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 3900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3911 } | 3911 } |
3912 | 3912 |
3913 void LayerTreeHostImpl::SetTreeLayerOpacityMutated(ElementId element_id, | 3913 void LayerTreeHostImpl::SetTreeLayerOpacityMutated(ElementId element_id, |
3914 LayerTreeImpl* tree, | 3914 LayerTreeImpl* tree, |
3915 float opacity) { | 3915 float opacity) { |
3916 if (!tree) | 3916 if (!tree) |
3917 return; | 3917 return; |
3918 | 3918 |
3919 LayerImpl* layer = tree->LayerByElementId(element_id); | 3919 LayerImpl* layer = tree->LayerByElementId(element_id); |
3920 if (layer) | 3920 if (layer) |
3921 layer->OnOpacityAnimated(opacity); | 3921 tree->property_trees()->effect_tree.OnOpacityAnimated( |
3922 opacity, layer->effect_tree_index(), tree); | |
ajuma
2016/08/18 18:49:26
Can we get the effect tree index from the id to in
jaydasika
2016/08/18 19:57:52
Acknowledged. Will do that in a separate CL.
| |
3922 } | 3923 } |
3923 | 3924 |
3924 void LayerTreeHostImpl::SetTreeLayerTransformMutated( | 3925 void LayerTreeHostImpl::SetTreeLayerTransformMutated( |
3925 ElementId element_id, | 3926 ElementId element_id, |
3926 LayerTreeImpl* tree, | 3927 LayerTreeImpl* tree, |
3927 const gfx::Transform& transform) { | 3928 const gfx::Transform& transform) { |
3928 if (!tree) | 3929 if (!tree) |
3929 return; | 3930 return; |
3930 | 3931 |
3931 LayerImpl* layer = tree->LayerByElementId(element_id); | 3932 LayerImpl* layer = tree->LayerByElementId(element_id); |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4101 return task_runner_provider_->HasImplThread(); | 4102 return task_runner_provider_->HasImplThread(); |
4102 } | 4103 } |
4103 | 4104 |
4104 bool LayerTreeHostImpl::CommitToActiveTree() const { | 4105 bool LayerTreeHostImpl::CommitToActiveTree() const { |
4105 // In single threaded mode we skip the pending tree and commit directly to the | 4106 // In single threaded mode we skip the pending tree and commit directly to the |
4106 // active tree. | 4107 // active tree. |
4107 return !task_runner_provider_->HasImplThread(); | 4108 return !task_runner_provider_->HasImplThread(); |
4108 } | 4109 } |
4109 | 4110 |
4110 } // namespace cc | 4111 } // namespace cc |
OLD | NEW |