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

Side by Side Diff: cc/layer.cc

Issue 11361223: cc: Remove cc::settings, move them to LayerTreeSettings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix-unittests Created 8 years, 1 month 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
« no previous file with comments | « cc/gl_renderer_unittest.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 "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"
11 #include "cc/layer_tree_host.h" 11 #include "cc/layer_tree_host.h"
12 #include "cc/settings.h"
13 #include "third_party/skia/include/core/SkImageFilter.h" 12 #include "third_party/skia/include/core/SkImageFilter.h"
14 #include "ui/gfx/rect_conversions.h" 13 #include "ui/gfx/rect_conversions.h"
15 #include <public/WebAnimationDelegate.h> 14 #include <public/WebAnimationDelegate.h>
16 #include <public/WebLayerScrollClient.h> 15 #include <public/WebLayerScrollClient.h>
17 #include <public/WebSize.h> 16 #include <public/WebSize.h>
18 17
19 using namespace std; 18 using namespace std;
20 using WebKit::WebTransformationMatrix; 19 using WebKit::WebTransformationMatrix;
21 20
22 namespace cc { 21 namespace cc {
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 } 760 }
762 761
763 bool Layer::addAnimation(scoped_ptr <ActiveAnimation> animation) 762 bool Layer::addAnimation(scoped_ptr <ActiveAnimation> animation)
764 { 763 {
765 // WebCore currently assumes that accelerated animations will start soon 764 // WebCore currently assumes that accelerated animations will start soon
766 // after the animation is added. However we cannot guarantee that if we do 765 // after the animation is added. However we cannot guarantee that if we do
767 // not have a layerTreeHost that will setNeedsCommit(). 766 // not have a layerTreeHost that will setNeedsCommit().
768 if (!m_layerTreeHost) 767 if (!m_layerTreeHost)
769 return false; 768 return false;
770 769
771 if (!Settings::acceleratedAnimationEnabled()) 770 if (!m_layerTreeHost->settings().acceleratedAnimationEnabled)
772 return false; 771 return false;
773 772
774 m_layerAnimationController->addAnimation(animation.Pass()); 773 m_layerAnimationController->addAnimation(animation.Pass());
775 if (m_layerTreeHost) { 774 if (m_layerTreeHost) {
776 m_layerTreeHost->didAddAnimation(); 775 m_layerTreeHost->didAddAnimation();
777 setNeedsCommit(); 776 setNeedsCommit();
778 } 777 }
779 return true; 778 return true;
780 } 779 }
781 780
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 { 848 {
850 return 0; 849 return 0;
851 } 850 }
852 851
853 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped _refptr<Layer> >::iterator, void*) 852 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped _refptr<Layer> >::iterator, void*)
854 { 853 {
855 // Currently we don't use z-order to decide what to paint, so there's no nee d to actually sort Layers. 854 // Currently we don't use z-order to decide what to paint, so there's no nee d to actually sort Layers.
856 } 855 }
857 856
858 } // namespace cc 857 } // namespace cc
OLDNEW
« no previous file with comments | « cc/gl_renderer_unittest.cc ('k') | cc/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698