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; | |
15 static const UniformHandle kInvalidUniformHandle = GrGLUniformManager::kInvalidU
niformHandle; | |
16 | |
17 struct GrGpuGL::ProgramCache::Entry { | 14 struct GrGpuGL::ProgramCache::Entry { |
18 SK_DECLARE_INST_COUNT_ROOT(Entry); | 15 SK_DECLARE_INST_COUNT_ROOT(Entry); |
19 Entry() : fProgram(NULL), fLRUStamp(0) {} | 16 Entry() : fProgram(NULL), fLRUStamp(0) {} |
20 | 17 |
21 SkAutoTUnref<GrGLProgram> fProgram; | 18 SkAutoTUnref<GrGLProgram> fProgram; |
22 unsigned int fLRUStamp; | 19 unsigned int fLRUStamp; |
23 }; | 20 }; |
24 | 21 |
25 SK_DEFINE_INST_COUNT(GrGpuGL::ProgramCache::Entry); | 22 SK_DEFINE_INST_COUNT(GrGpuGL::ProgramCache::Entry); |
26 | 23 |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 GrGLAttribTypeToLayout(attribType).fCount, | 396 GrGLAttribTypeToLayout(attribType).fCount, |
400 GrGLAttribTypeToLayout(attribType).fType, | 397 GrGLAttribTypeToLayout(attribType).fType, |
401 GrGLAttribTypeToLayout(attribType).fNormalized, | 398 GrGLAttribTypeToLayout(attribType).fNormalized, |
402 stride, | 399 stride, |
403 reinterpret_cast<GrGLvoid*>( | 400 reinterpret_cast<GrGLvoid*>( |
404 vertexOffsetInBytes + vertexAttrib->fOffset)); | 401 vertexOffsetInBytes + vertexAttrib->fOffset)); |
405 } | 402 } |
406 | 403 |
407 attribState->disableUnusedAttribArrays(this, usedAttribArraysMask); | 404 attribState->disableUnusedAttribArrays(this, usedAttribArraysMask); |
408 } | 405 } |
OLD | NEW |