| 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" |
| 11 #include "ui/gfx/rect.h" | 11 #include "ui/gfx/rect.h" |
| 12 #include "IntSize.h" | 12 #include "ui/gfx/vector2d.h" |
| 13 #include <public/WebTransformationMatrix.h> | 13 #include <public/WebTransformationMatrix.h> |
| 14 | 14 |
| 15 namespace cc { | 15 namespace cc { |
| 16 | 16 |
| 17 class LayerImpl; | 17 class LayerImpl; |
| 18 class LayerSorter; | 18 class LayerSorter; |
| 19 class Layer; | 19 class Layer; |
| 20 | 20 |
| 21 class CC_EXPORT LayerTreeHostCommon { | 21 class CC_EXPORT LayerTreeHostCommon { |
| 22 public: | 22 public: |
| (...skipping 16 matching lines...) Expand all Loading... |
| 39 return children[index].get(); | 39 return children[index].get(); |
| 40 } | 40 } |
| 41 | 41 |
| 42 static LayerImpl* getChildAsRawPtr(const ScopedPtrVector<LayerImpl>& childre
n, size_t index) | 42 static LayerImpl* getChildAsRawPtr(const ScopedPtrVector<LayerImpl>& childre
n, size_t index) |
| 43 { | 43 { |
| 44 return children[index]; | 44 return children[index]; |
| 45 } | 45 } |
| 46 | 46 |
| 47 struct ScrollUpdateInfo { | 47 struct ScrollUpdateInfo { |
| 48 int layerId; | 48 int layerId; |
| 49 IntSize scrollDelta; | 49 gfx::Vector2d scrollDelta; |
| 50 }; | 50 }; |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 struct CC_EXPORT ScrollAndScaleSet { | 53 struct CC_EXPORT ScrollAndScaleSet { |
| 54 ScrollAndScaleSet(); | 54 ScrollAndScaleSet(); |
| 55 ~ScrollAndScaleSet(); | 55 ~ScrollAndScaleSet(); |
| 56 | 56 |
| 57 std::vector<LayerTreeHostCommon::ScrollUpdateInfo> scrolls; | 57 std::vector<LayerTreeHostCommon::ScrollUpdateInfo> scrolls; |
| 58 float pageScaleDelta; | 58 float pageScaleDelta; |
| 59 }; | 59 }; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 87 for (size_t i = 0; i < rootLayer->children().size(); ++i) { | 87 for (size_t i = 0; i < rootLayer->children().size(); ++i) { |
| 88 if (LayerType* found = findLayerInSubtree(getChildAsRawPtr(rootLayer->ch
ildren(), i), layerId)) | 88 if (LayerType* found = findLayerInSubtree(getChildAsRawPtr(rootLayer->ch
ildren(), i), layerId)) |
| 89 return found; | 89 return found; |
| 90 } | 90 } |
| 91 return 0; | 91 return 0; |
| 92 } | 92 } |
| 93 | 93 |
| 94 } // namespace cc | 94 } // namespace cc |
| 95 | 95 |
| 96 #endif // CC_LAYER_TREE_HOST_COMMON_H_ | 96 #endif // CC_LAYER_TREE_HOST_COMMON_H_ |
| OLD | NEW |