Chromium Code Reviews| 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(); |
| } |