Index: src/core/SkPictureRecord.cpp |
diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp |
index 2822a1ac1643a2c0681418b79ae1ec75baf4c326..2718ee999df0ea2d03e1c35ae3dbdc46d3fc5141 100644 |
--- a/src/core/SkPictureRecord.cpp |
+++ b/src/core/SkPictureRecord.cpp |
@@ -777,6 +777,18 @@ void SkPictureRecord::onDrawAtlas(const SkImage* atlas, const SkRSXform xform[], |
this->validate(initialOffset, size); |
} |
+void SkPictureRecord::onDrawAnnotation(const SkRect& rect, const char key[], SkData* value) { |
+ size_t keyLen = fWriter.WriteStringSize(key); |
+ size_t valueLen = fWriter.WriteDataSize(value); |
+ size_t size = 4 + sizeof(SkRect) + keyLen + valueLen; |
+ |
+ size_t initialOffset = this->addDraw(DRAW_ANNOTATION, &size); |
+ this->addRect(rect); |
+ fWriter.writeString(key); |
+ fWriter.writeData(value); |
+ this->validate(initialOffset, size); |
+} |
+ |
/////////////////////////////////////////////////////////////////////////////// |
SkSurface* SkPictureRecord::onNewSurface(const SkImageInfo& info, const SkSurfaceProps&) { |