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

Unified Diff: src/core/SkAnnotation.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 | « include/core/SkAnnotation.h ('k') | src/core/SkPaint.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkAnnotation.cpp
diff --git a/src/core/SkAnnotation.cpp b/src/core/SkAnnotation.cpp
index 6ba645ffed578dd940a7ec2fd9ae0e532b034a50..bddff64db84c6dff3dcd200f6942a5848e27bd1d 100644
--- a/src/core/SkAnnotation.cpp
+++ b/src/core/SkAnnotation.cpp
@@ -56,7 +56,7 @@ const char* SkAnnotationKeys::Link_Named_Dest_Key() {
#include "SkCanvas.h"
static void annotate_paint(SkPaint& paint, const char* key, SkData* value) {
- paint.setAnnotation(SkNEW_ARGS(SkAnnotation, (key, value)))->unref();
+ paint.setAnnotation(SkAnnotation::Create(key, value))->unref();
}
void SkAnnotateRectWithURL(SkCanvas* canvas, const SkRect& rect, SkData* value) {
« no previous file with comments | « include/core/SkAnnotation.h ('k') | src/core/SkPaint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698