| 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 "config.h" | 5 #include "config.h" | 
| 6 | 6 | 
| 7 #include "cc/layer.h" | 7 #include "cc/layer.h" | 
| 8 | 8 | 
| 9 #include "CCActiveAnimation.h" | 9 #include "CCActiveAnimation.h" | 
| 10 #include "CCAnimationEvents.h" | 10 #include "CCAnimationEvents.h" | 
| (...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 700 } | 700 } | 
| 701 | 701 | 
| 702 bool LayerChromium::addAnimation(scoped_ptr <CCActiveAnimation> animation) | 702 bool LayerChromium::addAnimation(scoped_ptr <CCActiveAnimation> animation) | 
| 703 { | 703 { | 
| 704     // WebCore currently assumes that accelerated animations will start soon | 704     // WebCore currently assumes that accelerated animations will start soon | 
| 705     // after the animation is added. However we cannot guarantee that if we do | 705     // after the animation is added. However we cannot guarantee that if we do | 
| 706     // not have a layerTreeHost that will setNeedsCommit(). | 706     // not have a layerTreeHost that will setNeedsCommit(). | 
| 707     if (!m_layerTreeHost) | 707     if (!m_layerTreeHost) | 
| 708         return false; | 708         return false; | 
| 709 | 709 | 
| 710     if (!CCSettings::acceleratedAnimationEnabled()) | 710     if (!Settings::acceleratedAnimationEnabled()) | 
| 711         return false; | 711         return false; | 
| 712 | 712 | 
| 713     m_layerAnimationController->addAnimation(animation.Pass()); | 713     m_layerAnimationController->addAnimation(animation.Pass()); | 
| 714     if (m_layerTreeHost) { | 714     if (m_layerTreeHost) { | 
| 715         m_layerTreeHost->didAddAnimation(); | 715         m_layerTreeHost->didAddAnimation(); | 
| 716         setNeedsCommit(); | 716         setNeedsCommit(); | 
| 717     } | 717     } | 
| 718     return true; | 718     return true; | 
| 719 } | 719 } | 
| 720 | 720 | 
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 788 { | 788 { | 
| 789     return 0; | 789     return 0; | 
| 790 } | 790 } | 
| 791 | 791 | 
| 792 void sortLayers(std::vector<scoped_refptr<LayerChromium> >::iterator, std::vecto
     r<scoped_refptr<LayerChromium> >::iterator, void*) | 792 void sortLayers(std::vector<scoped_refptr<LayerChromium> >::iterator, std::vecto
     r<scoped_refptr<LayerChromium> >::iterator, void*) | 
| 793 { | 793 { | 
| 794     // Currently we don't use z-order to decide what to paint, so there's no nee
     d to actually sort LayerChromiums. | 794     // Currently we don't use z-order to decide what to paint, so there's no nee
     d to actually sort LayerChromiums. | 
| 795 } | 795 } | 
| 796 | 796 | 
| 797 } | 797 } | 
| OLD | NEW | 
|---|