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

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

Issue 2661523003: cc: Merge LayerTree into the LayerTreeHost. (Closed)
Patch Set: auto Created 3 years, 10 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 | « cc/trees/draw_property_utils.h ('k') | cc/trees/layer_tree.h » ('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
11 #include "cc/base/math_util.h" 11 #include "cc/base/math_util.h"
12 #include "cc/layers/draw_properties.h" 12 #include "cc/layers/draw_properties.h"
13 #include "cc/layers/layer.h" 13 #include "cc/layers/layer.h"
14 #include "cc/layers/layer_impl.h" 14 #include "cc/layers/layer_impl.h"
15 #include "cc/trees/clip_node.h" 15 #include "cc/trees/clip_node.h"
16 #include "cc/trees/effect_node.h" 16 #include "cc/trees/effect_node.h"
17 #include "cc/trees/layer_tree.h"
18 #include "cc/trees/layer_tree_impl.h" 17 #include "cc/trees/layer_tree_impl.h"
19 #include "cc/trees/property_tree.h" 18 #include "cc/trees/property_tree.h"
20 #include "cc/trees/property_tree_builder.h" 19 #include "cc/trees/property_tree_builder.h"
21 #include "cc/trees/transform_node.h" 20 #include "cc/trees/transform_node.h"
22 #include "ui/gfx/geometry/rect_conversions.h" 21 #include "ui/gfx/geometry/rect_conversions.h"
23 22
24 namespace cc { 23 namespace cc {
25 24
26 namespace draw_property_utils { 25 namespace draw_property_utils {
27 26
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 const EffectTree& effect_tree) { 757 const EffectTree& effect_tree) {
759 return LayerShouldBeSkippedInternal(layer, transform_tree, effect_tree); 758 return LayerShouldBeSkippedInternal(layer, transform_tree, effect_tree);
760 } 759 }
761 760
762 bool LayerShouldBeSkipped(Layer* layer, 761 bool LayerShouldBeSkipped(Layer* layer,
763 const TransformTree& transform_tree, 762 const TransformTree& transform_tree,
764 const EffectTree& effect_tree) { 763 const EffectTree& effect_tree) {
765 return LayerShouldBeSkippedInternal(layer, transform_tree, effect_tree); 764 return LayerShouldBeSkippedInternal(layer, transform_tree, effect_tree);
766 } 765 }
767 766
768 void FindLayersThatNeedUpdates(LayerTree* layer_tree, 767 void FindLayersThatNeedUpdates(LayerTreeHost* layer_tree_host,
769 const PropertyTrees* property_trees, 768 const PropertyTrees* property_trees,
770 LayerList* update_layer_list) { 769 LayerList* update_layer_list) {
771 const TransformTree& transform_tree = property_trees->transform_tree; 770 const TransformTree& transform_tree = property_trees->transform_tree;
772 const EffectTree& effect_tree = property_trees->effect_tree; 771 const EffectTree& effect_tree = property_trees->effect_tree;
773 for (auto* layer : *layer_tree) { 772 for (auto* layer : *layer_tree_host) {
774 if (!IsRootLayer(layer) && 773 if (!IsRootLayer(layer) &&
775 LayerShouldBeSkipped(layer, transform_tree, effect_tree)) 774 LayerShouldBeSkipped(layer, transform_tree, effect_tree))
776 continue; 775 continue;
777 776
778 bool layer_is_drawn = 777 bool layer_is_drawn =
779 effect_tree.Node(layer->effect_tree_index())->is_drawn; 778 effect_tree.Node(layer->effect_tree_index())->is_drawn;
780 779
781 if (LayerNeedsUpdate(layer, layer_is_drawn, property_trees)) { 780 if (LayerNeedsUpdate(layer, layer_is_drawn, property_trees)) {
782 update_layer_list->push_back(layer); 781 update_layer_list->push_back(layer);
783 } 782 }
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
1560 void UpdateElasticOverscroll(PropertyTrees* property_trees, 1559 void UpdateElasticOverscroll(PropertyTrees* property_trees,
1561 const Layer* overscroll_elasticity_layer, 1560 const Layer* overscroll_elasticity_layer,
1562 const gfx::Vector2dF& elastic_overscroll) { 1561 const gfx::Vector2dF& elastic_overscroll) {
1563 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer, 1562 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer,
1564 elastic_overscroll); 1563 elastic_overscroll);
1565 } 1564 }
1566 1565
1567 } // namespace draw_property_utils 1566 } // namespace draw_property_utils
1568 1567
1569 } // namespace cc 1568 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/draw_property_utils.h ('k') | cc/trees/layer_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698