Make sure SkDrawLooper objects can only be allocated on the heap.
Make constructors of SkLayerDrawLooper and SkBlurDrawLooper non-public.
Remove addLayer* methods from SkLayerDrawLooper. SkLayerDrawLooper::Builder is
used to create new objects.
Provide factory method for creating SkBlurDrawLooper.
BUG=2141
R=scroggo@google.com, reed@google.com, djsollen@google.com
Author: dominikg@chromium.org
Review URL: https://codereview.chromium.org/232913003
git-svn-id: http://skia.googlecode.com/svn/trunk@14200 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/samplecode/SampleTextOnPath.cpp b/samplecode/SampleTextOnPath.cpp
index f2b9af6..6d79e20 100644
--- a/samplecode/SampleTextOnPath.cpp
+++ b/samplecode/SampleTextOnPath.cpp
@@ -35,10 +35,10 @@
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);