diff options
author | Heather Miller <hcm@google.com> | 2016-11-10 21:25:30 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-11-10 21:25:44 +0000 |
commit | b613c266df48cf45296ecc23d1bd7098c84bb7ba (patch) | |
tree | 50f7d84a4238918bf5869ee760ed78332b2db946 /tools | |
parent | fac8db2df8b5cf6fd62189315bad0726d8e51f6d (diff) |
Revert "Change SkCanvas to *not* inherit from SkRefCnt"
This reverts commit 824075071885b6b741c141cbe2134d8345d34589.
Reason for revert: Breaking WebView (chromium:663959)
Original change's description:
> Change SkCanvas to *not* inherit from SkRefCnt
>
> Definitely tricky for classes like SkNWayCanvas, where the caller (today)
> need not pay attention to ownership of the canvases it gave the NWay
> (after this CL, the caller *must* managed ownership)
>
> BUG=skia:
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4441
>
> DOCS_PREVIEW= https://skia.org/?cl=4441
>
> Change-Id: Ib1ac07a3cdf0686d78e7aaa4735d45cc90bea081
> Reviewed-on: https://skia-review.googlesource.com/4441
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
>
TBR=djsollen@google.com,mtklein@google.com,halcanary@google.com,robertphillips@google.com,fmalita@chromium.org,fmalita@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I5e3b3e876b7d2c09833cf841801321033b6b968b
Reviewed-on: https://skia-review.googlesource.com/4687
Commit-Queue: Heather Miller <hcm@google.com>
Reviewed-by: Heather Miller <hcm@google.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lua/lua_pictures.cpp | 2 | ||||
-rw-r--r-- | tools/skiaserve/Request.h | 2 | ||||
-rw-r--r-- | tools/skp_parser.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/tools/lua/lua_pictures.cpp b/tools/lua/lua_pictures.cpp index 639a5227ee..bd8fda1569 100644 --- a/tools/lua/lua_pictures.cpp +++ b/tools/lua/lua_pictures.cpp @@ -145,7 +145,7 @@ int tool_main(int argc, char** argv) { auto pic(load_picture(path)); if (pic.get()) { - std::unique_ptr<SkLuaCanvas> canvas( + sk_sp<SkLuaCanvas> canvas( new SkLuaCanvas(SkScalarCeilToInt(pic->cullRect().width()), SkScalarCeilToInt(pic->cullRect().height()), L.get(), gAccumulateFunc)); diff --git a/tools/skiaserve/Request.h b/tools/skiaserve/Request.h index 4058d7ce7e..6b065a2bf8 100644 --- a/tools/skiaserve/Request.h +++ b/tools/skiaserve/Request.h @@ -63,7 +63,7 @@ struct Request { SkColor getPixel(int x, int y); UploadContext* fUploadContext; - std::unique_ptr<SkDebugCanvas> fDebugCanvas; + sk_sp<SkDebugCanvas> fDebugCanvas; UrlDataManager fUrlDataManager; private: diff --git a/tools/skp_parser.cpp b/tools/skp_parser.cpp index 887c50d182..d242524566 100644 --- a/tools/skp_parser.cpp +++ b/tools/skp_parser.cpp @@ -34,7 +34,7 @@ int main(int argc, char** argv) { SkISize size = pic->cullRect().roundOut().size(); SkDebugCanvas debugCanvas(size.width(), size.height()); pic->playback(&debugCanvas); - std::unique_ptr<SkCanvas> nullCanvas = SkMakeNullCanvas(); + sk_sp<SkCanvas> nullCanvas(SkCreateNullCanvas()); UrlDataManager dataManager(SkString("data")); Json::Value json = debugCanvas.toJSON( dataManager, debugCanvas.getSize(), nullCanvas.get()); |