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()) {} |