OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 #ifndef CC_TREES_LAYER_SORTER_H_ | 5 #ifndef CC_TREES_LAYER_SORTER_H_ |
6 #define CC_TREES_LAYER_SORTER_H_ | 6 #define CC_TREES_LAYER_SORTER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/containers/hash_tables.h" | 11 #include "base/containers/hash_tables.h" |
12 #include "cc/base/cc_export.h" | 12 #include "cc/base/cc_export.h" |
13 #include "cc/layers/layer_impl.h" | 13 #include "cc/layers/layer_impl.h" |
14 #include "ui/gfx/point3_f.h" | 14 #include "ui/gfx/point3_f.h" |
15 #include "ui/gfx/quad_f.h" | 15 #include "ui/gfx/quad_f.h" |
16 #include "ui/gfx/rect_f.h" | 16 #include "ui/gfx/rect_f.h" |
17 #include "ui/gfx/vector3d_f.h" | 17 #include "ui/gfx/vector3d_f.h" |
18 | 18 |
19 #if defined(COMPILER_GCC) | |
20 namespace cc { struct GraphEdge; } | |
21 | |
22 namespace BASE_HASH_NAMESPACE { | |
23 template <> | |
24 struct hash<cc::GraphEdge*> { | |
25 size_t operator()(cc::GraphEdge* ptr) const { | |
26 return hash<size_t>()(reinterpret_cast<size_t>(ptr)); | |
27 } | |
28 }; | |
29 } // namespace BASE_HASH_NAMESPACE | |
30 #endif // COMPILER | |
31 | |
32 namespace gfx { | 19 namespace gfx { |
33 class Transform; | 20 class Transform; |
34 } | 21 } |
35 | 22 |
36 namespace cc { | 23 namespace cc { |
37 struct GraphEdge; | 24 struct GraphEdge; |
38 | 25 |
39 // Holds various useful properties derived from a layer's 3D outline. | 26 // Holds various useful properties derived from a layer's 3D outline. |
40 struct CC_EXPORT LayerShape { | 27 struct CC_EXPORT LayerShape { |
41 LayerShape(); | 28 LayerShape(); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 void CreateGraphNodes(LayerImplList::iterator first, | 92 void CreateGraphNodes(LayerImplList::iterator first, |
106 LayerImplList::iterator last); | 93 LayerImplList::iterator last); |
107 void CreateGraphEdges(); | 94 void CreateGraphEdges(); |
108 void RemoveEdgeFromList(GraphEdge* graph, std::vector<GraphEdge*>* list); | 95 void RemoveEdgeFromList(GraphEdge* graph, std::vector<GraphEdge*>* list); |
109 | 96 |
110 DISALLOW_COPY_AND_ASSIGN(LayerSorter); | 97 DISALLOW_COPY_AND_ASSIGN(LayerSorter); |
111 }; | 98 }; |
112 | 99 |
113 } // namespace cc | 100 } // namespace cc |
114 #endif // CC_TREES_LAYER_SORTER_H_ | 101 #endif // CC_TREES_LAYER_SORTER_H_ |
OLD | NEW |