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

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

Issue 1651153003: [SPv2] Adds pre-computed paint property context to PaintLayer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/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;

Powered by Google App Engine
This is Rietveld 408576698