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

Unified Diff: src/gpu/batches/GrNinePatch.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/SkRecorder.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrNinePatch.cpp
diff --git a/src/gpu/batches/GrNinePatch.cpp b/src/gpu/batches/GrNinePatch.cpp
index 3417c5c0951d4c6794e875253dfd821c54b323af..522e775c3339d6579b7aa730d2799e070bb81300 100644
--- a/src/gpu/batches/GrNinePatch.cpp
+++ b/src/gpu/batches/GrNinePatch.cpp
@@ -82,7 +82,7 @@ private:
int patchCnt = fPatches.count();
int numRects = 0;
for (int i = 0; i < patchCnt; i++) {
- numRects += fPatches[i].fIter->numRects();
+ numRects += fPatches[i].fIter->numRectsToDraw();
}
SkAutoTUnref<const GrBuffer> indexBuffer(
@@ -132,7 +132,7 @@ private:
if (!isScaleTranslate) {
SkPoint* positions = reinterpret_cast<SkPoint*>(patchVerts);
patch.fViewMatrix.mapPointsWithStride(positions, vertexStride,
- kVertsPerRect * patch.fIter->numRects());
+ kVertsPerRect * patch.fIter->numRectsToDraw());
}
}
helper.recordDraw(target, gp.get());
« no previous file with comments | « src/core/SkRecorder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698