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 16650e0a8010342a0719e344c0d6a99757e6305b..c9f2a9ad6d3d62665438a106cfbc030d17c02cf0 100644 |
| --- a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp |
| +++ b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp |
| @@ -767,8 +767,13 @@ void PaintLayerCompositor::updateDirectCompositingReasons(PaintLayer* layer) |
| bool PaintLayerCompositor::canBeComposited(const PaintLayer* layer) const |
| { |
| - const bool hasCompositorAnimation = m_compositingReasonFinder.requiresCompositingForAnimation(*layer->layoutObject()->style()); |
| - return m_hasAcceleratedCompositing && (hasCompositorAnimation || !layer->subtreeIsInvisible()) && layer->isSelfPaintingLayer() && !layer->layoutObject()->isLayoutFlowThread(); |
| + LayoutObject* layoutObject = layer->layoutObject(); |
| + FrameView* frameView = layoutObject->frameView(); |
|
chrishtr
2016/01/21 22:49:18
Just layer->layoutObject()->frameView() is ok.
wkorman
2016/01/22 00:19:56
Done. I pulled layoutObject into a local variable
|
| + if (frameView && !frameView->isVisible()) { |
| + return false; |
|
chrishtr
2016/01/21 22:49:18
Add a comment explaining this situation. e.g.:
El
wkorman
2016/01/22 00:19:56
Done.
|
| + } |
| + const bool hasCompositorAnimation = m_compositingReasonFinder.requiresCompositingForAnimation(*layoutObject->style()); |
| + return m_hasAcceleratedCompositing && (hasCompositorAnimation || !layer->subtreeIsInvisible()) && layer->isSelfPaintingLayer() && !layoutObject->isLayoutFlowThread(); |
| } |
| // Return true if the given layer is a stacking context and has compositing child |