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

Unified Diff: src/core/SkPicturePlayback.cpp

Issue 13957009: First pass at Comment API (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Addressed code review issues Created 7 years, 7 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/SkPictureFlat.h ('k') | src/core/SkPictureRecord.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPicturePlayback.cpp
===================================================================
--- src/core/SkPicturePlayback.cpp (revision 9288)
+++ src/core/SkPicturePlayback.cpp (working copy)
@@ -858,6 +858,18 @@
canvas.drawData(reader.skip(length), length);
// skip handles padding the read out to a multiple of 4
} break;
+ case BEGIN_COMMENT_GROUP: {
+ const char* desc = reader.readString();
+ canvas.beginCommentGroup(desc);
+ } break;
+ case COMMENT: {
+ const char* kywd = reader.readString();
+ const char* value = reader.readString();
+ canvas.addComment(kywd, value);
+ } break;
+ case END_COMMENT_GROUP: {
+ canvas.endCommentGroup();
+ } break;
case DRAW_OVAL: {
const SkPaint& paint = *getPaint(reader);
canvas.drawOval(reader.skipT<SkRect>(), paint);
« no previous file with comments | « src/core/SkPictureFlat.h ('k') | src/core/SkPictureRecord.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698