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

Unified Diff: src/core/SkRecorder.cpp

Issue 2305433002: Add option to skip rects to drawImageLattice() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Better detection for zero divs 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
« no previous file with comments | « src/core/SkRecordDraw.cpp ('k') | src/gpu/batches/GrNinePatch.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkRecorder.cpp
diff --git a/src/core/SkRecorder.cpp b/src/core/SkRecorder.cpp
index 840e19b90da8d3fee537190bcb8b8a96303c39e5..4c09e514be5f7997752fe94b73364d9d450e4c9e 100644
--- a/src/core/SkRecorder.cpp
+++ b/src/core/SkRecorder.cpp
@@ -238,9 +238,11 @@ void SkRecorder::onDrawImageNine(const SkImage* image, const SkIRect& center,
void SkRecorder::onDrawImageLattice(const SkImage* image, const Lattice& lattice, const SkRect& dst,
const SkPaint* paint) {
+ int flagCount = lattice.fFlags ? (lattice.fXCount + 1) * (lattice.fYCount + 1) : 0;
APPEND(DrawImageLattice, this->copy(paint), sk_ref_sp(image),
lattice.fXCount, this->copy(lattice.fXDivs, lattice.fXCount),
- lattice.fYCount, this->copy(lattice.fYDivs, lattice.fYCount), dst);
+ lattice.fYCount, this->copy(lattice.fYDivs, lattice.fYCount),
+ flagCount, this->copy(lattice.fFlags, flagCount), dst);
}
void SkRecorder::onDrawText(const void* text, size_t byteLength,
« no previous file with comments | « src/core/SkRecordDraw.cpp ('k') | src/gpu/batches/GrNinePatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698