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

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

Issue 839143002: Roll Chrome into Mojo. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rebase Created 5 years, 11 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/thread_proxy.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/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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 void SingleThreadProxy::SetVisible(bool visible) { 107 void SingleThreadProxy::SetVisible(bool visible) {
108 TRACE_EVENT1("cc", "SingleThreadProxy::SetVisible", "visible", visible); 108 TRACE_EVENT1("cc", "SingleThreadProxy::SetVisible", "visible", visible);
109 DebugScopedSetImplThread impl(this); 109 DebugScopedSetImplThread impl(this);
110 layer_tree_host_impl_->SetVisible(visible); 110 layer_tree_host_impl_->SetVisible(visible);
111 if (scheduler_on_impl_thread_) 111 if (scheduler_on_impl_thread_)
112 scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible()); 112 scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible());
113 // Changing visibility could change ShouldComposite(). 113 // Changing visibility could change ShouldComposite().
114 } 114 }
115 115
116 void SingleThreadProxy::SetThrottleFrameProduction(bool throttle) {
117 TRACE_EVENT1("cc", "SingleThreadProxy::SetThrottleFrameProduction",
118 "throttle", throttle);
119 DebugScopedSetImplThread impl(this);
120 if (scheduler_on_impl_thread_)
121 scheduler_on_impl_thread_->SetThrottleFrameProduction(throttle);
122 }
123
116 void SingleThreadProxy::RequestNewOutputSurface() { 124 void SingleThreadProxy::RequestNewOutputSurface() {
117 DCHECK(Proxy::IsMainThread()); 125 DCHECK(Proxy::IsMainThread());
118 DCHECK(layer_tree_host_->output_surface_lost()); 126 DCHECK(layer_tree_host_->output_surface_lost());
119 output_surface_creation_callback_.Cancel(); 127 output_surface_creation_callback_.Cancel();
120 if (output_surface_creation_requested_) 128 if (output_surface_creation_requested_)
121 return; 129 return;
122 output_surface_creation_requested_ = true; 130 output_surface_creation_requested_ = true;
123 layer_tree_host_->RequestNewOutputSurface(); 131 layer_tree_host_->RequestNewOutputSurface();
124 } 132 }
125 133
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 806
799 void SingleThreadProxy::DidBeginImplFrameDeadline() { 807 void SingleThreadProxy::DidBeginImplFrameDeadline() {
800 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); 808 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame();
801 } 809 }
802 810
803 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { 811 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) {
804 layer_tree_host_->SendBeginFramesToChildren(args); 812 layer_tree_host_->SendBeginFramesToChildren(args);
805 } 813 }
806 814
807 } // namespace cc 815 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698