| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 3897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3908 | 3908 |
| 3909 void LayerTreeHostImpl::SetMutatorsNeedRebuildPropertyTrees() {} | 3909 void LayerTreeHostImpl::SetMutatorsNeedRebuildPropertyTrees() {} |
| 3910 | 3910 |
| 3911 void LayerTreeHostImpl::SetTreeLayerFilterMutated( | 3911 void LayerTreeHostImpl::SetTreeLayerFilterMutated( |
| 3912 ElementId element_id, | 3912 ElementId element_id, |
| 3913 LayerTreeImpl* tree, | 3913 LayerTreeImpl* tree, |
| 3914 const FilterOperations& filters) { | 3914 const FilterOperations& filters) { |
| 3915 if (!tree) | 3915 if (!tree) |
| 3916 return; | 3916 return; |
| 3917 | 3917 |
| 3918 LayerImpl* layer = tree->LayerByElementId(element_id); | 3918 const int layer_id = tree->LayerIdByElementId(element_id); |
| 3919 if (layer) | 3919 const int effect_id = |
| 3920 layer->OnFilterAnimated(filters); | 3920 tree->property_trees()->effect_id_to_index_map[layer_id]; |
| 3921 if (effect_id != EffectTree::kInvalidNodeId) |
| 3922 tree->property_trees()->effect_tree.OnFilterAnimated(filters, effect_id, |
| 3923 tree); |
| 3921 } | 3924 } |
| 3922 | 3925 |
| 3923 void LayerTreeHostImpl::SetTreeLayerOpacityMutated(ElementId element_id, | 3926 void LayerTreeHostImpl::SetTreeLayerOpacityMutated(ElementId element_id, |
| 3924 LayerTreeImpl* tree, | 3927 LayerTreeImpl* tree, |
| 3925 float opacity) { | 3928 float opacity) { |
| 3926 if (!tree) | 3929 if (!tree) |
| 3927 return; | 3930 return; |
| 3928 | 3931 |
| 3929 const int layer_id = tree->LayerIdByElementId(element_id); | 3932 const int layer_id = tree->LayerIdByElementId(element_id); |
| 3930 const int effect_id = | 3933 const int effect_id = |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4120 return task_runner_provider_->HasImplThread(); | 4123 return task_runner_provider_->HasImplThread(); |
| 4121 } | 4124 } |
| 4122 | 4125 |
| 4123 bool LayerTreeHostImpl::CommitToActiveTree() const { | 4126 bool LayerTreeHostImpl::CommitToActiveTree() const { |
| 4124 // In single threaded mode we skip the pending tree and commit directly to the | 4127 // In single threaded mode we skip the pending tree and commit directly to the |
| 4125 // active tree. | 4128 // active tree. |
| 4126 return !task_runner_provider_->HasImplThread(); | 4129 return !task_runner_provider_->HasImplThread(); |
| 4127 } | 4130 } |
| 4128 | 4131 |
| 4129 } // namespace cc | 4132 } // namespace cc |
| OLD | NEW |