aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/samplerstress.cpp
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-21 10:13:32 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-21 10:13:32 +0000
commit7c9d0f3104408a64d52b84643f116179022d73bd (patch)
tree85aa1d482887cfed57315f1ce8f1d928001236ae /gm/samplerstress.cpp
parent0b45dc45d67144421904555ccf53782cc8d9969d (diff)
Factory methods for heap-allocated SkMaskFilter objects.
This is part of an effort to ensure that all SkPaint effects can only be allocated on the heap. This patch makes the constructors of SkMaskFilter and its subclasses non-public and instead provides factory methods for creating these objects on the heap. We temporarily keep constructor of publicly visible classes public behind a flag. BUG=skia:2187 R=scroggo@google.com, mtklein@google.com, reed@google.com Author: dominikg@chromium.org Review URL: https://codereview.chromium.org/173633003 git-svn-id: http://skia.googlecode.com/svn/trunk@13527 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm/samplerstress.cpp')
-rw-r--r--gm/samplerstress.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/gm/samplerstress.cpp b/gm/samplerstress.cpp
index 2ddac3a1ae..4303118d07 100644
--- a/gm/samplerstress.cpp
+++ b/gm/samplerstress.cpp
@@ -83,7 +83,7 @@ protected:
return;
}
- fMaskFilter.reset(SkNEW(SkStippleMaskFilter));
+ fMaskFilter.reset(SkStippleMaskFilter::Create());
}
virtual void onDraw(SkCanvas* canvas) {