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 <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 3648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3659 LayerTreeImpl* tree, | 3659 LayerTreeImpl* tree, |
3660 bool is_animating) { | 3660 bool is_animating) { |
3661 if (!tree) | 3661 if (!tree) |
3662 return; | 3662 return; |
3663 | 3663 |
3664 LayerAnimationValueObserver* layer = tree->LayerById(layer_id); | 3664 LayerAnimationValueObserver* layer = tree->LayerById(layer_id); |
3665 if (layer) | 3665 if (layer) |
3666 layer->OnTransformIsPotentiallyAnimatingChanged(is_animating); | 3666 layer->OnTransformIsPotentiallyAnimatingChanged(is_animating); |
3667 } | 3667 } |
3668 | 3668 |
3669 bool LayerTreeHostImpl::AnimationsPreserveAxisAlignment( | |
3670 const LayerImpl* layer) const { | |
3671 return animation_host_ | |
3672 ? animation_host_->AnimationsPreserveAxisAlignment(layer->id()) | |
3673 : true; | |
3674 } | |
3675 | |
3676 void LayerTreeHostImpl::SetLayerFilterMutated(int layer_id, | 3669 void LayerTreeHostImpl::SetLayerFilterMutated(int layer_id, |
3677 LayerTreeType tree_type, | 3670 LayerTreeType tree_type, |
3678 const FilterOperations& filters) { | 3671 const FilterOperations& filters) { |
3679 if (tree_type == LayerTreeType::ACTIVE) { | 3672 if (tree_type == LayerTreeType::ACTIVE) { |
3680 SetTreeLayerFilterMutated(layer_id, active_tree(), filters); | 3673 SetTreeLayerFilterMutated(layer_id, active_tree(), filters); |
3681 } else { | 3674 } else { |
3682 SetTreeLayerFilterMutated(layer_id, pending_tree(), filters); | 3675 SetTreeLayerFilterMutated(layer_id, pending_tree(), filters); |
3683 SetTreeLayerFilterMutated(layer_id, recycle_tree(), filters); | 3676 SetTreeLayerFilterMutated(layer_id, recycle_tree(), filters); |
3684 } | 3677 } |
3685 } | 3678 } |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3752 return task_runner_provider_->HasImplThread(); | 3745 return task_runner_provider_->HasImplThread(); |
3753 } | 3746 } |
3754 | 3747 |
3755 bool LayerTreeHostImpl::CommitToActiveTree() const { | 3748 bool LayerTreeHostImpl::CommitToActiveTree() const { |
3756 // In single threaded mode we skip the pending tree and commit directly to the | 3749 // In single threaded mode we skip the pending tree and commit directly to the |
3757 // active tree. | 3750 // active tree. |
3758 return !task_runner_provider_->HasImplThread(); | 3751 return !task_runner_provider_->HasImplThread(); |
3759 } | 3752 } |
3760 | 3753 |
3761 } // namespace cc | 3754 } // namespace cc |
OLD | NEW |