Index: src/core/SkRecorder.cpp |
diff --git a/src/core/SkRecorder.cpp b/src/core/SkRecorder.cpp |
index 2e14c3e25d6c9b6b5a321b92e1d765801d701089..df3e1d8fa51636c1f22a9f39718508cdb076f94b 100644 |
--- a/src/core/SkRecorder.cpp |
+++ b/src/core/SkRecorder.cpp |
@@ -82,6 +82,13 @@ char* SkRecorder::copy(const char src[], size_t count) { |
return dst; |
} |
+// As above, assuming and copying a terminating \0. |
+template <> |
+char* SkRecorder::copy(const char* src) { |
+ return this->copy(src, strlen(src)+1); |
+} |
+ |
+ |
void SkRecorder::clear(SkColor color) { |
APPEND(Clear, color); |
} |
@@ -276,3 +283,15 @@ void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { |
INHERITED(onClipRegion, deviceRgn, op); |
APPEND(ClipRegion, this->devBounds(), delay_copy(deviceRgn), op); |
} |
+ |
+void SkRecorder::beginCommentGroup(const char* description) { |
+ APPEND(BeginCommentGroup, this->copy(description)); |
+} |
+ |
+void SkRecorder::addComment(const char* key, const char* value) { |
+ APPEND(AddComment, this->copy(key), this->copy(value)); |
+} |
+ |
+void SkRecorder::endCommentGroup() { |
+ APPEND(EndCommentGroup); |
+} |