| 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 1377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1388 gfx::Size LayerTreeImpl::DrawViewportSize() const { | 1388 gfx::Size LayerTreeImpl::DrawViewportSize() const { |
| 1389 return layer_tree_host_impl_->DrawViewportSize(); | 1389 return layer_tree_host_impl_->DrawViewportSize(); |
| 1390 } | 1390 } |
| 1391 | 1391 |
| 1392 const gfx::Rect LayerTreeImpl::ViewportRectForTilePriority() const { | 1392 const gfx::Rect LayerTreeImpl::ViewportRectForTilePriority() const { |
| 1393 return layer_tree_host_impl_->ViewportRectForTilePriority(); | 1393 return layer_tree_host_impl_->ViewportRectForTilePriority(); |
| 1394 } | 1394 } |
| 1395 | 1395 |
| 1396 std::unique_ptr<ScrollbarAnimationController> | 1396 std::unique_ptr<ScrollbarAnimationController> |
| 1397 LayerTreeImpl::CreateScrollbarAnimationController(int scroll_layer_id) { | 1397 LayerTreeImpl::CreateScrollbarAnimationController(int scroll_layer_id) { |
| 1398 DCHECK(!settings().scrollbar_fade_delay.is_zero()); | 1398 DCHECK(!settings().scrollbar_fade_out_delay.is_zero()); |
| 1399 DCHECK(!settings().scrollbar_fade_duration.is_zero()); | 1399 DCHECK(!settings().scrollbar_fade_out_duration.is_zero()); |
| 1400 base::TimeDelta delay = settings().scrollbar_fade_delay; | 1400 base::TimeDelta fade_out_delay = settings().scrollbar_fade_out_delay; |
| 1401 base::TimeDelta resize_delay = settings().scrollbar_fade_resize_delay; | 1401 base::TimeDelta fade_out_resize_delay = |
| 1402 base::TimeDelta fade_duration = settings().scrollbar_fade_duration; | 1402 settings().scrollbar_fade_out_resize_delay; |
| 1403 base::TimeDelta fade_out_duration = settings().scrollbar_fade_out_duration; |
| 1403 switch (settings().scrollbar_animator) { | 1404 switch (settings().scrollbar_animator) { |
| 1404 case LayerTreeSettings::ANDROID_OVERLAY: { | 1405 case LayerTreeSettings::ANDROID_OVERLAY: { |
| 1405 return ScrollbarAnimationController:: | 1406 return ScrollbarAnimationController:: |
| 1406 CreateScrollbarAnimationControllerAndroid( | 1407 CreateScrollbarAnimationControllerAndroid( |
| 1407 scroll_layer_id, layer_tree_host_impl_, delay, resize_delay, | 1408 scroll_layer_id, layer_tree_host_impl_, fade_out_delay, |
| 1408 fade_duration); | 1409 fade_out_resize_delay, fade_out_duration); |
| 1409 } | 1410 } |
| 1410 case LayerTreeSettings::AURA_OVERLAY: { | 1411 case LayerTreeSettings::AURA_OVERLAY: { |
| 1412 DCHECK(!settings().scrollbar_fade_in_delay.is_zero()); |
| 1413 base::TimeDelta fade_in_delay = settings().scrollbar_fade_in_delay; |
| 1411 base::TimeDelta thinning_duration = | 1414 base::TimeDelta thinning_duration = |
| 1412 settings().scrollbar_thinning_duration; | 1415 settings().scrollbar_thinning_duration; |
| 1413 return ScrollbarAnimationController:: | 1416 return ScrollbarAnimationController:: |
| 1414 CreateScrollbarAnimationControllerAuraOverlay( | 1417 CreateScrollbarAnimationControllerAuraOverlay( |
| 1415 scroll_layer_id, layer_tree_host_impl_, delay, resize_delay, | 1418 scroll_layer_id, layer_tree_host_impl_, fade_in_delay, |
| 1416 fade_duration, thinning_duration); | 1419 fade_out_delay, fade_out_resize_delay, fade_out_duration, |
| 1420 thinning_duration); |
| 1417 } | 1421 } |
| 1418 case LayerTreeSettings::NO_ANIMATOR: | 1422 case LayerTreeSettings::NO_ANIMATOR: |
| 1419 NOTREACHED(); | 1423 NOTREACHED(); |
| 1420 break; | 1424 break; |
| 1421 } | 1425 } |
| 1422 return nullptr; | 1426 return nullptr; |
| 1423 } | 1427 } |
| 1424 | 1428 |
| 1425 void LayerTreeImpl::DidAnimateScrollOffset() { | 1429 void LayerTreeImpl::DidAnimateScrollOffset() { |
| 1426 layer_tree_host_impl_->DidAnimateScrollOffset(); | 1430 layer_tree_host_impl_->DidAnimateScrollOffset(); |
| (...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2118 | 2122 |
| 2119 void LayerTreeImpl::ResetAllChangeTracking() { | 2123 void LayerTreeImpl::ResetAllChangeTracking() { |
| 2120 layers_that_should_push_properties_.clear(); | 2124 layers_that_should_push_properties_.clear(); |
| 2121 // Iterate over all layers, including masks. | 2125 // Iterate over all layers, including masks. |
| 2122 for (auto& layer : *layers_) | 2126 for (auto& layer : *layers_) |
| 2123 layer->ResetChangeTracking(); | 2127 layer->ResetChangeTracking(); |
| 2124 property_trees_.ResetAllChangeTracking(); | 2128 property_trees_.ResetAllChangeTracking(); |
| 2125 } | 2129 } |
| 2126 | 2130 |
| 2127 } // namespace cc | 2131 } // namespace cc |
| OLD | NEW |