| 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_LAYER_SORTER_H_ | 5 #ifndef CC_LAYER_SORTER_H_ |
| 6 #define CC_LAYER_SORTER_H_ | 6 #define CC_LAYER_SORTER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
| 10 #include "cc/cc_export.h" | 10 #include "cc/cc_export.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 namespace BASE_HASH_NAMESPACE { | 23 namespace BASE_HASH_NAMESPACE { |
| 24 template<> | 24 template<> |
| 25 struct hash<cc::GraphEdge*> { | 25 struct hash<cc::GraphEdge*> { |
| 26 size_t operator()(cc::GraphEdge* ptr) const { | 26 size_t operator()(cc::GraphEdge* ptr) const { |
| 27 return hash<size_t>()(reinterpret_cast<size_t>(ptr)); | 27 return hash<size_t>()(reinterpret_cast<size_t>(ptr)); |
| 28 } | 28 } |
| 29 }; | 29 }; |
| 30 } // namespace BASE_HASH_NAMESPACE | 30 } // namespace BASE_HASH_NAMESPACE |
| 31 #endif // COMPILER | 31 #endif // COMPILER |
| 32 | 32 |
| 33 namespace WebKit { | 33 namespace gfx { |
| 34 class WebTransformationMatrix; | 34 class Transform; |
| 35 } | 35 } |
| 36 | 36 |
| 37 namespace cc { | 37 namespace cc { |
| 38 | 38 |
| 39 struct GraphEdge; | 39 struct GraphEdge; |
| 40 | 40 |
| 41 // Holds various useful properties derived from a layer's 3D outline. | 41 // Holds various useful properties derived from a layer's 3D outline. |
| 42 struct CC_EXPORT LayerShape { | 42 struct CC_EXPORT LayerShape { |
| 43 LayerShape(); | 43 LayerShape(); |
| 44 LayerShape(float width, float height, const WebKit::WebTransformationMatrix&
drawTransform); | 44 LayerShape(float width, float height, const gfx::Transform& drawTransform); |
| 45 ~LayerShape(); | 45 ~LayerShape(); |
| 46 | 46 |
| 47 float layerZFromProjectedPoint(const gfx::PointF&) const; | 47 float layerZFromProjectedPoint(const gfx::PointF&) const; |
| 48 | 48 |
| 49 gfx::Vector3dF layerNormal; | 49 gfx::Vector3dF layerNormal; |
| 50 gfx::Point3F transformOrigin; | 50 gfx::Point3F transformOrigin; |
| 51 gfx::QuadF projectedQuad; | 51 gfx::QuadF projectedQuad; |
| 52 gfx::RectF projectedBounds; | 52 gfx::RectF projectedBounds; |
| 53 }; | 53 }; |
| 54 | 54 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 107 |
| 108 void createGraphNodes(LayerList::iterator first, LayerList::iterator last); | 108 void createGraphNodes(LayerList::iterator first, LayerList::iterator last); |
| 109 void createGraphEdges(); | 109 void createGraphEdges(); |
| 110 void removeEdgeFromList(GraphEdge*, std::vector<GraphEdge*>&); | 110 void removeEdgeFromList(GraphEdge*, std::vector<GraphEdge*>&); |
| 111 | 111 |
| 112 DISALLOW_COPY_AND_ASSIGN(LayerSorter); | 112 DISALLOW_COPY_AND_ASSIGN(LayerSorter); |
| 113 }; | 113 }; |
| 114 | 114 |
| 115 } | 115 } |
| 116 #endif // CC_LAYER_SORTER_H_ | 116 #endif // CC_LAYER_SORTER_H_ |
| OLD | NEW |