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

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

Issue 1762823002: Remove runtime toggling of throttling frames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/single_thread_proxy.h ('k') | cc/trees/threaded_channel.h » ('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/profiler/scoped_tracker.h" 8 #include "base/profiler/scoped_tracker.h"
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "cc/animation/animation_events.h" 10 #include "cc/animation/animation_events.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 void SingleThreadProxy::SetVisible(bool visible) { 111 void SingleThreadProxy::SetVisible(bool visible) {
112 TRACE_EVENT1("cc", "SingleThreadProxy::SetVisible", "visible", visible); 112 TRACE_EVENT1("cc", "SingleThreadProxy::SetVisible", "visible", visible);
113 DebugScopedSetImplThread impl(task_runner_provider_); 113 DebugScopedSetImplThread impl(task_runner_provider_);
114 114
115 layer_tree_host_impl_->SetVisible(visible); 115 layer_tree_host_impl_->SetVisible(visible);
116 116
117 if (scheduler_on_impl_thread_) 117 if (scheduler_on_impl_thread_)
118 scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible()); 118 scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible());
119 } 119 }
120 120
121 void SingleThreadProxy::SetThrottleFrameProduction(bool throttle) {
122 TRACE_EVENT1("cc", "SingleThreadProxy::SetThrottleFrameProduction",
123 "throttle", throttle);
124 DebugScopedSetImplThread impl(task_runner_provider_);
125 if (scheduler_on_impl_thread_)
126 scheduler_on_impl_thread_->SetThrottleFrameProduction(throttle);
127 }
128
129 void SingleThreadProxy::RequestNewOutputSurface() { 121 void SingleThreadProxy::RequestNewOutputSurface() {
130 DCHECK(task_runner_provider_->IsMainThread()); 122 DCHECK(task_runner_provider_->IsMainThread());
131 DCHECK(layer_tree_host_->output_surface_lost()); 123 DCHECK(layer_tree_host_->output_surface_lost());
132 output_surface_creation_callback_.Cancel(); 124 output_surface_creation_callback_.Cancel();
133 if (output_surface_creation_requested_) 125 if (output_surface_creation_requested_)
134 return; 126 return;
135 output_surface_creation_requested_ = true; 127 output_surface_creation_requested_ = true;
136 layer_tree_host_->RequestNewOutputSurface(); 128 layer_tree_host_->RequestNewOutputSurface();
137 } 129 }
138 130
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 << "DidFinishImplFrame called while not inside an impl frame!"; 867 << "DidFinishImplFrame called while not inside an impl frame!";
876 inside_impl_frame_ = false; 868 inside_impl_frame_ = false;
877 #endif 869 #endif
878 } 870 }
879 871
880 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { 872 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) {
881 layer_tree_host_->SendBeginFramesToChildren(args); 873 layer_tree_host_->SendBeginFramesToChildren(args);
882 } 874 }
883 875
884 } // namespace cc 876 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | cc/trees/threaded_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698