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

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

Issue 1048383002: [SkDebugger] Flatten drawPicture ops (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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 760ce520525ac74a3f7a913ea6cbd4c20d514837..538dd23c209218fa9927e6604005e1bc43947654 100644
--- a/src/utils/debugger/SkDrawCommand.h
+++ b/src/utils/debugger/SkDrawCommand.h
@@ -16,6 +16,7 @@ class SK_API SkDrawCommand {
public:
enum OpType {
kBeginCommentGroup_OpType,
+ kBeginDrawPicture_OpType,
kClipPath_OpType,
kClipRegion_OpType,
kClipRect_OpType,
@@ -31,7 +32,6 @@ public:
kDrawPaint_OpType,
kDrawPatch_OpType,
kDrawPath_OpType,
- kDrawPicture_OpType,
kDrawPoints_OpType,
kDrawPosText_OpType,
kDrawPosTextH_OpType,
@@ -43,6 +43,7 @@ public:
kDrawTextOnPath_OpType,
kDrawVertices_OpType,
kEndCommentGroup_OpType,
+ kEndDrawPicture_OpType,
kRestore_OpType,
kSave_OpType,
kSaveLayer_OpType,
@@ -337,18 +338,31 @@ private:
typedef SkDrawCommand INHERITED;
};
-class SkDrawPictureCommand : public SkDrawCommand {
+class SkBeginDrawPictureCommand : public SkDrawCommand {
public:
- SkDrawPictureCommand(const SkPicture* picture, const SkMatrix* matrix, const SkPaint* paint);
+ SkBeginDrawPictureCommand(const SkPicture* picture,
+ const SkMatrix* matrix,
+ const SkPaint* paint);
+
void execute(SkCanvas* canvas) const override;
bool render(SkCanvas* canvas) const override;
private:
SkAutoTUnref<const SkPicture> fPicture;
- SkMatrix fMatrix;
- SkMatrix* fMatrixPtr;
- SkPaint fPaint;
- SkPaint* fPaintPtr;
+ SkTLazy<SkMatrix> fMatrix;
+ SkTLazy<SkPaint> fPaint;
+
+ typedef SkDrawCommand INHERITED;
+};
+
+class SkEndDrawPictureCommand : public SkDrawCommand {
+public:
+ SkEndDrawPictureCommand(bool restore);
+
+ void execute(SkCanvas* canvas) const override;
+
+private:
+ bool fRestore;
typedef SkDrawCommand INHERITED;
};
« 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