Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Side by Side Diff: cc/layer.cc

Issue 11550035: Implement pinch-zoom scaling for main-frame scrollbars and pinch-zoom overlay scrollbars. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revision as per comments, animate scrollbars, fix slow-path PZ scrolling. Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 if (m_layerAnimationDelegate) 874 if (m_layerAnimationDelegate)
875 m_layerAnimationDelegate->notifyAnimationStarted(wallClockTime); 875 m_layerAnimationDelegate->notifyAnimationStarted(wallClockTime);
876 } 876 }
877 877
878 void Layer::notifyAnimationFinished(double wallClockTime) 878 void Layer::notifyAnimationFinished(double wallClockTime)
879 { 879 {
880 if (m_layerAnimationDelegate) 880 if (m_layerAnimationDelegate)
881 m_layerAnimationDelegate->notifyAnimationFinished(wallClockTime); 881 m_layerAnimationDelegate->notifyAnimationFinished(wallClockTime);
882 } 882 }
883 883
884 void Layer::notifyAnimationPropertyUpdate(const AnimationEvent& event)
885 {
886 if (event.targetProperty == Animation::Opacity)
887 setOpacity(event.value);
888 }
889
884 void Layer::addLayerAnimationEventObserver(LayerAnimationEventObserver* animatio nObserver) 890 void Layer::addLayerAnimationEventObserver(LayerAnimationEventObserver* animatio nObserver)
885 { 891 {
886 if (!m_layerAnimationObservers.HasObserver(animationObserver)) 892 if (!m_layerAnimationObservers.HasObserver(animationObserver))
887 m_layerAnimationObservers.AddObserver(animationObserver); 893 m_layerAnimationObservers.AddObserver(animationObserver);
888 } 894 }
889 895
890 void Layer::removeLayerAnimationEventObserver(LayerAnimationEventObserver* anima tionObserver) 896 void Layer::removeLayerAnimationEventObserver(LayerAnimationEventObserver* anima tionObserver)
891 { 897 {
892 m_layerAnimationObservers.RemoveObserver(animationObserver); 898 m_layerAnimationObservers.RemoveObserver(animationObserver);
893 } 899 }
894 900
895 Region Layer::visibleContentOpaqueRegion() const 901 Region Layer::visibleContentOpaqueRegion() const
896 { 902 {
897 if (contentsOpaque()) 903 if (contentsOpaque())
898 return visibleContentRect(); 904 return visibleContentRect();
899 return Region(); 905 return Region();
900 } 906 }
901 907
902 ScrollbarLayer* Layer::toScrollbarLayer() 908 ScrollbarLayer* Layer::toScrollbarLayer()
903 { 909 {
904 return 0; 910 return 0;
905 } 911 }
906 912
907 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped _refptr<Layer> >::iterator, void*) 913 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped _refptr<Layer> >::iterator, void*)
908 { 914 {
909 // Currently we don't use z-order to decide what to paint, so there's no nee d to actually sort Layers. 915 // Currently we don't use z-order to decide what to paint, so there's no nee d to actually sort Layers.
910 } 916 }
911 917
912 } // namespace cc 918 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer.h ('k') | cc/layer_animation_controller.h » ('j') | cc/layer_tree_host.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698