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 <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
509 page_scale_factor_, min_page_scale_factor_, max_page_scale_factor_); | 509 page_scale_factor_, min_page_scale_factor_, max_page_scale_factor_); |
510 sync_tree->elastic_overscroll()->PushFromMainThread(elastic_overscroll_); | 510 sync_tree->elastic_overscroll()->PushFromMainThread(elastic_overscroll_); |
511 if (sync_tree->IsActiveTree()) | 511 if (sync_tree->IsActiveTree()) |
512 sync_tree->elastic_overscroll()->PushPendingToActive(); | 512 sync_tree->elastic_overscroll()->PushPendingToActive(); |
513 | 513 |
514 sync_tree->PassSwapPromises(std::move(swap_promise_list_)); | 514 sync_tree->PassSwapPromises(std::move(swap_promise_list_)); |
515 | 515 |
516 sync_tree->set_top_controls_shrink_blink_size( | 516 sync_tree->set_top_controls_shrink_blink_size( |
517 top_controls_shrink_blink_size_); | 517 top_controls_shrink_blink_size_); |
518 sync_tree->set_top_controls_height(top_controls_height_); | 518 sync_tree->set_top_controls_height(top_controls_height_); |
519 sync_tree->set_bottom_controls_height(bottom_controls_height_); | |
Khushal
2016/08/17 04:45:34
The commit step now happens in LayerTree::PushProp
| |
519 sync_tree->PushTopControlsFromMainThread(top_controls_shown_ratio_); | 520 sync_tree->PushTopControlsFromMainThread(top_controls_shown_ratio_); |
520 | 521 |
521 host_impl->SetHasGpuRasterizationTrigger(has_gpu_rasterization_trigger_); | 522 host_impl->SetHasGpuRasterizationTrigger(has_gpu_rasterization_trigger_); |
522 host_impl->SetContentIsSuitableForGpuRasterization( | 523 host_impl->SetContentIsSuitableForGpuRasterization( |
523 content_is_suitable_for_gpu_rasterization_); | 524 content_is_suitable_for_gpu_rasterization_); |
524 RecordGpuRasterizationHistogram(); | 525 RecordGpuRasterizationHistogram(); |
525 | 526 |
526 host_impl->SetViewportSize(device_viewport_size_); | 527 host_impl->SetViewportSize(device_viewport_size_); |
527 // TODO(senorblanco): Move this up so that it happens before GPU rasterization | 528 // TODO(senorblanco): Move this up so that it happens before GPU rasterization |
528 // properties are set, since those trigger an update of GPU rasterization | 529 // properties are set, since those trigger an update of GPU rasterization |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
820 } | 821 } |
821 | 822 |
822 void LayerTreeHost::SetTopControlsShownRatio(float ratio) { | 823 void LayerTreeHost::SetTopControlsShownRatio(float ratio) { |
823 if (top_controls_shown_ratio_ == ratio) | 824 if (top_controls_shown_ratio_ == ratio) |
824 return; | 825 return; |
825 | 826 |
826 top_controls_shown_ratio_ = ratio; | 827 top_controls_shown_ratio_ = ratio; |
827 SetNeedsCommit(); | 828 SetNeedsCommit(); |
828 } | 829 } |
829 | 830 |
831 void LayerTreeHost::setBottomControlHeight(float height) { | |
832 if (bottom_controls_height_ == height) | |
833 return; | |
834 | |
835 bottom_controls_height_ = height; | |
836 SetNeedsCommit(); | |
837 } | |
838 | |
830 void LayerTreeHost::ApplyPageScaleDeltaFromImplSide(float page_scale_delta) { | 839 void LayerTreeHost::ApplyPageScaleDeltaFromImplSide(float page_scale_delta) { |
831 DCHECK(CommitRequested()); | 840 DCHECK(CommitRequested()); |
832 if (page_scale_delta == 1.f) | 841 if (page_scale_delta == 1.f) |
833 return; | 842 return; |
834 page_scale_factor_ *= page_scale_delta; | 843 page_scale_factor_ *= page_scale_delta; |
835 SetPropertyTreesNeedRebuild(); | 844 SetPropertyTreesNeedRebuild(); |
836 } | 845 } |
837 | 846 |
838 void LayerTreeHost::SetPageScaleFactorAndLimits(float page_scale_factor, | 847 void LayerTreeHost::SetPageScaleFactorAndLimits(float page_scale_factor, |
839 float min_page_scale_factor, | 848 float min_page_scale_factor, |
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1671 | 1680 |
1672 surface_client_id_ = proto.surface_client_id(); | 1681 surface_client_id_ = proto.surface_client_id(); |
1673 next_surface_sequence_ = proto.next_surface_sequence(); | 1682 next_surface_sequence_ = proto.next_surface_sequence(); |
1674 } | 1683 } |
1675 | 1684 |
1676 AnimationHost* LayerTreeHost::animation_host() const { | 1685 AnimationHost* LayerTreeHost::animation_host() const { |
1677 return layer_tree_.animation_host(); | 1686 return layer_tree_.animation_host(); |
1678 } | 1687 } |
1679 | 1688 |
1680 } // namespace cc | 1689 } // namespace cc |
OLD | NEW |