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

Unified Diff: tools/debugger/SkDrawCommand.h

Issue 2127233002: Added the framework for having canvas/recorder/picture record depth_set's. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Updated requested changes (more functions, added to Debug, etc) Created 4 years, 5 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
Index: tools/debugger/SkDrawCommand.h
diff --git a/tools/debugger/SkDrawCommand.h b/tools/debugger/SkDrawCommand.h
index 8b8ada267fa8845f1fa243f60bfe205f8891715b..753772087c069c54ddfa0f222df1dbef19a6ce91 100644
--- a/tools/debugger/SkDrawCommand.h
+++ b/tools/debugger/SkDrawCommand.h
@@ -54,8 +54,9 @@ public:
kSave_OpType,
kSaveLayer_OpType,
kSetMatrix_OpType,
+ kSetZ_OpType,
- kLast_OpType = kSetMatrix_OpType
+ kLast_OpType = kSetZ_OpType
};
static const int kOpTypeCount = kLast_OpType + 1;
@@ -123,6 +124,7 @@ public:
static Json::Value MakeJsonRect(const SkRect& rect);
static Json::Value MakeJsonIRect(const SkIRect&);
static Json::Value MakeJsonMatrix(const SkMatrix&);
+ static Json::Value MakeJsonScalar(const SkScalar);
static Json::Value MakeJsonPath(const SkPath& path);
static Json::Value MakeJsonRegion(const SkRegion& region);
static Json::Value MakeJsonPaint(const SkPaint& paint, UrlDataManager& urlDataManager);
@@ -709,4 +711,16 @@ private:
typedef SkDrawCommand INHERITED;
};
+class SkSetZCommand : public SkDrawCommand {
+public:
robertphillips 2016/07/08 17:26:43 no const
vjiaoblack 2016/07/11 18:04:42 Done.
+ SkSetZCommand(const SkScalar);
+ void execute(SkCanvas* canvas) const override;
+ Json::Value toJSON(UrlDataManager& urlDataManager) const override;
+ static SkSetZCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager);
+
+private:
+ SkScalar fCurDrawDepth;
+
+ typedef SkDrawCommand INHERITED;
+};
#endif

Powered by Google App Engine
This is Rietveld 408576698