[vlc-commits] commit: skins2(Linux): A XSync is needed (Erwan Tulou )

git at videolan.org git at videolan.org
Mon Nov 8 15:19:06 CET 2010


vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Mon Nov  8 12:19:45 2010 +0100| [0656ac9c68a5e6abb81ca132771d3fa3c1fc296f] | committer: Erwan Tulou 

skins2(Linux): A XSync is needed

This partially fixes the position indicator getting blurry, because XGetImage didn't
retrieve the latest change in pixmap (Previous XCopyArea calls may still be pending)

Note that XSync is needed but not sufficient. Sporadic blurriness can still happen, because
there seems to be no way to know for sure when the pixmap content is really updated.
(waiting for NoExpose event, if enabled, is also not enough). Also, this problem is more
prone to occur with --vout xv than with x11 or opengl, as if xvideo were stressing the X server
more than the other two.

 modules/gui/skins2/x11/x11_graphics.cpp |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0656ac9c68a5e6abb81ca132771d3fa3c1fc296f
---

 modules/gui/skins2/x11/x11_graphics.cpp |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/modules/gui/skins2/x11/x11_graphics.cpp b/modules/gui/skins2/x11/x11_graphics.cpp
index b3e143d..ac51f53 100644
--- a/modules/gui/skins2/x11/x11_graphics.cpp
+++ b/modules/gui/skins2/x11/x11_graphics.cpp
@@ -188,6 +188,10 @@ void X11Graphics::drawBitmap( const GenericBitmap &rBitmap, int xSrc,
         return;
     }
 
+    // Force pending XCopyArea to be sent to the X Server
+    // before issuing an XGetImage.
+    XSync( XDISPLAY, False );
+
     // Get the image from the pixmap
     XImage *pImage = XGetImage( XDISPLAY, m_pixmap, xDest, yDest, width,
                                 height, AllPlanes, ZPixmap );



More information about the vlc-commits mailing list