Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc

Issue 2533603002: [scheduler] Add options to TaskQueue::InsertFence (Closed)
Patch Set: More nits Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after
1133 1133
1134 DCHECK(compositor_task_runner_->IsQueueEnabled()); 1134 DCHECK(compositor_task_runner_->IsQueueEnabled());
1135 MainThreadOnly().current_policy = new_policy; 1135 MainThreadOnly().current_policy = new_policy;
1136 } 1136 }
1137 1137
1138 void RendererSchedulerImpl::ApplyTaskQueuePolicy( 1138 void RendererSchedulerImpl::ApplyTaskQueuePolicy(
1139 TaskQueue* task_queue, 1139 TaskQueue* task_queue,
1140 const TaskQueuePolicy& old_task_queue_policy, 1140 const TaskQueuePolicy& old_task_queue_policy,
1141 const TaskQueuePolicy& new_task_queue_policy) const { 1141 const TaskQueuePolicy& new_task_queue_policy) const {
1142 if (old_task_queue_policy.is_enabled != new_task_queue_policy.is_enabled) { 1142 if (old_task_queue_policy.is_enabled != new_task_queue_policy.is_enabled) {
1143 task_queue_throttler_->SetQueueEnabled(task_queue, 1143 task_queue->SetQueueEnabled(new_task_queue_policy.is_enabled);
1144 new_task_queue_policy.is_enabled);
1145 } 1144 }
1146 1145
1147 if (old_task_queue_policy.priority != new_task_queue_policy.priority) 1146 if (old_task_queue_policy.priority != new_task_queue_policy.priority)
1148 task_queue->SetQueuePriority(new_task_queue_policy.priority); 1147 task_queue->SetQueuePriority(new_task_queue_policy.priority);
1149 1148
1150 if (old_task_queue_policy.time_domain_type != 1149 if (old_task_queue_policy.time_domain_type !=
1151 new_task_queue_policy.time_domain_type) { 1150 new_task_queue_policy.time_domain_type) {
1152 if (old_task_queue_policy.time_domain_type == TimeDomainType::THROTTLED) { 1151 if (old_task_queue_policy.time_domain_type == TimeDomainType::THROTTLED) {
1153 task_queue_throttler_->DecreaseThrottleRefCount(task_queue); 1152 task_queue_throttler_->DecreaseThrottleRefCount(task_queue);
1154 } else if (new_task_queue_policy.time_domain_type == 1153 } else if (new_task_queue_policy.time_domain_type ==
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
1786 case TimeDomainType::VIRTUAL: 1785 case TimeDomainType::VIRTUAL:
1787 return "virtual"; 1786 return "virtual";
1788 default: 1787 default:
1789 NOTREACHED(); 1788 NOTREACHED();
1790 return nullptr; 1789 return nullptr;
1791 } 1790 }
1792 } 1791 }
1793 1792
1794 } // namespace scheduler 1793 } // namespace scheduler
1795 } // namespace blink 1794 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698