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

Unified Diff: src/core/SkAnnotation.cpp

Issue 48523008: All SkAnnotations are no-draw. Propose we fold that through. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: deprecate Created 7 years, 2 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/SkPaint.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 f32164cb18c21ddbc8945b2b282590262252f230..837cb62ad43331e82a2dd03a3b91ce6c1fdaaccb 100644
--- a/src/core/SkAnnotation.cpp
+++ b/src/core/SkAnnotation.cpp
@@ -11,15 +11,13 @@
#include "SkPoint.h"
#include "SkStream.h"
-SkAnnotation::SkAnnotation(const char key[], SkData* value, uint32_t flags)
- : fKey(key) {
+SkAnnotation::SkAnnotation(const char key[], SkData* value) : fKey(key) {
if (NULL == value) {
value = SkData::NewEmpty();
} else {
value->ref();
}
fData = value;
- fFlags = flags;
}
SkAnnotation::~SkAnnotation() {
@@ -31,13 +29,11 @@ SkData* SkAnnotation::find(const char key[]) const {
}
SkAnnotation::SkAnnotation(SkFlattenableReadBuffer& buffer) {
- fFlags = buffer.readUInt();
buffer.readString(&fKey);
fData = buffer.readByteArrayAsData();
}
void SkAnnotation::writeToBuffer(SkFlattenableWriteBuffer& buffer) const {
- buffer.writeUInt(fFlags);
buffer.writeString(fKey.c_str());
buffer.writeDataAsByteArray(fData);
}
@@ -59,11 +55,7 @@ const char* SkAnnotationKeys::Link_Named_Dest_Key() {
#include "SkCanvas.h"
static void annotate_paint(SkPaint& paint, const char* key, SkData* value) {
- SkAnnotation* ann = SkNEW_ARGS(SkAnnotation, (key, value,
- SkAnnotation::kNoDraw_Flag));
-
- paint.setAnnotation(ann)->unref();
- SkASSERT(paint.isNoDrawAnnotation());
+ paint.setAnnotation(SkNEW_ARGS(SkAnnotation, (key, value)))->unref();
}
void SkAnnotateRectWithURL(SkCanvas* canvas, const SkRect& rect, SkData* value) {
« no previous file with comments | « include/core/SkPaint.h ('k') | src/core/SkPaint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698