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

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

Issue 1858233004: cc : Layers with background filters are drawn only if parent is drawn. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit test crash on bots Created 4 years, 8 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_unittest.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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 void FindLayersThatNeedUpdates(LayerImpl* layer, 397 void FindLayersThatNeedUpdates(LayerImpl* layer,
398 const TransformTree& transform_tree, 398 const TransformTree& transform_tree,
399 const EffectTree& effect_tree, 399 const EffectTree& effect_tree,
400 LayerImplList* update_layer_list, 400 LayerImplList* update_layer_list,
401 std::vector<LayerImpl*>* visible_layer_list) { 401 std::vector<LayerImpl*>* visible_layer_list) {
402 DCHECK_GE(layer->effect_tree_index(), 0); 402 DCHECK_GE(layer->effect_tree_index(), 0);
403 for (auto* layer_impl : *layer->layer_tree_impl()) { 403 for (auto* layer_impl : *layer->layer_tree_impl()) {
404 bool layer_is_drawn = 404 bool layer_is_drawn =
405 effect_tree.Node(layer->effect_tree_index())->data.is_drawn; 405 effect_tree.Node(layer->effect_tree_index())->data.is_drawn;
406 406
407 if (layer_impl->parent() && 407 if (!IsRootLayer(layer_impl) &&
408 LayerShouldBeSkipped(layer_impl, layer_is_drawn, transform_tree)) 408 LayerShouldBeSkipped(layer_impl, layer_is_drawn, transform_tree))
409 continue; 409 continue;
410 410
411 if (LayerNeedsUpdate(layer_impl, layer_is_drawn, transform_tree)) { 411 if (LayerNeedsUpdate(layer_impl, layer_is_drawn, transform_tree)) {
412 visible_layer_list->push_back(layer_impl); 412 visible_layer_list->push_back(layer_impl);
413 update_layer_list->push_back(layer_impl); 413 update_layer_list->push_back(layer_impl);
414 } 414 }
415 415
416 if (LayerImpl* mask_layer = layer->mask_layer()) 416 if (LayerImpl* mask_layer = layer->mask_layer())
417 update_layer_list->push_back(mask_layer); 417 update_layer_list->push_back(mask_layer);
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 void UpdateElasticOverscroll(PropertyTrees* property_trees, 1165 void UpdateElasticOverscroll(PropertyTrees* property_trees,
1166 const Layer* overscroll_elasticity_layer, 1166 const Layer* overscroll_elasticity_layer,
1167 const gfx::Vector2dF& elastic_overscroll) { 1167 const gfx::Vector2dF& elastic_overscroll) {
1168 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer, 1168 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer,
1169 elastic_overscroll); 1169 elastic_overscroll);
1170 } 1170 }
1171 1171
1172 } // namespace draw_property_utils 1172 } // namespace draw_property_utils
1173 1173
1174 } // namespace cc 1174 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698