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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h
diff --git a/third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h b/third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h
index 71012d454da967243c404401f4cafcef468c5e54..5f34e60c8090ec389972293dcf2cfd4305801a21 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h
+++ b/third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h
@@ -54,6 +54,23 @@ class PLATFORM_EXPORT ClipPaintPropertyNode
const ClipPaintPropertyNode* parent() const { return m_parent.get(); }
bool isRoot() const { return !m_parent; }
+#if DCHECK_IS_ON()
+ // The clone function is used by FindPropertiesNeedingUpdate.h for recording
+ // a clip node before it has been updated, to later detect changes.
+ PassRefPtr<ClipPaintPropertyNode> clone() const {
+ return adoptRef(
+ new ClipPaintPropertyNode(m_parent, m_localTransformSpace, m_clipRect));
+ }
+
+ // The equality operator is used by FindPropertiesNeedingUpdate.h for checking
+ // if a clip node has changed.
+ bool operator==(const ClipPaintPropertyNode& o) const {
+ return m_parent == o.m_parent &&
+ m_localTransformSpace == o.m_localTransformSpace &&
+ m_clipRect == o.m_clipRect;
+ }
+#endif
+
private:
ClipPaintPropertyNode(
PassRefPtr<const ClipPaintPropertyNode> parent,

Powered by Google App Engine
This is Rietveld 408576698