Index: src/gpu/GrDrawTarget.h |
diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h |
index b12ac99de4504c5766ef0f38c26d6a5d1f32224d..81dc7e6cb0cd15976c5c8993922aa8c83b62dd77 100644 |
--- a/src/gpu/GrDrawTarget.h |
+++ b/src/gpu/GrDrawTarget.h |
@@ -200,6 +200,14 @@ public: |
const CMMAccess cmmAccess() { return CMMAccess(this); } |
+ GrBatch* lastBatch() { |
+ if (fBatches.count()) { |
+ return fBatches.back(); |
+ } else { |
+ return nullptr; |
+ } |
+ } |
+ |
private: |
void recordBatch(GrBatch*); |
bool installPipelineInDrawBatch(const GrPipelineBuilder* pipelineBuilder, |