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

Unified Diff: debugger/SkDrawCommand.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 | « debugger/SkDrawCommand.h ('k') | gm/rects.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: debugger/SkDrawCommand.cpp
===================================================================
--- debugger/SkDrawCommand.cpp (revision 9288)
+++ debugger/SkDrawCommand.cpp (working copy)
@@ -12,6 +12,11 @@
// TODO(chudy): Refactor into non subclass model.
+SkDrawCommand::SkDrawCommand(DrawType type)
+ : fDrawType(type)
+ , fVisible(true) {
+}
+
SkDrawCommand::SkDrawCommand() {
fVisible = true;
}
@@ -56,6 +61,9 @@
case SKEW: return "Skew";
case TRANSLATE: return "Translate";
case NOOP: return "NoOp";
+ case BEGIN_COMMENT_GROUP: return "BeginCommentGroup";
+ case COMMENT: return "Comment";
+ case END_COMMENT_GROUP: return "EndCommentGroup";
default:
SkDebugf("DrawType error 0x%08x\n", type);
SkASSERT(0);
@@ -298,6 +306,26 @@
canvas->drawData(fData, fLength);
}
+BeginCommentGroup::BeginCommentGroup(const char* description)
+ : INHERITED(BEGIN_COMMENT_GROUP)
+ , fDescription(description) {
+ SkString* temp = new SkString;
+ temp->appendf("Description: %s", description);
+ fInfo.push(temp);
+}
+
+Comment::Comment(const char* kywd, const char* value)
+ : INHERITED(COMMENT)
+ , fKywd(kywd)
+ , fValue(value) {
+ SkString* temp = new SkString;
+ temp->appendf("%s: %s", kywd, value);
+ fInfo.push(temp);
+}
+
+EndCommentGroup::EndCommentGroup() : INHERITED(END_COMMENT_GROUP) {
+}
+
DrawOval::DrawOval(const SkRect& oval, const SkPaint& paint) {
fOval = oval;
fPaint = paint;
« no previous file with comments | « debugger/SkDrawCommand.h ('k') | gm/rects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698