Index: src/gpu/batches/GrDrawPathBatch.h |
diff --git a/src/gpu/batches/GrDrawPathBatch.h b/src/gpu/batches/GrDrawPathBatch.h |
index d29d046de3c9607b452a736dac3d74eb8a79897c..6d5c69a3466fb82c6a43a752c4f343fc890d23c4 100644 |
--- a/src/gpu/batches/GrDrawPathBatch.h |
+++ b/src/gpu/batches/GrDrawPathBatch.h |
@@ -76,19 +76,26 @@ private: |
GrDrawPathBatch(const SkMatrix& viewMatrix, GrColor color, GrPathRendering::FillType fill, |
const GrPath* path) |
: INHERITED(ClassID(), viewMatrix, color, fill) |
- , fPath(path) { |
+ , fPath(path) |
+ , fNext(nullptr) |
+ , fLastSlot(&fNext) |
+ , fTotalPathCount(1) { |
fBounds = path->getBounds(); |
viewMatrix.mapRect(&fBounds); |
+ fPathBounds = fBounds; |
} |
- |
- bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override { return false; } |
+ static bool ListBoundsIntersects(const GrDrawPathBatch* a, const GrDrawPathBatch* b); |
+ bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override; |
void onPrepare(GrBatchFlushState*) override {} |
void onDraw(GrBatchFlushState* state) override; |
GrPendingIOResource<const GrPath, kRead_GrIOType> fPath; |
- |
+ SkRect fPathBounds; |
+ sk_sp<GrDrawPathBatch> fNext; // Batch union is made with a linked list of batch nodes. |
+ sk_sp<GrDrawPathBatch>* fLastSlot; // Points to the fNext of the last batch in the batch list. |
+ int fTotalPathCount; |
typedef GrDrawPathBatchBase INHERITED; |
}; |