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

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

Issue 2571263002: cc: Remove map lookup from RenderSurfaceImpl::EffectTreeIndex (Closed)
Patch Set: Fix post-rebase unit test failure Created 3 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
« no previous file with comments | « cc/layers/render_surface_unittest.cc ('k') | cc/trees/layer_tree_host_in_process.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 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after
1065 1065
1066 void ComputeVisibleRects(LayerImpl* root_layer, 1066 void ComputeVisibleRects(LayerImpl* root_layer,
1067 PropertyTrees* property_trees, 1067 PropertyTrees* property_trees,
1068 bool can_render_to_separate_surface, 1068 bool can_render_to_separate_surface,
1069 LayerImplList* visible_layer_list) { 1069 LayerImplList* visible_layer_list) {
1070 for (auto* layer : *root_layer->layer_tree_impl()) { 1070 for (auto* layer : *root_layer->layer_tree_impl()) {
1071 UpdateRenderSurfaceForLayer(&property_trees->effect_tree, 1071 UpdateRenderSurfaceForLayer(&property_trees->effect_tree,
1072 can_render_to_separate_surface, layer); 1072 can_render_to_separate_surface, layer);
1073 EffectNode* node = 1073 EffectNode* node =
1074 property_trees->effect_tree.Node(layer->effect_tree_index()); 1074 property_trees->effect_tree.Node(layer->effect_tree_index());
1075 if (node->owning_layer_id == layer->id()) 1075 if (node->owning_layer_id == layer->id()) {
1076 node->render_surface = layer->render_surface(); 1076 node->render_surface = layer->render_surface();
1077 if (node->render_surface)
1078 node->render_surface->set_effect_tree_index(node->id);
1079 }
1077 #if DCHECK_IS_ON() 1080 #if DCHECK_IS_ON()
1078 if (can_render_to_separate_surface) 1081 if (can_render_to_separate_surface)
1079 ValidateRenderSurfaceForLayer(layer); 1082 ValidateRenderSurfaceForLayer(layer);
1080 #endif 1083 #endif
1081 } 1084 }
1082 ComputeVisibleRectsInternal(root_layer, property_trees, 1085 ComputeVisibleRectsInternal(root_layer, property_trees,
1083 can_render_to_separate_surface, 1086 can_render_to_separate_surface,
1084 visible_layer_list); 1087 visible_layer_list);
1085 } 1088 }
1086 1089
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
1459 void UpdateElasticOverscroll(PropertyTrees* property_trees, 1462 void UpdateElasticOverscroll(PropertyTrees* property_trees,
1460 const Layer* overscroll_elasticity_layer, 1463 const Layer* overscroll_elasticity_layer,
1461 const gfx::Vector2dF& elastic_overscroll) { 1464 const gfx::Vector2dF& elastic_overscroll) {
1462 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer, 1465 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer,
1463 elastic_overscroll); 1466 elastic_overscroll);
1464 } 1467 }
1465 1468
1466 } // namespace draw_property_utils 1469 } // namespace draw_property_utils
1467 1470
1468 } // namespace cc 1471 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/render_surface_unittest.cc ('k') | cc/trees/layer_tree_host_in_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698