Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 DisplayItemTransformTree_h | 5 #ifndef DisplayItemTransformTree_h |
| 6 #define DisplayItemTransformTree_h | 6 #define DisplayItemTransformTree_h |
| 7 | 7 |
| 8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
| 9 #include "platform/geometry/FloatPoint3D.h" | 9 #include "platform/geometry/FloatPoint3D.h" |
| 10 #include "platform/transforms/TransformationMatrix.h" | 10 #include "platform/transforms/TransformationMatrix.h" |
| 11 #include "public/platform/WebDisplayItemTransformTree.h" | 11 #include "public/platform/WebDisplayItemTransformTree.h" |
| 12 #include "wtf/Vector.h" | 12 #include "wtf/Vector.h" |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 // Represents the hierarchy of transforms which apply to ranges of a display | 16 // Represents the hierarchy of transforms which apply to ranges of a display |
| 17 // item list and may be of interest to the compositor. | 17 // item list and may be of interest to the compositor. |
| 18 // | 18 // |
| 19 // This class is also the private implementation of WebDisplayItemTransformTree. | 19 // This class is also the private implementation of WebDisplayItemTransformTree. |
| 20 // For more detail, see WebDisplayItemTransformTree.h. | 20 // For more detail, see WebDisplayItemTransformTree.h. |
| 21 // | |
| 22 // TODO(pdr): Refactor this into TransformPaintPropertyNode. | |
|
chrishtr
2015/10/07 20:55:56
Maybe just nuke these old classes and start over?
| |
| 21 class PLATFORM_EXPORT DisplayItemTransformTree { | 23 class PLATFORM_EXPORT DisplayItemTransformTree { |
| 22 public: | 24 public: |
| 23 using TransformNode = WebDisplayItemTransformTree::TransformNode; | 25 using TransformNode = WebDisplayItemTransformTree::TransformNode; |
| 24 enum : size_t { kInvalidIndex = WebDisplayItemTransformTree::kInvalidIndex } ; | 26 enum : size_t { kInvalidIndex = WebDisplayItemTransformTree::kInvalidIndex } ; |
| 25 | 27 |
| 26 DisplayItemTransformTree(); | 28 DisplayItemTransformTree(); |
| 27 ~DisplayItemTransformTree(); | 29 ~DisplayItemTransformTree(); |
| 28 | 30 |
| 29 size_t nodeCount() const { return m_nodes.size(); } | 31 size_t nodeCount() const { return m_nodes.size(); } |
| 30 TransformNode& nodeAt(size_t index) { return m_nodes[index]; } | 32 TransformNode& nodeAt(size_t index) { return m_nodes[index]; } |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 41 return m_nodes.size() - 1; | 43 return m_nodes.size() - 1; |
| 42 } | 44 } |
| 43 | 45 |
| 44 private: | 46 private: |
| 45 Vector<TransformNode> m_nodes; | 47 Vector<TransformNode> m_nodes; |
| 46 }; | 48 }; |
| 47 | 49 |
| 48 } // namespace blink | 50 } // namespace blink |
| 49 | 51 |
| 50 #endif // DisplayItemTransformTree_h | 52 #endif // DisplayItemTransformTree_h |
| OLD | NEW |