| 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_TREE_HOST_COMMON_H_ | 5 #ifndef CC_LAYER_TREE_HOST_COMMON_H_ |
| 6 #define CC_LAYER_TREE_HOST_COMMON_H_ | 6 #define CC_LAYER_TREE_HOST_COMMON_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "cc/cc_export.h" | 9 #include "cc/cc_export.h" |
| 10 #include "cc/scoped_ptr_vector.h" | 10 #include "cc/scoped_ptr_vector.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 gfx::Vector2d scrollDelta; | 52 gfx::Vector2d scrollDelta; |
| 53 }; | 53 }; |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 struct CC_EXPORT ScrollAndScaleSet { | 56 struct CC_EXPORT ScrollAndScaleSet { |
| 57 ScrollAndScaleSet(); | 57 ScrollAndScaleSet(); |
| 58 ~ScrollAndScaleSet(); | 58 ~ScrollAndScaleSet(); |
| 59 | 59 |
| 60 std::vector<LayerTreeHostCommon::ScrollUpdateInfo> scrolls; | 60 std::vector<LayerTreeHostCommon::ScrollUpdateInfo> scrolls; |
| 61 float pageScaleDelta; | 61 float pageScaleDelta; |
| 62 gfx::Vector2d desktopCompatibilityViewportOffsetFromScrollPositionDelta; |
| 62 }; | 63 }; |
| 63 | 64 |
| 64 template<typename LayerType> | 65 template<typename LayerType> |
| 65 bool LayerTreeHostCommon::renderSurfaceContributesToTarget(LayerType* layer, int
targetSurfaceLayerID) | 66 bool LayerTreeHostCommon::renderSurfaceContributesToTarget(LayerType* layer, int
targetSurfaceLayerID) |
| 66 { | 67 { |
| 67 // A layer will either contribute its own content, or its render surface's c
ontent, to | 68 // A layer will either contribute its own content, or its render surface's c
ontent, to |
| 68 // the target surface. The layer contributes its surface's content when both
the | 69 // the target surface. The layer contributes its surface's content when both
the |
| 69 // following are true: | 70 // following are true: |
| 70 // (1) The layer actually has a renderSurface, and | 71 // (1) The layer actually has a renderSurface, and |
| 71 // (2) The layer's renderSurface is not the same as the targetSurface. | 72 // (2) The layer's renderSurface is not the same as the targetSurface. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 90 for (size_t i = 0; i < rootLayer->children().size(); ++i) { | 91 for (size_t i = 0; i < rootLayer->children().size(); ++i) { |
| 91 if (LayerType* found = findLayerInSubtree(getChildAsRawPtr(rootLayer->ch
ildren(), i), layerId)) | 92 if (LayerType* found = findLayerInSubtree(getChildAsRawPtr(rootLayer->ch
ildren(), i), layerId)) |
| 92 return found; | 93 return found; |
| 93 } | 94 } |
| 94 return 0; | 95 return 0; |
| 95 } | 96 } |
| 96 | 97 |
| 97 } // namespace cc | 98 } // namespace cc |
| 98 | 99 |
| 99 #endif // CC_LAYER_TREE_HOST_COMMON_H_ | 100 #endif // CC_LAYER_TREE_HOST_COMMON_H_ |
| OLD | NEW |