Index: src/core/SkRecordDraw.cpp |
diff --git a/src/core/SkRecordDraw.cpp b/src/core/SkRecordDraw.cpp |
index 8897e5fcf3bd0d6f3c6fceeb13aa15e03e89f185..dcfc0fbf900cfa9a7f3db184043362f8c7e1cba7 100644 |
--- a/src/core/SkRecordDraw.cpp |
+++ b/src/core/SkRecordDraw.cpp |
@@ -97,6 +97,16 @@ template <> void Draw::draw(const TranslateZ& r) { } |
DRAW(DrawDRRect, drawDRRect(r.outer, r.inner, r.paint)); |
DRAW(DrawImage, drawImage(r.image.get(), r.left, r.top, r.paint)); |
+ |
+template <> void Draw::draw(const DrawImageLattice& r) { |
+ SkCanvas::Lattice lattice; |
+ lattice.fXCount = r.xCount; |
+ lattice.fXDivs = r.xDivs; |
+ lattice.fYCount = r.yCount; |
+ lattice.fYDivs = r.yDivs; |
+ fCanvas->drawImageLattice(r.image.get(), lattice, r.dst, r.paint); |
+} |
+ |
DRAW(DrawImageRect, legacy_drawImageRect(r.image.get(), r.src, r.dst, r.paint, r.constraint)); |
DRAW(DrawImageNine, drawImageNine(r.image.get(), r.center, r.dst, r.paint)); |
DRAW(DrawOval, drawOval(r.oval, r.paint)); |
@@ -412,6 +422,9 @@ private: |
return this->adjustAndMap(rect, op.paint); |
} |
+ Bounds bounds(const DrawImageLattice& op) const { |
+ return this->adjustAndMap(op.dst, op.paint); |
+ } |
Bounds bounds(const DrawImageRect& op) const { |
return this->adjustAndMap(op.dst, op.paint); |
} |