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

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

Issue 1391753005: (WIP) Invalidation during painting (for synchronized painting) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index 3bc1709ebb82d41630deda811a4c8265d7b1c927..f2f233e5e28bbf89975e472901fc39063b2665a8 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -1915,7 +1915,9 @@ void LayoutBox::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ance
// included into the visual overflow for repaint, we wouldn't have this issue.
inflatePaintInvalidationRectForReflectionAndFilter(rect);
- if (paintInvalidationState && paintInvalidationState->canMapToContainer(ancestor) && position != FixedPosition) {
+ if (paintInvalidationState && paintInvalidationState->canMapToContainer(ancestor)
+ // We support fast path mapping to container for fixed-position in SPv2.
+ && (position != FixedPosition || RuntimeEnabledFeatures::slimmingPaintV2Enabled())) {
if (layer() && layer()->transform())
rect = LayoutRect(layer()->transform()->mapRect(pixelSnappedIntRect(rect)));
@@ -3827,8 +3829,8 @@ PaintInvalidationReason LayoutBox::paintInvalidationReason(const LayoutBoxModelO
return invalidationReason;
// LayoutBox::incrementallyInvalidatePaint() depends on positionFromPaintInvalidationBacking
- // which is not available when slimmingPaintOffsetCachingEnabled.
- if (RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled() && (style()->hasBoxDecorations() || style()->hasBackground()))
+ // which is not available in SPv2.
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && (style()->hasBoxDecorations() || (style()->hasBackground() && hasVisualOverflow())))
return PaintInvalidationBorderBoxChange;
// TODO(wangxianzhu): Remove incremental invalidation when we remove rect-based paint invalidation.
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698