OLD | NEW |
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_CONTROLLER_H_ | 5 #ifndef CC_TILES_SOFTWARE_IMAGE_DECODE_CONTROLLER_H_ |
6 #define CC_TILES_SOFTWARE_IMAGE_DECODE_CONTROLLER_H_ | 6 #define CC_TILES_SOFTWARE_IMAGE_DECODE_CONTROLLER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 std::unordered_map<ImageKey, int, ImageKeyHash> decoded_images_ref_counts_; | 281 std::unordered_map<ImageKey, int, ImageKeyHash> decoded_images_ref_counts_; |
282 | 282 |
283 // Decoded image and ref counts (at-raster decode path). | 283 // Decoded image and ref counts (at-raster decode path). |
284 ImageMRUCache at_raster_decoded_images_; | 284 ImageMRUCache at_raster_decoded_images_; |
285 std::unordered_map<ImageKey, int, ImageKeyHash> | 285 std::unordered_map<ImageKey, int, ImageKeyHash> |
286 at_raster_decoded_images_ref_counts_; | 286 at_raster_decoded_images_ref_counts_; |
287 | 287 |
288 MemoryBudget locked_images_budget_; | 288 MemoryBudget locked_images_budget_; |
289 | 289 |
290 ResourceFormat format_; | 290 ResourceFormat format_; |
| 291 size_t max_items_in_cache_; |
291 | 292 |
292 // Used to uniquely identify DecodedImages for memory traces. | 293 // Used to uniquely identify DecodedImages for memory traces. |
293 base::AtomicSequenceNumber next_tracing_id_; | 294 base::AtomicSequenceNumber next_tracing_id_; |
294 }; | 295 }; |
295 | 296 |
296 } // namespace cc | 297 } // namespace cc |
297 | 298 |
298 #endif // CC_TILES_SOFTWARE_IMAGE_DECODE_CONTROLLER_H_ | 299 #endif // CC_TILES_SOFTWARE_IMAGE_DECODE_CONTROLLER_H_ |
OLD | NEW |