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

Unified Diff: third_party/WebKit/Source/core/paint/ObjectPaintProperties.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/core/paint/ObjectPaintProperties.h
diff --git a/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h b/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h
index 3e266a8db5de995a94b923f5135cd532811937f3..cd4e15aebdc9120826e7be08d13577e73a36377e 100644
--- a/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h
+++ b/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h
@@ -207,6 +207,48 @@ class CORE_EXPORT ObjectPaintProperties {
updateProperty(m_overflowClip, std::forward<Args>(args)...);
}
+#if DCHECK_IS_ON()
+ // Used by FindPropertiesNeedingUpdate.h for recording the current properties.
+ std::unique_ptr<ObjectPaintProperties> clone() const {
+ std::unique_ptr<ObjectPaintProperties> cloned = create();
+ if (m_paintOffsetTranslation)
+ cloned->m_paintOffsetTranslation = m_paintOffsetTranslation->clone();
+ if (m_transform)
+ cloned->m_transform = m_transform->clone();
+ if (m_effect)
+ cloned->m_effect = m_effect->clone();
+ if (m_cssClip)
+ cloned->m_cssClip = m_cssClip->clone();
+ if (m_cssClipFixedPosition)
+ cloned->m_cssClipFixedPosition = m_cssClipFixedPosition->clone();
+ if (m_innerBorderRadiusClip)
+ cloned->m_innerBorderRadiusClip = m_innerBorderRadiusClip->clone();
+ if (m_overflowClip)
+ cloned->m_overflowClip = m_overflowClip->clone();
+ if (m_perspective)
+ cloned->m_perspective = m_perspective->clone();
+ if (m_svgLocalToBorderBoxTransform) {
+ cloned->m_svgLocalToBorderBoxTransform =
+ m_svgLocalToBorderBoxTransform->clone();
+ }
+ if (m_scrollTranslation)
+ cloned->m_scrollTranslation = m_scrollTranslation->clone();
+ if (m_scrollbarPaintOffset)
+ cloned->m_scrollbarPaintOffset = m_scrollbarPaintOffset->clone();
+ if (m_scroll)
+ cloned->m_scroll = m_scroll->clone();
+ if (m_localBorderBoxProperties) {
+ auto& state = m_localBorderBoxProperties->propertyTreeState;
+ cloned->m_localBorderBoxProperties =
+ wrapUnique(new PropertyTreeStateWithOffset(
+ m_localBorderBoxProperties->paintOffset,
+ PropertyTreeState(state.transform(), state.clip(), state.effect(),
+ state.scroll())));
+ }
+ return cloned;
+ }
+#endif
+
private:
ObjectPaintProperties() {}

Powered by Google App Engine
This is Rietveld 408576698