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

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

Issue 23703010: Replace uses of GR_DEBUGCODE by SkDEBUGCODE. (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/GrGLPath.cpp ('k') | src/gpu/gr_unittests.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 "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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 const char* name, 327 const char* name,
328 int count, 328 int count,
329 const char* * outName) { 329 const char* * outName) {
330 SkASSERT(name && strlen(name)); 330 SkASSERT(name && strlen(name));
331 SkDEBUGCODE(static const uint32_t kVisibilityMask = kVertex_Visibility | kFr agment_Visibility); 331 SkDEBUGCODE(static const uint32_t kVisibilityMask = kVertex_Visibility | kFr agment_Visibility);
332 SkASSERT(0 == (~kVisibilityMask & visibility)); 332 SkASSERT(0 == (~kVisibilityMask & visibility));
333 SkASSERT(0 != visibility); 333 SkASSERT(0 != visibility);
334 334
335 BuilderUniform& uni = fUniforms.push_back(); 335 BuilderUniform& uni = fUniforms.push_back();
336 UniformHandle h = GrGLUniformManager::UniformHandle::CreateFromUniformIndex( fUniforms.count() - 1); 336 UniformHandle h = GrGLUniformManager::UniformHandle::CreateFromUniformIndex( fUniforms.count() - 1);
337 GR_DEBUGCODE(UniformHandle h2 =) 337 SkDEBUGCODE(UniformHandle h2 =)
338 fUniformManager.appendUniform(type, count); 338 fUniformManager.appendUniform(type, count);
339 // We expect the uniform manager to initially have no uniforms and that all uniforms are added 339 // We expect the uniform manager to initially have no uniforms and that all uniforms are added
340 // by this function. Therefore, the handles should match. 340 // by this function. Therefore, the handles should match.
341 SkASSERT(h2 == h); 341 SkASSERT(h2 == h);
342 uni.fVariable.setType(type); 342 uni.fVariable.setType(type);
343 uni.fVariable.setTypeModifier(GrGLShaderVar::kUniform_TypeModifier); 343 uni.fVariable.setTypeModifier(GrGLShaderVar::kUniform_TypeModifier);
344 this->nameVariable(uni.fVariable.accessName(), 'u', name); 344 this->nameVariable(uni.fVariable.accessName(), 'u', name);
345 uni.fVariable.setArrayCount(count); 345 uni.fVariable.setArrayCount(count);
346 uni.fVisibility = visibility; 346 uni.fVisibility = visibility;
347 347
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 for (const AttributePair* attrib = this->getEffectAttributes().begin(); 703 for (const AttributePair* attrib = this->getEffectAttributes().begin();
704 attrib != attribEnd; 704 attrib != attribEnd;
705 ++attrib) { 705 ++attrib) {
706 if (attrib->fIndex == attributeIndex) { 706 if (attrib->fIndex == attributeIndex) {
707 return &attrib->fName; 707 return &attrib->fName;
708 } 708 }
709 } 709 }
710 710
711 return NULL; 711 return NULL;
712 } 712 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLPath.cpp ('k') | src/gpu/gr_unittests.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698