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

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

Issue 2282433002: Revert of cc: Delete all the RendererCapabilities. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-prepare-mailbox-param
Patch Set: Created 4 years, 3 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/proxy_impl.h ('k') | cc/trees/proxy_main.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/proxy_impl.h" 5 #include "cc/trees/proxy_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 layer_tree_host_impl_->top_controls_manager()->UpdateTopControlsState( 139 layer_tree_host_impl_->top_controls_manager()->UpdateTopControlsState(
140 constraints, current, animate); 140 constraints, current, animate);
141 } 141 }
142 142
143 void ProxyImpl::InitializeOutputSurfaceOnImpl(OutputSurface* output_surface) { 143 void ProxyImpl::InitializeOutputSurfaceOnImpl(OutputSurface* output_surface) {
144 TRACE_EVENT0("cc", "ProxyImpl::InitializeOutputSurfaceOnImplThread"); 144 TRACE_EVENT0("cc", "ProxyImpl::InitializeOutputSurfaceOnImplThread");
145 DCHECK(IsImplThread()); 145 DCHECK(IsImplThread());
146 146
147 LayerTreeHostImpl* host_impl = layer_tree_host_impl_.get(); 147 LayerTreeHostImpl* host_impl = layer_tree_host_impl_.get();
148 bool success = host_impl->InitializeRenderer(output_surface); 148 bool success = host_impl->InitializeRenderer(output_surface);
149 channel_impl_->DidInitializeOutputSurface(success); 149 RendererCapabilities capabilities;
150 if (success) {
151 capabilities =
152 host_impl->GetRendererCapabilities().MainThreadCapabilities();
153 }
154
155 channel_impl_->DidInitializeOutputSurface(success, capabilities);
156
150 if (success) 157 if (success)
151 scheduler_->DidCreateAndInitializeOutputSurface(); 158 scheduler_->DidCreateAndInitializeOutputSurface();
152 } 159 }
153 160
154 void ProxyImpl::MainThreadHasStoppedFlingingOnImpl() { 161 void ProxyImpl::MainThreadHasStoppedFlingingOnImpl() {
155 DCHECK(IsImplThread()); 162 DCHECK(IsImplThread());
156 layer_tree_host_impl_->MainThreadHasStoppedFlinging(); 163 layer_tree_host_impl_->MainThreadHasStoppedFlinging();
157 } 164 }
158 165
159 void ProxyImpl::SetInputThrottledUntilCommitOnImpl(bool is_throttled) { 166 void ProxyImpl::SetInputThrottledUntilCommitOnImpl(bool is_throttled) {
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 layer_tree_host_impl_->ReadyToCommit(); 270 layer_tree_host_impl_->ReadyToCommit();
264 271
265 commit_completion_event_ = completion; 272 commit_completion_event_ = completion;
266 commit_completion_waits_for_activation_ = hold_commit_for_activation; 273 commit_completion_waits_for_activation_ = hold_commit_for_activation;
267 274
268 DCHECK(!blocked_main_commit().layer_tree_host); 275 DCHECK(!blocked_main_commit().layer_tree_host);
269 blocked_main_commit().layer_tree_host = layer_tree_host; 276 blocked_main_commit().layer_tree_host = layer_tree_host;
270 scheduler_->NotifyReadyToCommit(); 277 scheduler_->NotifyReadyToCommit();
271 } 278 }
272 279
280 void ProxyImpl::UpdateRendererCapabilitiesOnImplThread() {
281 DCHECK(IsImplThread());
282 channel_impl_->SetRendererCapabilitiesMainCopy(
283 layer_tree_host_impl_->GetRendererCapabilities()
284 .MainThreadCapabilities());
285 }
286
273 void ProxyImpl::DidLoseOutputSurfaceOnImplThread() { 287 void ProxyImpl::DidLoseOutputSurfaceOnImplThread() {
274 TRACE_EVENT0("cc", "ProxyImpl::DidLoseOutputSurfaceOnImplThread"); 288 TRACE_EVENT0("cc", "ProxyImpl::DidLoseOutputSurfaceOnImplThread");
275 DCHECK(IsImplThread()); 289 DCHECK(IsImplThread());
276 channel_impl_->DidLoseOutputSurface(); 290 channel_impl_->DidLoseOutputSurface();
277 scheduler_->DidLoseOutputSurface(); 291 scheduler_->DidLoseOutputSurface();
278 } 292 }
279 293
280 void ProxyImpl::CommitVSyncParameters(base::TimeTicks timebase, 294 void ProxyImpl::CommitVSyncParameters(base::TimeTicks timebase,
281 base::TimeDelta interval) { 295 base::TimeDelta interval) {
282 DCHECK(IsImplThread()); 296 DCHECK(IsImplThread());
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 bool ProxyImpl::IsMainThreadBlocked() const { 659 bool ProxyImpl::IsMainThreadBlocked() const {
646 return task_runner_provider_->IsMainThreadBlocked(); 660 return task_runner_provider_->IsMainThreadBlocked();
647 } 661 }
648 662
649 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { 663 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() {
650 DCHECK(IsMainThreadBlocked() && commit_completion_event_); 664 DCHECK(IsMainThreadBlocked() && commit_completion_event_);
651 return main_thread_blocked_commit_vars_unsafe_; 665 return main_thread_blocked_commit_vars_unsafe_;
652 } 666 }
653 667
654 } // namespace cc 668 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/proxy_impl.h ('k') | cc/trees/proxy_main.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698