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

Unified Diff: Source/core/frame/FrameView.cpp

Issue 1327563003: Don't cache subsequence whose layer is not fully contained by repaint rect (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
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index 447ac80c546a25b52b9c4bedd5fe94ec7a119198..d0e8ad4be2f917b1c2dab04a5a80b9338ce1ab7d 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -2418,9 +2418,9 @@ void FrameView::updateWidgetPositionsIfNeeded()
updateWidgetPositions();
}
-void FrameView::updateAllLifecyclePhases()
+void FrameView::updateAllLifecyclePhases(const LayoutRect& interestRect)
{
- frame().localFrameRoot()->view()->updateLifecyclePhasesInternal(AllPhases);
+ frame().localFrameRoot()->view()->updateLifecyclePhasesInternal(AllPhases, interestRect);
}
// TODO(chrishtr): add a scrolling update lifecycle phase.
@@ -2429,7 +2429,7 @@ void FrameView::updateLifecycleToCompositingCleanPlusScrolling()
frame().localFrameRoot()->view()->updateLifecyclePhasesInternal(OnlyUpToCompositingCleanPlusScrolling);
}
-void FrameView::updateLifecyclePhasesInternal(LifeCycleUpdateOption phases)
+void FrameView::updateLifecyclePhasesInternal(LifeCycleUpdateOption phases, const LayoutRect& interestRect)
{
// This must be called from the root frame, since it recurses down, not up.
// Otherwise the lifecycles of the frames might be out of sync.
@@ -2459,7 +2459,7 @@ void FrameView::updateLifecyclePhasesInternal(LifeCycleUpdateOption phases)
updateCompositedSelectionIfNeeded();
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
- paintForSlimmingPaintV2();
+ paintForSlimmingPaintV2(interestRect);
compositeForSlimmingPaintV2();
}
@@ -2473,7 +2473,7 @@ void FrameView::updateLifecyclePhasesInternal(LifeCycleUpdateOption phases)
}
}
-void FrameView::paintForSlimmingPaintV2()
+void FrameView::paintForSlimmingPaintV2(const LayoutRect& interestRect)
{
ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled());
ASSERT(frame() == page()->mainFrame() || (!frame().tree().parent()->isLocalFrame()));
@@ -2488,10 +2488,8 @@ void FrameView::paintForSlimmingPaintV2()
lifecycle().advanceTo(DocumentLifecycle::InPaintForSlimmingPaintV2);
- // TODO(pdr): Update callers to pass in the interest rect.
- IntRect interestRect = LayoutRect::infiniteIntRect();
GraphicsContext context(rootGraphicsLayer->displayItemList());
- rootGraphicsLayer->paint(context, interestRect);
+ rootGraphicsLayer->paint(context, roundedIntRect(interestRect));
lifecycle().advanceTo(DocumentLifecycle::PaintForSlimmingPaintV2Clean);
}

Powered by Google App Engine
This is Rietveld 408576698