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 CCLayerSorter_h | 5 #ifndef CCLayerSorter_h |
6 #define CCLayerSorter_h | 6 #define CCLayerSorter_h |
7 | 7 |
8 #include "FloatQuad.h" | |
9 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
10 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
11 #include "cc/layer_impl.h" | 10 #include "cc/layer_impl.h" |
12 #include "ui/gfx/point3_f.h" | 11 #include "ui/gfx/point3_f.h" |
| 12 #include "ui/gfx/quad_f.h" |
13 #include "ui/gfx/rect_f.h" | 13 #include "ui/gfx/rect_f.h" |
14 #include "ui/gfx/vector3d_f.h" | 14 #include "ui/gfx/vector3d_f.h" |
15 | 15 |
16 #if defined(COMPILER_GCC) | 16 #if defined(COMPILER_GCC) |
17 namespace cc | 17 namespace cc |
18 { | 18 { |
19 struct GraphEdge; | 19 struct GraphEdge; |
20 }; | 20 }; |
21 | 21 |
22 namespace BASE_HASH_NAMESPACE { | 22 namespace BASE_HASH_NAMESPACE { |
(...skipping 17 matching lines...) Expand all Loading... |
40 // Holds various useful properties derived from a layer's 3D outline. | 40 // Holds various useful properties derived from a layer's 3D outline. |
41 struct LayerShape { | 41 struct LayerShape { |
42 LayerShape(); | 42 LayerShape(); |
43 LayerShape(float width, float height, const WebKit::WebTransformationMatrix&
drawTransform); | 43 LayerShape(float width, float height, const WebKit::WebTransformationMatrix&
drawTransform); |
44 ~LayerShape(); | 44 ~LayerShape(); |
45 | 45 |
46 float layerZFromProjectedPoint(const gfx::PointF&) const; | 46 float layerZFromProjectedPoint(const gfx::PointF&) const; |
47 | 47 |
48 gfx::Vector3dF layerNormal; | 48 gfx::Vector3dF layerNormal; |
49 gfx::Point3F transformOrigin; | 49 gfx::Point3F transformOrigin; |
50 FloatQuad projectedQuad; | 50 gfx::QuadF projectedQuad; |
51 gfx::RectF projectedBounds; | 51 gfx::RectF projectedBounds; |
52 }; | 52 }; |
53 | 53 |
54 struct GraphNode { | 54 struct GraphNode { |
55 explicit GraphNode(LayerImpl* layerImpl); | 55 explicit GraphNode(LayerImpl* layerImpl); |
56 ~GraphNode(); | 56 ~GraphNode(); |
57 | 57 |
58 LayerImpl* layer; | 58 LayerImpl* layer; |
59 LayerShape shape; | 59 LayerShape shape; |
60 std::vector<GraphEdge*> incoming; | 60 std::vector<GraphEdge*> incoming; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 106 |
107 void createGraphNodes(LayerList::iterator first, LayerList::iterator last); | 107 void createGraphNodes(LayerList::iterator first, LayerList::iterator last); |
108 void createGraphEdges(); | 108 void createGraphEdges(); |
109 void removeEdgeFromList(GraphEdge*, std::vector<GraphEdge*>&); | 109 void removeEdgeFromList(GraphEdge*, std::vector<GraphEdge*>&); |
110 | 110 |
111 DISALLOW_COPY_AND_ASSIGN(LayerSorter); | 111 DISALLOW_COPY_AND_ASSIGN(LayerSorter); |
112 }; | 112 }; |
113 | 113 |
114 } | 114 } |
115 #endif | 115 #endif |
OLD | NEW |