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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 2334113002: Let slimmingPaintInvalidation plumbing work for spv1 (Closed)
Patch Set: - Created 4 years, 3 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/layout/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index 51f58eabc5f11ddc15005eb46c495e147734bdcf..1ca430f7255f2c8c3f8b6923cfc17e526b4e3cef 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -234,9 +234,6 @@ LayoutObject::LayoutObject(Node* node)
#endif
, m_bitfields(node)
{
- // TODO(wangxianzhu): Move this into initialization list when we enable the feature by default.
- if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled())
- m_previousPositionFromPaintInvalidationBacking = uninitializedPaintOffset();
InstanceCounters::incrementCounter(InstanceCounters::LayoutObjectCounter);
if (m_node)
frameView()->incrementLayoutObjectCount();
@@ -1127,6 +1124,7 @@ LayoutRect LayoutObject::invalidatePaintRectangle(const LayoutRect& dirtyRect, D
void LayoutObject::invalidateTreeIfNeeded(const PaintInvalidationState& paintInvalidationState)
{
+ DCHECK(!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled());
ensureIsReadyForPaintInvalidation();
// If we didn't need paint invalidation then our children don't need as well.
@@ -1148,6 +1146,8 @@ void LayoutObject::invalidateTreeIfNeeded(const PaintInvalidationState& paintInv
void LayoutObject::invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationState& childPaintInvalidationState)
{
+ DCHECK(!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled());
+
for (LayoutObject* child = slowFirstChild(); child; child = child->nextSibling()) {
// Column spanners are invalidated through their placeholders.
// See LayoutMultiColumnSpannerPlaceholder::invalidatePaintOfSubtreesIfNeeded().
@@ -3224,13 +3224,13 @@ void LayoutObject::setIsBackgroundAttachmentFixedObject(bool isBackgroundAttachm
const ObjectPaintProperties* LayoutObject::objectPaintProperties() const
{
- ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled());
+ DCHECK(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled());
return objectPaintPropertiesMap().get(this);
}
ObjectPaintProperties& LayoutObject::ensureObjectPaintProperties()
{
- DCHECK(RuntimeEnabledFeatures::slimmingPaintV2Enabled());
+ DCHECK(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled());
auto addResult = objectPaintPropertiesMap().add(this, nullptr);
if (addResult.isNewEntry)
addResult.storedValue->value = ObjectPaintProperties::create();
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.h ('k') | third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698