diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-02-27 11:47:36 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-02-27 11:47:36 +0000 |
commit | d957984c1efbd18f3b2bbeca78d282837c5a2ae1 (patch) | |
tree | 3509f6767590fc1ef77d395615526b72ac592089 /src/pipe | |
parent | 4472301607d74d014e717a6b113c4e53543b831b (diff) |
Factory methods for heap-allocated SkAnnotation 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 SkAnnotation non-public and instead
provides factory methods for creating these objects on the heap.
BUG=skia:2187
R=reed@google.com, mtklein@google.com, scroggo@google.com
Author: dominikg@chromium.org
Review URL: https://codereview.chromium.org/181703003
git-svn-id: http://skia.googlecode.com/svn/trunk@13605 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/pipe')
-rw-r--r-- | src/pipe/SkGPipeRead.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pipe/SkGPipeRead.cpp b/src/pipe/SkGPipeRead.cpp index 8827adc73f..aaa6b4c9c1 100644 --- a/src/pipe/SkGPipeRead.cpp +++ b/src/pipe/SkGPipeRead.cpp @@ -707,7 +707,7 @@ static void annotation_rp(SkCanvas*, SkReader32* reader, uint32_t op32, const size_t size = DrawOp_unpackData(op32); if (size > 0) { SkReadBuffer buffer(reader->skip(size), size); - p->setAnnotation(SkNEW_ARGS(SkAnnotation, (buffer)))->unref(); + p->setAnnotation(SkAnnotation::Create(buffer))->unref(); SkASSERT(buffer.offset() == size); } else { p->setAnnotation(NULL); |