Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Unified Diff: src/core/SkPicturePlayback.cpp

Issue 2305433002: Add option to skip rects to drawImageLattice() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: numRectsToDraw() Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/core/SkPicturePlayback.cpp
diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp
index 3df64227a6de169c19ebc6700a02d2a92fb47662..2b623f6216d9753e1edb5f5784636432c867f71d 100644
--- a/src/core/SkPicturePlayback.cpp
+++ b/src/core/SkPicturePlayback.cpp
@@ -316,6 +316,9 @@ void SkPicturePlayback::handleOp(SkReadBuffer* reader,
lattice.fXDivs = (const int*) reader->skip(lattice.fXCount * sizeof(int32_t));
lattice.fYCount = reader->readInt();
lattice.fYDivs = (const int*) reader->skip(lattice.fYCount * sizeof(int32_t));
+ lattice.fFlagCount = reader->readInt();
+ lattice.fFlags = (0 == lattice.fFlagCount) ? nullptr : (const SkCanvas::Lattice::Flags*)
+ reader->skip(SkAlign4(lattice.fFlagCount * sizeof(SkCanvas::Lattice::Flags)));
SkRect dst;
reader->readRect(&dst);
canvas->drawImageLattice(image, lattice, dst, paint);

Powered by Google App Engine
This is Rietveld 408576698