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

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: For review 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 85cf715be76ff53dc9b9c19cd00bc2b5a81bab25..87cf44f8408cfb2809be47f0ffac57689ef7e399 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -2427,9 +2427,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.
@@ -2438,7 +2438,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.
@@ -2468,7 +2468,7 @@ void FrameView::updateLifecyclePhasesInternal(LifeCycleUpdateOption phases)
updateCompositedSelectionIfNeeded();
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
- paintForSlimmingPaintV2();
+ paintForSlimmingPaintV2(interestRect);
compositeForSlimmingPaintV2();
}
@@ -2482,7 +2482,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()));
@@ -2497,10 +2497,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