From 616f1cb4564229322944234ee20fc96ab5716464 Mon Sep 17 00:00:00 2001 From: Brian Osman Date: Tue, 29 May 2018 11:23:35 -0400 Subject: 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 Commit-Queue: Mike Klein Auto-Submit: Brian Osman Reviewed-by: Mike Klein --- tools/debugger/SkDrawCommand.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'tools/debugger/SkDrawCommand.h') 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 fImage; + SkTDArray fXform; + SkTDArray fTex; + SkTDArray fColors; + SkBlendMode fBlendMode; + SkTLazy fCull; + SkTLazy fPaint; + + typedef SkDrawCommand INHERITED; +}; + class SkSaveCommand : public SkDrawCommand { public: SkSaveCommand(); -- cgit v1.2.3