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

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

Issue 733773005: cc: GPU rasterize tiles synchronously in PrepareToDraw (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove redundant completed_tasks_.clear() 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
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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 // All unscheduled tasks need to be canceled. 173 // All unscheduled tasks need to be canceled.
174 if (state.type == RasterTaskState::UNSCHEDULED) { 174 if (state.type == RasterTaskState::UNSCHEDULED) {
175 completed_raster_tasks_.push_back(state.task); 175 completed_raster_tasks_.push_back(state.task);
176 state.type = RasterTaskState::COMPLETED; 176 state.type = RasterTaskState::COMPLETED;
177 } 177 }
178 } 178 }
179 DCHECK_EQ(completed_raster_tasks_.size(), raster_task_states_.size()); 179 DCHECK_EQ(completed_raster_tasks_.size(), raster_task_states_.size());
180 } 180 }
181 181
182 void PixelBufferRasterWorkerPool::RunTasks(RasterTaskQueue* queue) {
183 NOTIMPLEMENTED();
184 }
185
182 void PixelBufferRasterWorkerPool::ScheduleTasks(RasterTaskQueue* queue) { 186 void PixelBufferRasterWorkerPool::ScheduleTasks(RasterTaskQueue* queue) {
183 TRACE_EVENT0("cc", "PixelBufferRasterWorkerPool::ScheduleTasks"); 187 TRACE_EVENT0("cc", "PixelBufferRasterWorkerPool::ScheduleTasks");
184 188
185 if (should_notify_client_if_no_tasks_are_pending_.none()) 189 if (should_notify_client_if_no_tasks_are_pending_.none())
186 TRACE_EVENT_ASYNC_BEGIN0("cc", "ScheduledTasks", this); 190 TRACE_EVENT_ASYNC_BEGIN0("cc", "ScheduledTasks", this);
187 191
188 should_notify_client_if_no_tasks_are_pending_.set(); 192 should_notify_client_if_no_tasks_are_pending_.set();
189 std::fill(task_counts_, task_counts_ + kNumberOfTaskSets, 0); 193 std::fill(task_counts_, task_counts_ + kNumberOfTaskSets, 0);
190 194
191 // Update raster task state and remove items from old queue. 195 // Update raster task state and remove items from old queue.
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 void PixelBufferRasterWorkerPool::ThrottleStateAsValueInto( 744 void PixelBufferRasterWorkerPool::ThrottleStateAsValueInto(
741 base::debug::TracedValue* throttle_state) const { 745 base::debug::TracedValue* throttle_state) const {
742 throttle_state->SetInteger("bytes_available_for_upload", 746 throttle_state->SetInteger("bytes_available_for_upload",
743 max_bytes_pending_upload_ - bytes_pending_upload_); 747 max_bytes_pending_upload_ - bytes_pending_upload_);
744 throttle_state->SetInteger("bytes_pending_upload", bytes_pending_upload_); 748 throttle_state->SetInteger("bytes_pending_upload", bytes_pending_upload_);
745 throttle_state->SetInteger("scheduled_raster_task_count", 749 throttle_state->SetInteger("scheduled_raster_task_count",
746 scheduled_raster_task_count_); 750 scheduled_raster_task_count_);
747 } 751 }
748 752
749 } // namespace cc 753 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698