summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/page/FrameView.cpp
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-05-13 16:23:25 +0100
committerBen Murdoch <benm@google.com>2011-05-16 11:35:02 +0100
commit65f03d4f644ce73618e5f4f50dd694b26f55ae12 (patch)
treef478babb801e720de7bfaee23443ffe029f58731 /Source/WebCore/page/FrameView.cpp
parent47de4a2fb7262c7ebdb9cd133ad2c54c187454d0 (diff)
downloadexternal_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.zip
external_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.tar.gz
external_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.tar.bz2
Merge WebKit at r75993: Initial merge by git.
Change-Id: I602bbdc3974787a3b0450456a30a7868286921c3
Diffstat (limited to 'Source/WebCore/page/FrameView.cpp')
-rw-r--r--Source/WebCore/page/FrameView.cpp49
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;