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

Unified Diff: samplecode/SampleTextOnPath.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 | « include/effects/SkLayerDrawLooper.h ('k') | samplecode/SampleTiling.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleTextOnPath.cpp
diff --git a/samplecode/SampleTextOnPath.cpp b/samplecode/SampleTextOnPath.cpp
index f2b9af6732e92e89314f2c8240997920541fa692..6d79e2075517a1f3d034a956a0ea49b6767ae7d8 100644
--- a/samplecode/SampleTextOnPath.cpp
+++ b/samplecode/SampleTextOnPath.cpp
@@ -35,10 +35,10 @@ static void textStrokePath(SkCanvas* canvas) {
canvas->drawPath(path, paint);
- paint.setLooper(new SkBlurDrawLooper(SK_ColorBLACK,
- SkBlurMask::ConvertRadiusToSigma(0.002f),
- 0.0f,
- 0.0f))->unref();
+ paint.setLooper(SkBlurDrawLooper::Create(SK_ColorBLACK,
+ SkBlurMask::ConvertRadiusToSigma(0.002f),
+ 0.0f,
+ 0.0f))->unref();
const char* text = "DRAWING STROKED TEXT WITH A BLUR ON A PATH";
size_t len = strlen(text);
« no previous file with comments | « include/effects/SkLayerDrawLooper.h ('k') | samplecode/SampleTiling.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698