Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Unified Diff: src/effects/SkLayerDrawLooper.cpp

Issue 1821533002: guard rasterizer and drawlooper setters (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: guard google3 Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/effects/SkBlurDrawLooper.cpp ('k') | src/effects/SkLayerRasterizer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkLayerDrawLooper.cpp
diff --git a/src/effects/SkLayerDrawLooper.cpp b/src/effects/SkLayerDrawLooper.cpp
index 83f21e5b405b46afb712377cc8c74c92036162f9..ae31482ae7bdf5ff3747680b902286a9447660a5 100644
--- a/src/effects/SkLayerDrawLooper.cpp
+++ b/src/effects/SkLayerDrawLooper.cpp
@@ -230,7 +230,7 @@ SkFlattenable* SkLayerDrawLooper::CreateProc(SkReadBuffer& buffer) {
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 @@ SkPaint* SkLayerDrawLooper::Builder::addLayerOnTop(const LayerInfo& info) {
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 @@ SkLayerDrawLooper* SkLayerDrawLooper::Builder::detachLooper() {
fRecs = nullptr;
fTopRec = nullptr;
- return looper;
+ return sk_sp<SkDrawLooper>(looper);
}
« no previous file with comments | « src/effects/SkBlurDrawLooper.cpp ('k') | src/effects/SkLayerRasterizer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698