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 "SkRTConf.h" | 12 #include "SkRTConf.h" |
13 #include "GrGLNameAllocator.h" | 13 #include "GrGLNameAllocator.h" |
14 #include "SkTSearch.h" | 14 #include "SkTSearch.h" |
15 | 15 |
16 #ifdef PROGRAM_CACHE_STATS | 16 #ifdef PROGRAM_CACHE_STATS |
17 SK_CONF_DECLARE(bool, c_DisplayCache, "gpu.displayCache", false, | 17 SK_CONF_DECLARE(bool, c_DisplayCache, "gpu.displayCache", false, |
18 "Display program cache usage."); | 18 "Display program cache usage."); |
19 #endif | 19 #endif |
20 | 20 |
21 typedef GrGLUniformManager::UniformHandle UniformHandle; | 21 typedef GrGLProgramDataManager::UniformHandle UniformHandle; |
22 | 22 |
23 struct GrGpuGL::ProgramCache::Entry { | 23 struct GrGpuGL::ProgramCache::Entry { |
24 SK_DECLARE_INST_COUNT_ROOT(Entry); | 24 SK_DECLARE_INST_COUNT_ROOT(Entry); |
25 Entry() : fProgram(NULL), fLRUStamp(0) {} | 25 Entry() : fProgram(NULL), fLRUStamp(0) {} |
26 | 26 |
27 SkAutoTUnref<GrGLProgram> fProgram; | 27 SkAutoTUnref<GrGLProgram> fProgram; |
28 unsigned int fLRUStamp; | 28 unsigned int fLRUStamp; |
29 }; | 29 }; |
30 | 30 |
31 struct GrGpuGL::ProgramCache::ProgDescLess { | 31 struct GrGpuGL::ProgramCache::ProgDescLess { |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 GrGLAttribTypeToLayout(attribType).fType, | 368 GrGLAttribTypeToLayout(attribType).fType, |
369 GrGLAttribTypeToLayout(attribType).fNormalized, | 369 GrGLAttribTypeToLayout(attribType).fNormalized, |
370 stride, | 370 stride, |
371 reinterpret_cast<GrGLvoid*>( | 371 reinterpret_cast<GrGLvoid*>( |
372 vertexOffsetInBytes + vertexAttrib->fOffset)); | 372 vertexOffsetInBytes + vertexAttrib->fOffset)); |
373 } | 373 } |
374 } | 374 } |
375 attribState->disableUnusedArrays(this, usedAttribArraysMask); | 375 attribState->disableUnusedArrays(this, usedAttribArraysMask); |
376 } | 376 } |
377 } | 377 } |
OLD | NEW |