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

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

Issue 2667373002: Ensure PaintArtifactCompositor assigns a scroll tree index to all cc layers (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
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/graphics/CompositingReasons.h" 10 #include "platform/graphics/CompositingReasons.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // is the root transform. 121 // is the root transform.
122 const TransformPaintPropertyNode* parent() const { return m_parent.get(); } 122 const TransformPaintPropertyNode* parent() const { return m_parent.get(); }
123 bool isRoot() const { return !m_parent; } 123 bool isRoot() const { return !m_parent; }
124 124
125 // True if this transform is for the scroll offset translation. 125 // True if this transform is for the scroll offset translation.
126 bool isScrollTranslation() const { return !!m_scroll; } 126 bool isScrollTranslation() const { return !!m_scroll; }
127 // The associated scroll node if this transform is the scroll offset for 127 // The associated scroll node if this transform is the scroll offset for
128 // scrolling, or nullptr otherwise. 128 // scrolling, or nullptr otherwise.
129 const ScrollPaintPropertyNode* scrollNode() const { return m_scroll.get(); } 129 const ScrollPaintPropertyNode* scrollNode() const { return m_scroll.get(); }
130 130
131 // Returns the scroll node this transform scrolls with respect to. If this
132 // is a scroll translation, scrollNode() can be returned. Otherwise, a full
133 // ancestor traversal can be required.
134 const ScrollPaintPropertyNode* findEnclosingScrollNode() const;
135
131 // If true, content with this transform node (or its descendant) appears in 136 // If true, content with this transform node (or its descendant) appears in
132 // the plane of its parent. This is implemented by flattening the total 137 // the plane of its parent. This is implemented by flattening the total
133 // accumulated transform from its ancestors. 138 // accumulated transform from its ancestors.
134 bool flattensInheritedTransform() const { 139 bool flattensInheritedTransform() const {
135 return m_flattensInheritedTransform; 140 return m_flattensInheritedTransform;
136 } 141 }
137 142
138 bool hasDirectCompositingReasons() const { 143 bool hasDirectCompositingReasons() const {
139 return m_directCompositingReasons != CompositingReasonNone; 144 return m_directCompositingReasons != CompositingReasonNone;
140 } 145 }
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 RefPtr<ScrollPaintPropertyNode> m_scroll; 215 RefPtr<ScrollPaintPropertyNode> m_scroll;
211 }; 216 };
212 217
213 // Redeclared here to avoid ODR issues. 218 // Redeclared here to avoid ODR issues.
214 // See platform/testing/PaintPrinters.h. 219 // See platform/testing/PaintPrinters.h.
215 void PrintTo(const TransformPaintPropertyNode&, std::ostream*); 220 void PrintTo(const TransformPaintPropertyNode&, std::ostream*);
216 221
217 } // namespace blink 222 } // namespace blink
218 223
219 #endif // TransformPaintPropertyNode_h 224 #endif // TransformPaintPropertyNode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698