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 const TracingInfo& tracing_info, | 112 const TracingInfo& tracing_info, |
113 scoped_refptr<TileTask>* task) override; | 113 scoped_refptr<TileTask>* 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 OnImageDecodeTaskCompleted(TileTask* task) override; |
| 123 void OnImageUploadTaskCompleted(TileTask* 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 | 270 |
269 ResourceFormat format_; | 271 ResourceFormat format_; |
270 | 272 |
271 // Used to uniquely identify DecodedImages for memory traces. | 273 // Used to uniquely identify DecodedImages for memory traces. |
272 base::AtomicSequenceNumber next_tracing_id_; | 274 base::AtomicSequenceNumber next_tracing_id_; |
273 }; | 275 }; |
274 | 276 |
275 } // namespace cc | 277 } // namespace cc |
276 | 278 |
277 #endif // CC_TILES_SOFTWARE_IMAGE_DECODE_CONTROLLER_H_ | 279 #endif // CC_TILES_SOFTWARE_IMAGE_DECODE_CONTROLLER_H_ |
OLD | NEW |