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

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

Issue 1312423006: Remove dependency on m_previousPositionFromPaintInvalidationBacking for spv2 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update TestExpectations 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/DeprecatedPaintLayer.cpp » ('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 40174392dbd2e3a08896a7b05b0d865e39921b22..b3af3821fb4ee63758acef005860e628c1a5a187 100644
--- a/Source/core/layout/LayoutObject.cpp
+++ b/Source/core/layout/LayoutObject.cpp
@@ -1336,9 +1336,9 @@ PaintInvalidationReason LayoutObject::invalidatePaintIfNeeded(PaintInvalidationS
return PaintInvalidationNone; // Don't invalidate paints if we're printing.
const LayoutRect oldBounds = previousPaintInvalidationRect();
- const LayoutPoint oldLocation = previousPositionFromPaintInvalidationBacking();
+ const LayoutPoint oldLocation = RuntimeEnabledFeatures::slimmingPaintV2Enabled() ? LayoutPoint() : previousPositionFromPaintInvalidationBacking();
LayoutRect newBounds = boundsRectForPaintInvalidation(&paintInvalidationContainer, &paintInvalidationState);
- LayoutPoint newLocation = DeprecatedPaintLayer::positionFromPaintInvalidationBacking(this, &paintInvalidationContainer, &paintInvalidationState);
+ LayoutPoint newLocation = RuntimeEnabledFeatures::slimmingPaintV2Enabled() ? 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.
@@ -1349,7 +1349,8 @@ PaintInvalidationReason LayoutObject::invalidatePaintIfNeeded(PaintInvalidationS
}
setPreviousPaintInvalidationRect(newBounds);
- setPreviousPositionFromPaintInvalidationBacking(newLocation);
+ if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled())
+ setPreviousPositionFromPaintInvalidationBacking(newLocation);
PaintInvalidationReason invalidationReason = paintInvalidationReason(paintInvalidationContainer, oldBounds, oldLocation, newBounds, newLocation);
@@ -3131,6 +3132,15 @@ static PaintInvalidationReason documentLifecycleBasedPaintInvalidationReason(con
inline void LayoutObject::markContainerChainForPaintInvalidation()
{
+ // Setting layer-needs-repaint doesn't mean we'll fully repaint the layer, but
+ // means we won't skip painting of the whole layer with a CachedSubsequenceDisplayItem.
+ // This is to ensure we'll check paint offset changes of the objects on the layer.
+ // We'll still use cached display items for non-invalidated objects on the layer.
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
+ if (DeprecatedPaintLayer* enclosingLayer = this->enclosingLayer())
+ enclosingLayer->setNeedsRepaint();
+ }
+
for (LayoutObject* container = this->containerCrossingFrameBoundaries(); container && !container->shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState(); container = container->containerCrossingFrameBoundaries())
container->m_bitfields.setChildShouldCheckForPaintInvalidation(true);
}
« no previous file with comments | « Source/core/layout/LayoutObject.h ('k') | Source/core/paint/DeprecatedPaintLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698