| 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 /** | 203 /** |
| 204 * This method should be called whenever a GrTexture is unreffed or | 204 * This method should be called whenever a GrTexture is unreffed or |
| 205 * switched from exclusive to non-exclusive. This | 205 * switched from exclusive to non-exclusive. This |
| 206 * gives the resource cache a chance to discard unneeded textures. | 206 * gives the resource cache a chance to discard unneeded textures. |
| 207 * Note: this entry point will be removed once totally ref-driven | 207 * Note: this entry point will be removed once totally ref-driven |
| 208 * cache maintenance is implemented | 208 * cache maintenance is implemented |
| 209 */ | 209 */ |
| 210 void purgeCache(); | 210 void purgeCache(); |
| 211 | 211 |
| 212 /** | 212 /** |
| 213 * Purge all the unlocked resources from the cache. |
| 214 * This entry point is mainly meant for timing texture uploads |
| 215 * and is not defined in normal builds of Skia. |
| 216 */ |
| 217 void purgeAllUnlockedResources(); |
| 218 |
| 219 /** |
| 213 * Creates a texture that is outside the cache. Does not count against | 220 * Creates a texture that is outside the cache. Does not count against |
| 214 * cache's budget. | 221 * cache's budget. |
| 215 */ | 222 */ |
| 216 GrTexture* createUncachedTexture(const GrTextureDesc& desc, | 223 GrTexture* createUncachedTexture(const GrTextureDesc& desc, |
| 217 void* srcData, | 224 void* srcData, |
| 218 size_t rowBytes); | 225 size_t rowBytes); |
| 219 | 226 |
| 220 /** | 227 /** |
| 221 * Returns true if the specified use of an indexed texture is supported. | 228 * Returns true if the specified use of an indexed texture is supported. |
| 222 * Support may depend upon whether the texture params indicate that the | 229 * Support may depend upon whether the texture params indicate that the |
| (...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1037 } | 1044 } |
| 1038 | 1045 |
| 1039 GrTexture* texture() { return fTexture; } | 1046 GrTexture* texture() { return fTexture; } |
| 1040 | 1047 |
| 1041 private: | 1048 private: |
| 1042 GrContext* fContext; | 1049 GrContext* fContext; |
| 1043 GrTexture* fTexture; | 1050 GrTexture* fTexture; |
| 1044 }; | 1051 }; |
| 1045 | 1052 |
| 1046 #endif | 1053 #endif |
| OLD | NEW |