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

Unified Diff: samplecode/SampleUnpremul.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 | « samplecode/SampleTiling.cpp ('k') | src/effects/SkBlurDrawLooper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleUnpremul.cpp
diff --git a/samplecode/SampleUnpremul.cpp b/samplecode/SampleUnpremul.cpp
index f2f60cc3129e7c3798ba35ccd66f3bcb157fb644..0b1848df95d4e1606a14ada1aa988795e9bae30f 100644
--- a/samplecode/SampleUnpremul.cpp
+++ b/samplecode/SampleUnpremul.cpp
@@ -85,10 +85,10 @@ protected:
SkPaint paint;
paint.setAntiAlias(true);
paint.setTextSize(SkIntToScalar(24));
- SkAutoTUnref<SkBlurDrawLooper> looper(SkNEW_ARGS(SkBlurDrawLooper,
- (SK_ColorBLUE,
- SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(2)),
- 0, 0)));
+ SkAutoTUnref<SkBlurDrawLooper> looper(
+ SkBlurDrawLooper::Create(SK_ColorBLUE,
+ SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(2)),
+ 0, 0));
paint.setLooper(looper);
SkScalar height = paint.getFontMetrics(NULL);
if (!fDecodeSucceeded) {
« no previous file with comments | « samplecode/SampleTiling.cpp ('k') | src/effects/SkBlurDrawLooper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698