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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 } | 358 } |
359 | 359 |
360 DCHECK(!sync_tree->ViewportSizeInvalid()); | 360 DCHECK(!sync_tree->ViewportSizeInvalid()); |
361 | 361 |
362 if (new_impl_tree_has_no_evicted_resources) { | 362 if (new_impl_tree_has_no_evicted_resources) { |
363 if (sync_tree->ContentsTexturesPurged()) | 363 if (sync_tree->ContentsTexturesPurged()) |
364 sync_tree->ResetContentsTexturesPurged(); | 364 sync_tree->ResetContentsTexturesPurged(); |
365 } | 365 } |
366 | 366 |
367 sync_tree->set_has_ever_been_drawn(false); | 367 sync_tree->set_has_ever_been_drawn(false); |
| 368 sync_tree->SetPropertyTrees(property_trees_); |
368 | 369 |
369 { | 370 { |
370 TRACE_EVENT0("cc", "LayerTreeHost::PushProperties"); | 371 TRACE_EVENT0("cc", "LayerTreeHost::PushProperties"); |
371 TreeSynchronizer::PushProperties(root_layer(), sync_tree->root_layer()); | 372 TreeSynchronizer::PushProperties(root_layer(), sync_tree->root_layer()); |
372 } | 373 } |
373 | 374 |
374 micro_benchmark_controller_.ScheduleImplBenchmarks(host_impl); | 375 micro_benchmark_controller_.ScheduleImplBenchmarks(host_impl); |
375 } | 376 } |
376 | 377 |
377 void LayerTreeHost::WillCommit() { | 378 void LayerTreeHost::WillCommit() { |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
791 hud_layer_->PrepareForCalculateDrawProperties( | 792 hud_layer_->PrepareForCalculateDrawProperties( |
792 device_viewport_size(), device_scale_factor_); | 793 device_viewport_size(), device_scale_factor_); |
793 } | 794 } |
794 | 795 |
795 TRACE_EVENT0("cc", "LayerTreeHost::UpdateLayers::CalcDrawProps"); | 796 TRACE_EVENT0("cc", "LayerTreeHost::UpdateLayers::CalcDrawProps"); |
796 bool can_render_to_separate_surface = true; | 797 bool can_render_to_separate_surface = true; |
797 // TODO(vmpstr): Passing 0 as the current render surface layer list id means | 798 // TODO(vmpstr): Passing 0 as the current render surface layer list id means |
798 // that we won't be able to detect if a layer is part of |update_list|. | 799 // that we won't be able to detect if a layer is part of |update_list|. |
799 // Change this if this information is required. | 800 // Change this if this information is required. |
800 int render_surface_layer_list_id = 0; | 801 int render_surface_layer_list_id = 0; |
801 PropertyTrees property_trees; | |
802 LayerTreeHostCommon::CalcDrawPropsMainInputs inputs( | 802 LayerTreeHostCommon::CalcDrawPropsMainInputs inputs( |
803 root_layer, device_viewport_size(), gfx::Transform(), | 803 root_layer, device_viewport_size(), gfx::Transform(), |
804 device_scale_factor_, page_scale_factor_, page_scale_layer, | 804 device_scale_factor_, page_scale_factor_, page_scale_layer, |
805 elastic_overscroll_, overscroll_elasticity_layer_.get(), | 805 elastic_overscroll_, overscroll_elasticity_layer_.get(), |
806 GetRendererCapabilities().max_texture_size, settings_.can_use_lcd_text, | 806 GetRendererCapabilities().max_texture_size, settings_.can_use_lcd_text, |
807 settings_.layers_always_allowed_lcd_text, | 807 settings_.layers_always_allowed_lcd_text, |
808 can_render_to_separate_surface, | 808 can_render_to_separate_surface, |
809 settings_.layer_transforms_should_scale_layer_contents, | 809 settings_.layer_transforms_should_scale_layer_contents, |
810 settings_.verify_property_trees, &update_list, | 810 settings_.verify_property_trees, &update_list, |
811 render_surface_layer_list_id, &property_trees); | 811 render_surface_layer_list_id, &property_trees_); |
812 LayerTreeHostCommon::CalculateDrawProperties(&inputs); | 812 LayerTreeHostCommon::CalculateDrawProperties(&inputs); |
813 } | 813 } |
814 | 814 |
815 // Reset partial texture update requests. | 815 // Reset partial texture update requests. |
816 partial_texture_update_requests_ = 0; | 816 partial_texture_update_requests_ = 0; |
817 | 817 |
818 bool did_paint_content = false; | 818 bool did_paint_content = false; |
819 bool need_more_updates = false; | 819 bool need_more_updates = false; |
820 PaintLayerContents( | 820 PaintLayerContents( |
821 update_list, queue, &did_paint_content, &need_more_updates); | 821 update_list, queue, &did_paint_content, &need_more_updates); |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1275 const BeginFrameArgs& args) const { | 1275 const BeginFrameArgs& args) const { |
1276 client_->SendBeginFramesToChildren(args); | 1276 client_->SendBeginFramesToChildren(args); |
1277 } | 1277 } |
1278 | 1278 |
1279 void LayerTreeHost::SetAuthoritativeVSyncInterval( | 1279 void LayerTreeHost::SetAuthoritativeVSyncInterval( |
1280 const base::TimeDelta& interval) { | 1280 const base::TimeDelta& interval) { |
1281 proxy_->SetAuthoritativeVSyncInterval(interval); | 1281 proxy_->SetAuthoritativeVSyncInterval(interval); |
1282 } | 1282 } |
1283 | 1283 |
1284 } // namespace cc | 1284 } // namespace cc |
OLD | NEW |