diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-15 15:48:36 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-15 15:48:36 +0000 |
commit | 73cb15351f33459e0c861a96135c634dec77ef9d (patch) | |
tree | cf521a48286c5cd88354056e65a933cc63f8fbe1 /tests | |
parent | beb8b3a4da83ce30e313e72ae0e444870acecb7e (diff) |
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
Diffstat (limited to 'tests')
-rw-r--r-- | tests/PaintTest.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/PaintTest.cpp b/tests/PaintTest.cpp index c41e23ac54..cfbe23aa6f 100644 --- a/tests/PaintTest.cpp +++ b/tests/PaintTest.cpp @@ -147,7 +147,8 @@ DEF_TEST(Paint_copy, reporter) { paint.setTextAlign(SkPaint::kLeft_Align); paint.setStrokeWidth(SkIntToScalar(2)); // set a few pointers - SkLayerDrawLooper* looper = new SkLayerDrawLooper(); + SkLayerDrawLooper::Builder looperBuilder; + SkLayerDrawLooper* looper = looperBuilder.detachLooper(); paint.setLooper(looper)->unref(); SkMaskFilter* mask = SkBlurMaskFilter::Create(SkBlurMaskFilter::kNormal_BlurStyle, SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(1))); |