xserver/hw/xgl/glx xglx.c,1.2,1.3
David Reveman <xserver-commit-u7BhqnqprCWvj1b/[email protected]> Wed, 26 Jan 2005 02:58:54 -0800 (PST)
| Newsgroups | gmane.comp.freedesktop.xserver.cvs |
|---|---|
| Message-ID | <[email protected]> |
Committed by: davidr Update of /cvs/xserver/xserver/hw/xgl/glx In directory gabe:/tmp/cvs-serv27014/hw/xgl/glx Modified Files: xglx.c Log Message: Xgl improvements Index: xglx.c =================================================================== RCS file: /cvs/xserver/xserver/hw/xgl/glx/xglx.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- xglx.c 5 Nov 2004 13:26:07 -0000 1.2 +++ xglx.c 26 Jan 2005 10:58:52 -0000 1.3 @@ -5,7 +5,7 @@ * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice - * appear in supporting documentation, and that the names of + * appear in supporting documentation, and that the name of * David Reveman not be used in advertising or publicity pertaining to * distribution of the software without specific, written prior permission. * David Reveman makes no representations about the suitability of this @@ -20,7 +20,7 @@ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * Author: David Reveman <[email protected]> + * Author: David Reveman <[email protected]> */ #include <X11/Xlib.h> @@ -64,7 +64,11 @@ glitz_format_t *xglxCurrentFormat; CARD32 lastEventTime = 0; ScreenPtr currentScreen = NULL; -xglScreenInfoRec xglScreenInfo = { 0, 0, 0, 0, FALSE }; +xglScreenInfoRec xglScreenInfo = { + NULL, 0, 0, 0, 0, FALSE, + DEFAULT_GEOMETRY_DATA_TYPE, + DEFAULT_GEOMETRY_USAGE +}; static Bool xglxAllocatePrivates (ScreenPtr pScreen) @@ -386,9 +390,15 @@ OSTimePtr pTimeout, pointer pReadMask) { - glitz_surface_flush (XGL_GET_SCREEN_PRIV (currentScreen)->surface); - glitz_drawable_flush (XGL_GET_SCREEN_PRIV (currentScreen)->drawable); - XFlush (xdisplay); + XGL_SCREEN_PRIV (currentScreen); + + if (!xglSyncSurface (&pScreenPriv->pScreenPixmap->drawable)) + FatalError (XGL_SW_FAILURE_STRING); + + glitz_surface_flush (pScreenPriv->surface); + glitz_drawable_finish (pScreenPriv->drawable); + + XSync (xdisplay, FALSE); } static void @@ -397,8 +407,8 @@ pointer pReadMask) { ScreenPtr pScreen = currentScreen; - XEvent X; - xEvent x; + XEvent X; + xEvent x; while (XPending (xdisplay)) { XNextEvent (xdisplay, &X); @@ -578,7 +588,7 @@ void ddxUseMsg (void) { - ErrorF ("\nXglx Usage:\n"); + ErrorF ("\nXglx usage:\n"); ErrorF ("-display string display name of the real server\n"); xglUseMsg ();