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

Unified Diff: third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp

Issue 1616183002: Don't composite layers with an invisible frameview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove verbose logging. 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/layout/compositing/PaintLayerCompositor.cpp
diff --git a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
index afe1f47d2806ad0f2cfc5ec473d4156833d8c7d5..df738006929e2770f8a67bf12d7afff88a2d2859 100644
--- a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
@@ -767,6 +767,11 @@ void PaintLayerCompositor::updateDirectCompositingReasons(PaintLayer* layer)
bool PaintLayerCompositor::canBeComposited(const PaintLayer* layer) const
{
+ FrameView* frameView = layer->layoutObject()->frameView();
+ // Elements within an invisible frame need not be composited because they are not drawn.
chrishtr 2016/01/28 00:32:31 s/need/must/
wkorman 2016/01/28 00:55:21 Done.
+ if (frameView && !frameView->isVisible()) {
+ return false;
+ }
const bool hasCompositorAnimation = m_compositingReasonFinder.requiresCompositingForAnimation(*layer->layoutObject()->style());
return m_hasAcceleratedCompositing && (hasCompositorAnimation || !layer->subtreeIsInvisible()) && layer->isSelfPaintingLayer() && !layer->layoutObject()->isLayoutFlowThread();
}

Powered by Google App Engine
This is Rietveld 408576698