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

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

Issue 23826002: Rename ShaderType enum to ShaderVisibility (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/gl/GrGLShaderBuilder.cpp ('k') | no next file » | 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 "gl/GrGLShaderBuilder.h" 8 #include "gl/GrGLShaderBuilder.h"
9 #include "gl/GrGLProgram.h" 9 #include "gl/GrGLProgram.h"
10 #include "gl/GrGLUniformHandle.h" 10 #include "gl/GrGLUniformHandle.h"
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 void GrGLUniformManager::getUniformLocations(GrGLuint programID, const BuilderUn iformArray& uniforms) { 252 void GrGLUniformManager::getUniformLocations(GrGLuint programID, const BuilderUn iformArray& uniforms) {
253 SkASSERT(uniforms.count() == fUniforms.count()); 253 SkASSERT(uniforms.count() == fUniforms.count());
254 int count = fUniforms.count(); 254 int count = fUniforms.count();
255 for (int i = 0; i < count; ++i) { 255 for (int i = 0; i < count; ++i) {
256 SkASSERT(uniforms[i].fVariable.getType() == fUniforms[i].fType); 256 SkASSERT(uniforms[i].fVariable.getType() == fUniforms[i].fType);
257 SkASSERT(uniforms[i].fVariable.getArrayCount() == fUniforms[i].fArrayCou nt); 257 SkASSERT(uniforms[i].fVariable.getArrayCount() == fUniforms[i].fArrayCou nt);
258 GrGLint location; 258 GrGLint location;
259 // TODO: Move the Xoom uniform array in both FS and VS bug workaround he re. 259 // TODO: Move the Xoom uniform array in both FS and VS bug workaround he re.
260 GR_GL_CALL_RET(fContext.interface(), location, 260 GR_GL_CALL_RET(fContext.interface(), location,
261 GetUniformLocation(programID, uniforms[i].fVariable.c_str ())); 261 GetUniformLocation(programID, uniforms[i].fVariable.c_str ()));
262 if (GrGLShaderBuilder::kVertex_ShaderType & uniforms[i].fVisibility) { 262 if (GrGLShaderBuilder::kVertex_Visibility & uniforms[i].fVisibility) {
263 fUniforms[i].fVSLocation = location; 263 fUniforms[i].fVSLocation = location;
264 } 264 }
265 if (GrGLShaderBuilder::kFragment_ShaderType & uniforms[i].fVisibility) { 265 if (GrGLShaderBuilder::kFragment_Visibility & uniforms[i].fVisibility) {
266 fUniforms[i].fFSLocation = location; 266 fUniforms[i].fFSLocation = location;
267 } 267 }
268 } 268 }
269 } 269 }
270 270
271 const GrGLUniformManager::BuilderUniform& 271 const GrGLUniformManager::BuilderUniform&
272 GrGLUniformManager::getBuilderUniform(const BuilderUniformArray& array, UniformH andle handle) const { 272 GrGLUniformManager::getBuilderUniform(const BuilderUniformArray& array, UniformH andle handle) const {
273 return array[handle.toUniformIndex()]; 273 return array[handle.toUniformIndex()];
274 } 274 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLShaderBuilder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698