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

Side by Side Diff: cc/layer_sorter.h

Issue 11365025: Make cc a component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/layer_quad.h ('k') | cc/layer_tiling_data.h » ('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 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" 8 #include "FloatQuad.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/hash_tables.h" 10 #include "base/hash_tables.h"
11 #include "cc/cc_export.h"
11 #include "cc/layer_impl.h" 12 #include "cc/layer_impl.h"
12 #include "ui/gfx/point3_f.h" 13 #include "ui/gfx/point3_f.h"
13 #include "ui/gfx/rect_f.h" 14 #include "ui/gfx/rect_f.h"
14 #include "ui/gfx/vector3d_f.h" 15 #include "ui/gfx/vector3d_f.h"
15 16
16 #if defined(COMPILER_GCC) 17 #if defined(COMPILER_GCC)
17 namespace cc 18 namespace cc
18 { 19 {
19 struct GraphEdge; 20 struct GraphEdge;
20 }; 21 };
(...skipping 10 matching lines...) Expand all
31 32
32 namespace WebKit { 33 namespace WebKit {
33 class WebTransformationMatrix; 34 class WebTransformationMatrix;
34 } 35 }
35 36
36 namespace cc { 37 namespace cc {
37 38
38 struct GraphEdge; 39 struct GraphEdge;
39 40
40 // Holds various useful properties derived from a layer's 3D outline. 41 // Holds various useful properties derived from a layer's 3D outline.
41 struct LayerShape { 42 struct CC_EXPORT LayerShape {
42 LayerShape(); 43 LayerShape();
43 LayerShape(float width, float height, const WebKit::WebTransformationMatrix& drawTransform); 44 LayerShape(float width, float height, const WebKit::WebTransformationMatrix& drawTransform);
44 ~LayerShape(); 45 ~LayerShape();
45 46
46 float layerZFromProjectedPoint(const gfx::PointF&) const; 47 float layerZFromProjectedPoint(const gfx::PointF&) const;
47 48
48 gfx::Vector3dF layerNormal; 49 gfx::Vector3dF layerNormal;
49 gfx::Point3F transformOrigin; 50 gfx::Point3F transformOrigin;
50 FloatQuad projectedQuad; 51 FloatQuad projectedQuad;
51 gfx::RectF projectedBounds; 52 gfx::RectF projectedBounds;
(...skipping 18 matching lines...) Expand all
70 { 71 {
71 } 72 }
72 73
73 GraphNode* from; 74 GraphNode* from;
74 GraphNode* to; 75 GraphNode* to;
75 float weight; 76 float weight;
76 }; 77 };
77 78
78 79
79 80
80 class LayerSorter { 81 class CC_EXPORT LayerSorter {
81 public: 82 public:
82 LayerSorter(); 83 LayerSorter();
83 ~LayerSorter(); 84 ~LayerSorter();
84 85
85 typedef std::vector<LayerImpl*> LayerList; 86 typedef std::vector<LayerImpl*> LayerList;
86 87
87 void sort(LayerList::iterator first, LayerList::iterator last); 88 void sort(LayerList::iterator first, LayerList::iterator last);
88 89
89 enum ABCompareResult { 90 enum ABCompareResult {
90 ABeforeB, 91 ABeforeB,
(...skipping 15 matching lines...) Expand all
106 107
107 void createGraphNodes(LayerList::iterator first, LayerList::iterator last); 108 void createGraphNodes(LayerList::iterator first, LayerList::iterator last);
108 void createGraphEdges(); 109 void createGraphEdges();
109 void removeEdgeFromList(GraphEdge*, std::vector<GraphEdge*>&); 110 void removeEdgeFromList(GraphEdge*, std::vector<GraphEdge*>&);
110 111
111 DISALLOW_COPY_AND_ASSIGN(LayerSorter); 112 DISALLOW_COPY_AND_ASSIGN(LayerSorter);
112 }; 113 };
113 114
114 } 115 }
115 #endif 116 #endif
OLDNEW
« no previous file with comments | « cc/layer_quad.h ('k') | cc/layer_tiling_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698