OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "GrGpuGL.h" | 8 #include "GrGpuGL.h" |
9 | 9 |
10 #include "GrEffect.h" | 10 #include "GrEffect.h" |
11 #include "GrGLEffect.h" | 11 #include "GrGLEffect.h" |
12 #include "SkTSearch.h" | 12 #include "SkTSearch.h" |
13 | 13 |
14 typedef GrGLUniformManager::UniformHandle UniformHandle; | 14 typedef GrGLUniformManager::UniformHandle UniformHandle; |
15 static const UniformHandle kInvalidUniformHandle = GrGLUniformManager::kInvalidU
niformHandle; | |
16 | 15 |
17 struct GrGpuGL::ProgramCache::Entry { | 16 struct GrGpuGL::ProgramCache::Entry { |
18 SK_DECLARE_INST_COUNT_ROOT(Entry); | 17 SK_DECLARE_INST_COUNT_ROOT(Entry); |
19 Entry() : fProgram(NULL), fLRUStamp(0) {} | 18 Entry() : fProgram(NULL), fLRUStamp(0) {} |
20 | 19 |
21 SkAutoTUnref<GrGLProgram> fProgram; | 20 SkAutoTUnref<GrGLProgram> fProgram; |
22 unsigned int fLRUStamp; | 21 unsigned int fLRUStamp; |
23 }; | 22 }; |
24 | 23 |
25 SK_DEFINE_INST_COUNT(GrGpuGL::ProgramCache::Entry); | 24 SK_DEFINE_INST_COUNT(GrGpuGL::ProgramCache::Entry); |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 GrGLAttribTypeToLayout(attribType).fCount, | 398 GrGLAttribTypeToLayout(attribType).fCount, |
400 GrGLAttribTypeToLayout(attribType).fType, | 399 GrGLAttribTypeToLayout(attribType).fType, |
401 GrGLAttribTypeToLayout(attribType).fNormalized, | 400 GrGLAttribTypeToLayout(attribType).fNormalized, |
402 stride, | 401 stride, |
403 reinterpret_cast<GrGLvoid*>( | 402 reinterpret_cast<GrGLvoid*>( |
404 vertexOffsetInBytes + vertexAttrib->fOffset)); | 403 vertexOffsetInBytes + vertexAttrib->fOffset)); |
405 } | 404 } |
406 | 405 |
407 attribState->disableUnusedAttribArrays(this, usedAttribArraysMask); | 406 attribState->disableUnusedAttribArrays(this, usedAttribArraysMask); |
408 } | 407 } |
OLD | NEW |