| 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 1450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1461 gfx::Size LayerTreeImpl::DrawViewportSize() const { | 1461 gfx::Size LayerTreeImpl::DrawViewportSize() const { |
| 1462 return layer_tree_host_impl_->DrawViewportSize(); | 1462 return layer_tree_host_impl_->DrawViewportSize(); |
| 1463 } | 1463 } |
| 1464 | 1464 |
| 1465 const gfx::Rect LayerTreeImpl::ViewportRectForTilePriority() const { | 1465 const gfx::Rect LayerTreeImpl::ViewportRectForTilePriority() const { |
| 1466 return layer_tree_host_impl_->ViewportRectForTilePriority(); | 1466 return layer_tree_host_impl_->ViewportRectForTilePriority(); |
| 1467 } | 1467 } |
| 1468 | 1468 |
| 1469 std::unique_ptr<ScrollbarAnimationController> | 1469 std::unique_ptr<ScrollbarAnimationController> |
| 1470 LayerTreeImpl::CreateScrollbarAnimationController(ElementId scroll_element_id) { | 1470 LayerTreeImpl::CreateScrollbarAnimationController(ElementId scroll_element_id) { |
| 1471 DCHECK(!settings().scrollbar_fade_out_delay.is_zero()); | 1471 DCHECK(!settings().scrollbar_fade_delay.is_zero()); |
| 1472 DCHECK(!settings().scrollbar_fade_out_duration.is_zero()); | 1472 DCHECK(!settings().scrollbar_fade_duration.is_zero()); |
| 1473 base::TimeDelta fade_out_delay = settings().scrollbar_fade_out_delay; | 1473 base::TimeDelta fade_delay = settings().scrollbar_fade_delay; |
| 1474 base::TimeDelta fade_out_resize_delay = | 1474 base::TimeDelta fade_out_resize_delay = |
| 1475 settings().scrollbar_fade_out_resize_delay; | 1475 settings().scrollbar_fade_out_resize_delay; |
| 1476 base::TimeDelta fade_out_duration = settings().scrollbar_fade_out_duration; | 1476 base::TimeDelta fade_duration = settings().scrollbar_fade_duration; |
| 1477 switch (settings().scrollbar_animator) { | 1477 switch (settings().scrollbar_animator) { |
| 1478 case LayerTreeSettings::ANDROID_OVERLAY: { | 1478 case LayerTreeSettings::ANDROID_OVERLAY: { |
| 1479 return ScrollbarAnimationController:: | 1479 return ScrollbarAnimationController:: |
| 1480 CreateScrollbarAnimationControllerAndroid( | 1480 CreateScrollbarAnimationControllerAndroid( |
| 1481 scroll_element_id, layer_tree_host_impl_, fade_out_delay, | 1481 scroll_element_id, layer_tree_host_impl_, fade_delay, |
| 1482 fade_out_resize_delay, fade_out_duration); | 1482 fade_out_resize_delay, fade_duration); |
| 1483 } | 1483 } |
| 1484 case LayerTreeSettings::AURA_OVERLAY: { | 1484 case LayerTreeSettings::AURA_OVERLAY: { |
| 1485 DCHECK(!settings().scrollbar_show_delay.is_zero()); | |
| 1486 base::TimeDelta show_delay = settings().scrollbar_show_delay; | |
| 1487 base::TimeDelta thinning_duration = | 1485 base::TimeDelta thinning_duration = |
| 1488 settings().scrollbar_thinning_duration; | 1486 settings().scrollbar_thinning_duration; |
| 1489 return ScrollbarAnimationController:: | 1487 return ScrollbarAnimationController:: |
| 1490 CreateScrollbarAnimationControllerAuraOverlay( | 1488 CreateScrollbarAnimationControllerAuraOverlay( |
| 1491 scroll_element_id, layer_tree_host_impl_, show_delay, | 1489 scroll_element_id, layer_tree_host_impl_, fade_delay, |
| 1492 fade_out_delay, fade_out_resize_delay, fade_out_duration, | 1490 fade_out_resize_delay, fade_duration, thinning_duration); |
| 1493 thinning_duration); | |
| 1494 } | 1491 } |
| 1495 case LayerTreeSettings::NO_ANIMATOR: | 1492 case LayerTreeSettings::NO_ANIMATOR: |
| 1496 NOTREACHED(); | 1493 NOTREACHED(); |
| 1497 break; | 1494 break; |
| 1498 } | 1495 } |
| 1499 return nullptr; | 1496 return nullptr; |
| 1500 } | 1497 } |
| 1501 | 1498 |
| 1502 void LayerTreeImpl::DidAnimateScrollOffset() { | 1499 void LayerTreeImpl::DidAnimateScrollOffset() { |
| 1503 layer_tree_host_impl_->DidAnimateScrollOffset(); | 1500 layer_tree_host_impl_->DidAnimateScrollOffset(); |
| (...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2184 | 2181 |
| 2185 void LayerTreeImpl::ResetAllChangeTracking() { | 2182 void LayerTreeImpl::ResetAllChangeTracking() { |
| 2186 layers_that_should_push_properties_.clear(); | 2183 layers_that_should_push_properties_.clear(); |
| 2187 // Iterate over all layers, including masks. | 2184 // Iterate over all layers, including masks. |
| 2188 for (auto& layer : *layers_) | 2185 for (auto& layer : *layers_) |
| 2189 layer->ResetChangeTracking(); | 2186 layer->ResetChangeTracking(); |
| 2190 property_trees_.ResetAllChangeTracking(); | 2187 property_trees_.ResetAllChangeTracking(); |
| 2191 } | 2188 } |
| 2192 | 2189 |
| 2193 } // namespace cc | 2190 } // namespace cc |
| OLD | NEW |