From 94053b9a07283c4aaed1ac51fb1724d7dfa6a909 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 18 Sep 2013 17:17:02 -0700 Subject: [PATCH] Force composition on expose events (bug 915809, r=mattwoodrow). --- widget/gtk2/nsWindow.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/widget/gtk2/nsWindow.cpp b/widget/gtk2/nsWindow.cpp index d8545cdc557..1e24d759347 100644 --- a/widget/gtk2/nsWindow.cpp +++ b/widget/gtk2/nsWindow.cpp @@ -105,6 +105,7 @@ extern "C" { #include "LayerManagerOGL.h" #include "GLContextProvider.h" #include "mozilla/gfx/2D.h" +#include "mozilla/layers/CompositorParent.h" #ifdef MOZ_X11 #include "gfxXlibSurface.h" @@ -1975,6 +1976,12 @@ nsWindow::OnExposeEvent(cairo_t *cr) if (!listener) return FALSE; + // Do an early async composite so that we at least have something on screen + // in the right place, even if the content is out of date. + if (GetLayerManager()->GetBackendType() == LAYERS_CLIENT && mCompositorParent) { + mCompositorParent->ScheduleRenderOnCompositorThread(); + } + // Dispatch WillPaintWindow notification to allow scripts etc. to run // before we paint {