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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 uint64_t prepare_tiles_id, | 112 uint64_t prepare_tiles_id, |
113 scoped_refptr<ImageDecodeTask>* task) override; | 113 scoped_refptr<ImageDecodeTask>* task) override; |
114 void UnrefImage(const DrawImage& image) override; | 114 void UnrefImage(const DrawImage& image) override; |
115 DecodedDrawImage GetDecodedImageForDraw(const DrawImage& image) override; | 115 DecodedDrawImage GetDecodedImageForDraw(const DrawImage& image) override; |
116 void DrawWithImageFinished(const DrawImage& image, | 116 void DrawWithImageFinished(const DrawImage& image, |
117 const DecodedDrawImage& decoded_image) override; | 117 const DecodedDrawImage& decoded_image) override; |
118 void ReduceCacheUsage() override; | 118 void ReduceCacheUsage() override; |
119 // Software doesn't keep outstanding images pinned, so this is a no-op. | 119 // Software doesn't keep outstanding images pinned, so this is a no-op. |
120 void SetShouldAggressivelyFreeResources( | 120 void SetShouldAggressivelyFreeResources( |
121 bool aggressively_free_resources) override {} | 121 bool aggressively_free_resources) override {} |
| 122 void ImageDecodeTaskCompleted(Task* task) override; |
| 123 void ImageUploadTaskCompleted(Task* task) override {} |
122 | 124 |
123 // Decode the given image and store it in the cache. This is only called by an | 125 // Decode the given image and store it in the cache. This is only called by an |
124 // image decode task from a worker thread. | 126 // image decode task from a worker thread. |
125 void DecodeImage(const ImageKey& key, const DrawImage& image); | 127 void DecodeImage(const ImageKey& key, const DrawImage& image); |
126 | 128 |
127 void RemovePendingTask(const ImageKey& key); | 129 void RemovePendingTask(const ImageKey& key); |
128 | 130 |
129 // MemoryDumpProvider overrides. | 131 // MemoryDumpProvider overrides. |
130 bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args, | 132 bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args, |
131 base::trace_event::ProcessMemoryDump* pmd) override; | 133 base::trace_event::ProcessMemoryDump* pmd) override; |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 | 255 |
254 ResourceFormat format_; | 256 ResourceFormat format_; |
255 | 257 |
256 // Used to uniquely identify DecodedImages for memory traces. | 258 // Used to uniquely identify DecodedImages for memory traces. |
257 base::AtomicSequenceNumber next_tracing_id_; | 259 base::AtomicSequenceNumber next_tracing_id_; |
258 }; | 260 }; |
259 | 261 |
260 } // namespace cc | 262 } // namespace cc |
261 | 263 |
262 #endif // CC_TILES_SOFTWARE_IMAGE_DECODE_CONTROLLER_H_ | 264 #endif // CC_TILES_SOFTWARE_IMAGE_DECODE_CONTROLLER_H_ |
OLD | NEW |