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

Side by Side Diff: src/gpu/glsl/GrGLSLGeometryProcessor.cpp

Issue 2324663004: Remove unneeded GrGLSLTransformedCoordsArray type (Closed)
Patch Set: update comments Created 4 years, 3 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/glsl/GrGLSLFragmentShaderBuilder.cpp ('k') | src/gpu/glsl/GrGLSLPrimitiveProcessor.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 "GrGLSLGeometryProcessor.h" 8 #include "GrGLSLGeometryProcessor.h"
9 9
10 #include "GrCoordTransform.h" 10 #include "GrCoordTransform.h"
11 #include "glsl/GrGLSLFragmentShaderBuilder.h" 11 #include "glsl/GrGLSLFragmentShaderBuilder.h"
12 #include "glsl/GrGLSLProcessorTypes.h"
13 #include "glsl/GrGLSLUniformHandler.h" 12 #include "glsl/GrGLSLUniformHandler.h"
14 #include "glsl/GrGLSLVarying.h" 13 #include "glsl/GrGLSLVarying.h"
15 #include "glsl/GrGLSLVertexShaderBuilder.h" 14 #include "glsl/GrGLSLVertexShaderBuilder.h"
16 15
17 void GrGLSLGeometryProcessor::emitCode(EmitArgs& args) { 16 void GrGLSLGeometryProcessor::emitCode(EmitArgs& args) {
18 GrGLSLVertexBuilder* vBuilder = args.fVertBuilder; 17 GrGLSLVertexBuilder* vBuilder = args.fVertBuilder;
19 GrGPArgs gpArgs; 18 GrGPArgs gpArgs;
20 this->onEmitCode(args, &gpArgs); 19 this->onEmitCode(args, &gpArgs);
21 vBuilder->transformToNormalizedDeviceSpace(gpArgs.fPositionVar); 20 vBuilder->transformToNormalizedDeviceSpace(gpArgs.fPositionVar);
22 if (kVec2f_GrSLType == gpArgs.fPositionVar.getType()) { 21 if (kVec2f_GrSLType == gpArgs.fPositionVar.getType()) {
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 gpArgs->fPositionVar.set(kVec2f_GrSLType, "pos2"); 149 gpArgs->fPositionVar.set(kVec2f_GrSLType, "pos2");
151 vertBuilder->codeAppendf("vec2 %s = vec2(%s * vec3(%s, 1));", 150 vertBuilder->codeAppendf("vec2 %s = vec2(%s * vec3(%s, 1));",
152 gpArgs->fPositionVar.c_str(), viewMatrixNam e, posName); 151 gpArgs->fPositionVar.c_str(), viewMatrixNam e, posName);
153 } else { 152 } else {
154 gpArgs->fPositionVar.set(kVec3f_GrSLType, "pos3"); 153 gpArgs->fPositionVar.set(kVec3f_GrSLType, "pos3");
155 vertBuilder->codeAppendf("vec3 %s = %s * vec3(%s, 1);", 154 vertBuilder->codeAppendf("vec3 %s = %s * vec3(%s, 1);",
156 gpArgs->fPositionVar.c_str(), viewMatrixNam e, posName); 155 gpArgs->fPositionVar.c_str(), viewMatrixNam e, posName);
157 } 156 }
158 } 157 }
159 } 158 }
OLDNEW
« no previous file with comments | « src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp ('k') | src/gpu/glsl/GrGLSLPrimitiveProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698