aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/builders
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/gl/builders')
-rw-r--r--src/gpu/gl/builders/GrGLProgramBuilder.cpp13
-rw-r--r--src/gpu/gl/builders/GrGLProgramBuilder.h7
2 files changed, 5 insertions, 15 deletions
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
index f3548e6bae..c3e81fb358 100644
--- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
@@ -30,7 +30,7 @@
GrGLProgram* GrGLProgramBuilder::CreateProgram(const GrPipeline& pipeline,
const GrPrimitiveProcessor& primProc,
- GrProgramDesc* desc,
+ const GrProgramDesc& desc,
GrGLGpu* gpu) {
GrAutoLocaleSetter als("C");
@@ -56,7 +56,7 @@ GrGLProgram* GrGLProgramBuilder::CreateProgram(const GrPipeline& pipeline,
GrGLProgramBuilder::GrGLProgramBuilder(GrGLGpu* gpu,
const GrPipeline& pipeline,
const GrPrimitiveProcessor& primProc,
- GrProgramDesc* desc)
+ const GrProgramDesc& desc)
: INHERITED(pipeline, primProc, desc)
, fGpu(gpu)
, fVaryingHandler(this)
@@ -89,13 +89,6 @@ bool GrGLProgramBuilder::compileAndAttachShaders(GrGLSLShaderBuilder& shader,
}
*shaderIds->append() = shaderId;
- if (!outInputs->fFlipY) {
- GrProgramDesc* d = this->desc();
- // the program doesn't care about the surface origin, set the key to zero to indicate that
- // it doesn't matter
- d->setSurfaceOriginKey(0);
- d->finalize();
- }
return true;
}
@@ -251,7 +244,7 @@ void GrGLProgramBuilder::cleanupShaders(const SkTDArray<GrGLuint>& shaderIDs) {
GrGLProgram* GrGLProgramBuilder::createProgram(GrGLuint programID) {
return new GrGLProgram(fGpu,
- *this->desc(),
+ this->desc(),
fUniformHandles,
programID,
fUniformHandler.fUniforms,
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.h b/src/gpu/gl/builders/GrGLProgramBuilder.h
index cfbb734155..84d6d91a57 100644
--- a/src/gpu/gl/builders/GrGLProgramBuilder.h
+++ b/src/gpu/gl/builders/GrGLProgramBuilder.h
@@ -29,14 +29,11 @@ public:
* The program implements what is specified in the stages given as input.
* After successful generation, the builder result objects are available
* to be used.
- * This function may modify the GrProgramDesc by setting the surface origin
- * key to 0 (unspecified) if it turns out the program does not care about
- * the surface origin.
* @return true if generation was successful.
*/
static GrGLProgram* CreateProgram(const GrPipeline&,
const GrPrimitiveProcessor&,
- GrProgramDesc*,
+ const GrProgramDesc&,
GrGLGpu*);
const GrCaps* caps() const override;
@@ -45,7 +42,7 @@ public:
private:
GrGLProgramBuilder(GrGLGpu*, const GrPipeline&, const GrPrimitiveProcessor&,
- GrProgramDesc*);
+ const GrProgramDesc&);
bool compileAndAttachShaders(GrGLSLShaderBuilder& shader,
GrGLuint programId,