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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h

Issue 2404213004: Implement incremental paint property tree rebuilding (Closed)
Patch Set: Cleanup needsUpdate finder construction, tighten reasons for updating a property subtree, misc clea… Created 4 years, 2 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: 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 28d06ecbcfac07ac921e9b301e252e940c560f06..2722cf429a19bd619db9e2cc6aa8a86ebe5964bc 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h
+++ b/third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h
@@ -52,6 +52,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