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_common.h" | 5 #include "cc/trees/layer_tree_host_common.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "cc/animation/layer_animation_controller.h" | 10 #include "cc/animation/layer_animation_controller.h" |
(...skipping 7801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7812 gfx::Size(30, 30), true, false, false); | 7812 gfx::Size(30, 30), true, false, false); |
7813 | 7813 |
7814 gfx::ScrollOffset scroll_offset(3.3, 4.2); | 7814 gfx::ScrollOffset scroll_offset(3.3, 4.2); |
7815 gfx::Vector2dF main_scroll_fractional_part(0.3f, 0.2f); | 7815 gfx::Vector2dF main_scroll_fractional_part(0.3f, 0.2f); |
7816 gfx::Vector2dF scroll_delta(0.1f, 0.4f); | 7816 gfx::Vector2dF scroll_delta(0.1f, 0.4f); |
7817 // Blink only uses the integer part of the scroll_offset for fixed | 7817 // Blink only uses the integer part of the scroll_offset for fixed |
7818 // position layer. | 7818 // position layer. |
7819 SetLayerPropertiesForTesting(fixed.get(), identity_transform, gfx::Point3F(), | 7819 SetLayerPropertiesForTesting(fixed.get(), identity_transform, gfx::Point3F(), |
7820 gfx::PointF(3.0f, 4.0f), gfx::Size(50, 50), true, | 7820 gfx::PointF(3.0f, 4.0f), gfx::Size(50, 50), true, |
7821 false, false); | 7821 false, false); |
7822 scroll_layer->SetScrollOffsetAndDelta(scroll_offset, scroll_delta); | 7822 scroll_layer->SetScrollOffset(scroll_offset); |
| 7823 scroll_layer->SetScrollDelta(scroll_delta); |
7823 scroll_layer->SetScrollCompensationAdjustment(main_scroll_fractional_part); | 7824 scroll_layer->SetScrollCompensationAdjustment(main_scroll_fractional_part); |
7824 | 7825 |
7825 scroller->AddChild(fixed.Pass()); | 7826 scroller->AddChild(fixed.Pass()); |
7826 container->AddChild(scroller.Pass()); | 7827 container->AddChild(scroller.Pass()); |
7827 root->AddChild(container.Pass()); | 7828 root->AddChild(container.Pass()); |
7828 | 7829 |
7829 LayerImplList render_surface_layer_list; | 7830 LayerImplList render_surface_layer_list; |
7830 LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs( | 7831 LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs( |
7831 root.get(), root->bounds(), &render_surface_layer_list); | 7832 root.get(), root->bounds(), &render_surface_layer_list); |
7832 LayerTreeHostCommon::CalculateDrawProperties(&inputs); | 7833 LayerTreeHostCommon::CalculateDrawProperties(&inputs); |
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8666 | 8667 |
8667 LayerTreeHostCommon::CalculateDrawProperties(&inputs); | 8668 LayerTreeHostCommon::CalculateDrawProperties(&inputs); |
8668 | 8669 |
8669 gfx::Rect affected_by_delta(0, 0, root_size.width(), | 8670 gfx::Rect affected_by_delta(0, 0, root_size.width(), |
8670 root_size.height() + 50); | 8671 root_size.height() + 50); |
8671 EXPECT_EQ(affected_by_delta, sublayer->visible_content_rect()); | 8672 EXPECT_EQ(affected_by_delta, sublayer->visible_content_rect()); |
8672 } | 8673 } |
8673 | 8674 |
8674 } // namespace | 8675 } // namespace |
8675 } // namespace cc | 8676 } // namespace cc |
OLD | NEW |