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

Side by Side Diff: cc/trees/single_thread_proxy.cc

Issue 554973002: Disable scheduler deadline task on battery power in Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 2 months 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
« no previous file with comments | « cc/trees/layer_tree_settings.cc ('k') | cc/trees/thread_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/trees/single_thread_proxy.h" 5 #include "cc/trees/single_thread_proxy.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "cc/debug/benchmark_instrumentation.h" 9 #include "cc/debug/benchmark_instrumentation.h"
10 #include "cc/output/context_provider.h" 10 #include "cc/output/context_provider.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // Scheduling is controlled by the embedder in the single thread case, so 79 // Scheduling is controlled by the embedder in the single thread case, so
80 // nothing to do. 80 // nothing to do.
81 DCHECK(Proxy::IsMainThread()); 81 DCHECK(Proxy::IsMainThread());
82 DebugScopedSetImplThread impl(this); 82 DebugScopedSetImplThread impl(this);
83 if (layer_tree_host_->settings().single_thread_proxy_scheduler && 83 if (layer_tree_host_->settings().single_thread_proxy_scheduler &&
84 !scheduler_on_impl_thread_) { 84 !scheduler_on_impl_thread_) {
85 SchedulerSettings scheduler_settings(layer_tree_host_->settings()); 85 SchedulerSettings scheduler_settings(layer_tree_host_->settings());
86 scheduler_on_impl_thread_ = Scheduler::Create(this, 86 scheduler_on_impl_thread_ = Scheduler::Create(this,
87 scheduler_settings, 87 scheduler_settings,
88 layer_tree_host_->id(), 88 layer_tree_host_->id(),
89 MainThreadTaskRunner()); 89 MainThreadTaskRunner(),
90 base::PowerMonitor::Get());
90 scheduler_on_impl_thread_->SetCanStart(); 91 scheduler_on_impl_thread_->SetCanStart();
91 scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible()); 92 scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible());
92 } 93 }
93 } 94 }
94 95
95 void SingleThreadProxy::SetVisible(bool visible) { 96 void SingleThreadProxy::SetVisible(bool visible) {
96 TRACE_EVENT0("cc", "SingleThreadProxy::SetVisible"); 97 TRACE_EVENT0("cc", "SingleThreadProxy::SetVisible");
97 DebugScopedSetImplThread impl(this); 98 DebugScopedSetImplThread impl(this);
98 layer_tree_host_impl_->SetVisible(visible); 99 layer_tree_host_impl_->SetVisible(visible);
99 if (scheduler_on_impl_thread_) 100 if (scheduler_on_impl_thread_)
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 774
774 base::TimeDelta SingleThreadProxy::CommitToActivateDurationEstimate() { 775 base::TimeDelta SingleThreadProxy::CommitToActivateDurationEstimate() {
775 return timing_history_.CommitToActivateDurationEstimate(); 776 return timing_history_.CommitToActivateDurationEstimate();
776 } 777 }
777 778
778 void SingleThreadProxy::DidBeginImplFrameDeadline() { 779 void SingleThreadProxy::DidBeginImplFrameDeadline() {
779 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); 780 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame();
780 } 781 }
781 782
782 } // namespace cc 783 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_settings.cc ('k') | cc/trees/thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698