Index: src/gpu/gl/builders/GrGLProgramBuilder.cpp |
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp |
index aa9e40c3f2acf942f2f2eeec64e2ed7d7ba6a377..64150a4fda96b8abcd77c1f97fff210c6b912bc9 100644 |
--- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp |
+++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp |
@@ -28,10 +28,13 @@ |
const int GrGLProgramBuilder::kVarsPerBlock = 8; |
-GrGLProgram* GrGLProgramBuilder::CreateProgram(const GrOptDrawState& optState, GrGpuGL* gpu) { |
+GrGLProgram* GrGLProgramBuilder::CreateProgram(const GrOptDrawState& optState, |
+ GrGpu::DrawType drawType, |
+ GrGpuGL* gpu) { |
// create a builder. This will be handed off to effects so they can use it to add |
// uniforms, varyings, textures, etc |
SkAutoTDelete<GrGLProgramBuilder> builder(CreateProgramBuilder(optState, |
+ drawType, |
optState.hasGeometryProcessor(), |
gpu)); |
@@ -70,6 +73,7 @@ |
GrGLProgramBuilder* |
GrGLProgramBuilder::CreateProgramBuilder(const GrOptDrawState& optState, |
+ GrGpu::DrawType drawType, |
bool hasGeometryProcessor, |
GrGpuGL* gpu) { |
const GrProgramDesc& desc = optState.programDesc(); |
@@ -230,7 +234,9 @@ |
fVS.setupUniformViewMatrix(); |
const GrProgramDesc::KeyHeader& header = this->header(); |
- fVS.codeAppend("gl_PointSize = 1.0;"); |
+ if (header.fEmitsPointSize) { |
+ fVS.codeAppend("gl_PointSize = 1.0;"); |
+ } |
// Setup position |
// TODO it'd be possible to remove these from the vertexshader builder and have them |