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

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: Based on https://codereview.chromium.org/1340133003/ 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') | no next file » | 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 99aa447fc57f3e52a9d4b00e267a3f877b6f4cf4..0045aa7dabca1564cab5c7f62583f4d5af1efbbc 100644
--- a/Source/core/layout/LayoutObject.cpp
+++ b/Source/core/layout/LayoutObject.cpp
@@ -1198,11 +1198,6 @@ void LayoutObject::invalidateDisplayItemClient(const DisplayItemClientWrapper& d
void LayoutObject::invalidateDisplayItemClients(const LayoutBoxModelObject& paintInvalidationContainer) const
{
paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*this);
-
- if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
pdr. 2015/09/15 03:03:59 Restoring this (instead of the setNeedsRepaint bel
- if (DeprecatedPaintLayer* enclosingLayer = this->enclosingLayer())
- enclosingLayer->setNeedsRepaint();
- }
}
LayoutRect LayoutObject::boundsRectForPaintInvalidation(const LayoutBoxModelObject* paintInvalidationContainer, const PaintInvalidationState* paintInvalidationState) const
@@ -1336,9 +1331,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 +1344,8 @@ PaintInvalidationReason LayoutObject::invalidatePaintIfNeeded(PaintInvalidationS
}
setPreviousPaintInvalidationRect(newBounds);
- setPreviousPositionFromPaintInvalidationBacking(newLocation);
+ if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled())
+ setPreviousPositionFromPaintInvalidationBacking(newLocation);
PaintInvalidationReason invalidationReason = paintInvalidationReason(paintInvalidationContainer, oldBounds, oldLocation, newBounds, newLocation);
@@ -3140,6 +3136,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') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698