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

Unified Diff: src/core/SkLatticeIter.cpp

Issue 2255963002: Batched implementation of drawLattice() for GPU (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Improve bench Created 4 years, 4 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/SkLatticeIter.cpp
diff --git a/src/core/SkLatticeIter.cpp b/src/core/SkLatticeIter.cpp
index 24ab3f1cbc29a11af6ded16de3965c93ac76b292..0a007e98458c2a1cae34eea9dcc7ec17029582de 100644
--- a/src/core/SkLatticeIter.cpp
+++ b/src/core/SkLatticeIter.cpp
@@ -228,3 +228,9 @@ bool SkLatticeIter::next(SkRect* src, SkRect* dst) {
}
return true;
}
+
+int SkLatticeIter::numRects() const {
+ SkASSERT(fSrcX.count() == fDstX.count() && fSrcY.count() == fDstY.count());
+ SkASSERT(fSrcX.count() >= 2 && fDstX.count() >= 2);
+ return (fSrcX.count() - 1) * (fDstX.count() - 1);
+}

Powered by Google App Engine
This is Rietveld 408576698