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 "GrGLGpu.h" | 8 #include "GrGLGpu.h" |
9 | 9 |
10 #include "builders/GrGLProgramBuilder.h" | 10 #include "builders/GrGLProgramBuilder.h" |
11 #include "GrProcessor.h" | 11 #include "GrProcessor.h" |
12 #include "GrGLProcessor.h" | 12 #include "GrGLProcessor.h" |
13 #include "GrGLPathRendering.h" | 13 #include "GrGLPathRendering.h" |
14 #include "GrOptDrawState.h" | |
15 #include "SkRTConf.h" | 14 #include "SkRTConf.h" |
16 #include "SkTSearch.h" | 15 #include "SkTSearch.h" |
17 | 16 |
18 #ifdef PROGRAM_CACHE_STATS | 17 #ifdef PROGRAM_CACHE_STATS |
19 SK_CONF_DECLARE(bool, c_DisplayCache, "gpu.displayCache", false, | 18 SK_CONF_DECLARE(bool, c_DisplayCache, "gpu.displayCache", false, |
20 "Display program cache usage."); | 19 "Display program cache usage."); |
21 #endif | 20 #endif |
22 | 21 |
23 typedef GrGLProgramDataManager::UniformHandle UniformHandle; | 22 typedef GrGLProgramDataManager::UniformHandle UniformHandle; |
24 | 23 |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 | 188 |
190 if (SK_MaxU32 == fCurrLRUStamp) { | 189 if (SK_MaxU32 == fCurrLRUStamp) { |
191 // wrap around! just trash our LRU, one time hit. | 190 // wrap around! just trash our LRU, one time hit. |
192 for (int i = 0; i < fCount; ++i) { | 191 for (int i = 0; i < fCount; ++i) { |
193 fEntries[i]->fLRUStamp = 0; | 192 fEntries[i]->fLRUStamp = 0; |
194 } | 193 } |
195 } | 194 } |
196 ++fCurrLRUStamp; | 195 ++fCurrLRUStamp; |
197 return entry->fProgram; | 196 return entry->fProgram; |
198 } | 197 } |
OLD | NEW |