| 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 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 hud_layer_->PrepareForCalculateDrawProperties( | 789 hud_layer_->PrepareForCalculateDrawProperties( |
| 790 device_viewport_size(), device_scale_factor_); | 790 device_viewport_size(), device_scale_factor_); |
| 791 } | 791 } |
| 792 | 792 |
| 793 TRACE_EVENT0("cc", "LayerTreeHost::UpdateLayers::CalcDrawProps"); | 793 TRACE_EVENT0("cc", "LayerTreeHost::UpdateLayers::CalcDrawProps"); |
| 794 bool can_render_to_separate_surface = true; | 794 bool can_render_to_separate_surface = true; |
| 795 // TODO(vmpstr): Passing 0 as the current render surface layer list id means | 795 // TODO(vmpstr): Passing 0 as the current render surface layer list id means |
| 796 // that we won't be able to detect if a layer is part of |update_list|. | 796 // that we won't be able to detect if a layer is part of |update_list|. |
| 797 // Change this if this information is required. | 797 // Change this if this information is required. |
| 798 int render_surface_layer_list_id = 0; | 798 int render_surface_layer_list_id = 0; |
| 799 PropertyTrees property_trees; |
| 799 LayerTreeHostCommon::CalcDrawPropsMainInputs inputs( | 800 LayerTreeHostCommon::CalcDrawPropsMainInputs inputs( |
| 800 root_layer, device_viewport_size(), gfx::Transform(), | 801 root_layer, device_viewport_size(), gfx::Transform(), |
| 801 device_scale_factor_, page_scale_factor_, page_scale_layer, | 802 device_scale_factor_, page_scale_factor_, page_scale_layer, |
| 802 elastic_overscroll_, overscroll_elasticity_layer_.get(), | 803 elastic_overscroll_, overscroll_elasticity_layer_.get(), |
| 803 GetRendererCapabilities().max_texture_size, settings_.can_use_lcd_text, | 804 GetRendererCapabilities().max_texture_size, settings_.can_use_lcd_text, |
| 804 settings_.layers_always_allowed_lcd_text, | 805 settings_.layers_always_allowed_lcd_text, |
| 805 can_render_to_separate_surface, | 806 can_render_to_separate_surface, |
| 806 settings_.layer_transforms_should_scale_layer_contents, | 807 settings_.layer_transforms_should_scale_layer_contents, |
| 807 settings_.verify_property_trees, &update_list, | 808 settings_.verify_property_trees, &update_list, |
| 808 render_surface_layer_list_id); | 809 render_surface_layer_list_id, &property_trees); |
| 809 LayerTreeHostCommon::CalculateDrawProperties(&inputs); | 810 LayerTreeHostCommon::CalculateDrawProperties(&inputs); |
| 810 } | 811 } |
| 811 | 812 |
| 812 // Reset partial texture update requests. | 813 // Reset partial texture update requests. |
| 813 partial_texture_update_requests_ = 0; | 814 partial_texture_update_requests_ = 0; |
| 814 | 815 |
| 815 bool did_paint_content = false; | 816 bool did_paint_content = false; |
| 816 bool need_more_updates = false; | 817 bool need_more_updates = false; |
| 817 PaintLayerContents( | 818 PaintLayerContents( |
| 818 update_list, queue, &did_paint_content, &need_more_updates); | 819 update_list, queue, &did_paint_content, &need_more_updates); |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1272 const BeginFrameArgs& args) const { | 1273 const BeginFrameArgs& args) const { |
| 1273 client_->SendBeginFramesToChildren(args); | 1274 client_->SendBeginFramesToChildren(args); |
| 1274 } | 1275 } |
| 1275 | 1276 |
| 1276 void LayerTreeHost::SetAuthoritativeVSyncInterval( | 1277 void LayerTreeHost::SetAuthoritativeVSyncInterval( |
| 1277 const base::TimeDelta& interval) { | 1278 const base::TimeDelta& interval) { |
| 1278 proxy_->SetAuthoritativeVSyncInterval(interval); | 1279 proxy_->SetAuthoritativeVSyncInterval(interval); |
| 1279 } | 1280 } |
| 1280 | 1281 |
| 1281 } // namespace cc | 1282 } // namespace cc |
| OLD | NEW |