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

Side by Side Diff: cc/resources/pixel_buffer_raster_worker_pool.cc

Issue 683113005: Update from chromium https://crrev.com/302282 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/resources/picture_pile_unittest.cc ('k') | cc/resources/resource_pool.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/resources/pixel_buffer_raster_worker_pool.h" 5 #include "cc/resources/pixel_buffer_raster_worker_pool.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/containers/stack_container.h" 9 #include "base/containers/stack_container.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 162
163 shutdown_ = true; 163 shutdown_ = true;
164 164
165 TaskGraph empty; 165 TaskGraph empty;
166 task_graph_runner_->ScheduleTasks(namespace_token_, &empty); 166 task_graph_runner_->ScheduleTasks(namespace_token_, &empty);
167 task_graph_runner_->WaitForTasksToFinishRunning(namespace_token_); 167 task_graph_runner_->WaitForTasksToFinishRunning(namespace_token_);
168 168
169 CheckForCompletedRasterizerTasks(); 169 CheckForCompletedRasterizerTasks();
170 CheckForCompletedUploads(); 170 CheckForCompletedUploads();
171 171
172 check_for_completed_raster_task_notifier_.Cancel(); 172 check_for_completed_raster_task_notifier_.Shutdown();
173 173
174 for (RasterTaskState::Vector::iterator it = raster_task_states_.begin(); 174 for (RasterTaskState::Vector::iterator it = raster_task_states_.begin();
175 it != raster_task_states_.end(); 175 it != raster_task_states_.end();
176 ++it) { 176 ++it) {
177 RasterTaskState& state = *it; 177 RasterTaskState& state = *it;
178 178
179 // All unscheduled tasks need to be canceled. 179 // All unscheduled tasks need to be canceled.
180 if (state.type == RasterTaskState::UNSCHEDULED) { 180 if (state.type == RasterTaskState::UNSCHEDULED) {
181 completed_raster_tasks_.push_back(state.task); 181 completed_raster_tasks_.push_back(state.task);
182 state.type = RasterTaskState::COMPLETED; 182 state.type = RasterTaskState::COMPLETED;
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 void PixelBufferRasterWorkerPool::ThrottleStateAsValueInto( 746 void PixelBufferRasterWorkerPool::ThrottleStateAsValueInto(
747 base::debug::TracedValue* throttle_state) const { 747 base::debug::TracedValue* throttle_state) const {
748 throttle_state->SetInteger("bytes_available_for_upload", 748 throttle_state->SetInteger("bytes_available_for_upload",
749 max_bytes_pending_upload_ - bytes_pending_upload_); 749 max_bytes_pending_upload_ - bytes_pending_upload_);
750 throttle_state->SetInteger("bytes_pending_upload", bytes_pending_upload_); 750 throttle_state->SetInteger("bytes_pending_upload", bytes_pending_upload_);
751 throttle_state->SetInteger("scheduled_raster_task_count", 751 throttle_state->SetInteger("scheduled_raster_task_count",
752 scheduled_raster_task_count_); 752 scheduled_raster_task_count_);
753 } 753 }
754 754
755 } // namespace cc 755 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_pile_unittest.cc ('k') | cc/resources/resource_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698