Chromium Code Reviews| Index: cc/debug/invalidation_benchmark.cc |
| diff --git a/cc/debug/invalidation_benchmark.cc b/cc/debug/invalidation_benchmark.cc |
| index 681e29ef7cced1b62c1f9303d22c0c26df7494af..a538eb6c5964371f5ab7bd8620fa65f2deea95f0 100644 |
| --- a/cc/debug/invalidation_benchmark.cc |
| +++ b/cc/debug/invalidation_benchmark.cc |
| @@ -70,11 +70,18 @@ void InvalidationBenchmark::DidUpdateLayers(LayerTreeHost* host) { |
| void InvalidationBenchmark::RunOnLayer(PictureLayer* layer) { |
| PropertyTrees* property_trees = layer->layer_tree_host()->property_trees(); |
| - LayerList update_list; |
| - update_list.push_back(layer); |
| - draw_property_utils::ComputeVisibleRectsForTesting( |
| - property_trees, property_trees->non_root_surfaces_enabled, &update_list); |
| - gfx::Rect visible_layer_rect = layer->visible_layer_rect_for_testing(); |
| + const TransformTree& transform_tree = property_trees->transform_tree; |
| + int index = layer->transform_tree_index(); |
| + layer->layer_tree_host()->BuildPropertyTreesForTesting(); |
| + gfx::Point position = |
| + gfx::Point(layer->position().x(), layer->position().y()); |
| + gfx::Rect layer_rect = gfx::Rect(position, layer->bounds()); |
| + gfx::Rect screen_space_rect = MathUtil::MapEnclosingClippedRect( |
| + transform_tree.ToScreen(index), layer_rect); |
| + screen_space_rect.Intersect( |
| + gfx::Rect(layer->layer_tree_host()->device_viewport_size())); |
| + gfx::Rect visible_layer_rect = MathUtil::MapEnclosingClippedRect( |
|
sunxd
2016/08/09 19:17:50
I forgot to make it a projection here. Please igno
|
| + transform_tree.FromScreen(index), screen_space_rect); |
| switch (mode_) { |
| case FIXED_SIZE: { |
| // Invalidation with a random position and fixed size. |