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

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

Issue 1755853002: Remove old paint offset caching code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 10 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 111e984c9978f70983ac7342283cbd6b436c00b4..cb81af046a40578984b77dbdb2d1e1f78f4c28d7 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -257,7 +257,7 @@ LayoutObject::LayoutObject(Node* node)
, m_bitfields(node)
{
// TODO(wangxianzhu): Move this into initialization list when we enable the feature by default.
- if (RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled())
+ if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled())
m_previousPositionFromPaintInvalidationBacking = uninitializedPaintOffset();
#ifndef NDEBUG
@@ -1422,9 +1422,9 @@ PaintInvalidationReason LayoutObject::invalidatePaintIfNeeded(PaintInvalidationS
return PaintInvalidationNone; // Don't invalidate paints if we're printing.
const LayoutRect oldBounds = previousPaintInvalidationRect();
- const LayoutPoint oldLocation = RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled() ? LayoutPoint() : previousPositionFromPaintInvalidationBacking();
+ const LayoutPoint oldLocation = RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() ? LayoutPoint() : previousPositionFromPaintInvalidationBacking();
LayoutRect newBounds = boundsRectForPaintInvalidation(paintInvalidationContainer, &paintInvalidationState);
- LayoutPoint newLocation = RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled() ? LayoutPoint() : PaintLayer::positionFromPaintInvalidationBacking(this, &paintInvalidationContainer, &paintInvalidationState);
+ LayoutPoint newLocation = RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() ? LayoutPoint() : PaintLayer::positionFromPaintInvalidationBacking(this, &paintInvalidationContainer, &paintInvalidationState);
// Composited scrolling should not be included in the bounds and position tracking, because the graphics layer backing the scroller
// does not move on scroll.
@@ -1435,7 +1435,7 @@ PaintInvalidationReason LayoutObject::invalidatePaintIfNeeded(PaintInvalidationS
}
setPreviousPaintInvalidationRect(newBounds);
- if (!RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled())
+ if (!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled())
setPreviousPositionFromPaintInvalidationBacking(newLocation);
if (!shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState() && !paintInvalidationState.forcedSubtreeInvalidationWithinContainer()) {
@@ -1464,7 +1464,7 @@ PaintInvalidationReason LayoutObject::invalidatePaintIfNeeded(PaintInvalidationS
// mutation, but incurs no pixel difference (i.e. bounds stay the same) so no rect-based
// invalidation is issued. See crbug.com/508383 and crbug.com/515977.
// This is a workaround to force display items to update paint offset.
- if (!RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled() && paintInvalidationState.forcedSubtreeInvalidationWithinContainer())
+ if (!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() && paintInvalidationState.forcedSubtreeInvalidationWithinContainer())
invalidateDisplayItemClientsWithPaintInvalidationState(paintInvalidationContainer, paintInvalidationState, invalidationReason);
return invalidationReason;

Powered by Google App Engine
This is Rietveld 408576698