| 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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 tasks[REQUIRED_FOR_ACTIVATION_TYPE].container().size(); | 532 tasks[REQUIRED_FOR_ACTIVATION_TYPE].container().size(); |
| 533 DCHECK_LE(scheduled_raster_task_required_for_activation_count, | 533 DCHECK_LE(scheduled_raster_task_required_for_activation_count, |
| 534 tasks_required_for_activation_.size()); | 534 tasks_required_for_activation_.size()); |
| 535 // Schedule OnRasterTasksRequiredForActivationFinished call only when | 535 // Schedule OnRasterTasksRequiredForActivationFinished call only when |
| 536 // notification is pending and throttling is not preventing all pending | 536 // notification is pending and throttling is not preventing all pending |
| 537 // tasks required for activation from being scheduled. | 537 // tasks required for activation from being scheduled. |
| 538 if (scheduled_raster_task_required_for_activation_count == | 538 if (scheduled_raster_task_required_for_activation_count == |
| 539 tasks_required_for_activation_.size() && | 539 tasks_required_for_activation_.size() && |
| 540 should_notify_client_if_no_tasks_required_for_activation_are_pending_) { | 540 should_notify_client_if_no_tasks_required_for_activation_are_pending_) { |
| 541 new_raster_required_for_activation_finished_task = | 541 new_raster_required_for_activation_finished_task = |
| 542 CreateRasterRequiredForActivationFinishedTask(); | 542 CreateRasterRequiredForActivationFinishedTask( |
| 543 tasks_required_for_activation_.size()); |
| 543 raster_required_for_activation_finished_task_pending_ = true; | 544 raster_required_for_activation_finished_task_pending_ = true; |
| 544 internal::GraphNode* raster_required_for_activation_finished_node = | 545 internal::GraphNode* raster_required_for_activation_finished_node = |
| 545 CreateGraphNodeForTask( | 546 CreateGraphNodeForTask( |
| 546 new_raster_required_for_activation_finished_task.get(), | 547 new_raster_required_for_activation_finished_task.get(), |
| 547 0u, // Priority 0 | 548 0u, // Priority 0 |
| 548 &graph); | 549 &graph); |
| 549 AddDependenciesToGraphNode( | 550 AddDependenciesToGraphNode( |
| 550 raster_required_for_activation_finished_node, | 551 raster_required_for_activation_finished_node, |
| 551 tasks[REQUIRED_FOR_ACTIVATION_TYPE].container()); | 552 tasks[REQUIRED_FOR_ACTIVATION_TYPE].container()); |
| 552 } | 553 } |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 | 677 |
| 677 throttle_state->SetInteger("bytes_available_for_upload", | 678 throttle_state->SetInteger("bytes_available_for_upload", |
| 678 max_bytes_pending_upload_ - bytes_pending_upload_); | 679 max_bytes_pending_upload_ - bytes_pending_upload_); |
| 679 throttle_state->SetInteger("bytes_pending_upload", bytes_pending_upload_); | 680 throttle_state->SetInteger("bytes_pending_upload", bytes_pending_upload_); |
| 680 throttle_state->SetInteger("scheduled_raster_task_count", | 681 throttle_state->SetInteger("scheduled_raster_task_count", |
| 681 scheduled_raster_task_count_); | 682 scheduled_raster_task_count_); |
| 682 return throttle_state.PassAs<base::Value>(); | 683 return throttle_state.PassAs<base::Value>(); |
| 683 } | 684 } |
| 684 | 685 |
| 685 } // namespace cc | 686 } // namespace cc |
| OLD | NEW |