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

Unified Diff: cc/layers/picture_layer.cc

Issue 2861193002: Workaround transform node NPE in PictureLayer::ShouldUseTransformedRasterization (Closed)
Patch Set: Created 3 years, 7 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/layers/picture_layer.cc
diff --git a/cc/layers/picture_layer.cc b/cc/layers/picture_layer.cc
index 146296d1eed9d14e5fc625f32e478deeb7040ff0..885be86041355e574c143fc4dbc3468a6b2fda5d 100644
--- a/cc/layers/picture_layer.cc
+++ b/cc/layers/picture_layer.cc
@@ -258,8 +258,14 @@ bool PictureLayer::ShouldUseTransformedRasterization() const {
const TransformTree& transform_tree =
layer_tree_host()->property_trees()->transform_tree;
DCHECK(!transform_tree.needs_update());
- if (transform_tree.Node(transform_tree_index())
- ->to_screen_is_potentially_animated)
+ auto* transform_node = transform_tree.Node(transform_tree_index());
+ DCHECK(transform_node);
+ // TODO(pdr): This is a workaround for https://crbug.com/708951 to avoid
+ // crashing when there's no transform node. This workaround should be removed.
+ if (!transform_node)
+ return false;
+
+ if (transform_node->to_screen_is_potentially_animated)
return false;
const gfx::Transform& to_screen =
« 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