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

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

Issue 1895873006: compositor-worker: Initialize CW machinery plumbing to compositor and fire CW rAF callbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Include WebCompositorMutatorClient from WebLayerTreeView to allow unique_ptr usage. Created 4 years, 6 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 external_begin_frame_source_ = nullptr; 117 external_begin_frame_source_ = nullptr;
118 unthrottled_begin_frame_source_ = nullptr; 118 unthrottled_begin_frame_source_ = nullptr;
119 synthetic_begin_frame_source_ = nullptr; 119 synthetic_begin_frame_source_ = nullptr;
120 layer_tree_host_impl_ = nullptr; 120 layer_tree_host_impl_ = nullptr;
121 // We need to explicitly shutdown the notifier to destroy any weakptrs it is 121 // We need to explicitly shutdown the notifier to destroy any weakptrs it is
122 // holding while still on the compositor thread. This also ensures any 122 // holding while still on the compositor thread. This also ensures any
123 // callbacks holding a ProxyImpl pointer are cancelled. 123 // callbacks holding a ProxyImpl pointer are cancelled.
124 smoothness_priority_expiration_notifier_.Shutdown(); 124 smoothness_priority_expiration_notifier_.Shutdown();
125 } 125 }
126 126
127 void ProxyImpl::InitializeMutatorOnImpl(
128 std::unique_ptr<LayerTreeMutator> mutator) {
129 TRACE_EVENT0("cc,compositor-worker", "ProxyImpl::InitializeMutatorOnImpl");
130 DCHECK(IsImplThread());
131 layer_tree_host_impl_->SetLayerTreeMutator(std::move(mutator));
132 }
133
127 void ProxyImpl::UpdateTopControlsStateOnImpl(TopControlsState constraints, 134 void ProxyImpl::UpdateTopControlsStateOnImpl(TopControlsState constraints,
128 TopControlsState current, 135 TopControlsState current,
129 bool animate) { 136 bool animate) {
130 DCHECK(IsImplThread()); 137 DCHECK(IsImplThread());
131 layer_tree_host_impl_->top_controls_manager()->UpdateTopControlsState( 138 layer_tree_host_impl_->top_controls_manager()->UpdateTopControlsState(
132 constraints, current, animate); 139 constraints, current, animate);
133 } 140 }
134 141
135 void ProxyImpl::InitializeOutputSurfaceOnImpl(OutputSurface* output_surface) { 142 void ProxyImpl::InitializeOutputSurfaceOnImpl(OutputSurface* output_surface) {
136 TRACE_EVENT0("cc", "ProxyImpl::InitializeOutputSurfaceOnImplThread"); 143 TRACE_EVENT0("cc", "ProxyImpl::InitializeOutputSurfaceOnImplThread");
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 bool ProxyImpl::IsMainThreadBlocked() const { 685 bool ProxyImpl::IsMainThreadBlocked() const {
679 return task_runner_provider_->IsMainThreadBlocked(); 686 return task_runner_provider_->IsMainThreadBlocked();
680 } 687 }
681 688
682 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { 689 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() {
683 DCHECK(IsMainThreadBlocked() && commit_completion_event_); 690 DCHECK(IsMainThreadBlocked() && commit_completion_event_);
684 return main_thread_blocked_commit_vars_unsafe_; 691 return main_thread_blocked_commit_vars_unsafe_;
685 } 692 }
686 693
687 } // namespace cc 694 } // 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