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

Unified Diff: tools/debugger/SkDrawCommand.h

Issue 2146073003: Creating framework for drawShadowedPicture (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Made changes to better hide changes from public 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 a7e6c73802bdee18e30d37f0efced17555376a0d..14a7af58827f268fe9bf2f9d674e217bfbe927a5 100644
--- a/tools/debugger/SkDrawCommand.h
+++ b/tools/debugger/SkDrawCommand.h
@@ -24,6 +24,7 @@ class SK_API SkDrawCommand {
public:
enum OpType {
kBeginDrawPicture_OpType,
+ kBeginDrawShadowedPicture_OpType,
kClipPath_OpType,
kClipRegion_OpType,
kClipRect_OpType,
@@ -52,6 +53,7 @@ public:
kDrawTextRSXform_OpType,
kDrawVertices_OpType,
kEndDrawPicture_OpType,
+ kEndDrawShadowedPicture_OpType,
kRestore_OpType,
kSave_OpType,
kSaveLayer_OpType,
@@ -455,6 +457,35 @@ private:
typedef SkDrawCommand INHERITED;
};
+class SkBeginDrawShadowedPictureCommand : public SkDrawCommand {
+public:
+ SkBeginDrawShadowedPictureCommand(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;
+ SkTLazy<SkMatrix> fMatrix;
+ SkTLazy<SkPaint> fPaint;
+
+ typedef SkDrawCommand INHERITED;
+};
+
+class SkEndDrawShadowedPictureCommand : public SkDrawCommand {
+public:
+ SkEndDrawShadowedPictureCommand(bool restore);
+
+ void execute(SkCanvas* canvas) const override;
+
+private:
+ bool fRestore;
+
+ typedef SkDrawCommand INHERITED;
+};
+
class SkDrawPointsCommand : public SkDrawCommand {
public:
SkDrawPointsCommand(SkCanvas::PointMode mode, size_t count, const SkPoint pts[],

Powered by Google App Engine
This is Rietveld 408576698