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

Side by Side Diff: cc/tiles/software_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_decode_cache.h ('k') | cc/tiles/software_image_decode_cache.cc » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_SOFTWARE_IMAGE_DECODE_CACHE_H_ 5 #ifndef CC_TILES_SOFTWARE_IMAGE_DECODE_CACHE_H_
6 #define CC_TILES_SOFTWARE_IMAGE_DECODE_CACHE_H_ 6 #define CC_TILES_SOFTWARE_IMAGE_DECODE_CACHE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 void UnrefImage(const DrawImage& image) override; 135 void UnrefImage(const DrawImage& image) override;
136 DecodedDrawImage GetDecodedImageForDraw(const DrawImage& image) override; 136 DecodedDrawImage GetDecodedImageForDraw(const DrawImage& image) override;
137 void DrawWithImageFinished(const DrawImage& image, 137 void DrawWithImageFinished(const DrawImage& image,
138 const DecodedDrawImage& decoded_image) override; 138 const DecodedDrawImage& decoded_image) override;
139 void ReduceCacheUsage() override; 139 void ReduceCacheUsage() override;
140 // Software doesn't keep outstanding images pinned, so this is a no-op. 140 // Software doesn't keep outstanding images pinned, so this is a no-op.
141 void SetShouldAggressivelyFreeResources( 141 void SetShouldAggressivelyFreeResources(
142 bool aggressively_free_resources) override {} 142 bool aggressively_free_resources) override {}
143 void ClearCache() override; 143 void ClearCache() override;
144 size_t GetMaximumMemoryLimitBytes() const override; 144 size_t GetMaximumMemoryLimitBytes() const override;
145 void NotifyImageUnused(uint32_t skimage_id) override;
145 146
146 // Decode the given image and store it in the cache. This is only called by an 147 // Decode the given image and store it in the cache. This is only called by an
147 // image decode task from a worker thread. 148 // image decode task from a worker thread.
148 void DecodeImage(const ImageKey& key, 149 void DecodeImage(const ImageKey& key,
149 const DrawImage& image, 150 const DrawImage& image,
150 DecodeTaskType task_type); 151 DecodeTaskType task_type);
151 152
152 void RemovePendingTask(const ImageKey& key, DecodeTaskType task_type); 153 void RemovePendingTask(const ImageKey& key, DecodeTaskType task_type);
153 154
154 // MemoryDumpProvider overrides. 155 // MemoryDumpProvider overrides.
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 ResourceFormat format_; 327 ResourceFormat format_;
327 size_t max_items_in_cache_; 328 size_t max_items_in_cache_;
328 329
329 // Used to uniquely identify DecodedImages for memory traces. 330 // Used to uniquely identify DecodedImages for memory traces.
330 base::AtomicSequenceNumber next_tracing_id_; 331 base::AtomicSequenceNumber next_tracing_id_;
331 }; 332 };
332 333
333 } // namespace cc 334 } // namespace cc
334 335
335 #endif // CC_TILES_SOFTWARE_IMAGE_DECODE_CACHE_H_ 336 #endif // CC_TILES_SOFTWARE_IMAGE_DECODE_CACHE_H_
OLDNEW
« no previous file with comments | « cc/tiles/image_decode_cache.h ('k') | cc/tiles/software_image_decode_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698