From e22bab9954ab378e24d3b04436ac879e35909135 Mon Sep 17 00:00:00 2001 From: reed Date: Fri, 18 Mar 2016 19:18:18 -0700 Subject: disable SK_SUPPORT_LEGACY_PATHEFFECT_PTR for skia builds BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1820593002 TBR= Review URL: https://codereview.chromium.org/1820593002 --- src/animator/SkDrawExtraPathEffect.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/animator/SkDrawExtraPathEffect.cpp') 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(effect1->getPathEffect()); + auto e2 = sk_sp(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(); } ///////// -- cgit v1.2.3