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

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

Issue 2379343003: Revert of cc: Remove frame queuing from the scheduler. (Closed)
Patch Set: 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 ProxyImpl::BlockedMainCommitOnly::~BlockedMainCommitOnly() {} 94 ProxyImpl::BlockedMainCommitOnly::~BlockedMainCommitOnly() {}
95 95
96 ProxyImpl::~ProxyImpl() { 96 ProxyImpl::~ProxyImpl() {
97 TRACE_EVENT0("cc", "ProxyImpl::~ProxyImpl"); 97 TRACE_EVENT0("cc", "ProxyImpl::~ProxyImpl");
98 DCHECK(IsImplThread()); 98 DCHECK(IsImplThread());
99 DCHECK(IsMainThreadBlocked()); 99 DCHECK(IsMainThreadBlocked());
100 100
101 // Take away the CompositorFrameSink before destroying things so it doesn't 101 // Take away the CompositorFrameSink before destroying things so it doesn't
102 // try to call into its client mid-shutdown. 102 // try to call into its client mid-shutdown.
103 scheduler_->DidLoseCompositorFrameSink();
103 layer_tree_host_impl_->ReleaseCompositorFrameSink(); 104 layer_tree_host_impl_->ReleaseCompositorFrameSink();
105
104 scheduler_ = nullptr; 106 scheduler_ = nullptr;
105 external_begin_frame_source_ = nullptr; 107 external_begin_frame_source_ = nullptr;
106 layer_tree_host_impl_ = nullptr; 108 layer_tree_host_impl_ = nullptr;
107 // We need to explicitly shutdown the notifier to destroy any weakptrs it is 109 // We need to explicitly shutdown the notifier to destroy any weakptrs it is
108 // holding while still on the compositor thread. This also ensures any 110 // holding while still on the compositor thread. This also ensures any
109 // callbacks holding a ProxyImpl pointer are cancelled. 111 // callbacks holding a ProxyImpl pointer are cancelled.
110 smoothness_priority_expiration_notifier_.Shutdown(); 112 smoothness_priority_expiration_notifier_.Shutdown();
111 } 113 }
112 114
113 void ProxyImpl::InitializeMutatorOnImpl( 115 void ProxyImpl::InitializeMutatorOnImpl(
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 bool ProxyImpl::IsMainThreadBlocked() const { 612 bool ProxyImpl::IsMainThreadBlocked() const {
611 return task_runner_provider_->IsMainThreadBlocked(); 613 return task_runner_provider_->IsMainThreadBlocked();
612 } 614 }
613 615
614 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { 616 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() {
615 DCHECK(IsMainThreadBlocked() && commit_completion_event_); 617 DCHECK(IsMainThreadBlocked() && commit_completion_event_);
616 return main_thread_blocked_commit_vars_unsafe_; 618 return main_thread_blocked_commit_vars_unsafe_;
617 } 619 }
618 620
619 } // namespace cc 621 } // 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