Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1650)

Unified Diff: src/gpu/gl/GrGLShaderBuilder.cpp

Issue 25846002: Use vertexless shaders when NVpr is available (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fix mac build Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLShaderBuilder.h ('k') | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
+}
« no previous file with comments | « src/gpu/gl/GrGLShaderBuilder.h ('k') | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698