Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Side by Side Diff: cc/tiles/image_decode_cache.h

Issue 2795803002: Clear Image Decode Cache on Navigation (Closed)
Patch Set: fix conversion Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/tiles/image_controller_unittest.cc ('k') | cc/tiles/software_image_decode_cache.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « cc/tiles/image_controller_unittest.cc ('k') | cc/tiles/software_image_decode_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698