Index: src/gpu/GrInOrderDrawBuffer.h |
diff --git a/src/gpu/GrInOrderDrawBuffer.h b/src/gpu/GrInOrderDrawBuffer.h |
index bf9237d4268896b2793f9c4671253653c108443b..9ef4e2fc64a8c7b488776d05c99861e3d71da4bb 100644 |
--- a/src/gpu/GrInOrderDrawBuffer.h |
+++ b/src/gpu/GrInOrderDrawBuffer.h |
@@ -320,7 +320,16 @@ private: |
// TODO hack until batch is everywhere |
DrawBatch* fDrawBatch; |
- void closeBatch(); |
+ // This will go away when everything uses batch. However, in the short term anything which |
+ // might be put into the GrInOrderDrawBuffer needs to make sure it closes the last batch |
+ void closeBatch() { |
+ if (fDrawBatch) { |
+ fBatchTarget.resetNumberOfDraws(); |
+ fDrawBatch->execute(this, fPrevState); |
+ fDrawBatch->fBatch->setNumberOfDraws(fBatchTarget.numberOfDraws()); |
+ fDrawBatch = NULL; |
+ } |
+ } |
typedef GrFlushToGpuDrawTarget INHERITED; |
}; |