OLD | NEW |
1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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/layer.h" | 5 #include "cc/layer.h" |
6 | 6 |
7 #include "cc/active_animation.h" | 7 #include "cc/active_animation.h" |
8 #include "cc/animation_events.h" | 8 #include "cc/animation_events.h" |
9 #include "cc/layer_animation_controller.h" | 9 #include "cc/layer_animation_controller.h" |
10 #include "cc/layer_impl.h" | 10 #include "cc/layer_impl.h" |
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
730 } | 730 } |
731 | 731 |
732 void Layer::OnTransformAnimated(const gfx::Transform& transform) | 732 void Layer::OnTransformAnimated(const gfx::Transform& transform) |
733 { | 733 { |
734 // This is called due to an ongoing accelerated animation. Since this animat
ion is | 734 // This is called due to an ongoing accelerated animation. Since this animat
ion is |
735 // also being run on the impl thread, there is no need to request a commit t
o push | 735 // also being run on the impl thread, there is no need to request a commit t
o push |
736 // this value over, so set this value directly rather than calling setTransf
orm. | 736 // this value over, so set this value directly rather than calling setTransf
orm. |
737 m_transform = transform; | 737 m_transform = transform; |
738 } | 738 } |
739 | 739 |
| 740 bool Layer::IsActive() const |
| 741 { |
| 742 return true; |
| 743 } |
| 744 |
740 bool Layer::addAnimation(scoped_ptr <ActiveAnimation> animation) | 745 bool Layer::addAnimation(scoped_ptr <ActiveAnimation> animation) |
741 { | 746 { |
742 // WebCore currently assumes that accelerated animations will start soon | 747 // WebCore currently assumes that accelerated animations will start soon |
743 // after the animation is added. However we cannot guarantee that if we do | 748 // after the animation is added. However we cannot guarantee that if we do |
744 // not have a layerTreeHost that will setNeedsCommit(). | 749 // not have a layerTreeHost that will setNeedsCommit(). |
745 // Unfortunately, the fix below to guarantee correctness causes performance | 750 // Unfortunately, the fix below to guarantee correctness causes performance |
746 // regressions on Android, since Android has shipped for a long time | 751 // regressions on Android, since Android has shipped for a long time |
747 // with all animations accelerated. For this reason, we will live with | 752 // with all animations accelerated. For this reason, we will live with |
748 // this bug only on Android until the bug is fixed. | 753 // this bug only on Android until the bug is fixed. |
749 // http://crbug.com/129683 | 754 // http://crbug.com/129683 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 { | 850 { |
846 return 0; | 851 return 0; |
847 } | 852 } |
848 | 853 |
849 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*) | 854 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*) |
850 { | 855 { |
851 // Currently we don't use z-order to decide what to paint, so there's no nee
d to actually sort Layers. | 856 // Currently we don't use z-order to decide what to paint, so there's no nee
d to actually sort Layers. |
852 } | 857 } |
853 | 858 |
854 } // namespace cc | 859 } // namespace cc |
OLD | NEW |