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

Unified Diff: src/gpu/batches/GrTInstanceBatch.h

Issue 1355353002: Create GrDraw and start fast pathing src over rects (Closed) Base URL: https://skia.googlesource.com/skia.git@strokerect2
Patch Set: tweaks Created 5 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/gpu/batches/GrRectBatchFactory.h ('k') | src/gpu/draws/GrDraw.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrTInstanceBatch.h
diff --git a/src/gpu/batches/GrTInstanceBatch.h b/src/gpu/batches/GrTInstanceBatch.h
index b4bc0c084f903b62756025db077bef2cc0c2d0dc..9640209c425607fe83308c9c54ca3f7a3fd56d37 100644
--- a/src/gpu/batches/GrTInstanceBatch.h
+++ b/src/gpu/batches/GrTInstanceBatch.h
@@ -77,6 +77,18 @@ public:
Impl::UpdateBoundsAfterAppend(geo, &fBounds);
}
+ bool appendIfPossible(const Geometry& geo) {
+ const Geometry& mine = fGeoData.back();
+ if (Impl::CanCombine(mine, geo, fOpts)) {
+ fGeoData.push_back(geo);
+ this->updateBoundsAfterAppend();
+ return true;
+ } else {
+ return false;
+ }
+
+ }
+
private:
GrTInstanceBatch() : INHERITED(ClassID()) {}
« no previous file with comments | « src/gpu/batches/GrRectBatchFactory.h ('k') | src/gpu/draws/GrDraw.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698