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

Unified Diff: src/core/SkPaint.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 | « samplecode/SampleUnpremul.cpp ('k') | src/core/SkReadBuffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPaint.cpp
diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp
index 331f7794bfe127b4a7b3641f6e81cc22857a4588..5baabd3f1deec5121da0572c3f9c089089d64626 100644
--- a/src/core/SkPaint.cpp
+++ b/src/core/SkPaint.cpp
@@ -370,7 +370,9 @@ void SkPaint::setLooper(sk_sp<SkDrawLooper> looper) { fLooper = std::move(looper
return f; \
}
SET_PTR(Typeface)
+#ifdef SK_SUPPORT_LEGACY_MINOR_EFFECT_PTR
SET_PTR(Rasterizer)
+#endif
SET_PTR(ImageFilter)
SET_PTR(Shader)
SET_PTR(ColorFilter)
@@ -381,10 +383,12 @@ SET_PTR(PathEffect)
SET_PTR(MaskFilter)
#undef SET_PTR
+#ifdef SK_SUPPORT_LEGACY_MINOR_EFFECT_PTR
SkDrawLooper* SkPaint::setLooper(SkDrawLooper* looper) {
fLooper.reset(SkSafeRef(looper));
return looper;
}
+#endif
SkXfermode* SkPaint::setXfermodeMode(SkXfermode::Mode mode) {
fXfermode.reset(SkXfermode::Create(mode));
@@ -1937,8 +1941,8 @@ void SkPaint::unflatten(SkReadBuffer& buffer) {
SkSafeUnref(this->setXfermode(buffer.readXfermode()));
SkSafeUnref(this->setMaskFilter(buffer.readMaskFilter()));
SkSafeUnref(this->setColorFilter(buffer.readColorFilter()));
- SkSafeUnref(this->setRasterizer(buffer.readRasterizer()));
- SkSafeUnref(this->setLooper(buffer.readDrawLooper()));
+ this->setRasterizer(buffer.readRasterizer());
+ this->setLooper(buffer.readDrawLooper());
SkSafeUnref(this->setImageFilter(buffer.readImageFilter()));
if (buffer.isVersionLT(SkReadBuffer::kAnnotationsMovedToCanvas_Version)) {
« no previous file with comments | « samplecode/SampleUnpremul.cpp ('k') | src/core/SkReadBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698