aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2015-02-12 06:37:12 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-02-12 06:37:12 -0800
commit72942b8eb56f17e9303380d4e8492f66e9330578 (patch)
tree61696a88c8151f2923d903595f816955b140975c
parent19e0058a650a9e4dc9c35ed26c5e91916bcc0601 (diff)
Add staging for Chromium
This staging is needed to land https://codereview.chromium.org/912403004/ (Remove SkPictureFlat.h include from SkDrawCommands.h) Review URL: https://codereview.chromium.org/916983002
-rw-r--r--src/utils/debugger/SkDrawCommand.cpp11
-rw-r--r--src/utils/debugger/SkDrawCommand.h16
2 files changed, 26 insertions, 1 deletions
diff --git a/src/utils/debugger/SkDrawCommand.cpp b/src/utils/debugger/SkDrawCommand.cpp
index 47b29f731f..0804797692 100644
--- a/src/utils/debugger/SkDrawCommand.cpp
+++ b/src/utils/debugger/SkDrawCommand.cpp
@@ -14,6 +14,15 @@
// TODO(chudy): Refactor into non subclass model.
+const char* SkDrawCommand::kDrawRectString = "Draw Rect";
+const char* SkDrawCommand::kClipRectString = "Clip Rect";
+
+const SkDrawCommand::OpType SkDrawCommand::kSave_OpType = SAVE;
+const SkDrawCommand::OpType SkDrawCommand::kClipRect_OpType = CLIP_RECT;
+const SkDrawCommand::OpType SkDrawCommand::kDrawRect_OpType = DRAW_RECT;
+const SkDrawCommand::OpType SkDrawCommand::kRestore_OpType = RESTORE;
+const SkDrawCommand::OpType SkDrawCommand::kSetMatrix_OpType = SET_MATRIX;
+
SkDrawCommand::SkDrawCommand(DrawType type)
: fDrawType(type)
, fOffset(0)
@@ -57,7 +66,7 @@ const char* SkDrawCommand::GetCommandString(DrawType type) {
case SAVE: return "Save";
case SAVE_LAYER: return "Save Layer";
case SCALE: return "Scale";
- case SET_MATRIX: return "Set Matrix";
+ case SET_MATRIX: return "SetMatrix";
case SKEW: return "Skew";
case TRANSLATE: return "Translate";
case NOOP: return "NoOp";
diff --git a/src/utils/debugger/SkDrawCommand.h b/src/utils/debugger/SkDrawCommand.h
index 746bf5979c..ab72a88d71 100644
--- a/src/utils/debugger/SkDrawCommand.h
+++ b/src/utils/debugger/SkDrawCommand.h
@@ -15,6 +15,22 @@
class SK_API SkDrawCommand {
public:
+ // Staging for Chromium
+ typedef DrawType OpType;
+
+ static const int kOpTypeCount = LAST_DRAWTYPE_ENUM+1;
+
+ static const char* kDrawRectString;
+ static const char* kClipRectString;
+
+ static const OpType kSave_OpType;
+ static const OpType kClipRect_OpType;
+ static const OpType kDrawRect_OpType;
+ static const OpType kRestore_OpType;
+ static const OpType kSetMatrix_OpType;
+ // End Staging
+
+
SkDrawCommand(DrawType drawType);
virtual ~SkDrawCommand();