OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 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 #ifndef GrContext_DEFINED | 8 #ifndef GrContext_DEFINED |
9 #define GrContext_DEFINED | 9 #define GrContext_DEFINED |
10 | 10 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
130 * Specify the GPU resource cache limits. If the current cache exceeds eith er | 130 * Specify the GPU resource cache limits. If the current cache exceeds eith er |
131 * of these, it will be purged (LRU) to keep the cache within these limits. | 131 * of these, it will be purged (LRU) to keep the cache within these limits. |
132 * | 132 * |
133 * @param maxResources The maximum number of resources that can be held in | 133 * @param maxResources The maximum number of resources that can be held in |
134 * the cache. | 134 * the cache. |
135 * @param maxResourceBytes The maximum number of bytes of video memory | 135 * @param maxResourceBytes The maximum number of bytes of video memory |
136 * that can be held in the cache. | 136 * that can be held in the cache. |
137 */ | 137 */ |
138 void setResourceCacheLimits(int maxResources, size_t maxResourceBytes); | 138 void setResourceCacheLimits(int maxResources, size_t maxResourceBytes); |
139 | 139 |
140 /** | |
141 * Specify the TextBlob cache limit. If the current cache exceeds this limi t it will purge. | |
142 * | |
143 * @param bytes The maximum number of bytes of cpu memory that can be held in the cache | |
144 */ | |
145 void setTextBlobCacheLimit(size_t bytes); | |
bsalomon
2015/08/03 15:28:30
Is this just needed for testing? Seems like an odd
| |
146 | |
140 GrTextureProvider* textureProvider() { return fTextureProvider; } | 147 GrTextureProvider* textureProvider() { return fTextureProvider; } |
141 const GrTextureProvider* textureProvider() const { return fTextureProvider; } | 148 const GrTextureProvider* textureProvider() const { return fTextureProvider; } |
142 | 149 |
143 /** | 150 /** |
144 * Frees GPU created by the context. Can be called to reduce GPU memory | 151 * Frees GPU created by the context. Can be called to reduce GPU memory |
145 * pressure. | 152 * pressure. |
146 */ | 153 */ |
147 void freeGpuResources(); | 154 void freeGpuResources(); |
148 | 155 |
149 /** | 156 /** |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
458 /** | 465 /** |
459 * A callback similar to the above for use by the TextBlobCache | 466 * A callback similar to the above for use by the TextBlobCache |
460 * TODO move textblob draw calls below context so we can use the call above. | 467 * TODO move textblob draw calls below context so we can use the call above. |
461 */ | 468 */ |
462 static void TextBlobCacheOverBudgetCB(void* data); | 469 static void TextBlobCacheOverBudgetCB(void* data); |
463 | 470 |
464 typedef SkRefCnt INHERITED; | 471 typedef SkRefCnt INHERITED; |
465 }; | 472 }; |
466 | 473 |
467 #endif | 474 #endif |
OLD | NEW |