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

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

Issue 20017005: gpu: Refactor GpuMemoryBuffer framework for multi-process support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « cc/resources/pixel_buffer_raster_worker_pool.h ('k') | cc/resources/raster_worker_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 "base/containers/stack_container.h" 7 #include "base/containers/stack_container.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "cc/debug/traced_value.h" 10 #include "cc/debug/traced_value.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 // another check. 229 // another check.
230 check_for_completed_raster_tasks_callback_.Cancel(); 230 check_for_completed_raster_tasks_callback_.Cancel();
231 check_for_completed_raster_tasks_pending_ = false; 231 check_for_completed_raster_tasks_pending_ = false;
232 ScheduleCheckForCompletedRasterTasks(); 232 ScheduleCheckForCompletedRasterTasks();
233 233
234 TRACE_EVENT_ASYNC_STEP1( 234 TRACE_EVENT_ASYNC_STEP1(
235 "cc", "ScheduledTasks", this, StateName(), 235 "cc", "ScheduledTasks", this, StateName(),
236 "state", TracedValue::FromValue(StateAsValue().release())); 236 "state", TracedValue::FromValue(StateAsValue().release()));
237 } 237 }
238 238
239 GLenum PixelBufferRasterWorkerPool::GetResourceFormat() const {
240 return resource_provider()->best_texture_format();
241 }
242
239 void PixelBufferRasterWorkerPool::CheckForCompletedTasks() { 243 void PixelBufferRasterWorkerPool::CheckForCompletedTasks() {
240 TRACE_EVENT0("cc", "PixelBufferRasterWorkerPool::CheckForCompletedTasks"); 244 TRACE_EVENT0("cc", "PixelBufferRasterWorkerPool::CheckForCompletedTasks");
241 245
242 RasterWorkerPool::CheckForCompletedTasks(); 246 RasterWorkerPool::CheckForCompletedTasks();
243 CheckForCompletedUploads(); 247 CheckForCompletedUploads();
244 FlushUploads(); 248 FlushUploads();
245 249
246 TaskDeque completed_tasks; 250 TaskDeque completed_tasks;
247 completed_tasks_.swap(completed_tasks); 251 completed_tasks_.swap(completed_tasks);
248 252
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 678
675 throttle_state->SetInteger("bytes_available_for_upload", 679 throttle_state->SetInteger("bytes_available_for_upload",
676 kMaxPendingUploadBytes - bytes_pending_upload_); 680 kMaxPendingUploadBytes - bytes_pending_upload_);
677 throttle_state->SetInteger("bytes_pending_upload", bytes_pending_upload_); 681 throttle_state->SetInteger("bytes_pending_upload", bytes_pending_upload_);
678 throttle_state->SetInteger("scheduled_raster_task_count", 682 throttle_state->SetInteger("scheduled_raster_task_count",
679 scheduled_raster_task_count_); 683 scheduled_raster_task_count_);
680 return throttle_state.PassAs<base::Value>(); 684 return throttle_state.PassAs<base::Value>();
681 } 685 }
682 686
683 } // namespace cc 687 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/pixel_buffer_raster_worker_pool.h ('k') | cc/resources/raster_worker_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698