| OLD | NEW |
| 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 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 tasks[REQUIRED_FOR_ACTIVATION_TYPE].container().size(); | 546 tasks[REQUIRED_FOR_ACTIVATION_TYPE].container().size(); |
| 547 DCHECK_LE(scheduled_raster_task_required_for_activation_count, | 547 DCHECK_LE(scheduled_raster_task_required_for_activation_count, |
| 548 tasks_required_for_activation_.size()); | 548 tasks_required_for_activation_.size()); |
| 549 // Schedule OnRasterTasksRequiredForActivationFinished call only when | 549 // Schedule OnRasterTasksRequiredForActivationFinished call only when |
| 550 // notification is pending and throttling is not preventing all pending | 550 // notification is pending and throttling is not preventing all pending |
| 551 // tasks required for activation from being scheduled. | 551 // tasks required for activation from being scheduled. |
| 552 if (scheduled_raster_task_required_for_activation_count == | 552 if (scheduled_raster_task_required_for_activation_count == |
| 553 tasks_required_for_activation_.size() && | 553 tasks_required_for_activation_.size() && |
| 554 should_notify_client_if_no_tasks_required_for_activation_are_pending_) { | 554 should_notify_client_if_no_tasks_required_for_activation_are_pending_) { |
| 555 new_raster_required_for_activation_finished_task = | 555 new_raster_required_for_activation_finished_task = |
| 556 CreateRasterRequiredForActivationFinishedTask(); | 556 CreateRasterRequiredForActivationFinishedTask( |
| 557 tasks_required_for_activation_.size()); |
| 557 raster_required_for_activation_finished_task_pending_ = true; | 558 raster_required_for_activation_finished_task_pending_ = true; |
| 558 internal::GraphNode* raster_required_for_activation_finished_node = | 559 internal::GraphNode* raster_required_for_activation_finished_node = |
| 559 CreateGraphNodeForTask( | 560 CreateGraphNodeForTask( |
| 560 new_raster_required_for_activation_finished_task.get(), | 561 new_raster_required_for_activation_finished_task.get(), |
| 561 0u, // Priority 0 | 562 0u, // Priority 0 |
| 562 &graph); | 563 &graph); |
| 563 AddDependenciesToGraphNode( | 564 AddDependenciesToGraphNode( |
| 564 raster_required_for_activation_finished_node, | 565 raster_required_for_activation_finished_node, |
| 565 tasks[REQUIRED_FOR_ACTIVATION_TYPE].container()); | 566 tasks[REQUIRED_FOR_ACTIVATION_TYPE].container()); |
| 566 } | 567 } |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 | 692 |
| 692 throttle_state->SetInteger("bytes_available_for_upload", | 693 throttle_state->SetInteger("bytes_available_for_upload", |
| 693 max_bytes_pending_upload_ - bytes_pending_upload_); | 694 max_bytes_pending_upload_ - bytes_pending_upload_); |
| 694 throttle_state->SetInteger("bytes_pending_upload", bytes_pending_upload_); | 695 throttle_state->SetInteger("bytes_pending_upload", bytes_pending_upload_); |
| 695 throttle_state->SetInteger("scheduled_raster_task_count", | 696 throttle_state->SetInteger("scheduled_raster_task_count", |
| 696 scheduled_raster_task_count_); | 697 scheduled_raster_task_count_); |
| 697 return throttle_state.PassAs<base::Value>(); | 698 return throttle_state.PassAs<base::Value>(); |
| 698 } | 699 } |
| 699 | 700 |
| 700 } // namespace cc | 701 } // namespace cc |
| OLD | NEW |