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

Unified Diff: third_party/WebKit/Source/core/paint/ObjectPaintProperties.cpp

Issue 2621193006: Reduce PropertyTreeState construction and copies (Closed)
Patch Set: Created 3 years, 11 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/core/paint/ObjectPaintProperties.cpp
diff --git a/third_party/WebKit/Source/core/paint/ObjectPaintProperties.cpp b/third_party/WebKit/Source/core/paint/ObjectPaintProperties.cpp
index ae564c4d2f8bc7bcf70a5af487d9b38a298c6b25..f79de534bb3a67a83779c58444c2eda9d80e3e98 100644
--- a/third_party/WebKit/Source/core/paint/ObjectPaintProperties.cpp
+++ b/third_party/WebKit/Source/core/paint/ObjectPaintProperties.cpp
@@ -6,23 +6,25 @@
namespace blink {
-PropertyTreeState ObjectPaintProperties::contentsProperties() const {
- PropertyTreeState properties = *localBorderBoxProperties();
+void ObjectPaintProperties::updateContentsProperties() const {
+ DCHECK(m_localBorderBoxProperties);
+ DCHECK(!m_contentsProperties);
+
+ m_contentsProperties =
+ WTF::makeUnique<PropertyTreeState>(*m_localBorderBoxProperties);
if (scrollTranslation())
- properties.setTransform(scrollTranslation());
+ m_contentsProperties->setTransform(scrollTranslation());
if (scroll())
- properties.setScroll(scroll());
+ m_contentsProperties->setScroll(scroll());
if (overflowClip())
- properties.setClip(overflowClip());
+ m_contentsProperties->setClip(overflowClip());
else if (cssClip())
- properties.setClip(cssClip());
+ m_contentsProperties->setClip(cssClip());
// TODO(chrishtr): cssClipFixedPosition needs to be handled somehow.
-
- return properties;
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698