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

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

Issue 12431018: Increase bits for effect attribute key (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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 | « include/gpu/GrBackendEffectFactory.h ('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 "GrGLSL.h" 8 #include "GrGLSL.h"
9 #include "GrGLEffect.h" 9 #include "GrGLEffect.h"
10 10
(...skipping 21 matching lines...) Expand all
32 return key; 32 return key;
33 } 33 }
34 34
35 GrGLEffect::EffectKey GrGLEffect::GenAttribKey(const GrEffectStage& stage) { 35 GrGLEffect::EffectKey GrGLEffect::GenAttribKey(const GrEffectStage& stage) {
36 EffectKey key = 0; 36 EffectKey key = 0;
37 37
38 int numAttributes = stage.getVertexAttribIndexCount(); 38 int numAttributes = stage.getVertexAttribIndexCount();
39 GrAssert(numAttributes <= 2); 39 GrAssert(numAttributes <= 2);
40 const int* attributeIndices = stage.getVertexAttribIndices(); 40 const int* attributeIndices = stage.getVertexAttribIndices();
41 for (int index = 0; index < numAttributes; ++index) { 41 for (int index = 0; index < numAttributes; ++index) {
42 EffectKey value = attributeIndices[index] << 2*index; 42 EffectKey value = attributeIndices[index] << 3*index;
43 GrAssert(0 == (value & key)); // keys for each attribute ought not to ov erlap 43 GrAssert(0 == (value & key)); // keys for each attribute ought not to ov erlap
44 key |= value; 44 key |= value;
45 } 45 }
46 46
47 return key; 47 return key;
48 } 48 }
OLDNEW
« no previous file with comments | « include/gpu/GrBackendEffectFactory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698