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

Side by Side Diff: cc/tiles/tile_manager.cc

Issue 1885873002: cc: Rename TileTaskClient interface to RasterBufferProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_schedule
Patch Set: Removed patch dependency. 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
« no previous file with comments | « cc/tiles/software_image_decode_controller.cc ('k') | cc/tiles/tile_manager_perftest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 #include "cc/tiles/tile_manager.h" 5 #include "cc/tiles/tile_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 timer.SetArea(content_rect_.size().GetArea()); 91 timer.SetArea(content_rect_.size().GetArea());
92 92
93 DCHECK(raster_source_); 93 DCHECK(raster_source_);
94 94
95 raster_buffer_->Playback(raster_source_.get(), content_rect_, 95 raster_buffer_->Playback(raster_source_.get(), content_rect_,
96 invalid_content_rect_, new_content_id_, 96 invalid_content_rect_, new_content_id_,
97 contents_scale_, playback_settings_); 97 contents_scale_, playback_settings_);
98 } 98 }
99 99
100 // Overridden from TileTask: 100 // Overridden from TileTask:
101 void ScheduleOnOriginThread(TileTaskClient* client) override { 101 void ScheduleOnOriginThread(RasterBufferProvider* provider) override {
102 DCHECK(!raster_buffer_); 102 DCHECK(!raster_buffer_);
103 raster_buffer_ = client->AcquireBufferForRaster( 103 raster_buffer_ = provider->AcquireBufferForRaster(
104 resource_, resource_content_id_, previous_content_id_); 104 resource_, resource_content_id_, previous_content_id_);
105 } 105 }
106 void CompleteOnOriginThread(TileTaskClient* client) override { 106 void CompleteOnOriginThread(RasterBufferProvider* provider) override {
107 client->ReleaseBufferForRaster(std::move(raster_buffer_)); 107 provider->ReleaseBufferForRaster(std::move(raster_buffer_));
108 reply_.Run(!HasFinishedRunning()); 108 reply_.Run(!HasFinishedRunning());
109 } 109 }
110 110
111 protected: 111 protected:
112 ~RasterTaskImpl() override { DCHECK(!raster_buffer_); } 112 ~RasterTaskImpl() override { DCHECK(!raster_buffer_); }
113 113
114 private: 114 private:
115 const Resource* resource_; 115 const Resource* resource_;
116 scoped_refptr<RasterSource> raster_source_; 116 scoped_refptr<RasterSource> raster_source_;
117 gfx::Rect content_rect_; 117 gfx::Rect content_rect_;
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 : task_runner_(task_runner), 245 : task_runner_(task_runner),
246 on_task_set_finished_callback_(on_task_set_finished_callback) {} 246 on_task_set_finished_callback_(on_task_set_finished_callback) {}
247 247
248 // Overridden from Task: 248 // Overridden from Task:
249 void RunOnWorkerThread() override { 249 void RunOnWorkerThread() override {
250 TRACE_EVENT0("cc", "TaskSetFinishedTaskImpl::RunOnWorkerThread"); 250 TRACE_EVENT0("cc", "TaskSetFinishedTaskImpl::RunOnWorkerThread");
251 TaskSetFinished(); 251 TaskSetFinished();
252 } 252 }
253 253
254 // Overridden from TileTask: 254 // Overridden from TileTask:
255 void ScheduleOnOriginThread(TileTaskClient* client) override {} 255 void ScheduleOnOriginThread(RasterBufferProvider* provider) override {}
256 void CompleteOnOriginThread(TileTaskClient* client) override {} 256 void CompleteOnOriginThread(RasterBufferProvider* provider) override {}
257 257
258 protected: 258 protected:
259 ~TaskSetFinishedTaskImpl() override {} 259 ~TaskSetFinishedTaskImpl() override {}
260 260
261 void TaskSetFinished() { 261 void TaskSetFinished() {
262 task_runner_->PostTask(FROM_HERE, on_task_set_finished_callback_); 262 task_runner_->PostTask(FROM_HERE, on_task_set_finished_callback_);
263 } 263 }
264 264
265 private: 265 private:
266 scoped_refptr<base::SequencedTaskRunner> task_runner_; 266 scoped_refptr<base::SequencedTaskRunner> task_runner_;
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after
1235 void TileManager::Signals::reset() { 1235 void TileManager::Signals::reset() {
1236 ready_to_activate = false; 1236 ready_to_activate = false;
1237 did_notify_ready_to_activate = false; 1237 did_notify_ready_to_activate = false;
1238 ready_to_draw = false; 1238 ready_to_draw = false;
1239 did_notify_ready_to_draw = false; 1239 did_notify_ready_to_draw = false;
1240 all_tile_tasks_completed = false; 1240 all_tile_tasks_completed = false;
1241 did_notify_all_tile_tasks_completed = false; 1241 did_notify_all_tile_tasks_completed = false;
1242 } 1242 }
1243 1243
1244 } // namespace cc 1244 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiles/software_image_decode_controller.cc ('k') | cc/tiles/tile_manager_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698