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

Side by Side Diff: src/gpu/gl/builders/GrGLProgramBuilder.cpp

Issue 827973002: ViewMatrix uniform upload moved to GeometryProcessor (Closed) Base URL: https://skia.googlesource.com/skia.git@vm-on-gp
Patch Set: feedback inc Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « src/gpu/gl/builders/GrGLProgramBuilder.h ('k') | src/gpu/gl/builders/GrGLVertexShaderBuilder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrGLProgramBuilder.h" 8 #include "GrGLProgramBuilder.h"
9 #include "gl/GrGLProgram.h" 9 #include "gl/GrGLProgram.h"
10 #include "gl/GrGLSLPrettyPrint.h" 10 #include "gl/GrGLSLPrettyPrint.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 } 171 }
172 } 172 }
173 } 173 }
174 174
175 const GrGLContextInfo& GrGLProgramBuilder::ctxInfo() const { 175 const GrGLContextInfo& GrGLProgramBuilder::ctxInfo() const {
176 return fGpu->ctxInfo(); 176 return fGpu->ctxInfo();
177 } 177 }
178 178
179 void GrGLProgramBuilder::emitAndInstallProcs(GrGLSLExpr4* inputColor, GrGLSLExpr 4* inputCoverage) { 179 void GrGLProgramBuilder::emitAndInstallProcs(GrGLSLExpr4* inputColor, GrGLSLExpr 4* inputCoverage) {
180 if (fOptState.hasGeometryProcessor()) { 180 if (fOptState.hasGeometryProcessor()) {
181 fVS.setupUniformViewMatrix();
182
183 fVS.codeAppend("gl_PointSize = 1.0;"); 181 fVS.codeAppend("gl_PointSize = 1.0;");
184 182
185 // Setup position 183 // Setup position
186 // TODO it'd be possible to remove these from the vertexshader builder a nd have them 184 // TODO it'd be possible to remove these from the vertexshader builder a nd have them
187 // be outputs from the emit call. We don't do this because emitargs is constant. It would 185 // be outputs from the emit call. We don't do this because emitargs is constant. It would
188 // be easy to change this though 186 // be easy to change this though
189 fVS.codeAppendf("vec3 %s;", fVS.glPosition()); 187 fVS.codeAppendf("vec3 %s;", fVS.glPosition());
190 fVS.codeAppendf("vec2 %s;", fVS.positionCoords()); 188 fVS.codeAppendf("vec2 %s;", fVS.positionCoords());
191 fVS.codeAppendf("vec2 %s;", fVS.localCoords()); 189 fVS.codeAppendf("vec2 %s;", fVS.localCoords());
192 190
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 } 543 }
546 544
547 //////////////////////////////////////////////////////////////////////////////// /////////////////// 545 //////////////////////////////////////////////////////////////////////////////// ///////////////////
548 546
549 GrGLInstalledFragProcs::~GrGLInstalledFragProcs() { 547 GrGLInstalledFragProcs::~GrGLInstalledFragProcs() {
550 int numProcs = fProcs.count(); 548 int numProcs = fProcs.count();
551 for (int e = 0; e < numProcs; ++e) { 549 for (int e = 0; e < numProcs; ++e) {
552 SkDELETE(fProcs[e]); 550 SkDELETE(fProcs[e]);
553 } 551 }
554 } 552 }
OLDNEW
« no previous file with comments | « src/gpu/gl/builders/GrGLProgramBuilder.h ('k') | src/gpu/gl/builders/GrGLVertexShaderBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698