commit | 7b380d0d0e91ae6967c52bfa14853a77b9551de4 | [log] [tgz] |
---|---|---|
author | reed <reed@google.com> | Mon Mar 21 13:25:16 2016 -0700 |
committer | Commit bot <commit-bot@chromium.org> | Mon Mar 21 13:25:16 2016 -0700 |
tree | e76ea25f431624e01b51ca605761438fd4560120 | |
parent | dc6c9bf91c158e89cd9d5ef19dfbf1da98c598a6 [diff] [blame] |
guard rasterizer and drawlooper setters Need to land https://codereview.chromium.org/1823513002/ first BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1821533002 Review URL: https://codereview.chromium.org/1821533002
diff --git a/src/effects/SkLayerDrawLooper.cpp b/src/effects/SkLayerDrawLooper.cpp index 83f21e5..ae31482 100644 --- a/src/effects/SkLayerDrawLooper.cpp +++ b/src/effects/SkLayerDrawLooper.cpp
@@ -230,7 +230,7 @@ info.fPostTranslate = buffer.readBool(); buffer.readPaint(builder.addLayerOnTop(info)); } - return builder.detachLooper(); + return builder.detach().release(); } #ifndef SK_IGNORE_TO_STRING @@ -344,7 +344,7 @@ return &rec->fPaint; } -SkLayerDrawLooper* SkLayerDrawLooper::Builder::detachLooper() { +sk_sp<SkDrawLooper> SkLayerDrawLooper::Builder::detach() { SkLayerDrawLooper* looper = new SkLayerDrawLooper; looper->fCount = fCount; looper->fRecs = fRecs; @@ -353,5 +353,5 @@ fRecs = nullptr; fTopRec = nullptr; - return looper; + return sk_sp<SkDrawLooper>(looper); }