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

Unified Diff: src/core/SkPaint.cpp

Issue 181703003: Factory methods for heap-allocated SkAnnotation objects. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 10 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 | « src/core/SkAnnotation.cpp ('k') | src/pipe/SkGPipeRead.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPaint.cpp
diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp
index 9191ce00673d78eb39b429e0a0448b4f349a2de7..6c0991e0dd540dd2f718e18900f4e742b66dc45d 100644
--- a/src/core/SkPaint.cpp
+++ b/src/core/SkPaint.cpp
@@ -2164,7 +2164,7 @@ void SkPaint::unflatten(SkReadBuffer& buffer) {
SkSafeUnref(this->setImageFilter(buffer.readImageFilter()));
if (buffer.readBool()) {
- this->setAnnotation(SkNEW_ARGS(SkAnnotation, (buffer)))->unref();
+ this->setAnnotation(SkAnnotation::Create(buffer))->unref();
}
} else {
this->setPathEffect(NULL);
@@ -2684,7 +2684,7 @@ void SkPaint::FlatteningTraits::Unflatten(SkReadBuffer& buffer, SkPaint* paint)
#undef F
#undef F_UNREF
if (dirty & kAnnotation_DirtyBit) {
- paint->setAnnotation(SkNEW_ARGS(SkAnnotation, (buffer)))->unref();
+ paint->setAnnotation(SkAnnotation::Create(buffer))->unref();
}
#ifdef SK_BUILD_FOR_ANDROID
if (dirty & kPaintOptionsAndroid_DirtyBit) {
« no previous file with comments | « src/core/SkAnnotation.cpp ('k') | src/pipe/SkGPipeRead.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698