Index: src/gpu/gl/GrGLShaderBuilder.cpp |
diff --git a/src/gpu/gl/GrGLShaderBuilder.cpp b/src/gpu/gl/GrGLShaderBuilder.cpp |
index 089ece7c0712b116828ccbaece594883f0733c10..00fefe1305a675bddd8ed146fb03cf937b180967 100644 |
--- a/src/gpu/gl/GrGLShaderBuilder.cpp |
+++ b/src/gpu/gl/GrGLShaderBuilder.cpp |
@@ -441,7 +441,6 @@ const char* GrGLShaderBuilder::fragmentPosition() { |
} |
} |
- |
void GrGLShaderBuilder::fsEmitFunction(GrSLType returnType, |
const char* name, |
int argCnt, |
@@ -920,3 +919,35 @@ void GrGLFullShaderBuilder::bindProgramLocations(GrGLuint programId) const { |
GL_CALL(BindAttribLocation(programId, attrib->fIndex, attrib->fName.c_str())); |
} |
} |
+ |
+//////////////////////////////////////////////////////////////////////////////// |
+ |
+GrGLFragmentOnlyShaderBuilder::GrGLFragmentOnlyShaderBuilder(GrGpuGL* gpu, |
+ GrGLUniformManager& uniformManager, |
+ const GrGLProgramDesc& desc) |
+ : INHERITED(gpu, uniformManager, desc) |
+ , fNumTexCoordSets(0) { |
+ |
+ SkASSERT(!desc.getHeader().fHasVertexCode); |
+ SkASSERT(gpu->glCaps().fixedFunctionSupport()); |
+ SkASSERT(gpu->glCaps().pathStencilingSupport()); |
+ SkASSERT(GrGLProgramDesc::kAttribute_ColorInput != desc.getHeader().fColorInput); |
+ SkASSERT(GrGLProgramDesc::kAttribute_ColorInput != desc.getHeader().fCoverageInput); |
+} |
+ |
+GrGLProgramEffects* GrGLFragmentOnlyShaderBuilder::createAndEmitEffects( |
+ const GrEffectStage* effectStages[], |
+ const EffectKey effectKeys[], |
+ int effectCnt, |
+ SkString* inOutFSColor, |
+ GrSLConstantVec* fsInOutColorKnownValue) { |
+ |
+ GrGLTexGenProgramEffectsBuilder texGenEffectsBuilder(this, effectCnt); |
+ this->INHERITED::createAndEmitEffects(&texGenEffectsBuilder, |
+ effectStages, |
+ effectKeys, |
+ effectCnt, |
+ inOutFSColor, |
+ fsInOutColorKnownValue); |
+ return texGenEffectsBuilder.finish(); |
+} |