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

Unified Diff: public/platform/WebDisplayItemTransformTree.h

Issue 1296963002: Put transform tree building in DisplayItemPropertyTreeBuilder. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove unused include. Created 5 years, 4 months 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 side-by-side diff with in-line comments
Download patch
Index: public/platform/WebDisplayItemTransformTree.h
diff --git a/public/platform/WebDisplayItemTransformTree.h b/public/platform/WebDisplayItemTransformTree.h
index 06ea6bcad4d4f0bf909aee47ae654b06e99c4805..761e436468b81ce3065b6e447e7388066bb72477 100644
--- a/public/platform/WebDisplayItemTransformTree.h
+++ b/public/platform/WebDisplayItemTransformTree.h
@@ -22,18 +22,7 @@ class DisplayItemTransformTree;
// parent, relative to whom its transform should be interpreted (i.e. the
// total transform at a node is the product of its transform and its parent's
// total transform).
-//
-// These nodes are associated with a display item list through the associated
-// "range records", which correspond to non-overlapping ranges of display items
-// in the list, in sorted order. Since the begin/end display items that create
-// transform nodes are not included in these ranges, and empty ranges are
-// omitted, these ranges are not a partition. Rather, they constitute a partial
-// map from display item indices to transform node indices.
-//
-// Similarly, there may be transform nodes with no associated range records.
-// This doesn't necessarily mean that it can be ignored -- it may be the parent
-// of one or more other transform nodes.
-class WebDisplayItemTransformTree {
+class BLINK_PLATFORM_EXPORT WebDisplayItemTransformTree {
public:
enum : size_t { kInvalidIndex = static_cast<size_t>(-1) };
@@ -53,62 +42,18 @@ public:
SkMatrix44 matrix;
};
- struct RangeRecord {
- RangeRecord(size_t beginIndex, size_t endIndex, size_t nodeIndex, const WebFloatSize& drawingOffset = WebFloatSize())
- : displayListBeginIndex(beginIndex)
- , displayListEndIndex(endIndex)
- , transformNodeIndex(nodeIndex)
- , offset(drawingOffset)
- {
- }
-
- bool operator==(const RangeRecord& other) const
- {
- return displayListBeginIndex == other.displayListBeginIndex
- && displayListEndIndex == other.displayListEndIndex
- && transformNodeIndex == other.transformNodeIndex
- && offset == other.offset;
- }
- bool operator!=(const RangeRecord& other) const { return !(*this == other); }
-
- // Index of first affected display item.
- size_t displayListBeginIndex;
-
- // Index of first unaffected display item after |displayListBeginIndex|.
- size_t displayListEndIndex;
-
- // Index of a the applicable transform node (in |m_nodes|).
- size_t transformNodeIndex;
-
- // The offset of this range's drawing in the coordinate space of the
- // transform node.
- WebFloatSize offset;
- };
-
- BLINK_PLATFORM_EXPORT WebDisplayItemTransformTree();
+ WebDisplayItemTransformTree();
#if INSIDE_BLINK
- BLINK_PLATFORM_EXPORT WebDisplayItemTransformTree(
- const WTF::PassOwnPtr<DisplayItemTransformTree>&);
+ WebDisplayItemTransformTree(const WTF::PassOwnPtr<DisplayItemTransformTree>&);
#endif
- BLINK_PLATFORM_EXPORT ~WebDisplayItemTransformTree();
+ ~WebDisplayItemTransformTree();
// Returns the number of nodes in the transform tree.
- BLINK_PLATFORM_EXPORT size_t nodeCount() const;
+ size_t nodeCount() const;
// Returns a node in the transform tree by its index (from 0 to nodeCount() - 1).
- BLINK_PLATFORM_EXPORT const TransformNode& nodeAt(size_t index) const;
-
- // Returns the parent of the given node.
- // Do not call this with the root node.
- BLINK_PLATFORM_EXPORT const TransformNode& parentNode(const TransformNode&) const;
-
- // Returns the number of display item ranges.
- BLINK_PLATFORM_EXPORT size_t rangeRecordCount() const;
-
- // Returns the requested display item range, sorted by position in the
- // display item list.
- BLINK_PLATFORM_EXPORT const RangeRecord& rangeRecordAt(size_t index) const;
+ const TransformNode& nodeAt(size_t index) const;
private:
WebPrivateOwnPtr<const DisplayItemTransformTree> m_private;
pdr. 2015/08/17 22:25:08 Why "m_private" instead of "m_transformTree"?
jbroman 2015/08/17 23:57:19 The majority of cases of this pattern use that nam
pdr. 2015/08/18 04:31:42 Sadness. But, when in Rome..
« public/platform/WebDisplayItemClipTree.h ('K') | « public/platform/WebDisplayItemClipTree.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698