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

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

Issue 2945813002: cc: Interface to evict images from cc image decode cache. (Closed)
Patch Set: rebase Created 3 years, 6 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/base/devtools_instrumentation.h" 9 #include "cc/base/devtools_instrumentation.h"
10 #include "cc/paint/draw_image.h" 10 #include "cc/paint/draw_image.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 bool aggressively_free_resources) = 0; 117 bool aggressively_free_resources) = 0;
118 118
119 // Clears all elements from the cache. 119 // Clears all elements from the cache.
120 virtual void ClearCache() = 0; 120 virtual void ClearCache() = 0;
121 121
122 // Returns the maximum amount of memory we would be able to lock. This ignores 122 // Returns the maximum amount of memory we would be able to lock. This ignores
123 // any temporary states, such as throttled, and return the maximum possible 123 // any temporary states, such as throttled, and return the maximum possible
124 // memory. It is used as an esimate of whether an image can fit into the 124 // memory. It is used as an esimate of whether an image can fit into the
125 // locked budget before creating a task. 125 // locked budget before creating a task.
126 virtual size_t GetMaximumMemoryLimitBytes() const = 0; 126 virtual size_t GetMaximumMemoryLimitBytes() const = 0;
127
128 // Indicate to the cache that the image is no longer going
129 // to be used. This means it can be deleted altogether. If the
130 // image is locked, then the cache can do its best to clean it
131 // up later.
132 virtual void NotifyImageUnused(uint32_t skimage_id) = 0;
127 }; 133 };
128 134
129 } // namespace cc 135 } // namespace cc
130 136
131 #endif // CC_TILES_IMAGE_DECODE_CACHE_H_ 137 #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