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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2100353002: cc: DCHECK that the OutputSurface was released in ~LayerTreeHostImpl(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: released-outputsurface: rebase-on-2106273002 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/layer_test_common.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index ba448b7e4737bc7ce45659ad446d2682900a907f..0e7f4287c9bc325ac861e3218985e226eeb1b78e 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -274,6 +274,9 @@ LayerTreeHostImpl::~LayerTreeHostImpl() {
TRACE_EVENT_OBJECT_DELETED_WITH_ID(
TRACE_DISABLED_BY_DEFAULT("cc.debug"), "cc::LayerTreeHostImpl", id_);
+ // It is released before shutdown.
+ DCHECK(!output_surface_);
+
if (input_handler_client_) {
input_handler_client_->WillShutdown();
input_handler_client_ = NULL;
@@ -299,11 +302,6 @@ LayerTreeHostImpl::~LayerTreeHostImpl() {
CleanUpTileManagerAndUIResources();
renderer_ = nullptr;
resource_provider_ = nullptr;
-
- if (output_surface_) {
- output_surface_->DetachFromClient();
- output_surface_ = nullptr;
- }
}
void LayerTreeHostImpl::BeginMainFrameAborted(CommitEarlyOutReason reason) {
« no previous file with comments | « cc/test/layer_test_common.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698