| Index: cc/trees/draw_property_utils.cc
|
| diff --git a/cc/trees/draw_property_utils.cc b/cc/trees/draw_property_utils.cc
|
| index 17d676f1a85b419dc24a79a046fc5ec08812ae0d..7e643e89d63d5e186af38ef175b81340335a5152 100644
|
| --- a/cc/trees/draw_property_utils.cc
|
| +++ b/cc/trees/draw_property_utils.cc
|
| @@ -458,9 +458,19 @@ static inline bool LayerShouldBeSkippedInternal(
|
| transform_tree.Node(layer->transform_tree_index());
|
| const EffectNode* effect_node = effect_tree.Node(layer->effect_tree_index());
|
|
|
| + DCHECK(effect_node);
|
| + DCHECK(transform_node);
|
| + // TODO(crbug.com/726423) : This is a workaround for crbug.com/726225 to
|
| + // avoid crashing when there is no effect or transform node. Effect node and
|
| + // transform node should always exist here and this workaround should be
|
| + // removed.
|
| + if (!transform_node || !effect_node)
|
| + return true;
|
| +
|
| if (effect_node->has_render_surface &&
|
| effect_node->num_copy_requests_in_subtree > 0)
|
| return false;
|
| +
|
| // If the layer transform is not invertible, it should be skipped.
|
| // TODO(ajuma): Correctly process subtrees with singular transform for the
|
| // case where we may animate to a non-singular transform and wish to
|
| @@ -851,6 +861,13 @@ void FindLayersThatNeedUpdates(LayerTreeImpl* layer_tree_impl,
|
| const EffectTree& effect_tree = property_trees->effect_tree;
|
|
|
| for (auto* layer_impl : *layer_tree_impl) {
|
| + DCHECK(layer_impl);
|
| + DCHECK(layer_impl->layer_tree_impl());
|
| + // TODO(crbug.com/726423) : This is a workaround for crbug.com/725851 to
|
| + // avoid crashing when layer_impl is nullptr. This workaround should be
|
| + // removed as layer_impl should not be nullptr here.
|
| + if (!layer_impl)
|
| + continue;
|
| if (!IsRootLayer(layer_impl) &&
|
| LayerShouldBeSkipped(layer_impl, transform_tree, effect_tree))
|
| continue;
|
|
|