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
This commit is contained in:
robertphillips 2015-02-12 06:37:12 -08:00 committed by Commit bot
parent 19e0058a65
commit 72942b8eb5
2 changed files with 26 additions and 1 deletions

View File

@ -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";

View File

@ -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();