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

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

Issue 2386183003: Revert of cc: Remove frame queuing from the scheduler. (patchset #14 id:400001 of https://coderevie… (Closed)
Patch Set: fix revert Created 4 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/test/test_compositor_frame_sink.cc ('k') | cc/trees/single_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 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 ProxyImpl::BlockedMainCommitOnly::~BlockedMainCommitOnly() {} 86 ProxyImpl::BlockedMainCommitOnly::~BlockedMainCommitOnly() {}
87 87
88 ProxyImpl::~ProxyImpl() { 88 ProxyImpl::~ProxyImpl() {
89 TRACE_EVENT0("cc", "ProxyImpl::~ProxyImpl"); 89 TRACE_EVENT0("cc", "ProxyImpl::~ProxyImpl");
90 DCHECK(IsImplThread()); 90 DCHECK(IsImplThread());
91 DCHECK(IsMainThreadBlocked()); 91 DCHECK(IsMainThreadBlocked());
92 92
93 // Take away the CompositorFrameSink before destroying things so it doesn't 93 // Take away the CompositorFrameSink before destroying things so it doesn't
94 // try to call into its client mid-shutdown. 94 // try to call into its client mid-shutdown.
95 scheduler_->DidLoseCompositorFrameSink();
95 layer_tree_host_impl_->ReleaseCompositorFrameSink(); 96 layer_tree_host_impl_->ReleaseCompositorFrameSink();
97
96 scheduler_ = nullptr; 98 scheduler_ = nullptr;
97 layer_tree_host_impl_ = nullptr; 99 layer_tree_host_impl_ = nullptr;
98 // We need to explicitly shutdown the notifier to destroy any weakptrs it is 100 // We need to explicitly shutdown the notifier to destroy any weakptrs it is
99 // holding while still on the compositor thread. This also ensures any 101 // holding while still on the compositor thread. This also ensures any
100 // callbacks holding a ProxyImpl pointer are cancelled. 102 // callbacks holding a ProxyImpl pointer are cancelled.
101 smoothness_priority_expiration_notifier_.Shutdown(); 103 smoothness_priority_expiration_notifier_.Shutdown();
102 } 104 }
103 105
104 void ProxyImpl::InitializeMutatorOnImpl( 106 void ProxyImpl::InitializeMutatorOnImpl(
105 std::unique_ptr<LayerTreeMutator> mutator) { 107 std::unique_ptr<LayerTreeMutator> mutator) {
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 bool ProxyImpl::IsMainThreadBlocked() const { 603 bool ProxyImpl::IsMainThreadBlocked() const {
602 return task_runner_provider_->IsMainThreadBlocked(); 604 return task_runner_provider_->IsMainThreadBlocked();
603 } 605 }
604 606
605 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { 607 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() {
606 DCHECK(IsMainThreadBlocked() && commit_completion_event_); 608 DCHECK(IsMainThreadBlocked() && commit_completion_event_);
607 return main_thread_blocked_commit_vars_unsafe_; 609 return main_thread_blocked_commit_vars_unsafe_;
608 } 610 }
609 611
610 } // namespace cc 612 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/test_compositor_frame_sink.cc ('k') | cc/trees/single_thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698