| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/layers/layer_impl.h" | 5 #include "cc/layers/layer_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 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 774 } | 774 } |
| 775 } | 775 } |
| 776 | 776 |
| 777 void LayerImpl::OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset) { | 777 void LayerImpl::OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset) { |
| 778 // Only layers in the active tree should need to do anything here, since | 778 // Only layers in the active tree should need to do anything here, since |
| 779 // layers in the pending tree will find out about these changes as a | 779 // layers in the pending tree will find out about these changes as a |
| 780 // result of the shared SyncedProperty. | 780 // result of the shared SyncedProperty. |
| 781 if (!IsActive()) | 781 if (!IsActive()) |
| 782 return; | 782 return; |
| 783 | 783 |
| 784 SetCurrentScrollOffset(scroll_offset); | 784 SetCurrentScrollOffset(ClampScrollOffsetToLimits(scroll_offset)); |
| 785 | 785 |
| 786 layer_tree_impl_->DidAnimateScrollOffset(); | 786 layer_tree_impl_->DidAnimateScrollOffset(); |
| 787 } | 787 } |
| 788 | 788 |
| 789 void LayerImpl::OnTransformIsPotentiallyAnimatingChanged(bool is_animating) { | 789 void LayerImpl::OnTransformIsPotentiallyAnimatingChanged(bool is_animating) { |
| 790 UpdatePropertyTreeTransformIsAnimated(is_animating); | 790 UpdatePropertyTreeTransformIsAnimated(is_animating); |
| 791 was_ever_ready_since_last_transform_animation_ = false; | 791 was_ever_ready_since_last_transform_animation_ = false; |
| 792 } | 792 } |
| 793 | 793 |
| 794 bool LayerImpl::IsActive() const { | 794 bool LayerImpl::IsActive() const { |
| (...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1410 .layer_transforms_should_scale_layer_contents) { | 1410 .layer_transforms_should_scale_layer_contents) { |
| 1411 return default_scale; | 1411 return default_scale; |
| 1412 } | 1412 } |
| 1413 | 1413 |
| 1414 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( | 1414 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( |
| 1415 DrawTransform(), default_scale); | 1415 DrawTransform(), default_scale); |
| 1416 return std::max(transform_scales.x(), transform_scales.y()); | 1416 return std::max(transform_scales.x(), transform_scales.y()); |
| 1417 } | 1417 } |
| 1418 | 1418 |
| 1419 } // namespace cc | 1419 } // namespace cc |
| OLD | NEW |