Index: src/gpu/gl/GrGLGeometryProcessor.h |
diff --git a/src/gpu/gl/GrGLGeometryProcessor.h b/src/gpu/gl/GrGLGeometryProcessor.h |
index c3bee952665449a111f43d9834de5388e9c97b6b..a172904ac68aa1a55240051143c1c785247cb590 100644 |
--- a/src/gpu/gl/GrGLGeometryProcessor.h |
+++ b/src/gpu/gl/GrGLGeometryProcessor.h |
@@ -10,6 +10,7 @@ |
#include "GrGLProcessor.h" |
+class GrBatchTracker; |
class GrGLGPBuilder; |
/** |
@@ -25,16 +26,19 @@ public: |
struct EmitArgs { |
EmitArgs(GrGLGPBuilder* pb, |
const GrGeometryProcessor& gp, |
+ const GrBatchTracker& bt, |
const char* outputColor, |
const char* outputCoverage, |
const TextureSamplerArray& samplers) |
: fPB(pb) |
, fGP(gp) |
+ , fBT(bt) |
, fOutputColor(outputColor) |
, fOutputCoverage(outputCoverage) |
, fSamplers(samplers) {} |
GrGLGPBuilder* fPB; |
const GrGeometryProcessor& fGP; |
+ const GrBatchTracker& fBT; |
const char* fOutputColor; |
const char* fOutputCoverage; |
const TextureSamplerArray& fSamplers; |
@@ -45,6 +49,15 @@ public: |
*/ |
virtual void emitCode(const EmitArgs&) = 0; |
+ /** A GrGLGeometryProcessor instance can be reused with any GrGLGeometryProcessor that produces |
+ the same stage key; this function reads data from a GrGLGeometryProcessor and uploads any |
+ uniform variables required by the shaders created in emitCode(). The GrGeometryProcessor |
+ parameter is guaranteed to be of the same type that created this GrGLGeometryProcessor and |
+ to have an identical processor key as the one that created this GrGLGeometryProcessor. */ |
+ virtual void setData(const GrGLProgramDataManager&, |
+ const GrGeometryProcessor&, |
+ const GrBatchTracker&) = 0; |
+ |
private: |
typedef GrGLProcessor INHERITED; |
}; |