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

Unified Diff: src/utils/debugger/SkDrawCommand.h

Issue 912403004: Remove SkPictureFlat.h include from SkDrawCommands.h (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to ToT Created 5 years, 10 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/utils/debugger/SkDebugCanvas.cpp ('k') | src/utils/debugger/SkDrawCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/debugger/SkDrawCommand.h
diff --git a/src/utils/debugger/SkDrawCommand.h b/src/utils/debugger/SkDrawCommand.h
index ab72a88d718630210c654dd1dc7a0b540d593aa6..9ff1a9f65c8da3a8258895fee3dc6ecdd8d12fae 100644
--- a/src/utils/debugger/SkDrawCommand.h
+++ b/src/utils/debugger/SkDrawCommand.h
@@ -9,29 +9,56 @@
#ifndef SKDRAWCOMMAND_H_
#define SKDRAWCOMMAND_H_
-#include "SkPictureFlat.h"
#include "SkCanvas.h"
#include "SkString.h"
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
+ enum OpType {
+ kBeginCommentGroup_OpType,
+ kClipPath_OpType,
+ kClipRegion_OpType,
+ kClipRect_OpType,
+ kClipRRect_OpType,
+ kComment_OpType,
+ kConcat_OpType,
+ kDrawBitmap_OpType,
+ kDrawBitmapNine_OpType,
+ kDrawBitmapRect_OpType,
+ kDrawClear_OpType,
+ kDrawDRRect_OpType,
+ kDrawOval_OpType,
+ kDrawPaint_OpType,
+ kDrawPatch_OpType,
+ kDrawPath_OpType,
+ kDrawPicture_OpType,
+ kDrawPoints_OpType,
+ kDrawPosText_OpType,
+ kDrawPosTextH_OpType,
+ kDrawRect_OpType,
+ kDrawRRect_OpType,
+ kDrawSprite_OpType,
+ kDrawText_OpType,
+ kDrawTextBlob_OpType,
+ kDrawTextOnPath_OpType,
+ kDrawVertices_OpType,
+ kEndCommentGroup_OpType,
+ kRestore_OpType,
+ kSave_OpType,
+ kSaveLayer_OpType,
+ kSetMatrix_OpType,
+
+ kLast_OpType = kSetMatrix_OpType
+ };
+
+ static const int kOpTypeCount = kLast_OpType + 1;
- SkDrawCommand(DrawType drawType);
+ SkDrawCommand(OpType opType);
virtual ~SkDrawCommand();
@@ -41,7 +68,7 @@ public:
size_t offset() const { return fOffset; }
virtual const char* toCString() const {
- return GetCommandString(fDrawType);
+ return GetCommandString(fOpType);
}
bool isVisible() const {
@@ -73,17 +100,17 @@ public:
virtual void setActive(bool active) {}
virtual bool active() const { return false; }
- DrawType getType() const { return fDrawType; }
+ OpType getType() const { return fOpType; }
virtual bool render(SkCanvas* canvas) const { return false; }
- static const char* GetCommandString(DrawType type);
+ static const char* GetCommandString(OpType type);
protected:
SkTDArray<SkString*> fInfo;
private:
- DrawType fDrawType;
+ OpType fOpType;
size_t fOffset;
bool fVisible;
};
@@ -430,6 +457,24 @@ private:
typedef SkDrawCommand INHERITED;
};
+class SkDrawPatchCommand : public SkDrawCommand {
+public:
+ SkDrawPatchCommand(const SkPoint cubics[12], const SkColor colors[4],
+ const SkPoint texCoords[4], SkXfermode* xmode,
+ const SkPaint& paint);
+ void execute(SkCanvas* canvas) const SK_OVERRIDE;
+
+private:
+ SkPoint fCubics[12];
+ SkColor fColors[4];
+ SkPoint fTexCoords[4];
+ SkAutoTUnref<SkXfermode> fXfermode;
+ SkPaint fPaint;
+
+ typedef SkDrawCommand INHERITED;
+};
+
+
class SkDrawRectCommand : public SkDrawCommand {
public:
SkDrawRectCommand(const SkRect& rect, const SkPaint& paint);
@@ -508,16 +553,6 @@ private:
typedef SkDrawCommand INHERITED;
};
-class SkRotateCommand : public SkDrawCommand {
-public:
- SkRotateCommand(SkScalar degrees);
- void execute(SkCanvas* canvas) const SK_OVERRIDE;
-private:
- SkScalar fDegrees;
-
- typedef SkDrawCommand INHERITED;
-};
-
class SkSaveCommand : public SkDrawCommand {
public:
SkSaveCommand();
@@ -550,21 +585,6 @@ private:
typedef SkDrawCommand INHERITED;
};
-class SkScaleCommand : public SkDrawCommand {
-public:
- SkScaleCommand(SkScalar sx, SkScalar sy);
- void execute(SkCanvas* canvas) const SK_OVERRIDE;
-
- SkScalar x() const { return fSx; }
- SkScalar y() const { return fSy; }
-
-private:
- SkScalar fSx;
- SkScalar fSy;
-
- typedef SkDrawCommand INHERITED;
-};
-
class SkSetMatrixCommand : public SkDrawCommand {
public:
SkSetMatrixCommand(const SkMatrix& matrix);
@@ -577,30 +597,4 @@ private:
typedef SkDrawCommand INHERITED;
};
-class SkSkewCommand : public SkDrawCommand {
-public:
- SkSkewCommand(SkScalar sx, SkScalar sy);
- void execute(SkCanvas* canvas) const SK_OVERRIDE;
-private:
- SkScalar fSx;
- SkScalar fSy;
-
- typedef SkDrawCommand INHERITED;
-};
-
-class SkTranslateCommand : public SkDrawCommand {
-public:
- SkTranslateCommand(SkScalar dx, SkScalar dy);
- void execute(SkCanvas* canvas) const SK_OVERRIDE;
-
- SkScalar x() const { return fDx; }
- SkScalar y() const { return fDy; }
-
-private:
- SkScalar fDx;
- SkScalar fDy;
-
- typedef SkDrawCommand INHERITED;
-};
-
#endif
« no previous file with comments | « src/utils/debugger/SkDebugCanvas.cpp ('k') | src/utils/debugger/SkDrawCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698