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

Side by Side Diff: cc/tiles/software_image_decode_controller.h

Issue 1866043006: cc: Remove ScheduleOnOriginThread() and CompleteOnOriginThread(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wip - fixed few unit tests Created 4 years, 8 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
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_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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 ~SoftwareImageDecodeController() override; 108 ~SoftwareImageDecodeController() override;
109 109
110 // ImageDecodeController overrides. 110 // ImageDecodeController overrides.
111 bool GetTaskForImageAndRef(const DrawImage& image, 111 bool GetTaskForImageAndRef(const DrawImage& image,
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 CompleteTask(Task* task) override;
118 void ReduceCacheUsage() override; 119 void ReduceCacheUsage() override;
119 120
120 // Decode the given image and store it in the cache. This is only called by an 121 // Decode the given image and store it in the cache. This is only called by an
121 // image decode task from a worker thread. 122 // image decode task from a worker thread.
122 void DecodeImage(const ImageKey& key, const DrawImage& image); 123 void DecodeImage(const ImageKey& key, const DrawImage& image);
123 124
124 void RemovePendingTask(const ImageKey& key); 125 void RemovePendingTask(const ImageKey& key);
125 126
126 // MemoryDumpProvider overrides. 127 // MemoryDumpProvider overrides.
127 bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args, 128 bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 251
251 ResourceFormat format_; 252 ResourceFormat format_;
252 253
253 // Used to uniquely identify DecodedImages for memory traces. 254 // Used to uniquely identify DecodedImages for memory traces.
254 base::AtomicSequenceNumber next_tracing_id_; 255 base::AtomicSequenceNumber next_tracing_id_;
255 }; 256 };
256 257
257 } // namespace cc 258 } // namespace cc
258 259
259 #endif // CC_TILES_SOFTWARE_IMAGE_DECODE_CONTROLLER_H_ 260 #endif // CC_TILES_SOFTWARE_IMAGE_DECODE_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698