Index: src/core/SkPictureRecord.cpp |
diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp |
index 4cba3b067f2d2e1bd1d72853480785399ffdc60e..6325edae00e7fa0ba3ab7104612ae9af2f517591 100644 |
--- a/src/core/SkPictureRecord.cpp |
+++ b/src/core/SkPictureRecord.cpp |
@@ -540,7 +540,7 @@ void SkPictureRecord::onDrawImageLattice(const SkImage* image, const Lattice& la |
// xCount + xDivs + yCount+ yDivs |
int flagCount = (nullptr == lattice.fFlags) ? 0 : (lattice.fXCount + 1) * (lattice.fYCount + 1); |
size_t latticeSize = (1 + lattice.fXCount + 1 + lattice.fYCount + 1) * kUInt32Size + |
- SkAlign4(flagCount * sizeof(SkCanvas::Lattice::Flags)); |
+ SkAlign4(flagCount * sizeof(SkCanvas::Lattice::Flags)) + sizeof(SkIRect); |
// op + paint index + image index + lattice + dst rect |
size_t size = 3 * kUInt32Size + latticeSize + sizeof(dst); |
@@ -553,6 +553,8 @@ void SkPictureRecord::onDrawImageLattice(const SkImage* image, const Lattice& la |
fWriter.writePad(lattice.fYDivs, lattice.fYCount * kUInt32Size); |
this->addInt(flagCount); |
fWriter.writePad(lattice.fFlags, flagCount * sizeof(SkCanvas::Lattice::Flags)); |
+ SkASSERT(lattice.fBounds); |
+ this->addIRect(*lattice.fBounds); |
this->addRect(dst); |
this->validate(initialOffset, size); |
} |