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

Side by Side Diff: cc/trees/draw_property_utils.cc

Issue 2925213002: cc: Mark layers with invalid property tree indices as non-drawable. (Closed)
Patch Set: .. Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_common.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/draw_property_utils.h" 5 #include "cc/trees/draw_property_utils.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 const EffectTree& effect_tree = property_trees->effect_tree; 844 const EffectTree& effect_tree = property_trees->effect_tree;
845 845
846 for (auto* layer_impl : *layer_tree_impl) { 846 for (auto* layer_impl : *layer_tree_impl) {
847 DCHECK(layer_impl); 847 DCHECK(layer_impl);
848 DCHECK(layer_impl->layer_tree_impl()); 848 DCHECK(layer_impl->layer_tree_impl());
849 // TODO(crbug.com/726423) : This is a workaround for crbug.com/725851 to 849 // TODO(crbug.com/726423) : This is a workaround for crbug.com/725851 to
850 // avoid crashing when layer_impl is nullptr. This workaround should be 850 // avoid crashing when layer_impl is nullptr. This workaround should be
851 // removed as layer_impl should not be nullptr here. 851 // removed as layer_impl should not be nullptr here.
852 if (!layer_impl || !layer_impl->HasValidPropertyTreeIndices()) 852 if (!layer_impl || !layer_impl->HasValidPropertyTreeIndices())
853 continue; 853 continue;
854
854 if (!IsRootLayer(layer_impl) && 855 if (!IsRootLayer(layer_impl) &&
855 LayerShouldBeSkippedForDrawPropertiesComputation( 856 LayerShouldBeSkippedForDrawPropertiesComputation(
856 layer_impl, transform_tree, effect_tree)) 857 layer_impl, transform_tree, effect_tree))
857 continue; 858 continue;
858 859
859 bool layer_is_drawn = 860 bool layer_is_drawn =
860 effect_tree.Node(layer_impl->effect_tree_index())->is_drawn; 861 effect_tree.Node(layer_impl->effect_tree_index())->is_drawn;
861 862
862 if (LayerNeedsUpdate(layer_impl, layer_is_drawn, property_trees)) 863 if (LayerNeedsUpdate(layer_impl, layer_is_drawn, property_trees))
863 visible_layer_list->push_back(layer_impl); 864 visible_layer_list->push_back(layer_impl);
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
1078 void UpdateElasticOverscroll(PropertyTrees* property_trees, 1079 void UpdateElasticOverscroll(PropertyTrees* property_trees,
1079 const Layer* overscroll_elasticity_layer, 1080 const Layer* overscroll_elasticity_layer,
1080 const gfx::Vector2dF& elastic_overscroll) { 1081 const gfx::Vector2dF& elastic_overscroll) {
1081 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer, 1082 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer,
1082 elastic_overscroll); 1083 elastic_overscroll);
1083 } 1084 }
1084 1085
1085 } // namespace draw_property_utils 1086 } // namespace draw_property_utils
1086 1087
1087 } // namespace cc 1088 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698