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

Unified Diff: gm/circles.cpp

Issue 232913003: Make sure SkDrawLooper objects can only be allocated on the heap. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 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
« no previous file with comments | « gm/blurroundrect.cpp ('k') | gm/drawlooper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/circles.cpp
diff --git a/gm/circles.cpp b/gm/circles.cpp
index b4cfef28c1a0699a6dab5689e005e6a4fffdc086..ce833db6fdca9e48b7803b4359d0f43e95a8de97 100644
--- a/gm/circles.cpp
+++ b/gm/circles.cpp
@@ -81,12 +81,12 @@ protected:
SkPaint p;
p.setAntiAlias(true);
SkBlurDrawLooper* shadowLooper =
- new SkBlurDrawLooper (SK_ColorBLUE,
- SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(10)),
- SkIntToScalar(5), SkIntToScalar(10),
- SkBlurDrawLooper::kIgnoreTransform_BlurFlag |
- SkBlurDrawLooper::kOverrideColor_BlurFlag |
- SkBlurDrawLooper::kHighQuality_BlurFlag);
+ SkBlurDrawLooper::Create(SK_ColorBLUE,
+ SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(10)),
+ SkIntToScalar(5), SkIntToScalar(10),
+ SkBlurDrawLooper::kIgnoreTransform_BlurFlag |
+ SkBlurDrawLooper::kOverrideColor_BlurFlag |
+ SkBlurDrawLooper::kHighQuality_BlurFlag);
SkAutoUnref aurL0(shadowLooper);
p.setLooper(shadowLooper);
fPaints.push_back(p);
« no previous file with comments | « gm/blurroundrect.cpp ('k') | gm/drawlooper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698