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

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

Issue 1588093004: Compute if a layer is drawn without LayerTree hierarchy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 return false; 427 return false;
428 } 428 }
429 429
430 template <typename LayerType> 430 template <typename LayerType>
431 void FindLayersThatNeedUpdates( 431 void FindLayersThatNeedUpdates(
432 LayerType* layer, 432 LayerType* layer,
433 const TransformTree& tree, 433 const TransformTree& tree,
434 bool subtree_is_visible_from_ancestor, 434 bool subtree_is_visible_from_ancestor,
435 typename LayerType::LayerListType* update_layer_list, 435 typename LayerType::LayerListType* update_layer_list,
436 std::vector<LayerType*>* visible_layer_list) { 436 std::vector<LayerType*>* visible_layer_list) {
437 bool layer_is_drawn = 437 bool layer_is_drawn = layer->IsDrawnFromPropertyTrees();
438 layer->HasCopyRequest() ||
439 (subtree_is_visible_from_ancestor && !layer->hide_layer_and_subtree());
440 438
441 if (layer->parent() && SubtreeShouldBeSkipped(layer, layer_is_drawn, tree)) 439 if (layer->parent() && SubtreeShouldBeSkipped(layer, layer_is_drawn, tree))
442 return; 440 return;
443 441
444 if (!LayerShouldBeSkipped(layer, layer_is_drawn, tree)) { 442 if (!LayerShouldBeSkipped(layer, layer_is_drawn, tree)) {
445 visible_layer_list->push_back(layer); 443 visible_layer_list->push_back(layer);
446 update_layer_list->push_back(layer); 444 update_layer_list->push_back(layer);
447 } 445 }
448 446
449 // Append mask layers to the update layer list. They don't have valid visible 447 // Append mask layers to the update layer list. They don't have valid visible
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
1178 1176
1179 void UpdateElasticOverscrollInPropertyTrees( 1177 void UpdateElasticOverscrollInPropertyTrees(
1180 PropertyTrees* property_trees, 1178 PropertyTrees* property_trees,
1181 const Layer* overscroll_elasticity_layer, 1179 const Layer* overscroll_elasticity_layer,
1182 const gfx::Vector2dF& elastic_overscroll) { 1180 const gfx::Vector2dF& elastic_overscroll) {
1183 UpdateElasticOverscrollInPropertyTreesInternal( 1181 UpdateElasticOverscrollInPropertyTreesInternal(
1184 property_trees, overscroll_elasticity_layer, elastic_overscroll); 1182 property_trees, overscroll_elasticity_layer, elastic_overscroll);
1185 } 1183 }
1186 1184
1187 } // namespace cc 1185 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698