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" |
11 #include "cc/layer_tree_host.h" | 11 #include "cc/layer_tree_host.h" |
12 #include "cc/layer_tree_impl.h" | 12 #include "cc/layer_tree_impl.h" |
13 #include "third_party/WebKit/Source/Platform/chromium/public/WebAnimationDelegat
e.h" | 13 #include "third_party/WebKit/Source/Platform/chromium/public/WebAnimationDelegat
e.h" |
14 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerScrollClien
t.h" | 14 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerScrollClien
t.h" |
15 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" | 15 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" |
16 #include "third_party/skia/include/core/SkImageFilter.h" | 16 #include "third_party/skia/include/core/SkImageFilter.h" |
17 #include "ui/gfx/rect_conversions.h" | 17 #include "ui/gfx/rect_conversions.h" |
18 | 18 |
19 namespace cc { | 19 namespace cc { |
20 | 20 |
| 21 const int Layer::s_invalidLayerId = -1; |
21 static int s_nextLayerId = 1; | 22 static int s_nextLayerId = 1; |
22 | 23 |
23 scoped_refptr<Layer> Layer::create() | 24 scoped_refptr<Layer> Layer::create() |
24 { | 25 { |
25 return make_scoped_refptr(new Layer()); | 26 return make_scoped_refptr(new Layer()); |
26 } | 27 } |
27 | 28 |
28 Layer::Layer() | 29 Layer::Layer() |
29 : m_needsDisplay(false) | 30 : m_needsDisplay(false) |
30 , m_stackingOrderChanged(false) | 31 , m_stackingOrderChanged(false) |
(...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
904 { | 905 { |
905 return 0; | 906 return 0; |
906 } | 907 } |
907 | 908 |
908 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*) | 909 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*) |
909 { | 910 { |
910 // Currently we don't use z-order to decide what to paint, so there's no nee
d to actually sort Layers. | 911 // Currently we don't use z-order to decide what to paint, so there's no nee
d to actually sort Layers. |
911 } | 912 } |
912 | 913 |
913 } // namespace cc | 914 } // namespace cc |
OLD | NEW |