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

Unified Diff: third_party/WebKit/Source/core/paint/ViewPainter.cpp

Issue 1364063007: Throttle rendering pipeline for invisible frames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo in comment. Created 5 years, 2 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/paint/ViewPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/ViewPainter.cpp b/third_party/WebKit/Source/core/paint/ViewPainter.cpp
index ab5171ef9d682989b414a87c2d4fe4f66ddb9dcc..8d0600fe859ce553a8edd4730334699476ff86d4 100644
--- a/third_party/WebKit/Source/core/paint/ViewPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/ViewPainter.cpp
@@ -25,6 +25,10 @@ void ViewPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOffs
// LayoutViews should never be called to paint with an offset not on device pixels.
ASSERT(LayoutPoint(IntPoint(paintOffset.x(), paintOffset.y())) == paintOffset);
+ const FrameView* frameView = m_layoutView.frameView();
+ if (frameView->shouldThrottleRendering())
+ return;
+
m_layoutView.paintObject(paintInfo, paintOffset);
BlockPainter(m_layoutView).paintOverflowControlsIfNeeded(paintInfo, paintOffset);
}

Powered by Google App Engine
This is Rietveld 408576698