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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayerPainter.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/PaintLayerPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
index 6aa124823e87b7dca13e33f0cf0d8f9728cae97a..5c70302f2d76f952e4f4add44c1bbc2c5430dab2 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
@@ -8,6 +8,7 @@
#include "core/frame/Settings.h"
#include "core/layout/ClipPathOperation.h"
#include "core/layout/LayoutBlock.h"
+#include "core/layout/LayoutFrame.h"
#include "core/layout/LayoutView.h"
#include "core/layout/svg/LayoutSVGResourceClipper.h"
#include "core/page/Page.h"
@@ -86,6 +87,10 @@ PaintLayerPainter::PaintResult PaintLayerPainter::paintLayerInternal(GraphicsCon
if (shouldSuppressPaintingLayer(&m_paintLayer))
return FullyPainted;
+ // TODO(skyostil): Unify this early-out logic with subsequence caching.
+ if (m_paintLayer.layoutObject()->isLayoutPart() && toLayoutPart(m_paintLayer.layoutObject())->isThrottledFrameView())
+ return FullyPainted;
+
// If this layer is totally invisible then there is nothing to paint.
if (!m_paintLayer.layoutObject()->opacity() && !m_paintLayer.layoutObject()->hasBackdropFilter())
return FullyPainted;
@@ -220,6 +225,10 @@ PaintLayerPainter::PaintResult PaintLayerPainter::paintLayerContentsInternal(Gra
if (paintFlags & PaintLayerPaintingRootBackgroundOnly && !m_paintLayer.layoutObject()->isLayoutView() && !m_paintLayer.layoutObject()->isDocumentElement())
return result;
+ // TODO(skyostil): Unify this early-out logic with subsequence caching.
+ if (m_paintLayer.layoutObject()->isLayoutPart() && toLayoutPart(m_paintLayer.layoutObject())->isThrottledFrameView())
+ return FullyPainted;
+
PaintLayerPaintingInfo paintingInfo = paintingInfoArg;
// Ensure our lists are up-to-date.

Powered by Google App Engine
This is Rietveld 408576698