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

Unified Diff: tools/debugger/SkDrawCommand.cpp

Issue 1852113003: switch maskfilters to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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
« tests/BlurTest.cpp ('K') | « tests/PaintTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/debugger/SkDrawCommand.cpp
diff --git a/tools/debugger/SkDrawCommand.cpp b/tools/debugger/SkDrawCommand.cpp
index d868418d54ba8b4506fbaa05bb38a2f88f6979ec..f8125dfb5a553555794469bde65439ccbcb4aa37 100644
--- a/tools/debugger/SkDrawCommand.cpp
+++ b/tools/debugger/SkDrawCommand.cpp
@@ -1147,8 +1147,7 @@ static void extract_json_paint_maskfilter(Json::Value& jsonPaint, UrlDataManager
Json::Value jsonMaskFilter = jsonPaint[SKDEBUGCANVAS_ATTRIBUTE_MASKFILTER];
SkMaskFilter* maskFilter = (SkMaskFilter*) load_flattenable(jsonMaskFilter, urlDataManager);
if (maskFilter != nullptr) {
- target->setMaskFilter(maskFilter);
- maskFilter->unref();
+ target->setMaskFilter(sk_ref_sp(maskFilter));
f(malita) 2016/04/04 13:46:57 I think this leaks: local ptr already holds a ref
f(malita) 2016/04/04 13:50:15 (maybe refactor as sk_sp<SkMaskFilter> maskFilter(
reed1 2016/04/04 16:34:48 Done.
}
}
}
@@ -1339,7 +1338,7 @@ static void extract_json_paint_blur(Json::Value& jsonPaint, SkPaint* target) {
SkASSERT(false);
flags = SkBlurMaskFilter::BlurFlags::kNone_BlurFlag;
}
- target->setMaskFilter(SkBlurMaskFilter::Create(style, sigma, flags));
+ target->setMaskFilter(SkBlurMaskFilter::Make(style, sigma, flags));
}
}
« tests/BlurTest.cpp ('K') | « tests/PaintTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698