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

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

Issue 1603983002: Fix partial painting with render pipeline throttling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Invalidate paint for unthrottled frame. Created 4 years, 11 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/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index e6b21e12e5da41b7e33d16778dab6ec2b5e7c719..11dd072d0991cde57d164fa1078546697b8cb057 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -3718,16 +3718,11 @@ void FrameView::paint(GraphicsContext& context, const CullRect& cullRect) const
void FrameView::paint(GraphicsContext& context, const GlobalPaintFlags globalPaintFlags, const CullRect& cullRect) const
{
- // TODO(skyostil): Remove this early-out in favor of painting cached scrollbars.
- if (shouldThrottleRendering())
- return;
FramePainter(*this).paint(context, globalPaintFlags, cullRect);
}
void FrameView::paintContents(GraphicsContext& context, const GlobalPaintFlags globalPaintFlags, const IntRect& damageRect) const
{
- if (shouldThrottleRendering())
- return;
FramePainter(*this).paintContents(context, globalPaintFlags, damageRect);
}
@@ -4023,8 +4018,15 @@ void FrameView::notifyRenderThrottlingObservers()
}
bool becameUnthrottled = wasThrottled && !canThrottleRendering();
- if (becameUnthrottled)
+ if (becameUnthrottled) {
+ // Start ticking animation frames again if necessary.
page()->animator().scheduleVisualUpdate(m_frame.get());
+ // Force a full repaint of this frame to ensure we are not left with a
+ // partially painted version of this frame's contents if we skipped
+ // painting them while the frame was throttled.
+ if (LayoutView* layoutView = this->layoutView())
+ layoutView->setShouldDoFullPaintInvalidation(PaintInvalidationBecameVisible);
+ }
}
bool FrameView::shouldThrottleRendering() const

Powered by Google App Engine
This is Rietveld 408576698