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

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

Issue 1355753008: RuntimeEnabledFeatures::slimmingPaintOffsetCaching (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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
« no previous file with comments | « Source/core/layout/LayoutObject.h ('k') | Source/core/paint/DisplayItemListPaintTest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutObject.cpp
diff --git a/Source/core/layout/LayoutObject.cpp b/Source/core/layout/LayoutObject.cpp
index 8b2ce680a823b95e64094ab5a8403c7394f98962..d0c0e001d1fd64cf6d40c402f37b7d80c5e0a784 100644
--- a/Source/core/layout/LayoutObject.cpp
+++ b/Source/core/layout/LayoutObject.cpp
@@ -1340,9 +1340,9 @@ PaintInvalidationReason LayoutObject::invalidatePaintIfNeeded(PaintInvalidationS
return PaintInvalidationNone; // Don't invalidate paints if we're printing.
const LayoutRect oldBounds = previousPaintInvalidationRect();
- const LayoutPoint oldLocation = RuntimeEnabledFeatures::slimmingPaintV2Enabled() ? LayoutPoint() : previousPositionFromPaintInvalidationBacking();
+ const LayoutPoint oldLocation = RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled() ? LayoutPoint() : previousPositionFromPaintInvalidationBacking();
LayoutRect newBounds = boundsRectForPaintInvalidation(&paintInvalidationContainer, &paintInvalidationState);
- LayoutPoint newLocation = RuntimeEnabledFeatures::slimmingPaintV2Enabled() ? LayoutPoint() : DeprecatedPaintLayer::positionFromPaintInvalidationBacking(this, &paintInvalidationContainer, &paintInvalidationState);
+ LayoutPoint newLocation = RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled() ? LayoutPoint() : DeprecatedPaintLayer::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.
@@ -1353,7 +1353,7 @@ PaintInvalidationReason LayoutObject::invalidatePaintIfNeeded(PaintInvalidationS
}
setPreviousPaintInvalidationRect(newBounds);
- if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled())
+ if (!RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled())
setPreviousPositionFromPaintInvalidationBacking(newLocation);
PaintInvalidationReason invalidationReason = paintInvalidationReason(paintInvalidationContainer, oldBounds, oldLocation, newBounds, newLocation);
@@ -1377,7 +1377,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 (paintInvalidationState.forcedSubtreeInvalidationWithinContainer())
+ if (!RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled() && paintInvalidationState.forcedSubtreeInvalidationWithinContainer())
invalidateDisplayItemClients(paintInvalidationContainer);
return invalidationReason;
« no previous file with comments | « Source/core/layout/LayoutObject.h ('k') | Source/core/paint/DisplayItemListPaintTest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698