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> |
11 #include <unordered_map> | 11 #include <unordered_map> |
12 #include <unordered_set> | 12 #include <unordered_set> |
13 | 13 |
14 #include "base/atomic_sequence_num.h" | 14 #include "base/atomic_sequence_num.h" |
15 #include "base/containers/mru_cache.h" | 15 #include "base/containers/mru_cache.h" |
16 #include "base/hash.h" | 16 #include "base/hash.h" |
17 #include "base/memory/discardable_memory_allocator.h" | 17 #include "base/memory/discardable_memory_allocator.h" |
18 #include "base/memory/ref_counted.h" | 18 #include "base/memory/ref_counted.h" |
19 #include "base/numerics/safe_math.h" | 19 #include "base/numerics/safe_math.h" |
20 #include "base/threading/thread_checker.h" | 20 #include "base/threading/thread_checker.h" |
21 #include "base/trace_event/memory_dump_provider.h" | 21 #include "base/trace_event/memory_dump_provider.h" |
22 #include "cc/base/cc_export.h" | 22 #include "cc/base/cc_export.h" |
23 #include "cc/playback/decoded_draw_image.h" | 23 #include "cc/playback/decoded_draw_image.h" |
24 #include "cc/playback/draw_image.h" | 24 #include "cc/playback/draw_image.h" |
25 #include "cc/raster/tile_task_runner.h" | 25 #include "cc/resources/resource_format.h" |
26 #include "cc/tiles/image_decode_controller.h" | 26 #include "cc/tiles/image_decode_controller.h" |
27 #include "skia/ext/refptr.h" | 27 #include "skia/ext/refptr.h" |
28 | 28 |
29 namespace cc { | 29 namespace cc { |
30 | 30 |
31 // ImageDecodeControllerKey is a class that gets a cache key out of a given draw | 31 // ImageDecodeControllerKey is a class that gets a cache key out of a given draw |
32 // image. That is, this key uniquely identifies an image in the cache. Note that | 32 // image. That is, this key uniquely identifies an image in the cache. Note that |
33 // it's insufficient to use SkImage's unique id, since the same image can appear | 33 // it's insufficient to use SkImage's unique id, since the same image can appear |
34 // in the cache multiple times at different scales and filter qualities. | 34 // in the cache multiple times at different scales and filter qualities. |
35 class CC_EXPORT ImageDecodeControllerKey { | 35 class CC_EXPORT ImageDecodeControllerKey { |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 | 266 |
267 ResourceFormat format_; | 267 ResourceFormat format_; |
268 | 268 |
269 // Used to uniquely identify DecodedImages for memory traces. | 269 // Used to uniquely identify DecodedImages for memory traces. |
270 base::AtomicSequenceNumber next_tracing_id_; | 270 base::AtomicSequenceNumber next_tracing_id_; |
271 }; | 271 }; |
272 | 272 |
273 } // namespace cc | 273 } // namespace cc |
274 | 274 |
275 #endif // CC_TILES_SOFTWARE_IMAGE_DECODE_CONTROLLER_H_ | 275 #endif // CC_TILES_SOFTWARE_IMAGE_DECODE_CONTROLLER_H_ |
OLD | NEW |