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 CCLayerTreeHostCommon_h | 5 #ifndef CCLayerTreeHostCommon_h |
6 #define CCLayerTreeHostCommon_h | 6 #define CCLayerTreeHostCommon_h |
7 | 7 |
8 #include "IntRect.h" | 8 #include "IntRect.h" |
9 #include "IntSize.h" | 9 #include "IntSize.h" |
10 #include <public/WebTransformationMatrix.h> | 10 #include <public/WebTransformationMatrix.h> |
(...skipping 25 matching lines...) Expand all Loading... |
36 // from the given root layer (including mask and replica layers). | 36 // from the given root layer (including mask and replica layers). |
37 template<typename LayerType> static LayerType* findLayerInSubtree(LayerType*
rootLayer, int layerId); | 37 template<typename LayerType> static LayerType* findLayerInSubtree(LayerType*
rootLayer, int layerId); |
38 | 38 |
39 struct ScrollUpdateInfo { | 39 struct ScrollUpdateInfo { |
40 int layerId; | 40 int layerId; |
41 IntSize scrollDelta; | 41 IntSize scrollDelta; |
42 }; | 42 }; |
43 }; | 43 }; |
44 | 44 |
45 struct CCScrollAndScaleSet { | 45 struct CCScrollAndScaleSet { |
| 46 CCScrollAndScaleSet(); |
| 47 ~CCScrollAndScaleSet(); |
| 48 |
46 Vector<CCLayerTreeHostCommon::ScrollUpdateInfo> scrolls; | 49 Vector<CCLayerTreeHostCommon::ScrollUpdateInfo> scrolls; |
47 float pageScaleDelta; | 50 float pageScaleDelta; |
48 }; | 51 }; |
49 | 52 |
50 template<typename LayerType> | 53 template<typename LayerType> |
51 bool CCLayerTreeHostCommon::renderSurfaceContributesToTarget(LayerType* layer, i
nt targetSurfaceLayerID) | 54 bool CCLayerTreeHostCommon::renderSurfaceContributesToTarget(LayerType* layer, i
nt targetSurfaceLayerID) |
52 { | 55 { |
53 // A layer will either contribute its own content, or its render surface's c
ontent, to | 56 // A layer will either contribute its own content, or its render surface's c
ontent, to |
54 // the target surface. The layer contributes its surface's content when both
the | 57 // the target surface. The layer contributes its surface's content when both
the |
55 // following are true: | 58 // following are true: |
(...skipping 20 matching lines...) Expand all Loading... |
76 for (size_t i = 0; i < rootLayer->children().size(); ++i) { | 79 for (size_t i = 0; i < rootLayer->children().size(); ++i) { |
77 if (LayerType* found = findLayerInSubtree(rootLayer->children()[i].get()
, layerId)) | 80 if (LayerType* found = findLayerInSubtree(rootLayer->children()[i].get()
, layerId)) |
78 return found; | 81 return found; |
79 } | 82 } |
80 return 0; | 83 return 0; |
81 } | 84 } |
82 | 85 |
83 } // namespace cc | 86 } // namespace cc |
84 | 87 |
85 #endif | 88 #endif |
OLD | NEW |