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 2916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2927 | 2927 |
2928 // SetScrollElementId will initialize the scrollbar which will cause it to | 2928 // SetScrollElementId will initialize the scrollbar which will cause it to |
2929 // show and request a redraw. | 2929 // show and request a redraw. |
2930 did_request_redraw_ = false; | 2930 did_request_redraw_ = false; |
2931 } | 2931 } |
2932 | 2932 |
2933 void RunTest(LayerTreeSettings::ScrollbarAnimator animator) { | 2933 void RunTest(LayerTreeSettings::ScrollbarAnimator animator) { |
2934 LayerTreeSettings settings = DefaultSettings(); | 2934 LayerTreeSettings settings = DefaultSettings(); |
2935 settings.scrollbar_animator = animator; | 2935 settings.scrollbar_animator = animator; |
2936 settings.scrollbar_fade_delay = base::TimeDelta::FromMilliseconds(20); | 2936 settings.scrollbar_fade_delay = base::TimeDelta::FromMilliseconds(20); |
2937 settings.scrollbar_fade_out_resize_delay = | |
2938 base::TimeDelta::FromMilliseconds(20); | |
2939 settings.scrollbar_fade_duration = base::TimeDelta::FromMilliseconds(20); | 2937 settings.scrollbar_fade_duration = base::TimeDelta::FromMilliseconds(20); |
2940 | 2938 |
2941 // If no animator is set, scrollbar won't show and no animation is expected. | 2939 // If no animator is set, scrollbar won't show and no animation is expected. |
2942 bool expecting_animations = animator != LayerTreeSettings::NO_ANIMATOR; | 2940 bool expecting_animations = animator != LayerTreeSettings::NO_ANIMATOR; |
2943 | 2941 |
2944 SetupLayers(settings); | 2942 SetupLayers(settings); |
2945 | 2943 |
2946 base::TimeTicks fake_now = base::TimeTicks::Now(); | 2944 base::TimeTicks fake_now = base::TimeTicks::Now(); |
2947 | 2945 |
2948 if (expecting_animations) { | 2946 if (expecting_animations) { |
(...skipping 9344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12293 else | 12291 else |
12294 EXPECT_FALSE(tile->HasRasterTask()); | 12292 EXPECT_FALSE(tile->HasRasterTask()); |
12295 } | 12293 } |
12296 Region expected_invalidation( | 12294 Region expected_invalidation( |
12297 raster_source->GetRectForImage(checkerable_image->uniqueID())); | 12295 raster_source->GetRectForImage(checkerable_image->uniqueID())); |
12298 EXPECT_EQ(expected_invalidation, *(root->GetPendingInvalidation())); | 12296 EXPECT_EQ(expected_invalidation, *(root->GetPendingInvalidation())); |
12299 } | 12297 } |
12300 | 12298 |
12301 } // namespace | 12299 } // namespace |
12302 } // namespace cc | 12300 } // namespace cc |
OLD | NEW |