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

Unified Diff: src/animator/SkDrawExtraPathEffect.cpp

Issue 1820593002: disable SK_SUPPORT_LEGACY_PATHEFFECT_PTR for skia builds (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/animator/SkDrawDiscrete.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/animator/SkDrawExtraPathEffect.cpp
diff --git a/src/animator/SkDrawExtraPathEffect.cpp b/src/animator/SkDrawExtraPathEffect.cpp
index 4fa76c65c9a1dedd00bcdb6d5d0eb1690b13c13e..a444bc1cb334aa92fdcef0c5d2e108e5def0fff3 100644
--- a/src/animator/SkDrawExtraPathEffect.cpp
+++ b/src/animator/SkDrawExtraPathEffect.cpp
@@ -379,12 +379,9 @@ bool SkDrawComposePathEffect::addChild(SkAnimateMaker& , SkDisplayable* child) {
}
SkPathEffect* SkDrawComposePathEffect::getPathEffect() {
- SkPathEffect* e1 = effect1->getPathEffect();
- SkPathEffect* e2 = effect2->getPathEffect();
- SkPathEffect* composite = SkComposePathEffect::Create(e1, e2);
- e1->unref();
- e2->unref();
- return composite;
+ auto e1 = sk_sp<SkPathEffect>(effect1->getPathEffect());
+ auto e2 = sk_sp<SkPathEffect>(effect2->getPathEffect());
+ return SkComposePathEffect::Make(e1, e2).release();
}
bool SkDrawComposePathEffect::isPaint() const {
@@ -411,7 +408,7 @@ SkDrawCornerPathEffect::~SkDrawCornerPathEffect() {
}
SkPathEffect* SkDrawCornerPathEffect::getPathEffect() {
- return SkCornerPathEffect::Create(radius);
+ return SkCornerPathEffect::Make(radius).release();
}
/////////
« no previous file with comments | « src/animator/SkDrawDiscrete.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698