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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/TransformPaintPropertyNode.h

Issue 2495893002: Implement incremental paint property tree rebuilding (Closed)
Patch Set: Suppress main thread scrolling invalidation failures Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/paint/ScrollPaintPropertyNode.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 TransformPaintPropertyNode_h 5 #ifndef TransformPaintPropertyNode_h
6 #define TransformPaintPropertyNode_h 6 #define TransformPaintPropertyNode_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"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // accumulated transform from its ancestors. 64 // accumulated transform from its ancestors.
65 bool flattensInheritedTransform() const { 65 bool flattensInheritedTransform() const {
66 return m_flattensInheritedTransform; 66 return m_flattensInheritedTransform;
67 } 67 }
68 68
69 // Content whose transform nodes have a common rendering context ID are 3D 69 // Content whose transform nodes have a common rendering context ID are 3D
70 // sorted. If this is 0, content will not be 3D sorted. 70 // sorted. If this is 0, content will not be 3D sorted.
71 unsigned renderingContextID() const { return m_renderingContextID; } 71 unsigned renderingContextID() const { return m_renderingContextID; }
72 bool hasRenderingContext() const { return m_renderingContextID; } 72 bool hasRenderingContext() const { return m_renderingContextID; }
73 73
74 #if DCHECK_IS_ON()
75 // The clone function is used by FindPropertiesNeedingUpdate.h for recording
76 // a transform node before it has been updated, to later detect changes.
77 PassRefPtr<TransformPaintPropertyNode> clone() const {
78 return adoptRef(new TransformPaintPropertyNode(m_matrix, m_origin, m_parent,
79 m_flattensInheritedTransform,
80 m_renderingContextID));
81 }
82
83 // The equality operator is used by FindPropertiesNeedingUpdate.h for checking
84 // if a transform node has changed.
85 bool operator==(const TransformPaintPropertyNode& o) const {
86 return m_matrix == o.m_matrix && m_origin == o.m_origin &&
87 m_parent == o.m_parent &&
88 m_flattensInheritedTransform == o.m_flattensInheritedTransform &&
89 m_renderingContextID == o.m_renderingContextID;
90 }
91 #endif
92
74 private: 93 private:
75 TransformPaintPropertyNode( 94 TransformPaintPropertyNode(
76 const TransformationMatrix& matrix, 95 const TransformationMatrix& matrix,
77 const FloatPoint3D& origin, 96 const FloatPoint3D& origin,
78 PassRefPtr<const TransformPaintPropertyNode> parent, 97 PassRefPtr<const TransformPaintPropertyNode> parent,
79 bool flattensInheritedTransform, 98 bool flattensInheritedTransform,
80 unsigned renderingContextID) 99 unsigned renderingContextID)
81 : m_matrix(matrix), 100 : m_matrix(matrix),
82 m_origin(origin), 101 m_origin(origin),
83 m_parent(parent), 102 m_parent(parent),
84 m_flattensInheritedTransform(flattensInheritedTransform), 103 m_flattensInheritedTransform(flattensInheritedTransform),
85 m_renderingContextID(renderingContextID) {} 104 m_renderingContextID(renderingContextID) {}
86 105
87 TransformationMatrix m_matrix; 106 TransformationMatrix m_matrix;
88 FloatPoint3D m_origin; 107 FloatPoint3D m_origin;
89 RefPtr<const TransformPaintPropertyNode> m_parent; 108 RefPtr<const TransformPaintPropertyNode> m_parent;
90 bool m_flattensInheritedTransform; 109 bool m_flattensInheritedTransform;
91 unsigned m_renderingContextID; 110 unsigned m_renderingContextID;
92 }; 111 };
93 112
94 // Redeclared here to avoid ODR issues. 113 // Redeclared here to avoid ODR issues.
95 // See platform/testing/PaintPrinters.h. 114 // See platform/testing/PaintPrinters.h.
96 void PrintTo(const TransformPaintPropertyNode&, std::ostream*); 115 void PrintTo(const TransformPaintPropertyNode&, std::ostream*);
97 116
98 } // namespace blink 117 } // namespace blink
99 118
100 #endif // TransformPaintPropertyNode_h 119 #endif // TransformPaintPropertyNode_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/paint/ScrollPaintPropertyNode.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698