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

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

Issue 2216203002: Refactor MutatorHostClient from LayerTreeHost to LayerTree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes according to code review. Created 4 years, 4 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 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 } 699 }
700 700
701 bool LayerShouldBeSkipped(Layer* layer, 701 bool LayerShouldBeSkipped(Layer* layer,
702 bool layer_is_drawn, 702 bool layer_is_drawn,
703 const TransformTree& transform_tree, 703 const TransformTree& transform_tree,
704 const EffectTree& effect_tree) { 704 const EffectTree& effect_tree) {
705 return LayerShouldBeSkippedInternal(layer, layer_is_drawn, transform_tree, 705 return LayerShouldBeSkippedInternal(layer, layer_is_drawn, transform_tree,
706 effect_tree); 706 effect_tree);
707 } 707 }
708 708
709 void FindLayersThatNeedUpdates(LayerTreeHost* layer_tree_host, 709 void FindLayersThatNeedUpdates(LayerTree* layer_tree,
710 const TransformTree& transform_tree, 710 const TransformTree& transform_tree,
711 const EffectTree& effect_tree, 711 const EffectTree& effect_tree,
712 LayerList* update_layer_list) { 712 LayerList* update_layer_list) {
713 for (auto* layer : *layer_tree_host) { 713 for (auto* layer : *layer_tree) {
714 bool layer_is_drawn = 714 bool layer_is_drawn =
715 effect_tree.Node(layer->effect_tree_index())->is_drawn; 715 effect_tree.Node(layer->effect_tree_index())->is_drawn;
716 716
717 if (!IsRootLayer(layer) && 717 if (!IsRootLayer(layer) &&
718 LayerShouldBeSkipped(layer, layer_is_drawn, transform_tree, 718 LayerShouldBeSkipped(layer, layer_is_drawn, transform_tree,
719 effect_tree)) 719 effect_tree))
720 continue; 720 continue;
721 721
722 if (LayerNeedsUpdate(layer, layer_is_drawn, transform_tree)) { 722 if (LayerNeedsUpdate(layer, layer_is_drawn, transform_tree)) {
723 update_layer_list->push_back(layer); 723 update_layer_list->push_back(layer);
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
1596 void UpdateElasticOverscroll(PropertyTrees* property_trees, 1596 void UpdateElasticOverscroll(PropertyTrees* property_trees,
1597 const Layer* overscroll_elasticity_layer, 1597 const Layer* overscroll_elasticity_layer,
1598 const gfx::Vector2dF& elastic_overscroll) { 1598 const gfx::Vector2dF& elastic_overscroll) {
1599 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer, 1599 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer,
1600 elastic_overscroll); 1600 elastic_overscroll);
1601 } 1601 }
1602 1602
1603 } // namespace draw_property_utils 1603 } // namespace draw_property_utils
1604 1604
1605 } // namespace cc 1605 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698