aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPaint.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2016-03-22 07:23:24 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-22 07:23:24 -0700
commitf809d7687a4fb7b88b651b046da2bc0035d6aa09 (patch)
tree38fa4182df2c735459e43b0eaaa073c1ef8c612d /src/core/SkPaint.cpp
parentcfcd1819d1431bbe5812c174fc337d3678d63f06 (diff)
switch colorfilters to sk_sp
Diffstat (limited to 'src/core/SkPaint.cpp')
-rw-r--r--src/core/SkPaint.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp
index 19bdcaf0aa..6fe9d7599d 100644
--- a/src/core/SkPaint.cpp
+++ b/src/core/SkPaint.cpp
@@ -375,7 +375,9 @@ SET_PTR(Rasterizer)
#endif
SET_PTR(ImageFilter)
SET_PTR(Shader)
+#ifdef SK_SUPPORT_LEGACY_COLORFILTER_PTR
SET_PTR(ColorFilter)
+#endif
SET_PTR(Xfermode)
#ifdef SK_SUPPORT_LEGACY_PATHEFFECT_PTR
SET_PTR(PathEffect)
@@ -1940,7 +1942,7 @@ void SkPaint::unflatten(SkReadBuffer& buffer) {
this->setShader(buffer.readShader());
SkSafeUnref(this->setXfermode(buffer.readXfermode()));
SkSafeUnref(this->setMaskFilter(buffer.readMaskFilter()));
- SkSafeUnref(this->setColorFilter(buffer.readColorFilter()));
+ this->setColorFilter(buffer.readColorFilter());
this->setRasterizer(buffer.readRasterizer());
this->setLooper(buffer.readDrawLooper());
SkSafeUnref(this->setImageFilter(buffer.readImageFilter()));