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

Unified Diff: src/gpu/gl/builders/GrGLProgramBuilder.cpp

Issue 776243005: Revert of move program descriptor generation to flush (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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/builders/GrGLProgramBuilder.h ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « src/gpu/gl/builders/GrGLProgramBuilder.h ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698