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>
diff --git a/tools/debugger/SkDrawCommand.h b/tools/debugger/SkDrawCommand.h
index a52eb43..5a14c4f 100644
--- a/tools/debugger/SkDrawCommand.h
+++ b/tools/debugger/SkDrawCommand.h
@@ -60,6 +60,7 @@
         kDrawTextOnPath_OpType,
         kDrawTextRSXform_OpType,
         kDrawVertices_OpType,
+        kDrawAtlas_OpType,
         kEndDrawPicture_OpType,
         kRestore_OpType,
         kSave_OpType,
@@ -742,6 +743,25 @@
     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();