summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-25 21:30:59 +0000
committerreveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-25 21:30:59 +0000
commitb3b0179788ab30c04f8d493bc4b953591cbe97de (patch)
treec032c4e2db490911f5b2fa53ee1f9de06632b370
parent635967b9d1ef47a8968b4774b98fbcadce533e1d (diff)
downloadchromium_src-b3b0179788ab30c04f8d493bc4b953591cbe97de.zip
chromium_src-b3b0179788ab30c04f8d493bc4b953591cbe97de.tar.gz
chromium_src-b3b0179788ab30c04f8d493bc4b953591cbe97de.tar.bz2
Revert 259322 "Merge 254665 "cc: Fix problem with missing "requi..."
Causing compile failure. > Merge 254665 "cc: Fix problem with missing "required for activat..." > > > cc: Fix problem with missing "required for activation" signals. > > > > We need to schedule a raster-required-for-activation-finished task > > whenever no tasks required for activation were throttled. Comparing > > scheduled tasks to |raster_tasks_required_for_activation_| is not > > enough as that includes tasks with pending uploads. > > > > BUG=346876 > > > > Review URL: https://codereview.chromium.org/185463002 > > TBR=reveman@chromium.org > > Review URL: https://codereview.chromium.org/210153003 BUG=356363,346876 TBR=reveman@chromium.org Review URL: https://codereview.chromium.org/199653009 git-svn-id: svn://svn.chromium.org/chrome/branches/1847/src@259339 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--cc/resources/pixel_buffer_raster_worker_pool.cc14
1 files changed, 5 insertions, 9 deletions
diff --git a/cc/resources/pixel_buffer_raster_worker_pool.cc b/cc/resources/pixel_buffer_raster_worker_pool.cc
index f8e0e61..21ee1cc 100644
--- a/cc/resources/pixel_buffer_raster_worker_pool.cc
+++ b/cc/resources/pixel_buffer_raster_worker_pool.cc
@@ -497,7 +497,6 @@ void PixelBufferRasterWorkerPool::ScheduleMoreTasks() {
size_t bytes_pending_upload = bytes_pending_upload_;
bool did_throttle_raster_tasks = false;
- bool did_throttle_raster_tasks_required_for_activation = false;
for (RasterTaskQueueIterator it(&raster_tasks_); it; ++it) {
internal::RasterWorkerPoolTask* task = *it;
@@ -521,9 +520,7 @@ void PixelBufferRasterWorkerPool::ScheduleMoreTasks() {
new_bytes_pending_upload += task->resource()->bytes();
if (new_bytes_pending_upload > max_bytes_pending_upload_) {
did_throttle_raster_tasks = true;
- if (item.required_for_activation)
- did_throttle_raster_tasks_required_for_activation = true;
- continue;
+ break;
}
// If raster has finished, just update |bytes_pending_upload|.
@@ -536,9 +533,7 @@ void PixelBufferRasterWorkerPool::ScheduleMoreTasks() {
// Throttle raster tasks based on kMaxScheduledRasterTasks.
if (tasks.container().size() >= kMaxScheduledRasterTasks) {
did_throttle_raster_tasks = true;
- if (item.required_for_activation)
- did_throttle_raster_tasks_required_for_activation = true;
- continue;
+ break;
}
// Update |bytes_pending_upload| now that task has cleared all
@@ -565,11 +560,12 @@ void PixelBufferRasterWorkerPool::ScheduleMoreTasks() {
// Schedule OnRasterTasksRequiredForActivationFinished call only when
// notification is pending and throttling is not preventing all pending
// tasks required for activation from being scheduled.
- if (!did_throttle_raster_tasks_required_for_activation &&
+ if (scheduled_raster_task_required_for_activation_count ==
+ raster_tasks_required_for_activation_.size() &&
should_notify_client_if_no_tasks_required_for_activation_are_pending_) {
new_raster_required_for_activation_finished_task =
CreateRasterRequiredForActivationFinishedTask(
- raster_tasks_.required_for_activation_count);
+ raster_tasks_required_for_activation_.size());
raster_required_for_activation_finished_task_pending_ = true;
InsertNodeForTask(&graph_,
new_raster_required_for_activation_finished_task.get(),