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 <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 1392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1403 | 1403 |
1404 const gfx::Rect LayerTreeImpl::ViewportRectForTilePriority() const { | 1404 const gfx::Rect LayerTreeImpl::ViewportRectForTilePriority() const { |
1405 return layer_tree_host_impl_->ViewportRectForTilePriority(); | 1405 return layer_tree_host_impl_->ViewportRectForTilePriority(); |
1406 } | 1406 } |
1407 | 1407 |
1408 std::unique_ptr<ScrollbarAnimationController> | 1408 std::unique_ptr<ScrollbarAnimationController> |
1409 LayerTreeImpl::CreateScrollbarAnimationController(ElementId scroll_element_id) { | 1409 LayerTreeImpl::CreateScrollbarAnimationController(ElementId scroll_element_id) { |
1410 DCHECK(!settings().scrollbar_fade_delay.is_zero()); | 1410 DCHECK(!settings().scrollbar_fade_delay.is_zero()); |
1411 DCHECK(!settings().scrollbar_fade_duration.is_zero()); | 1411 DCHECK(!settings().scrollbar_fade_duration.is_zero()); |
1412 base::TimeDelta fade_delay = settings().scrollbar_fade_delay; | 1412 base::TimeDelta fade_delay = settings().scrollbar_fade_delay; |
1413 base::TimeDelta fade_out_resize_delay = | |
1414 settings().scrollbar_fade_out_resize_delay; | |
1415 base::TimeDelta fade_duration = settings().scrollbar_fade_duration; | 1413 base::TimeDelta fade_duration = settings().scrollbar_fade_duration; |
1416 switch (settings().scrollbar_animator) { | 1414 switch (settings().scrollbar_animator) { |
1417 case LayerTreeSettings::ANDROID_OVERLAY: { | 1415 case LayerTreeSettings::ANDROID_OVERLAY: { |
1418 return ScrollbarAnimationController:: | 1416 return ScrollbarAnimationController:: |
1419 CreateScrollbarAnimationControllerAndroid( | 1417 CreateScrollbarAnimationControllerAndroid(scroll_element_id, |
1420 scroll_element_id, layer_tree_host_impl_, fade_delay, | 1418 layer_tree_host_impl_, |
1421 fade_out_resize_delay, fade_duration); | 1419 fade_delay, fade_duration); |
1422 } | 1420 } |
1423 case LayerTreeSettings::AURA_OVERLAY: { | 1421 case LayerTreeSettings::AURA_OVERLAY: { |
1424 base::TimeDelta thinning_duration = | 1422 base::TimeDelta thinning_duration = |
1425 settings().scrollbar_thinning_duration; | 1423 settings().scrollbar_thinning_duration; |
1426 return ScrollbarAnimationController:: | 1424 return ScrollbarAnimationController:: |
1427 CreateScrollbarAnimationControllerAuraOverlay( | 1425 CreateScrollbarAnimationControllerAuraOverlay( |
1428 scroll_element_id, layer_tree_host_impl_, fade_delay, | 1426 scroll_element_id, layer_tree_host_impl_, fade_delay, |
1429 fade_out_resize_delay, fade_duration, thinning_duration); | 1427 fade_duration, thinning_duration); |
1430 } | 1428 } |
1431 case LayerTreeSettings::NO_ANIMATOR: | 1429 case LayerTreeSettings::NO_ANIMATOR: |
1432 NOTREACHED(); | 1430 NOTREACHED(); |
1433 break; | 1431 break; |
1434 } | 1432 } |
1435 return nullptr; | 1433 return nullptr; |
1436 } | 1434 } |
1437 | 1435 |
1438 void LayerTreeImpl::DidAnimateScrollOffset() { | 1436 void LayerTreeImpl::DidAnimateScrollOffset() { |
1439 layer_tree_host_impl_->DidAnimateScrollOffset(); | 1437 layer_tree_host_impl_->DidAnimateScrollOffset(); |
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2122 | 2120 |
2123 void LayerTreeImpl::ResetAllChangeTracking() { | 2121 void LayerTreeImpl::ResetAllChangeTracking() { |
2124 layers_that_should_push_properties_.clear(); | 2122 layers_that_should_push_properties_.clear(); |
2125 // Iterate over all layers, including masks. | 2123 // Iterate over all layers, including masks. |
2126 for (auto& layer : *layers_) | 2124 for (auto& layer : *layers_) |
2127 layer->ResetChangeTracking(); | 2125 layer->ResetChangeTracking(); |
2128 property_trees_.ResetAllChangeTracking(); | 2126 property_trees_.ResetAllChangeTracking(); |
2129 } | 2127 } |
2130 | 2128 |
2131 } // namespace cc | 2129 } // namespace cc |
OLD | NEW |