Add drawBitmapLattice to SkDebugCanvas

One more step to full coverage of SkCanvas API. (Also, it would be nice
to implement fromJSON for both lattice types, I'll attempt that in a
follow up CL).

Change-Id: I5fe55ca90b7859e40f5e8ec83bc12b7938674b60
Reviewed-on: https://skia-review.googlesource.com/129245
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
diff --git a/tools/debugger/SkDrawCommand.h b/tools/debugger/SkDrawCommand.h
index 257029c..a52eb43 100644
--- a/tools/debugger/SkDrawCommand.h
+++ b/tools/debugger/SkDrawCommand.h
@@ -35,6 +35,7 @@
         kConcat_OpType,
         kDrawAnnotation_OpType,
         kDrawBitmap_OpType,
+        kDrawBitmapLattice_OpType,
         kDrawBitmapNine_OpType,
         kDrawBitmapRect_OpType,
         kDrawDRRect_OpType,
@@ -265,6 +266,25 @@
     typedef SkDrawCommand INHERITED;
 };
 
+class SkDrawBitmapLatticeCommand : public SkDrawCommand {
+public:
+    SkDrawBitmapLatticeCommand(const SkBitmap& bitmap, const SkCanvas::Lattice& lattice,
+                               const SkRect& dst, const SkPaint* paint);
+    void execute(SkCanvas* canvas) const override;
+    bool render(SkCanvas* canvas) const override;
+    Json::Value toJSON(UrlDataManager& urlDataManager) const override;
+    static SkDrawBitmapLatticeCommand* fromJSON(Json::Value& command,
+                                                UrlDataManager& urlDataManager);
+
+private:
+    SkBitmap          fBitmap;
+    SkCanvas::Lattice fLattice;
+    SkRect            fDst;
+    SkTLazy<SkPaint>  fPaint;
+
+    typedef SkDrawCommand INHERITED;
+};
+
 class SkDrawBitmapNineCommand : public SkDrawCommand {
 public:
     SkDrawBitmapNineCommand(const SkBitmap& bitmap, const SkIRect& center,