diff options
Diffstat (limited to 'Source/WebCore/page/FrameView.cpp')
-rw-r--r-- | Source/WebCore/page/FrameView.cpp | 49 |
1 files changed, 21 insertions, 28 deletions
diff --git a/Source/WebCore/page/FrameView.cpp b/Source/WebCore/page/FrameView.cpp index 926d943..fdf01ec 100644 --- a/Source/WebCore/page/FrameView.cpp +++ b/Source/WebCore/page/FrameView.cpp @@ -566,6 +566,24 @@ void FrameView::updateCompositingLayers() #endif } +void FrameView::syncCompositingStateForThisFrame() +{ + if (RenderView* view = m_frame->contentRenderer()) + view->compositor()->flushPendingLayerChanges(); + +#if ENABLE(FULLSCREEN_API) + // The fullScreenRenderer's graphicsLayer has been re-parented, and the above recursive syncCompositingState + // call will not cause the subtree under it to repaint. Explicitly call the syncCompositingState on + // the fullScreenRenderer's graphicsLayer here: + Document* document = m_frame->document(); + if (isDocumentRunningFullScreenAnimation(document)) { + RenderLayerBacking* backing = document->fullScreenRenderer()->layer()->backing(); + if (GraphicsLayer* fullScreenLayer = backing->graphicsLayer()) + fullScreenLayer->syncCompositingState(); + } +#endif +} + void FrameView::setNeedsOneShotDrawingSynchronization() { Page* page = frame() ? frame()->page() : 0; @@ -655,21 +673,8 @@ bool FrameView::syncCompositingStateRecursive() if (needsLayout()) return false; - if (GraphicsLayer* rootLayer = contentRenderer->compositor()->rootPlatformLayer()) - rootLayer->syncCompositingState(); + syncCompositingStateForThisFrame(); -#if ENABLE(FULLSCREEN_API) - // The fullScreenRenderer's graphicsLayer has been re-parented, and the above recursive syncCompositingState - // call will not cause the subtree under it to repaint. Explicitly call the syncCompositingState on - // the fullScreenRenderer's graphicsLayer here: - Document* document = m_frame->document(); - if (isDocumentRunningFullScreenAnimation(document)) { - RenderLayerBacking* backing = document->fullScreenRenderer()->layer()->backing(); - if (GraphicsLayer* fullScreenLayer = backing->graphicsLayer()) - fullScreenLayer->syncCompositingState(); - } -#endif - bool allSubframesSynced = true; const HashSet<RefPtr<Widget> >* viewChildren = children(); HashSet<RefPtr<Widget> >::const_iterator end = viewChildren->end(); @@ -2231,20 +2236,8 @@ void FrameView::paintContents(GraphicsContext* p, const IntRect& rect) return; #if USE(ACCELERATED_COMPOSITING) - if (!p->paintingDisabled()) { - if (GraphicsLayer* rootLayer = contentRenderer->compositor()->rootPlatformLayer()) - rootLayer->syncCompositingState(); -#if ENABLE(FULLSCREEN_API) - // The fullScreenRenderer's graphicsLayer has been re-parented, and the above recursive syncCompositingState - // call will not cause the subtree under it to repaint. Explicitly call the syncCompositingState on - // the fullScreenRenderer's graphicsLayer here: - if (isDocumentRunningFullScreenAnimation(document)) { - RenderLayerBacking* backing = document->fullScreenRenderer()->layer()->backing(); - if (GraphicsLayer* fullScreenLayer = backing->graphicsLayer()) - fullScreenLayer->syncCompositingState(); - } -#endif - } + if (!p->paintingDisabled()) + syncCompositingStateForThisFrame(); #endif PaintBehavior oldPaintBehavior = m_paintBehavior; |