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

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

Issue 2540333002: cc: Remove map lookup from RenderSurfaceImpl::EffectTreeIndex (Closed)
Patch Set: Created 4 years 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/layers/render_surface_unittest.cc ('k') | no next file » | 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 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 1064
1065 void ComputeVisibleRects(LayerImpl* root_layer, 1065 void ComputeVisibleRects(LayerImpl* root_layer,
1066 PropertyTrees* property_trees, 1066 PropertyTrees* property_trees,
1067 bool can_render_to_separate_surface, 1067 bool can_render_to_separate_surface,
1068 LayerImplList* visible_layer_list) { 1068 LayerImplList* visible_layer_list) {
1069 for (auto* layer : *root_layer->layer_tree_impl()) { 1069 for (auto* layer : *root_layer->layer_tree_impl()) {
1070 UpdateRenderSurfaceForLayer(&property_trees->effect_tree, 1070 UpdateRenderSurfaceForLayer(&property_trees->effect_tree,
1071 can_render_to_separate_surface, layer); 1071 can_render_to_separate_surface, layer);
1072 EffectNode* node = 1072 EffectNode* node =
1073 property_trees->effect_tree.Node(layer->effect_tree_index()); 1073 property_trees->effect_tree.Node(layer->effect_tree_index());
1074 if (node->owner_id == layer->id()) 1074 if (node->owner_id == layer->id()) {
1075 node->render_surface = layer->render_surface(); 1075 node->render_surface = layer->render_surface();
1076 if (node->render_surface)
1077 node->render_surface->set_effect_tree_index(node->id);
1078 }
1076 #if DCHECK_IS_ON() 1079 #if DCHECK_IS_ON()
1077 if (can_render_to_separate_surface) 1080 if (can_render_to_separate_surface)
1078 ValidateRenderSurfaceForLayer(layer); 1081 ValidateRenderSurfaceForLayer(layer);
1079 #endif 1082 #endif
1080 } 1083 }
1081 ComputeVisibleRectsInternal(root_layer, property_trees, 1084 ComputeVisibleRectsInternal(root_layer, property_trees,
1082 can_render_to_separate_surface, 1085 can_render_to_separate_surface,
1083 visible_layer_list); 1086 visible_layer_list);
1084 } 1087 }
1085 1088
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
1453 void UpdateElasticOverscroll(PropertyTrees* property_trees, 1456 void UpdateElasticOverscroll(PropertyTrees* property_trees,
1454 const Layer* overscroll_elasticity_layer, 1457 const Layer* overscroll_elasticity_layer,
1455 const gfx::Vector2dF& elastic_overscroll) { 1458 const gfx::Vector2dF& elastic_overscroll) {
1456 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer, 1459 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer,
1457 elastic_overscroll); 1460 elastic_overscroll);
1458 } 1461 }
1459 1462
1460 } // namespace draw_property_utils 1463 } // namespace draw_property_utils
1461 1464
1462 } // namespace cc 1465 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/render_surface_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698