diff options
author | Brian Osman <brianosman@google.com> | 2018-05-29 11:23:35 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-05-29 15:44:35 +0000 |
commit | 616f1cb4564229322944234ee20fc96ab5716464 (patch) | |
tree | f5ff5c07b4897efb4ed7e04e071395f85aac88b5 /tools/debugger/SkDrawCommand.h | |
parent | ae0f6cc345b193243353578883169fa055806468 (diff) |
Added drawAtlas support to SkDebugCanvas
No serialization yet (like drawVertices, etc...), but should support
capture and playback.
Change-Id: I7b54cc95fb828471a8faa6abd4eaca0ad0d2cb70
Reviewed-on: https://skia-review.googlesource.com/130503
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Diffstat (limited to 'tools/debugger/SkDrawCommand.h')
-rw-r--r-- | tools/debugger/SkDrawCommand.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/debugger/SkDrawCommand.h b/tools/debugger/SkDrawCommand.h index a52eb43762..5a14c4fbff 100644 --- a/tools/debugger/SkDrawCommand.h +++ b/tools/debugger/SkDrawCommand.h @@ -60,6 +60,7 @@ public: kDrawTextOnPath_OpType, kDrawTextRSXform_OpType, kDrawVertices_OpType, + kDrawAtlas_OpType, kEndDrawPicture_OpType, kRestore_OpType, kSave_OpType, @@ -742,6 +743,25 @@ private: typedef SkDrawCommand INHERITED; }; +class SkDrawAtlasCommand : public SkDrawCommand { +public: + SkDrawAtlasCommand(const SkImage*, const SkRSXform[], const SkRect[], const SkColor[], int, + SkBlendMode, const SkRect*, const SkPaint*); + + void execute(SkCanvas* canvas) const override; + +private: + sk_sp<const SkImage> fImage; + SkTDArray<SkRSXform> fXform; + SkTDArray<SkRect> fTex; + SkTDArray<SkColor> fColors; + SkBlendMode fBlendMode; + SkTLazy<SkRect> fCull; + SkTLazy<SkPaint> fPaint; + + typedef SkDrawCommand INHERITED; +}; + class SkSaveCommand : public SkDrawCommand { public: SkSaveCommand(); |