diff options
author | ajuma <ajuma@chromium.org> | 2015-07-10 15:37:40 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-10 22:39:21 +0000 |
commit | 2b92d0faeb76efa29112da48ed7a193827d62017 (patch) | |
tree | 0579d9d507fedad4d763b3658354a96bdef6a513 | |
parent | 8bbe2a412957f249e3a46599cc0b3d4bfdf9fe56 (diff) | |
download | chromium_src-2b92d0faeb76efa29112da48ed7a193827d62017.zip chromium_src-2b92d0faeb76efa29112da48ed7a193827d62017.tar.gz chromium_src-2b92d0faeb76efa29112da48ed7a193827d62017.tar.bz2 |
cc: Make sure we don't insert or remove layers during painting
Calling Layer::Update should not cause changes to tree topology.
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1232573005
Cr-Commit-Position: refs/heads/master@{#338385}
-rw-r--r-- | cc/trees/layer_tree_host.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc index 918d5db..a348301b 100644 --- a/cc/trees/layer_tree_host.cc +++ b/cc/trees/layer_tree_host.cc @@ -1096,6 +1096,7 @@ Layer* LayerTreeHost::LayerById(int id) const { void LayerTreeHost::RegisterLayer(Layer* layer) { DCHECK(!LayerById(layer->id())); + DCHECK(!in_paint_layer_contents_); layer_id_map_[layer->id()] = layer; if (animation_host_) animation_host_->RegisterLayer(layer->id(), LayerTreeType::ACTIVE); @@ -1103,6 +1104,7 @@ void LayerTreeHost::RegisterLayer(Layer* layer) { void LayerTreeHost::UnregisterLayer(Layer* layer) { DCHECK(LayerById(layer->id())); + DCHECK(!in_paint_layer_contents_); if (animation_host_) animation_host_->UnregisterLayer(layer->id(), LayerTreeType::ACTIVE); layer_id_map_.erase(layer->id()); |