| 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_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <cmath> | 10 #include <cmath> |
| (...skipping 947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 958 scroll->SetBounds(scroll_content_size); | 958 scroll->SetBounds(scroll_content_size); |
| 959 scroll->SetScrollClipLayer(clip->id()); | 959 scroll->SetScrollClipLayer(clip->id()); |
| 960 scroll->SetDrawsContent(true); | 960 scroll->SetDrawsContent(true); |
| 961 | 961 |
| 962 std::unique_ptr<SolidColorScrollbarLayerImpl> scrollbar = | 962 std::unique_ptr<SolidColorScrollbarLayerImpl> scrollbar = |
| 963 SolidColorScrollbarLayerImpl::Create(layer_tree_impl, 4, VERTICAL, 10, 0, | 963 SolidColorScrollbarLayerImpl::Create(layer_tree_impl, 4, VERTICAL, 10, 0, |
| 964 false, true); | 964 false, true); |
| 965 scrollbar->SetBounds(scrollbar_size); | 965 scrollbar->SetBounds(scrollbar_size); |
| 966 scrollbar->SetPosition(gfx::PointF(345, 0)); | 966 scrollbar->SetPosition(gfx::PointF(345, 0)); |
| 967 scrollbar->SetScrollLayerId(scroll->id()); | 967 scrollbar->SetScrollLayerId(scroll->id()); |
| 968 scrollbar->set_layer_or_descendant_is_drawn(true); | |
| 969 scrollbar->SetDrawsContent(true); | 968 scrollbar->SetDrawsContent(true); |
| 969 scrollbar->SetOpacity(1.f); |
| 970 | 970 |
| 971 std::unique_ptr<LayerImpl> squash1 = LayerImpl::Create(layer_tree_impl, 5); | 971 std::unique_ptr<LayerImpl> squash1 = LayerImpl::Create(layer_tree_impl, 5); |
| 972 squash1->SetBounds(gfx::Size(140, 300)); | 972 squash1->SetBounds(gfx::Size(140, 300)); |
| 973 squash1->SetPosition(gfx::PointF(220, 0)); | 973 squash1->SetPosition(gfx::PointF(220, 0)); |
| 974 squash1->SetDrawsContent(true); | 974 squash1->SetDrawsContent(true); |
| 975 | 975 |
| 976 std::unique_ptr<LayerImpl> squash2 = LayerImpl::Create(layer_tree_impl, 6); | 976 std::unique_ptr<LayerImpl> squash2 = LayerImpl::Create(layer_tree_impl, 6); |
| 977 squash2->SetBounds(gfx::Size(140, 300)); | 977 squash2->SetBounds(gfx::Size(140, 300)); |
| 978 squash2->SetPosition(gfx::PointF(220, 300)); | 978 squash2->SetPosition(gfx::PointF(220, 300)); |
| 979 squash2->SetDrawsContent(true); | 979 squash2->SetDrawsContent(true); |
| (...skipping 9693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10673 // There should not be any jitter measured till we hit the fixed point hits | 10673 // There should not be any jitter measured till we hit the fixed point hits |
| 10674 // threshold. | 10674 // threshold. |
| 10675 float expected_jitter = | 10675 float expected_jitter = |
| 10676 (i == pending_tree->kFixedPointHitsThreshold) ? 500 : 0; | 10676 (i == pending_tree->kFixedPointHitsThreshold) ? 500 : 0; |
| 10677 EXPECT_EQ(jitter, expected_jitter); | 10677 EXPECT_EQ(jitter, expected_jitter); |
| 10678 } | 10678 } |
| 10679 } | 10679 } |
| 10680 | 10680 |
| 10681 } // namespace | 10681 } // namespace |
| 10682 } // namespace cc | 10682 } // namespace cc |
| OLD | NEW |