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/animation.h" | 7 #include "cc/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 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
867 if (m_layerAnimationDelegate) | 867 if (m_layerAnimationDelegate) |
868 m_layerAnimationDelegate->notifyAnimationStarted(wallClockTime); | 868 m_layerAnimationDelegate->notifyAnimationStarted(wallClockTime); |
869 } | 869 } |
870 | 870 |
871 void Layer::notifyAnimationFinished(double wallClockTime) | 871 void Layer::notifyAnimationFinished(double wallClockTime) |
872 { | 872 { |
873 if (m_layerAnimationDelegate) | 873 if (m_layerAnimationDelegate) |
874 m_layerAnimationDelegate->notifyAnimationFinished(wallClockTime); | 874 m_layerAnimationDelegate->notifyAnimationFinished(wallClockTime); |
875 } | 875 } |
876 | 876 |
877 void Layer::notifyAnimationPropertyUpdate(const AnimationEvent& event) | |
878 { | |
879 if (event.targetProperty == Animation::Opacity) | |
880 setOpacity(event.value); | |
Ian Vollick
2013/03/06 01:00:57
Please add an 'else if' for transform.
| |
881 } | |
882 | |
877 void Layer::addLayerAnimationEventObserver(LayerAnimationEventObserver* animatio nObserver) | 883 void Layer::addLayerAnimationEventObserver(LayerAnimationEventObserver* animatio nObserver) |
878 { | 884 { |
879 if (!m_layerAnimationObservers.HasObserver(animationObserver)) | 885 if (!m_layerAnimationObservers.HasObserver(animationObserver)) |
880 m_layerAnimationObservers.AddObserver(animationObserver); | 886 m_layerAnimationObservers.AddObserver(animationObserver); |
881 } | 887 } |
882 | 888 |
883 void Layer::removeLayerAnimationEventObserver(LayerAnimationEventObserver* anima tionObserver) | 889 void Layer::removeLayerAnimationEventObserver(LayerAnimationEventObserver* anima tionObserver) |
884 { | 890 { |
885 m_layerAnimationObservers.RemoveObserver(animationObserver); | 891 m_layerAnimationObservers.RemoveObserver(animationObserver); |
886 } | 892 } |
887 | 893 |
888 Region Layer::visibleContentOpaqueRegion() const | 894 Region Layer::visibleContentOpaqueRegion() const |
889 { | 895 { |
890 if (contentsOpaque()) | 896 if (contentsOpaque()) |
891 return visibleContentRect(); | 897 return visibleContentRect(); |
892 return Region(); | 898 return Region(); |
893 } | 899 } |
894 | 900 |
895 ScrollbarLayer* Layer::toScrollbarLayer() | 901 ScrollbarLayer* Layer::toScrollbarLayer() |
896 { | 902 { |
897 return 0; | 903 return 0; |
898 } | 904 } |
899 | 905 |
900 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped _refptr<Layer> >::iterator, void*) | 906 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped _refptr<Layer> >::iterator, void*) |
901 { | 907 { |
902 // Currently we don't use z-order to decide what to paint, so there's no nee d to actually sort Layers. | 908 // Currently we don't use z-order to decide what to paint, so there's no nee d to actually sort Layers. |
903 } | 909 } |
904 | 910 |
905 } // namespace cc | 911 } // namespace cc |
OLD | NEW |