Skip to content

Commit eb569ff

Browse files
author
Kaloyan Chehlarski
committed
Disable DCHECK in property_tree.cc, layer_tree_impl.cc
Certain DCHECKs may trigger when an element in a PropertyTree is being animated, while at the same time the user is rapidly scrolling the web page. Comments in related code seem to indicate these DCHECKs were put in place to investigate cases where nonexistent tree nodes were being animated. The code surrounding them seems to be guarded against such cases, so they should be safe to disable. These seem to be triggerable in upstream Chromium as well: https://issues.chromium.org/issues/40226717 Task-number: QTBUG-122924 Change-Id: I9ba49272714467beff30cb4671e78542fe7e4bda Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/568625 Reviewed-by: Peter Varga <[email protected]> (cherry picked from commit 03019ab) Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/622866 Reviewed-by: Qt Cherry-pick Bot <[email protected]>
1 parent 7900ec2 commit eb569ff

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

chromium/cc/trees/layer_tree_impl.cc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -949,9 +949,9 @@ ElementListType LayerTreeImpl::GetElementTypeForAnimation() const {
949949

950950
void LayerTreeImpl::SetTransformMutated(ElementId element_id,
951951
const gfx::Transform& transform) {
952-
DCHECK_EQ(1u,
953-
property_trees()->transform_tree().element_id_to_node_index().count(
954-
element_id));
952+
// DCHECK_EQ(1u,
953+
// property_trees()->transform_tree().element_id_to_node_index().count(
954+
// element_id));
955955
if (!base::FeatureList::IsEnabled(features::kNoPreserveLastMutation) &&
956956
(IsSyncTree() || IsRecycleTree())) {
957957
element_id_to_transform_animations_[element_id] = transform;
@@ -962,9 +962,9 @@ void LayerTreeImpl::SetTransformMutated(ElementId element_id,
962962
}
963963

964964
void LayerTreeImpl::SetOpacityMutated(ElementId element_id, float opacity) {
965-
DCHECK_EQ(1u,
966-
property_trees()->effect_tree().element_id_to_node_index().count(
967-
element_id));
965+
// DCHECK_EQ(1u,
966+
// property_trees()->effect_tree().element_id_to_node_index().count(
967+
// element_id));
968968
if (!base::FeatureList::IsEnabled(features::kNoPreserveLastMutation) &&
969969
(IsSyncTree() || IsRecycleTree())) {
970970
element_id_to_opacity_animations_[element_id] = opacity;
@@ -976,9 +976,9 @@ void LayerTreeImpl::SetOpacityMutated(ElementId element_id, float opacity) {
976976

977977
void LayerTreeImpl::SetFilterMutated(ElementId element_id,
978978
const FilterOperations& filters) {
979-
DCHECK_EQ(1u,
980-
property_trees()->effect_tree().element_id_to_node_index().count(
981-
element_id));
979+
// DCHECK_EQ(1u,
980+
// property_trees()->effect_tree().element_id_to_node_index().count(
981+
// element_id));
982982
if (!base::FeatureList::IsEnabled(features::kNoPreserveLastMutation) &&
983983
(IsSyncTree() || IsRecycleTree())) {
984984
element_id_to_filter_animations_[element_id] = filters;
@@ -991,9 +991,9 @@ void LayerTreeImpl::SetFilterMutated(ElementId element_id,
991991
void LayerTreeImpl::SetBackdropFilterMutated(
992992
ElementId element_id,
993993
const FilterOperations& backdrop_filters) {
994-
DCHECK_EQ(1u,
995-
property_trees()->effect_tree().element_id_to_node_index().count(
996-
element_id));
994+
// DCHECK_EQ(1u,
995+
// property_trees()->effect_tree().element_id_to_node_index().count(
996+
// element_id));
997997
if (!base::FeatureList::IsEnabled(features::kNoPreserveLastMutation) &&
998998
(IsSyncTree() || IsRecycleTree())) {
999999
element_id_to_backdrop_filter_animations_[element_id] = backdrop_filters;

chromium/cc/trees/property_tree.cc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2128,9 +2128,9 @@ bool PropertyTrees::ElementIsAnimatingChanged(
21282128
effect_tree_mutable().set_needs_update(true);
21292129
}
21302130
} else {
2131-
DCHECK_NODE_EXISTENCE(check_node_existence, state, property,
2132-
needs_rebuild())
2133-
<< "Attempting to animate opacity on non existent effect node";
2131+
// DCHECK_NODE_EXISTENCE(check_node_existence, state, property,
2132+
// needs_rebuild())
2133+
// << "Attempting to animate opacity on non existent effect node";
21342134
}
21352135
break;
21362136
case TargetProperty::FILTER:
@@ -2145,9 +2145,9 @@ bool PropertyTrees::ElementIsAnimatingChanged(
21452145
// Filter animation changes only the node, and the subtree does not
21462146
// care, thus there is no need to request property tree update.
21472147
} else {
2148-
DCHECK_NODE_EXISTENCE(check_node_existence, state, property,
2149-
needs_rebuild())
2150-
<< "Attempting to animate filter on non existent effect node";
2148+
// DCHECK_NODE_EXISTENCE(check_node_existence, state, property,
2149+
// needs_rebuild())
2150+
// << "Attempting to animate filter on non existent effect node";
21512151
}
21522152
break;
21532153
case TargetProperty::BACKDROP_FILTER:
@@ -2163,9 +2163,9 @@ bool PropertyTrees::ElementIsAnimatingChanged(
21632163
// does not care, thus there is no need to request property tree
21642164
// update.
21652165
} else {
2166-
DCHECK_NODE_EXISTENCE(check_node_existence, state, property,
2167-
needs_rebuild())
2168-
<< "Attempting to animate filter on non existent effect node";
2166+
// DCHECK_NODE_EXISTENCE(check_node_existence, state, property,
2167+
// needs_rebuild())
2168+
// << "Attempting to animate filter on non existent effect node";
21692169
}
21702170
break;
21712171
default:

0 commit comments

Comments
 (0)