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