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

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

Issue 2538833005: [scheduler] Add options to TaskQueue::InsertFence (Closed)
Patch Set: 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 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698