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 5546ea33d36ce5773120089d2538164aaec607e9..9454e32bc65c3917629f23735c2eb8ca2003969e 100644 |
--- a/cc/trees/layer_tree_host_impl.cc |
+++ b/cc/trees/layer_tree_host_impl.cc |
@@ -128,6 +128,10 @@ class LayerTreeHostImplTimeSourceAdapter : public TimeSourceClient { |
time_source_->SetActive(active); |
} |
+ bool Active() const { |
+ return time_source_->Active(); |
+ } |
+ |
private: |
LayerTreeHostImplTimeSourceAdapter( |
LayerTreeHostImpl* layer_tree_host_impl, |
@@ -256,6 +260,8 @@ void LayerTreeHostImpl::CommitComplete() { |
ManageTiles(); |
} else { |
active_tree_->set_needs_update_draw_properties(); |
+ if (time_source_client_adapter_ && time_source_client_adapter_->Active()) |
+ DCHECK(active_tree_->root_layer()); |
} |
client_->SendManagedMemoryStats(); |
@@ -825,6 +831,8 @@ void LayerTreeHostImpl::MainThreadHasStoppedFlinging() { |
void LayerTreeHostImpl::UpdateBackgroundAnimateTicking( |
bool should_background_tick) { |
DCHECK(proxy_->IsImplThread()); |
+ if (should_background_tick) |
+ DCHECK(active_tree_->root_layer()); |
bool enabled = should_background_tick && |
!animation_registrar_->active_animation_controllers().empty(); |
@@ -1503,6 +1511,9 @@ void LayerTreeHostImpl::ActivatePendingTree() { |
client_->DidActivatePendingTree(); |
if (!tree_activation_callback_.is_null()) |
tree_activation_callback_.Run(); |
+ |
+ if (time_source_client_adapter_ && time_source_client_adapter_->Active()) |
+ DCHECK(active_tree_->root_layer()); |
} |
void LayerTreeHostImpl::SetVisible(bool visible) { |