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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 2646583002: Revert of Add DCHECK for duplicate layers with the same cc::ElementId. (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 7957734ff26fe535b21b81196117f4bc7881f588..4cd9aae75103100b01bf11715f3d23ce8405f9f7 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -544,25 +544,18 @@
}
void LayerTreeImpl::AddToElementMap(LayerImpl* layer) {
- ElementId element_id = layer->element_id();
- if (!element_id)
+ if (!layer->element_id())
return;
TRACE_EVENT2(TRACE_DISABLED_BY_DEFAULT("compositor-worker"),
"LayerTreeImpl::AddToElementMap", "element",
- element_id.AsValue().release(), "layer_id", layer->id());
-
-#if DCHECK_IS_ON()
- LayerImpl* existing_layer = LayerByElementId(element_id);
- bool element_id_collision_detected =
- existing_layer && existing_layer != layer;
- DCHECK(!element_id_collision_detected);
-#endif
-
- element_layers_map_[element_id] = layer->id();
+ layer->element_id().AsValue().release(), "layer_id",
+ layer->id());
+
+ element_layers_map_[layer->element_id()] = layer->id();
layer_tree_host_impl_->mutator_host()->RegisterElement(
- element_id,
+ layer->element_id(),
IsActiveTree() ? ElementListType::ACTIVE : ElementListType::PENDING);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698