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

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

Issue 2811023002: Move LayoutBoxModelObject's PaintLayer member to rare paint data (Closed)
Patch Set: Minor cleanup Created 3 years, 8 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/RarePaintData.h
diff --git a/third_party/WebKit/Source/core/paint/RarePaintData.h b/third_party/WebKit/Source/core/paint/RarePaintData.h
index 7584ae412104adc97aa788b19c7986d686d53f2e..b04b5f5c0c9bed9301c5eac4734ac1a662a1a700 100644
--- a/third_party/WebKit/Source/core/paint/RarePaintData.h
+++ b/third_party/WebKit/Source/core/paint/RarePaintData.h
@@ -13,10 +13,10 @@ namespace blink {
class PropertyTreeState;
class ObjectPaintProperties;
+class PaintLayer;
// This is for paint-related data on LayoutObject that is not needed on all
// objects.
-// TODO(pdr): Store LayoutBoxModelObject's m_paintLayer in this structure.
class CORE_EXPORT RarePaintData {
WTF_MAKE_NONCOPYABLE(RarePaintData);
USING_FAST_MALLOC(RarePaintData);
@@ -25,6 +25,9 @@ class CORE_EXPORT RarePaintData {
RarePaintData();
~RarePaintData();
+ PaintLayer* Layer() { return layer_.get(); }
+ void SetLayer(std::unique_ptr<PaintLayer>);
+
ObjectPaintProperties* PaintProperties() const {
return paint_properties_.get();
}
@@ -44,6 +47,10 @@ class CORE_EXPORT RarePaintData {
PropertyTreeState ContentsProperties() const;
private:
+ // The PaintLayer associated with this LayoutBoxModelObject. This can be null
+ // depending on the return value of LayoutBoxModelObject::layerTypeRequired().
+ std::unique_ptr<PaintLayer> layer_;
+
// Holds references to the paint property nodes created by this object.
std::unique_ptr<ObjectPaintProperties> paint_properties_;
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.h ('k') | third_party/WebKit/Source/core/paint/RarePaintData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698