| 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 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 } | 538 } |
| 539 | 539 |
| 540 // Update |bytes_pending_upload| now that task has cleared all | 540 // Update |bytes_pending_upload| now that task has cleared all |
| 541 // throttling limits. | 541 // throttling limits. |
| 542 bytes_pending_upload = new_bytes_pending_upload; | 542 bytes_pending_upload = new_bytes_pending_upload; |
| 543 | 543 |
| 544 RasterTaskType type = IsRasterTaskRequiredForActivation(task) | 544 RasterTaskType type = IsRasterTaskRequiredForActivation(task) |
| 545 ? REQUIRED_FOR_ACTIVATION_TYPE | 545 ? REQUIRED_FOR_ACTIVATION_TYPE |
| 546 : PREPAINT_TYPE; | 546 : PREPAINT_TYPE; |
| 547 | 547 |
| 548 task->ScheduleOnOriginThread(this); | |
| 549 DCHECK(state_it->second == UNSCHEDULED || state_it->second == SCHEDULED); | 548 DCHECK(state_it->second == UNSCHEDULED || state_it->second == SCHEDULED); |
| 550 state_it->second = SCHEDULED; | 549 state_it->second = SCHEDULED; |
| 551 | 550 |
| 552 tasks[type].container().push_back(CreateGraphNodeForRasterTask( | 551 tasks[type].container().push_back(CreateGraphNodeForRasterTask( |
| 553 task, task->dependencies(), priority++, &graph)); | 552 task, task->dependencies(), priority++, &graph)); |
| 554 } | 553 } |
| 555 | 554 |
| 556 scoped_refptr<internal::WorkerPoolTask> | 555 scoped_refptr<internal::WorkerPoolTask> |
| 557 new_raster_required_for_activation_finished_task; | 556 new_raster_required_for_activation_finished_task; |
| 558 | 557 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 | 670 |
| 672 throttle_state->SetInteger("bytes_available_for_upload", | 671 throttle_state->SetInteger("bytes_available_for_upload", |
| 673 max_bytes_pending_upload_ - bytes_pending_upload_); | 672 max_bytes_pending_upload_ - bytes_pending_upload_); |
| 674 throttle_state->SetInteger("bytes_pending_upload", bytes_pending_upload_); | 673 throttle_state->SetInteger("bytes_pending_upload", bytes_pending_upload_); |
| 675 throttle_state->SetInteger("scheduled_raster_task_count", | 674 throttle_state->SetInteger("scheduled_raster_task_count", |
| 676 scheduled_raster_task_count_); | 675 scheduled_raster_task_count_); |
| 677 return throttle_state.PassAs<base::Value>(); | 676 return throttle_state.PassAs<base::Value>(); |
| 678 } | 677 } |
| 679 | 678 |
| 680 } // namespace cc | 679 } // namespace cc |
| OLD | NEW |