| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <stack> | 8 #include <stack> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 772 LayerTreeHostCommon::UpdateRenderSurfaces( | 772 LayerTreeHostCommon::UpdateRenderSurfaces( |
| 773 root_layer, can_render_to_separate_surface, identity_transform, | 773 root_layer, can_render_to_separate_surface, identity_transform, |
| 774 preserves_2d_axis_alignment); | 774 preserves_2d_axis_alignment); |
| 775 { | 775 { |
| 776 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("cc.debug.cdp-perf"), | 776 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("cc.debug.cdp-perf"), |
| 777 "LayerTreeHostCommon::ComputeVisibleRectsWithPropertyTrees"); | 777 "LayerTreeHostCommon::ComputeVisibleRectsWithPropertyTrees"); |
| 778 BuildPropertyTreesAndComputeVisibleRects( | 778 BuildPropertyTreesAndComputeVisibleRects( |
| 779 root_layer, page_scale_layer, inner_viewport_scroll_layer_.get(), | 779 root_layer, page_scale_layer, inner_viewport_scroll_layer_.get(), |
| 780 outer_viewport_scroll_layer_.get(), page_scale_factor_, | 780 outer_viewport_scroll_layer_.get(), page_scale_factor_, |
| 781 device_scale_factor_, gfx::Rect(device_viewport_size_), | 781 device_scale_factor_, gfx::Rect(device_viewport_size_), |
| 782 identity_transform, &property_trees_, &update_layer_list); | 782 identity_transform, can_render_to_separate_surface, &property_trees_, |
| 783 &update_layer_list); |
| 783 } | 784 } |
| 784 | 785 |
| 785 for (const auto& layer : update_layer_list) | 786 for (const auto& layer : update_layer_list) |
| 786 layer->SavePaintProperties(); | 787 layer->SavePaintProperties(); |
| 787 | 788 |
| 788 base::AutoReset<bool> painting(&in_paint_layer_contents_, true); | 789 base::AutoReset<bool> painting(&in_paint_layer_contents_, true); |
| 789 bool did_paint_content = false; | 790 bool did_paint_content = false; |
| 790 for (const auto& layer : update_layer_list) { | 791 for (const auto& layer : update_layer_list) { |
| 791 did_paint_content |= layer->Update(); | 792 did_paint_content |= layer->Update(); |
| 792 content_is_suitable_for_gpu_rasterization_ &= | 793 content_is_suitable_for_gpu_rasterization_ &= |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1215 return animation_host_ ? animation_host_->HasAnyAnimation(layer->id()) | 1216 return animation_host_ ? animation_host_->HasAnyAnimation(layer->id()) |
| 1216 : false; | 1217 : false; |
| 1217 } | 1218 } |
| 1218 | 1219 |
| 1219 bool LayerTreeHost::HasActiveAnimation(const Layer* layer) const { | 1220 bool LayerTreeHost::HasActiveAnimation(const Layer* layer) const { |
| 1220 return animation_host_ ? animation_host_->HasActiveAnimation(layer->id()) | 1221 return animation_host_ ? animation_host_->HasActiveAnimation(layer->id()) |
| 1221 : false; | 1222 : false; |
| 1222 } | 1223 } |
| 1223 | 1224 |
| 1224 } // namespace cc | 1225 } // namespace cc |
| OLD | NEW |