Index: include/gpu/GrDrawContext.h |
diff --git a/include/gpu/GrDrawContext.h b/include/gpu/GrDrawContext.h |
index 97cb72a7f2e530166874b8998dd132b5a95653d1..96f6629ea6743aabf7852f52f804e810958438b6 100644 |
--- a/include/gpu/GrDrawContext.h |
+++ b/include/gpu/GrDrawContext.h |
@@ -12,8 +12,10 @@ |
#include "SkRefCnt.h" |
#include "SkSurfaceProps.h" |
+class GrBatch; |
class GrClip; |
class GrContext; |
+class GrDraw; |
class GrDrawBatch; |
class GrDrawTarget; |
class GrPaint; |
@@ -259,8 +261,14 @@ public: |
*/ |
void drawBatch(GrRenderTarget*, const GrClip&, const GrPaint&, GrDrawBatch*); |
+ // This entry point is currently only used for text contexts and the experimental GrDraw |
+ void drawBatch(const GrPipelineBuilder& pipelineBuilder, GrDrawBatch* batch); |
+ |
+ // returns the last batch, or a null pointer if none is available. This is so internal clients |
+ // can fast path batching |
+ GrBatch* lastBatch(); |
+ |
private: |
- friend class GrAtlasTextContext; // for access to drawBatch |
friend class GrContext; // for ctor |
GrDrawContext(GrContext*, GrDrawTarget*, const SkSurfaceProps&); |
@@ -278,10 +286,6 @@ private: |
const SkPath&, |
const GrStrokeInfo&); |
- // This entry point allows the GrTextContext-derived classes to add their batches to |
- // the drawTarget. |
- void drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* batch); |
- |
GrContext* fContext; // owning context -> no ref |
GrDrawTarget* fDrawTarget; |
GrTextContext* fTextContext; // lazily created |