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

Side by Side Diff: cc/layer.cc

Issue 11186039: Move CC switches to cc/switches.h. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Switch ui/compositor back to using compositorSupport() Created 8 years, 2 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
« no previous file with comments | « cc/gl_renderer.cc ('k') | cc/layer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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
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
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 }
OLDNEW
« no previous file with comments | « cc/gl_renderer.cc ('k') | cc/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698