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

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

Issue 398543004: cc: Avoid issuing COMMANDS_COMPLETED queries unless necessary. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: issue BeginQueryEXT before first drawing command Created 6 years, 5 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/image_raster_worker_pool.cc ('k') | cc/resources/resource_provider.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 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 405
406 bytes_pending_upload_ -= task->resource()->bytes(); 406 bytes_pending_upload_ -= task->resource()->bytes();
407 407
408 task->WillComplete(); 408 task->WillComplete();
409 task->CompleteOnOriginThread(this); 409 task->CompleteOnOriginThread(this);
410 task->DidComplete(); 410 task->DidComplete();
411 411
412 // Async set pixels commands are not necessarily processed in-sequence with 412 // Async set pixels commands are not necessarily processed in-sequence with
413 // drawing commands. Read lock fences are required to ensure that async 413 // drawing commands. Read lock fences are required to ensure that async
414 // commands don't access the resource while used for drawing. 414 // commands don't access the resource while used for drawing.
415 resource_provider_->EnableReadLockFences(task->resource()->id(), true); 415 resource_provider_->EnableReadLockFences(task->resource()->id());
416 416
417 DCHECK(std::find(completed_raster_tasks_.begin(), 417 DCHECK(std::find(completed_raster_tasks_.begin(),
418 completed_raster_tasks_.end(), 418 completed_raster_tasks_.end(),
419 task) == completed_raster_tasks_.end()); 419 task) == completed_raster_tasks_.end());
420 completed_raster_tasks_.push_back(task); 420 completed_raster_tasks_.push_back(task);
421 state.type = RasterTaskState::COMPLETED; 421 state.type = RasterTaskState::COMPLETED;
422 DCHECK_LE(static_cast<size_t>(state.required_for_activation), 422 DCHECK_LE(static_cast<size_t>(state.required_for_activation),
423 raster_tasks_required_for_activation_count_); 423 raster_tasks_required_for_activation_count_);
424 raster_tasks_required_for_activation_count_ -= 424 raster_tasks_required_for_activation_count_ -=
425 state.required_for_activation; 425 state.required_for_activation;
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 761
762 throttle_state->SetInteger("bytes_available_for_upload", 762 throttle_state->SetInteger("bytes_available_for_upload",
763 max_bytes_pending_upload_ - bytes_pending_upload_); 763 max_bytes_pending_upload_ - bytes_pending_upload_);
764 throttle_state->SetInteger("bytes_pending_upload", bytes_pending_upload_); 764 throttle_state->SetInteger("bytes_pending_upload", bytes_pending_upload_);
765 throttle_state->SetInteger("scheduled_raster_task_count", 765 throttle_state->SetInteger("scheduled_raster_task_count",
766 scheduled_raster_task_count_); 766 scheduled_raster_task_count_);
767 return throttle_state.PassAs<base::Value>(); 767 return throttle_state.PassAs<base::Value>();
768 } 768 }
769 769
770 } // namespace cc 770 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/image_raster_worker_pool.cc ('k') | cc/resources/resource_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698