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

Unified Diff: gm/imagefilters.cpp

Issue 1518643002: SkBlurImageFilter returns input when sigma = 0 (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: safe refcnt Created 5 years 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
Index: gm/imagefilters.cpp
diff --git a/gm/imagefilters.cpp b/gm/imagefilters.cpp
index af2c776ce186e77d8e72b6bb4a0d9d81d984da5e..ff8a69054acfe7b385b60b406fe5cd436e5b365b 100644
--- a/gm/imagefilters.cpp
+++ b/gm/imagefilters.cpp
@@ -87,7 +87,8 @@ DEF_SIMPLE_GM(fast_slow_blurimagefilter, canvas, 620, 260) {
canvas->translate(10, 10);
for (SkScalar sigma = 8; sigma <= 128; sigma *= 2) {
SkPaint paint;
- paint.setImageFilter(SkBlurImageFilter::Create(sigma, sigma))->unref();
+ SkAutoTUnref<SkImageFilter> blur(SkBlurImageFilter::Create(sigma, sigma));
+ paint.setImageFilter(blur.get());
canvas->save();
// we outset the clip by 1, to fall out of the fast-case in drawImage

Powered by Google App Engine
This is Rietveld 408576698