Index: src/gpu/gl/GrGLProgramDesc.h |
diff --git a/src/gpu/gl/GrGLProgramDesc.h b/src/gpu/gl/GrGLProgramDesc.h |
index 4e1be5b2f9c0d1127b62c134bfdc2471a17bb55d..9bf7553b61cfede488dd9b15283302a23f2aedd0 100644 |
--- a/src/gpu/gl/GrGLProgramDesc.h |
+++ b/src/gpu/gl/GrGLProgramDesc.h |
@@ -43,8 +43,13 @@ |
*/ |
static bool Build(const GrOptDrawState&, |
GrGpu::DrawType, |
+ GrBlendCoeff srcCoeff, |
+ GrBlendCoeff dstCoeff, |
GrGpuGL*, |
- const GrDeviceCoordTexture*, |
+ const GrDeviceCoordTexture* dstCopy, |
+ const GrGeometryStage** geometryProcessor, |
+ SkTArray<const GrFragmentStage*, true>* colorStages, |
+ SkTArray<const GrFragmentStage*, true>* coverageStages, |
GrGLProgramDesc*); |
bool hasGeometryProcessor() const { |
@@ -155,22 +160,25 @@ |
const KeyHeader& getHeader() const { return *this->atOffset<KeyHeader, kHeaderOffset>(); } |
/** Used to provide effects' keys to their emitCode() function. */ |
- class ProcKeyProvider { |
+ class EffectKeyProvider { |
public: |
- enum ProcessorType { |
- kGeometry_ProcessorType, |
- kFragment_ProcessorType, |
+ enum EffectType { |
+ kGeometryProcessor_EffectType, |
+ kColor_EffectType, |
+ kCoverage_EffectType, |
}; |
- ProcKeyProvider(const GrGLProgramDesc* desc, ProcessorType type) |
- : fDesc(desc), fBaseIndex(0) { |
+ EffectKeyProvider(const GrGLProgramDesc* desc, EffectType type) : fDesc(desc) { |
switch (type) { |
- case kGeometry_ProcessorType: |
+ case kGeometryProcessor_EffectType: |
// there can be only one |
fBaseIndex = 0; |
break; |
- case kFragment_ProcessorType: |
+ case kColor_EffectType: |
fBaseIndex = desc->hasGeometryProcessor() ? 1 : 0; |
+ break; |
+ case kCoverage_EffectType: |
+ fBaseIndex = desc->numColorEffects() + (desc->hasGeometryProcessor() ? 1 : 0); |
break; |
} |
} |