| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "platform/scheduler/renderer/renderer_scheduler_impl.h" | 5 #include "platform/scheduler/renderer/renderer_scheduler_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/debug/stack_trace.h" | 8 #include "base/debug/stack_trace.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1114 | 1114 |
| 1115 DCHECK(compositor_task_runner_->IsQueueEnabled()); | 1115 DCHECK(compositor_task_runner_->IsQueueEnabled()); |
| 1116 MainThreadOnly().current_policy = new_policy; | 1116 MainThreadOnly().current_policy = new_policy; |
| 1117 } | 1117 } |
| 1118 | 1118 |
| 1119 void RendererSchedulerImpl::ApplyTaskQueuePolicy( | 1119 void RendererSchedulerImpl::ApplyTaskQueuePolicy( |
| 1120 TaskQueue* task_queue, | 1120 TaskQueue* task_queue, |
| 1121 const TaskQueuePolicy& old_task_queue_policy, | 1121 const TaskQueuePolicy& old_task_queue_policy, |
| 1122 const TaskQueuePolicy& new_task_queue_policy) const { | 1122 const TaskQueuePolicy& new_task_queue_policy) const { |
| 1123 if (old_task_queue_policy.is_enabled != new_task_queue_policy.is_enabled) { | 1123 if (old_task_queue_policy.is_enabled != new_task_queue_policy.is_enabled) { |
| 1124 task_queue_throttler_->SetQueueEnabled(task_queue, | 1124 task_queue->SetQueueEnabled(new_task_queue_policy.is_enabled); |
| 1125 new_task_queue_policy.is_enabled); | |
| 1126 } | 1125 } |
| 1127 | 1126 |
| 1128 if (old_task_queue_policy.priority != new_task_queue_policy.priority) | 1127 if (old_task_queue_policy.priority != new_task_queue_policy.priority) |
| 1129 task_queue->SetQueuePriority(new_task_queue_policy.priority); | 1128 task_queue->SetQueuePriority(new_task_queue_policy.priority); |
| 1130 | 1129 |
| 1131 if (old_task_queue_policy.time_domain_type != | 1130 if (old_task_queue_policy.time_domain_type != |
| 1132 new_task_queue_policy.time_domain_type) { | 1131 new_task_queue_policy.time_domain_type) { |
| 1133 if (old_task_queue_policy.time_domain_type == TimeDomainType::THROTTLED) { | 1132 if (old_task_queue_policy.time_domain_type == TimeDomainType::THROTTLED) { |
| 1134 task_queue_throttler_->DecreaseThrottleRefCount(task_queue); | 1133 task_queue_throttler_->DecreaseThrottleRefCount(task_queue); |
| 1135 } else if (new_task_queue_policy.time_domain_type == | 1134 } else if (new_task_queue_policy.time_domain_type == |
| (...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1704 case v8::PERFORMANCE_LOAD: | 1703 case v8::PERFORMANCE_LOAD: |
| 1705 return "load"; | 1704 return "load"; |
| 1706 default: | 1705 default: |
| 1707 NOTREACHED(); | 1706 NOTREACHED(); |
| 1708 return nullptr; | 1707 return nullptr; |
| 1709 } | 1708 } |
| 1710 } | 1709 } |
| 1711 | 1710 |
| 1712 } // namespace scheduler | 1711 } // namespace scheduler |
| 1713 } // namespace blink | 1712 } // namespace blink |
| OLD | NEW |