| 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_impl.h" | 5 #include "cc/trees/layer_tree_impl.h" |
| 6 | 6 |
| 7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
| 8 #include "cc/animation/animation.h" | 8 #include "cc/animation/animation.h" |
| 9 #include "cc/animation/animation_id_provider.h" | 9 #include "cc/animation/animation_id_provider.h" |
| 10 #include "cc/animation/keyframed_animation_curve.h" | 10 #include "cc/animation/keyframed_animation_curve.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 currently_scrolling_layer_ ? currently_scrolling_layer_->id() : 0; | 91 currently_scrolling_layer_ ? currently_scrolling_layer_->id() : 0; |
| 92 root_scroll_layer_ = NULL; | 92 root_scroll_layer_ = NULL; |
| 93 currently_scrolling_layer_ = NULL; | 93 currently_scrolling_layer_ = NULL; |
| 94 | 94 |
| 95 render_surface_layer_list_.clear(); | 95 render_surface_layer_list_.clear(); |
| 96 set_needs_update_draw_properties(); | 96 set_needs_update_draw_properties(); |
| 97 return root_layer_.Pass(); | 97 return root_layer_.Pass(); |
| 98 } | 98 } |
| 99 | 99 |
| 100 void LayerTreeImpl::PushPropertiesTo(LayerTreeImpl* target_tree) { | 100 void LayerTreeImpl::PushPropertiesTo(LayerTreeImpl* target_tree) { |
| 101 target_tree->SetLatencyInfo(latency_info_); |
| 102 latency_info_.Clear(); |
| 101 target_tree->SetPageScaleFactorAndLimits( | 103 target_tree->SetPageScaleFactorAndLimits( |
| 102 page_scale_factor(), min_page_scale_factor(), max_page_scale_factor()); | 104 page_scale_factor(), min_page_scale_factor(), max_page_scale_factor()); |
| 103 target_tree->SetPageScaleDelta( | 105 target_tree->SetPageScaleDelta( |
| 104 target_tree->page_scale_delta() / target_tree->sent_page_scale_delta()); | 106 target_tree->page_scale_delta() / target_tree->sent_page_scale_delta()); |
| 105 target_tree->set_sent_page_scale_delta(1); | 107 target_tree->set_sent_page_scale_delta(1); |
| 106 | 108 |
| 107 // This should match the property synchronization in | 109 // This should match the property synchronization in |
| 108 // LayerTreeHost::finishCommitOnImplThread(). | 110 // LayerTreeHost::finishCommitOnImplThread(). |
| 109 target_tree->set_source_frame_number(source_frame_number()); | 111 target_tree->set_source_frame_number(source_frame_number()); |
| 110 target_tree->set_background_color(background_color()); | 112 target_tree->set_background_color(background_color()); |
| (...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 | 679 |
| 678 gfx::Vector2dF original_viewport_size = | 680 gfx::Vector2dF original_viewport_size = |
| 679 gfx::RectF(root_clip->bounds()).bottom_right() - | 681 gfx::RectF(root_clip->bounds()).bottom_right() - |
| 680 gfx::PointF(); | 682 gfx::PointF(); |
| 681 original_viewport_size.Scale(1 / page_scale_factor()); | 683 original_viewport_size.Scale(1 / page_scale_factor()); |
| 682 | 684 |
| 683 root_scroll->SetFixedContainerSizeDelta( | 685 root_scroll->SetFixedContainerSizeDelta( |
| 684 scrollable_viewport_size - original_viewport_size); | 686 scrollable_viewport_size - original_viewport_size); |
| 685 } | 687 } |
| 686 | 688 |
| 689 void LayerTreeImpl::SetLatencyInfo(const LatencyInfo& latency_info) { |
| 690 latency_info_.MergeWith(latency_info); |
| 691 } |
| 692 |
| 693 const LatencyInfo& LayerTreeImpl::GetLatencyInfo() { |
| 694 return latency_info_; |
| 695 } |
| 696 |
| 697 void LayerTreeImpl::ClearLatencyInfo() { |
| 698 latency_info_.Clear(); |
| 699 } |
| 700 |
| 687 } // namespace cc | 701 } // namespace cc |
| OLD | NEW |