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

Side by Side Diff: src/gpu/gl/GrGLEffectMatrix.cpp

Issue 14925010: Move loops that chain together effects into GrGLShaderBuilder from GrGLProgram. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Address comments and fix for emitting code for skipped effects Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/gpu/gl/GrGLProgram.cpp » ('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 2012 Google Inc. 2 * Copyright 2012 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 "GrGLEffectMatrix.h" 8 #include "GrGLEffectMatrix.h"
9 #include "GrDrawEffect.h" 9 #include "GrDrawEffect.h"
10 #include "GrTexture.h" 10 #include "GrTexture.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 suffixedUniName.append(suffix); 80 suffixedUniName.append(suffix);
81 uniName = suffixedUniName.c_str(); 81 uniName = suffixedUniName.c_str();
82 } 82 }
83 if (kVoid_GrSLType != fUniType) { 83 if (kVoid_GrSLType != fUniType) {
84 fUni = builder->addUniform(GrGLShaderBuilder::kVertex_ShaderType, 84 fUni = builder->addUniform(GrGLShaderBuilder::kVertex_ShaderType,
85 fUniType, 85 fUniType,
86 uniName, 86 uniName,
87 &uniName); 87 &uniName);
88 } 88 }
89 89
90 const char* varyingName = "StageCoord"; 90 const char* varyingName = "MatrixCoord";
91 SkString suffixedVaryingName; 91 SkString suffixedVaryingName;
92 if (NULL != suffix) { 92 if (NULL != suffix) {
93 suffixedVaryingName.append(varyingName); 93 suffixedVaryingName.append(varyingName);
94 suffixedVaryingName.append(suffix); 94 suffixedVaryingName.append(suffix);
95 varyingName = suffixedVaryingName.c_str(); 95 varyingName = suffixedVaryingName.c_str();
96 } 96 }
97 const char* vsVaryingName; 97 const char* vsVaryingName;
98 const char* fsVaryingName; 98 const char* fsVaryingName;
99 builder->addVarying(varyingType, varyingName, &vsVaryingName, &fsVaryingName ); 99 builder->addVarying(varyingType, varyingName, &vsVaryingName, &fsVaryingName );
100 100
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 if (!fPrevMatrix.cheapEqualTo(combined)) { 229 if (!fPrevMatrix.cheapEqualTo(combined)) {
230 uniformManager.setSkMatrix(fUni, combined); 230 uniformManager.setSkMatrix(fUni, combined);
231 fPrevMatrix = combined; 231 fPrevMatrix = combined;
232 } 232 }
233 break; 233 break;
234 } 234 }
235 default: 235 default:
236 GrCrash("Unexpected uniform type."); 236 GrCrash("Unexpected uniform type.");
237 } 237 }
238 } 238 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/gl/GrGLProgram.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698