Index: src/core/SkPaint.cpp |
diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp |
index 2d6c72714d2169041df645a70b91f01c1d8fd1fd..5e813f78c4d009c0ee56648b7ae66463a95bfdcb 100644 |
--- a/src/core/SkPaint.cpp |
+++ b/src/core/SkPaint.cpp |
@@ -375,6 +375,7 @@ |
SET_PTR(Shader) |
SET_PTR(ColorFilter) |
SET_PTR(Xfermode) |
+SET_PTR(PathEffect) |
SET_PTR(MaskFilter) |
#undef SET_PTR |
@@ -1929,7 +1930,7 @@ |
} |
if (flatFlags & kHasEffects_FlatFlag) { |
- this->setPathEffect(buffer.readPathEffect()); |
+ SkSafeUnref(this->setPathEffect(buffer.readPathEffect())); |
this->setShader(buffer.readShader()); |
SkSafeUnref(this->setXfermode(buffer.readXfermode())); |
SkSafeUnref(this->setMaskFilter(buffer.readMaskFilter())); |
@@ -2249,11 +2250,11 @@ |
fCache = fPaint.detachCache(nullptr, SkPaint::FakeGamma::On, nullptr); |
SkPaint::Style style = SkPaint::kFill_Style; |
- sk_sp<SkPathEffect> pe; |
+ SkPathEffect* pe = nullptr; |
if (!applyStrokeAndPathEffects) { |
style = paint.getStyle(); // restore |
- pe = sk_ref_sp(paint.getPathEffect()); // restore |
+ pe = paint.getPathEffect(); // restore |
} |
fPaint.setStyle(style); |
fPaint.setPathEffect(pe); |