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

Unified Diff: cc/test/layer_test_common.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: . 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
Index: cc/test/layer_test_common.cc
diff --git a/cc/test/layer_test_common.cc b/cc/test/layer_test_common.cc
index d5c5a1c9d24314d51fb1baa1f183047b2cf71dae..aead5b8a90e405aca07db1ef1f93fba7899dbdc1 100644
--- a/cc/test/layer_test_common.cc
+++ b/cc/test/layer_test_common.cc
@@ -126,8 +126,9 @@ LayerTestCommon::LayerImplTest::LayerImplTest(const LayerTreeSettings& settings)
layer_impl_id_(2) {
std::unique_ptr<LayerImpl> root =
LayerImpl::Create(host_->host_impl()->active_tree(), 1);
+ root->SetHasRenderSurface(true);
host_->host_impl()->active_tree()->SetRootLayer(std::move(root));
- root_layer()->SetHasRenderSurface(true);
+ host_->host_impl()->active_tree()->BuildLayerListForTesting();
host_->host_impl()->SetVisible(true);
host_->host_impl()->InitializeRenderer(output_surface_.get());
@@ -144,6 +145,7 @@ LayerTestCommon::LayerImplTest::LayerImplTest(const LayerTreeSettings& settings)
LayerTestCommon::LayerImplTest::~LayerImplTest() {
host_->animation_host()->RemoveAnimationTimeline(timeline_);
timeline_ = nullptr;
+ host_->host_impl()->ReleaseOutputSurface();
}
void LayerTestCommon::LayerImplTest::CalcDrawProps(

Powered by Google App Engine
This is Rietveld 408576698