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

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

Issue 2292273003: Define contentsProperties on ObjectPaintProperties, for use in paint invalidation. (Closed)
Patch Set: none Created 4 years, 4 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.h
diff --git a/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h b/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h
index 9c9a1a7ef390ce1af5aa1dff570c137d6ca4184e..3f22e76c7c2c2daa259e338fd6e9a71977a86ce4 100644
--- a/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h
+++ b/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h
@@ -77,6 +77,9 @@ public:
PropertyTreeState propertyTreeState;
};
const LocalBorderBoxProperties* localBorderBoxProperties() const { return m_localBorderBoxProperties.get(); }
+ // ContentsProperties is the PropertyTreeState state that is the same as in localBorderBoxProperties, except that it is inside
+ // any clips and scrolls caused by this object. This PropertyTreeState is suitable as the destination for paint invalidation.
+ const PropertyTreeState* contentsProperties() const { return m_contentsProperties.get(); }
void clearPaintOffsetTranslation() { m_paintOffsetTranslation = nullptr; }
void clearTransform() { m_transform = nullptr; }
@@ -109,6 +112,7 @@ public:
template <typename... Args> ClipPaintPropertyNode* createOrUpdateOverflowClip(Args&&... args) { return createOrUpdateProperty(m_overflowClip, std::forward<Args>(args)...); }
void setLocalBorderBoxProperties(std::unique_ptr<LocalBorderBoxProperties> properties) { m_localBorderBoxProperties = std::move(properties); }
+ void setContentsProperties(std::unique_ptr<PropertyTreeState> properties) { m_contentsProperties = std::move(properties); }
private:
ObjectPaintProperties() { }
@@ -136,6 +140,7 @@ private:
RefPtr<TransformPaintPropertyNode> m_scrollbarPaintOffset;
std::unique_ptr<LocalBorderBoxProperties> m_localBorderBoxProperties;
+ std::unique_ptr<PropertyTreeState> m_contentsProperties;
pdr. 2016/08/31 04:48:52 Instead of caching such a large object, could we c
szager1 2016/08/31 16:31:22 +1, I don't think it should be stored; it should b
chrishtr 2016/08/31 17:43:30 Yes. I think you could say the same for localBorde
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698