aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/animator/SkDrawExtraPathEffect.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2016-03-18 19:18:18 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-18 19:18:18 -0700
commite22bab9954ab378e24d3b04436ac879e35909135 (patch)
tree655b00c48703e1221fc5aefd1fb169105b4e2f10 /src/animator/SkDrawExtraPathEffect.cpp
parentd15750c0c7766ecab7022ea9b2f9e89a9132cbc2 (diff)
disable SK_SUPPORT_LEGACY_PATHEFFECT_PTR for skia builds
Diffstat (limited to 'src/animator/SkDrawExtraPathEffect.cpp')
-rw-r--r--src/animator/SkDrawExtraPathEffect.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/animator/SkDrawExtraPathEffect.cpp b/src/animator/SkDrawExtraPathEffect.cpp
index 4fa76c65c9..a444bc1cb3 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();
}
/////////