| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CC_TILES_IMAGE_DECODE_CACHE_H_ | 5 #ifndef CC_TILES_IMAGE_DECODE_CACHE_H_ |
| 6 #define CC_TILES_IMAGE_DECODE_CACHE_H_ | 6 #define CC_TILES_IMAGE_DECODE_CACHE_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "cc/paint/draw_image.h" | 9 #include "cc/paint/draw_image.h" |
| 10 #include "cc/tiles/decoded_draw_image.h" | 10 #include "cc/tiles/decoded_draw_image.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 const DecodedDrawImage& decoded_image) = 0; | 86 const DecodedDrawImage& decoded_image) = 0; |
| 87 | 87 |
| 88 // This function informs the cache that now is a good time to clean up | 88 // This function informs the cache that now is a good time to clean up |
| 89 // memory. This is called periodically from the compositor thread. | 89 // memory. This is called periodically from the compositor thread. |
| 90 virtual void ReduceCacheUsage() = 0; | 90 virtual void ReduceCacheUsage() = 0; |
| 91 | 91 |
| 92 // This function informs the cache that we are hidden and should not be | 92 // This function informs the cache that we are hidden and should not be |
| 93 // retaining cached resources longer than needed. | 93 // retaining cached resources longer than needed. |
| 94 virtual void SetShouldAggressivelyFreeResources( | 94 virtual void SetShouldAggressivelyFreeResources( |
| 95 bool aggressively_free_resources) = 0; | 95 bool aggressively_free_resources) = 0; |
| 96 |
| 97 // Clears all elements from the cache. |
| 98 virtual void ClearCache() = 0; |
| 96 }; | 99 }; |
| 97 | 100 |
| 98 } // namespace cc | 101 } // namespace cc |
| 99 | 102 |
| 100 #endif // CC_TILES_IMAGE_DECODE_CACHE_H_ | 103 #endif // CC_TILES_IMAGE_DECODE_CACHE_H_ |
| OLD | NEW |