Chromium Code Reviews| Index: third_party/WebKit/Source/core/paint/PaintLayer.h |
| diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.h b/third_party/WebKit/Source/core/paint/PaintLayer.h |
| index 5d1baa9407f29d25a01ef613fe06c6d213a6fbc6..45838aaf9f958197b2af27d207f2231b1baebd3a 100644 |
| --- a/third_party/WebKit/Source/core/paint/PaintLayer.h |
| +++ b/third_party/WebKit/Source/core/paint/PaintLayer.h |
| @@ -57,6 +57,7 @@ |
| #include "core/paint/PaintLayerStackingNode.h" |
| #include "core/paint/PaintLayerStackingNodeIterator.h" |
| #include "platform/graphics/CompositingReasons.h" |
| +#include "platform/graphics/paint/PaintChunkProperties.h" |
| #include "public/platform/WebBlendMode.h" |
| #include "wtf/Allocator.h" |
| #include "wtf/OwnPtr.h" |
| @@ -130,6 +131,11 @@ struct PaintLayerRareData { |
| // The accumulated subpixel offset of a composited layer's composited bounds compared to absolute coordinates. |
| LayoutSize subpixelAccumulation; |
| + |
| + struct CachedSPv2PaintParameters { |
| + LayoutPoint paintOffset; |
| + PaintChunkProperties properties; |
| + } cachedSPv2PaintParameters; |
|
pdr.
2016/02/02 06:18:20
Is this data actually rare or is it just on rareda
trchen
2016/02/02 21:48:53
It will be no longer rare once SPv2 ships. :)
|
| }; |
| // PaintLayer is an old object that handles lots of unrelated operations. |
| @@ -679,6 +685,9 @@ public: |
| } |
| void clearClipRectsCache() const { m_clipRectsCache.clear(); } |
| + const PaintLayerRareData::CachedSPv2PaintParameters& cachedSPv2PaintParameters() const { ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); ASSERT(m_rareData); return m_rareData->cachedSPv2PaintParameters; } |
|
pdr.
2016/02/02 06:18:20
WDYT about some lifecycle asserts here?
For the a
trchen
2016/02/02 21:48:53
Acknowledged. Hey, fantastic idea!
|
| + PaintLayerRareData::CachedSPv2PaintParameters& accessCachedSPv2PaintParameters() { ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); return ensureRareData().cachedSPv2PaintParameters; } |
| + |
| private: |
| // Bounding box in the coordinates of this layer. |
| LayoutRect logicalBoundingBox() const; |