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

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

Issue 667793004: Support single-threaded impl-side painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use numeric limits for raster task limit Created 6 years, 2 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 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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 // Schedule new tasks. 280 // Schedule new tasks.
281 ScheduleMoreTasks(); 281 ScheduleMoreTasks();
282 282
283 // Reschedule check for completed raster tasks. 283 // Reschedule check for completed raster tasks.
284 check_for_completed_raster_task_notifier_.Schedule(); 284 check_for_completed_raster_task_notifier_.Schedule();
285 285
286 TRACE_EVENT_ASYNC_STEP_INTO1( 286 TRACE_EVENT_ASYNC_STEP_INTO1(
287 "cc", "ScheduledTasks", this, StateName(), "state", StateAsValue()); 287 "cc", "ScheduledTasks", this, StateName(), "state", StateAsValue());
288 } 288 }
289 289
290 void PixelBufferRasterWorkerPool::WaitForTasksToFinishRunning() {
291 task_graph_runner_->WaitForTasksToFinishRunning(namespace_token_);
reveman 2014/10/27 19:15:49 Note that this doesn't do what is expected. It wil
292 }
293
290 void PixelBufferRasterWorkerPool::CheckForCompletedTasks() { 294 void PixelBufferRasterWorkerPool::CheckForCompletedTasks() {
291 TRACE_EVENT0("cc", "PixelBufferRasterWorkerPool::CheckForCompletedTasks"); 295 TRACE_EVENT0("cc", "PixelBufferRasterWorkerPool::CheckForCompletedTasks");
292 296
293 CheckForCompletedRasterizerTasks(); 297 CheckForCompletedRasterizerTasks();
294 CheckForCompletedUploads(); 298 CheckForCompletedUploads();
295 FlushUploads(); 299 FlushUploads();
296 300
297 for (RasterizerTask::Vector::const_iterator it = 301 for (RasterizerTask::Vector::const_iterator it =
298 completed_image_decode_tasks_.begin(); 302 completed_image_decode_tasks_.begin();
299 it != completed_image_decode_tasks_.end(); 303 it != completed_image_decode_tasks_.end();
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 void PixelBufferRasterWorkerPool::ThrottleStateAsValueInto( 750 void PixelBufferRasterWorkerPool::ThrottleStateAsValueInto(
747 base::debug::TracedValue* throttle_state) const { 751 base::debug::TracedValue* throttle_state) const {
748 throttle_state->SetInteger("bytes_available_for_upload", 752 throttle_state->SetInteger("bytes_available_for_upload",
749 max_bytes_pending_upload_ - bytes_pending_upload_); 753 max_bytes_pending_upload_ - bytes_pending_upload_);
750 throttle_state->SetInteger("bytes_pending_upload", bytes_pending_upload_); 754 throttle_state->SetInteger("bytes_pending_upload", bytes_pending_upload_);
751 throttle_state->SetInteger("scheduled_raster_task_count", 755 throttle_state->SetInteger("scheduled_raster_task_count",
752 scheduled_raster_task_count_); 756 scheduled_raster_task_count_);
753 } 757 }
754 758
755 } // namespace cc 759 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698