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

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

Issue 2075343003: Use a cc::Display for layout tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mailbox-test
Patch Set: layouttests-display2: rebase Created 4 years, 5 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/pixel_test_delegating_output_surface.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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 ProxyImpl::BlockedMainCommitOnly::BlockedMainCommitOnly() 108 ProxyImpl::BlockedMainCommitOnly::BlockedMainCommitOnly()
109 : layer_tree_host(nullptr) {} 109 : layer_tree_host(nullptr) {}
110 110
111 ProxyImpl::BlockedMainCommitOnly::~BlockedMainCommitOnly() {} 111 ProxyImpl::BlockedMainCommitOnly::~BlockedMainCommitOnly() {}
112 112
113 ProxyImpl::~ProxyImpl() { 113 ProxyImpl::~ProxyImpl() {
114 TRACE_EVENT0("cc", "ProxyImpl::~ProxyImpl"); 114 TRACE_EVENT0("cc", "ProxyImpl::~ProxyImpl");
115 DCHECK(IsImplThread()); 115 DCHECK(IsImplThread());
116 DCHECK(IsMainThreadBlocked()); 116 DCHECK(IsMainThreadBlocked());
117 117
118 // Take away the OutputSurface before destroying things so it doesn't try
119 // to call into its client mid-shutdown.
120 layer_tree_host_impl_->ReleaseOutputSurface();
121
118 scheduler_ = nullptr; 122 scheduler_ = nullptr;
119 external_begin_frame_source_ = nullptr; 123 external_begin_frame_source_ = nullptr;
120 unthrottled_begin_frame_source_ = nullptr; 124 unthrottled_begin_frame_source_ = nullptr;
121 synthetic_begin_frame_source_ = nullptr; 125 synthetic_begin_frame_source_ = nullptr;
122 layer_tree_host_impl_ = nullptr; 126 layer_tree_host_impl_ = nullptr;
123 // We need to explicitly shutdown the notifier to destroy any weakptrs it is 127 // We need to explicitly shutdown the notifier to destroy any weakptrs it is
124 // holding while still on the compositor thread. This also ensures any 128 // holding while still on the compositor thread. This also ensures any
125 // callbacks holding a ProxyImpl pointer are cancelled. 129 // callbacks holding a ProxyImpl pointer are cancelled.
126 smoothness_priority_expiration_notifier_.Shutdown(); 130 smoothness_priority_expiration_notifier_.Shutdown();
127 } 131 }
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 bool ProxyImpl::IsMainThreadBlocked() const { 679 bool ProxyImpl::IsMainThreadBlocked() const {
676 return task_runner_provider_->IsMainThreadBlocked(); 680 return task_runner_provider_->IsMainThreadBlocked();
677 } 681 }
678 682
679 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { 683 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() {
680 DCHECK(IsMainThreadBlocked() && commit_completion_event_); 684 DCHECK(IsMainThreadBlocked() && commit_completion_event_);
681 return main_thread_blocked_commit_vars_unsafe_; 685 return main_thread_blocked_commit_vars_unsafe_;
682 } 686 }
683 687
684 } // namespace cc 688 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/pixel_test_delegating_output_surface.cc ('k') | cc/trees/single_thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698