xserver: Branch 'master' - 4 commits

Keith Packard keithp at kemper.freedesktop.org
Fri Mar 18 11:41:26 PDT 2011


 configure.ac                           |   63 ++++-----------------------------
 exa/exa.h                              |    2 -
 exa/exa_classic.c                      |    4 +-
 exa/exa_driver.c                       |    6 +--
 exa/exa_migration_mixed.c              |    4 +-
 exa/exa_mixed.c                        |    4 +-
 exa/exa_priv.h                         |    6 +--
 fb/fb.h                                |    4 +-
 fb/fb24_32.c                           |    2 -
 fb/fbpixmap.c                          |   10 +++--
 hw/dmx/dmxpixmap.c                     |    5 +-
 hw/dmx/dmxpixmap.h                     |    2 -
 hw/xfree86/common/xf86VGAarbiter.c     |    4 +-
 hw/xfree86/common/xf86VGAarbiterPriv.h |    2 -
 hw/xfree86/xaa/xaaInit.c               |   10 ++---
 hw/xnest/Pixmap.c                      |    5 +-
 hw/xnest/XNPixmap.h                    |    2 -
 hw/xwin/win.h                          |    2 -
 hw/xwin/winpixmap.c                    |    7 ++-
 include/pixmapstr.h                    |    1 
 include/scrnintstr.h                   |    2 -
 test/.gitignore                        |    2 -
 test/Makefile.am                       |    6 ++-
 test/xi2/Makefile.am                   |    6 ++-
 24 files changed, 65 insertions(+), 96 deletions(-)

New commits:
commit efcb7275ce5de651f91ba4ff8bb227dfb68bb154
Author: Gaetan Nadon <memsize at videotron.ca>
Date:   Thu Mar 17 19:26:37 2011 -0400

    test: git ignore the list test executable
    
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/test/.gitignore b/test/.gitignore
index db8c5f3..86e687f 100644
--- a/test/.gitignore
+++ b/test/.gitignore
@@ -1,7 +1,7 @@
-#		Add & Override for this directory and it's subdirectories
 libxservertest.c
 
 input
+list
 xkb
 xtest
 xi2/protocol-eventconvert
commit 6a5bf15fa99cf5b2358b3b3e2f29e5044aa8724a
Author: Gaetan Nadon <memsize at videotron.ca>
Date:   Thu Mar 17 19:26:36 2011 -0400

    Add generalized unit test support using util-macros.
    
    A handful of modules have begun adding unit test programs.
    These macros will help providing a consistent interface which will
    help package builders and developers to manage the functionality.
    
    XORG_ENABLE_UNIT_TESTS will turn on/off unit testing, regardless
    of how it is implemented. The default (yes/no) can be specified by each
    module. It can be used by itself if glib or -wrap support is not needed.
    
    XORG_WITH_GLIB will probe the system for glib-2.0. A different version
    can be specified in each module. It will consult XORG_ENABLE_UNIT_TESTS
    but can be used by itself in contexts other then unit testing.
    The default (yes/no) can be specified by each module.
    
    XORG_LD_WRAP will probe the linker for -wrap support. It will consult
    XORG_ENABLE_UNIT_TESTS but can be used by itself in contexts
    other then unit testing.
    
    configure options:
      --enable-unit-tests     Enable building unit test cases (default: auto)
      --with-glib             Use GLib library for unit testing (default: auto)
    
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/configure.ac b/configure.ac
index 345c167..b681163 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,9 +32,9 @@ AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE
 
-# Require xorg-macros minimum of 1.10 for XORG_CHECK_SGML_DOCTOOLS
+# Require xorg-macros minimum of 1.13 for XORG_ENABLE_UNIT_TESTS
 m4_ifndef([XORG_MACROS_VERSION],
-          [m4_fatal([must install xorg-macros 1.10 or later before running autoconf/autogen])])
+          [m4_fatal([must install xorg-macros 1.13 or later before running autoconf/autogen])])
 XORG_MACROS_VERSION(1.10)
 XORG_DEFAULT_OPTIONS
 XORG_WITH_DOXYGEN(1.6.1)
@@ -43,6 +43,9 @@ XORG_ENABLE_DOCS
 XORG_ENABLE_DEVEL_DOCS
 XORG_WITH_XMLTO(0.0.20)
 XORG_WITH_FOP
+XORG_ENABLE_UNIT_TESTS
+XORG_WITH_GLIB
+XORG_LD_WRAP
 
 m4_ifndef([XORG_FONT_MACROS_VERSION], [m4_fatal([must install fontutil 1.1 or later before running autoconf/autogen])])
 XORG_FONT_MACROS_VERSION(1.1)
@@ -458,9 +461,6 @@ AC_ARG_ENABLE(werror,        AS_HELP_STRING([--enable-werror],
 AC_ARG_ENABLE(debug,         AS_HELP_STRING([--enable-debug],
 				  [Enable debugging (default: disabled)]),
 			        [DEBUGGING=$enableval], [DEBUGGING=no])
-AC_ARG_ENABLE(unit-tests,    AS_HELP_STRING([--enable-unit-tests],
-                                  [Enable unit-tests (default: auto)]),
-                                [UNITTESTS=$enableval], [UNITTESTS=auto])
 AC_ARG_ENABLE(use-sigio-by-default, AS_HELP_STRING([--enable-use-sigio-by-default]
   [Enable SIGIO input handlers by default (default: $USE_SIGIO_BY_DEFAULT)]),
                                 [USE_SIGIO_BY_DEFAULT=$enableval], [])
@@ -1270,50 +1270,6 @@ if test "x$DEBUGGING" = xyes; then
 fi
 AM_CONDITIONAL(DEBUG, [test "x$DEBUGGING" = xyes])
 
-# If unittests aren't explicitly disabled, check for required support
-if test "x$UNITTESTS" != xno ; then
-       PKG_CHECK_MODULES([GLIB], $LIBGLIB,
-                         [HAVE_GLIB=yes], [HAVE_GLIB=no])
-
-       # Check if linker supports -wrap, passed via compiler flags
-       # When cross-compiling, reports no, since unit tests run from
-       # "make check", so would be running on build machine,  not target
-       AC_MSG_CHECKING([whether the linker supports -wrap])
-       save_LDFLAGS="$LDFLAGS"
-       LDFLAGS="$LDFLAGS -Wl,-wrap,exit"
-       AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-	void __wrap_exit (int s)
-	{
-	    __real_exit (0);
-	}]],
-	[[exit (1);]])],
-                     [linker_can_wrap="yes"],
-                     [linker_can_wrap="no"],
-                     [linker_can_wrap="no"])
-       AC_MSG_RESULT([$linker_can_wrap])
-       LDFLAGS="$save_LDFLAGS"
-fi
-
-if test "x$UNITTESTS" = xauto; then
-       if test "x$HAVE_GLIB" = xyes && test "x$linker_can_wrap" = xyes; then
-           UNITTESTS=yes
-       else
-           UNITTESTS=no
-       fi
-fi
-if test "x$UNITTESTS" = xyes; then
-       if test "x$HAVE_GLIB" = xno; then
-           AC_MSG_ERROR([glib required to build unit tests])
-       fi
-       if test "x$linker_can_wrap" = xno; then
-           AC_MSG_ERROR([ld -wrap support required to build unit tests])
-       fi
-       AC_DEFINE(UNITTESTS, 1, [Enable unit tests])
-       AC_SUBST([GLIB_LIBS])
-       AC_SUBST([GLIB_CFLAGS])
-fi
-AM_CONDITIONAL(UNITTESTS, [test "x$UNITTESTS" = xyes])
-
 AC_DEFINE(XTEST, 1, [Support XTest extension])
 AC_DEFINE(XSYNC, 1, [Support XSync extension])
 AC_DEFINE(XCMISC, 1, [Support XCMisc extension])
diff --git a/test/Makefile.am b/test/Makefile.am
index be54e5f..34f21d7 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,4 +1,6 @@
-if UNITTESTS
+if ENABLE_UNIT_TESTS
+if HAVE_GLIB
+if HAVE_LD_WRAP
 SUBDIRS= . xi2
 check_PROGRAMS = xkb input xtest list
 check_LTLIBRARIES = libxservertest.la
@@ -35,6 +37,8 @@ libxservertest_la_LIBADD = \
             $(top_builddir)/os/libos.la \
             @XORG_LIBS@
 endif
+endif
+endif
 
 CLEANFILES=libxservertest.c
 
diff --git a/test/xi2/Makefile.am b/test/xi2/Makefile.am
index d8dc7e9..e197869 100644
--- a/test/xi2/Makefile.am
+++ b/test/xi2/Makefile.am
@@ -1,4 +1,6 @@
-if UNITTESTS
+if ENABLE_UNIT_TESTS
+if HAVE_GLIB
+if HAVE_LD_WRAP
 check_PROGRAMS =  \
 	protocol-xiqueryversion \
 	protocol-xiquerydevice \
@@ -49,3 +51,5 @@ protocol_xigetclientpointer_SOURCES=$(COMMON_SOURCES) protocol-xigetclientpointe
 protocol_xiquerypointer_SOURCES=$(COMMON_SOURCES) protocol-xiquerypointer.c
 protocol_xiwarppointer_SOURCES=$(COMMON_SOURCES) protocol-xiwarppointer.c
 endif
+endif
+endif
commit ee583cb33423fa79beb22db20b30e10a677f9b5a
Author: Gaetan Nadon <memsize at videotron.ca>
Date:   Thu Mar 17 19:26:35 2011 -0400

    config: group document related XORG_ macros together
    
    No functional changes.
    
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/configure.ac b/configure.ac
index 7eb4151..345c167 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,6 +39,10 @@ XORG_MACROS_VERSION(1.10)
 XORG_DEFAULT_OPTIONS
 XORG_WITH_DOXYGEN(1.6.1)
 XORG_CHECK_SGML_DOCTOOLS(1.5)
+XORG_ENABLE_DOCS
+XORG_ENABLE_DEVEL_DOCS
+XORG_WITH_XMLTO(0.0.20)
+XORG_WITH_FOP
 
 m4_ifndef([XORG_FONT_MACROS_VERSION], [m4_fatal([must install fontutil 1.1 or later before running autoconf/autogen])])
 XORG_FONT_MACROS_VERSION(1.1)
@@ -698,11 +702,6 @@ if test "x$INT10" = xyes; then
 	AC_CHECK_HEADERS([sys/vm86.h sys/io.h])
 fi
 
-XORG_ENABLE_DOCS
-XORG_ENABLE_DEVEL_DOCS
-XORG_WITH_XMLTO(0.0.20)
-XORG_WITH_FOP
-
 dnl Handle installing libxf86config
 AM_CONDITIONAL(INSTALL_LIBXF86CONFIG, [test "x$INSTALL_LIBXF86CONFIG" = xyes])
 
commit d5b16b037b8fe12ba85c68c8289b6a8cc5e3a09d
Author: Keith Packard <keithp at keithp.com>
Date:   Thu Mar 17 23:48:52 2011 -0700

    Revert "dix: Remove usage_hint from pixmaps, store it in ->drawable.class"
    
    This reverts commit 1564c82417d201de5b9a5ec5e7aa4ef14c45fbad.
    
    The drivers used the top bits of the usage_hint to store driver
    private flags (intel, radeon, nouveau).
    
    With EXA we need to get at this data so if we migrate the pixmap we
    can create the correct type of pixmap in the driver, however this
    commit truncates the usage_hint into 8-bit class and loses all the
    good stuff.
    
    Signed-off-by: Dave Airlie <airlied at gmail.com>
    Reviewed-by: Keith Packard <keithp at keithp.com>

diff --git a/exa/exa.h b/exa/exa.h
index 6de6300..8c93d15 100644
--- a/exa/exa.h
+++ b/exa/exa.h
@@ -712,7 +712,7 @@ typedef struct _ExaDriver {
      * driver MUST fill out new_fb_pitch with valid pitch of pixmap
      */
     void *(*CreatePixmap2)(ScreenPtr pScreen, int width, int height,
-			   int depth, int class, int bitsPerPixel,
+			   int depth, int usage_hint, int bitsPerPixel,
 			   int *new_fb_pitch);
     /** @} */
 } ExaDriverRec, *ExaDriverPtr;
diff --git a/exa/exa_classic.c b/exa/exa_classic.c
index 640b26a..169ce3a 100644
--- a/exa/exa_classic.c
+++ b/exa/exa_classic.c
@@ -54,7 +54,7 @@ ExaGetPixmapAddress(PixmapPtr p)
  */
 PixmapPtr
 exaCreatePixmap_classic(ScreenPtr pScreen, int w, int h, int depth,
-		unsigned class)
+		unsigned usage_hint)
 {
     PixmapPtr pPixmap;
     ExaPixmapPrivPtr	pExaPixmap;
@@ -66,7 +66,7 @@ exaCreatePixmap_classic(ScreenPtr pScreen, int w, int h, int depth,
 	return NullPixmap;
 
     swap(pExaScr, pScreen, CreatePixmap);
-    pPixmap = pScreen->CreatePixmap (pScreen, w, h, depth, class);
+    pPixmap = pScreen->CreatePixmap (pScreen, w, h, depth, usage_hint);
     swap(pExaScr, pScreen, CreatePixmap);
 
     if (!pPixmap)
diff --git a/exa/exa_driver.c b/exa/exa_driver.c
index 4d2a1a5..b9903d1 100644
--- a/exa/exa_driver.c
+++ b/exa/exa_driver.c
@@ -48,7 +48,7 @@ ExaGetPixmapAddress(PixmapPtr p)
  */
 PixmapPtr
 exaCreatePixmap_driver(ScreenPtr pScreen, int w, int h, int depth,
-		unsigned class)
+		unsigned usage_hint)
 {
     PixmapPtr pPixmap;
     ExaPixmapPrivPtr	pExaPixmap;
@@ -60,7 +60,7 @@ exaCreatePixmap_driver(ScreenPtr pScreen, int w, int h, int depth,
 	return NullPixmap;
 
     swap(pExaScr, pScreen, CreatePixmap);
-    pPixmap = pScreen->CreatePixmap(pScreen, 0, 0, depth, class);
+    pPixmap = pScreen->CreatePixmap(pScreen, 0, 0, depth, usage_hint);
     swap(pExaScr, pScreen, CreatePixmap);
 
     if (!pPixmap)
@@ -78,7 +78,7 @@ exaCreatePixmap_driver(ScreenPtr pScreen, int w, int h, int depth,
 
     if (pExaScr->info->CreatePixmap2) {
 	int new_pitch = 0;
-	pExaPixmap->driverPriv = pExaScr->info->CreatePixmap2(pScreen, w, h, depth, class, bpp, &new_pitch);
+	pExaPixmap->driverPriv = pExaScr->info->CreatePixmap2(pScreen, w, h, depth, usage_hint, bpp, &new_pitch);
 	paddedWidth = pExaPixmap->fb_pitch = new_pitch;
     }
     else {
diff --git a/exa/exa_migration_mixed.c b/exa/exa_migration_mixed.c
index a563357..fb47151 100644
--- a/exa/exa_migration_mixed.c
+++ b/exa/exa_migration_mixed.c
@@ -39,7 +39,7 @@ exaCreateDriverPixmap_mixed(PixmapPtr pPixmap)
     ExaPixmapPriv(pPixmap);
     int w = pPixmap->drawable.width, h = pPixmap->drawable.height;
     int depth = pPixmap->drawable.depth, bpp = pPixmap->drawable.bitsPerPixel;
-    int class = pPixmap->drawable.class;
+    int usage_hint = pPixmap->usage_hint;
     int paddedWidth = pExaPixmap->sys_pitch;
 
     /* Already done. */
@@ -55,7 +55,7 @@ exaCreateDriverPixmap_mixed(PixmapPtr pPixmap)
 
     if (pExaScr->info->CreatePixmap2) {
 	int new_pitch = 0;
-        pExaPixmap->driverPriv = pExaScr->info->CreatePixmap2(pScreen, w, h, depth, class, bpp, &new_pitch);
+        pExaPixmap->driverPriv = pExaScr->info->CreatePixmap2(pScreen, w, h, depth, usage_hint, bpp, &new_pitch);
 	paddedWidth = pExaPixmap->fb_pitch = new_pitch;
     } else {
 	if (paddedWidth < pExaPixmap->fb_pitch)
diff --git a/exa/exa_mixed.c b/exa/exa_mixed.c
index 24fce76..fd1afb2 100644
--- a/exa/exa_mixed.c
+++ b/exa/exa_mixed.c
@@ -47,7 +47,7 @@ ExaGetPixmapAddress(PixmapPtr p)
  */
 PixmapPtr
 exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth,
-		unsigned class)
+		unsigned usage_hint)
 {
     PixmapPtr pPixmap;
     ExaPixmapPrivPtr	pExaPixmap;
@@ -59,7 +59,7 @@ exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth,
 	return NullPixmap;
 
     swap(pExaScr, pScreen, CreatePixmap);
-    pPixmap = pScreen->CreatePixmap(pScreen, 0, 0, depth, class);
+    pPixmap = pScreen->CreatePixmap(pScreen, 0, 0, depth, usage_hint);
     swap(pExaScr, pScreen, CreatePixmap);
 
     if (!pPixmap)
diff --git a/exa/exa_priv.h b/exa/exa_priv.h
index 1f6dede..e5d90d4 100644
--- a/exa/exa_priv.h
+++ b/exa/exa_priv.h
@@ -588,7 +588,7 @@ extern const GCFuncs exaGCFuncs;
 /* exa_classic.c */
 PixmapPtr
 exaCreatePixmap_classic(ScreenPtr pScreen, int w, int h, int depth,
-		unsigned class);
+		unsigned usage_hint);
 
 Bool
 exaModifyPixmapHeader_classic(PixmapPtr pPixmap, int width, int height, int depth,
@@ -603,7 +603,7 @@ exaPixmapHasGpuCopy_classic(PixmapPtr pPixmap);
 /* exa_driver.c */
 PixmapPtr
 exaCreatePixmap_driver(ScreenPtr pScreen, int w, int h, int depth,
-		unsigned class);
+		unsigned usage_hint);
 
 Bool
 exaModifyPixmapHeader_driver(PixmapPtr pPixmap, int width, int height, int depth,
@@ -618,7 +618,7 @@ exaPixmapHasGpuCopy_driver(PixmapPtr pPixmap);
 /* exa_mixed.c */
 PixmapPtr
 exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth,
-		unsigned class);
+		unsigned usage_hint);
 
 Bool
 exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
diff --git a/fb/fb.h b/fb/fb.h
index d905219..021a940 100644
--- a/fb/fb.h
+++ b/fb/fb.h
@@ -1625,11 +1625,11 @@ fbPictureInit (ScreenPtr pScreen,
 
 extern _X_EXPORT PixmapPtr
 fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp,
-		   unsigned class);
+		   unsigned usage_hint);
 
 extern _X_EXPORT PixmapPtr
 fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth,
-		unsigned class);
+		unsigned usage_hint);
 
 extern _X_EXPORT Bool
 fbDestroyPixmap (PixmapPtr pPixmap);
diff --git a/fb/fb24_32.c b/fb/fb24_32.c
index e24f394..2e600ed 100644
--- a/fb/fb24_32.c
+++ b/fb/fb24_32.c
@@ -546,7 +546,7 @@ fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel)
     pNewTile = pScreen->CreatePixmap(pScreen, pOldTile->drawable.width,
 				     pOldTile->drawable.height,
 				     pOldTile->drawable.depth,
-				     pOldTile->drawable.class);
+				     pOldTile->usage_hint);
     if (!pNewTile)
 	return 0;
     fbGetDrawable (&pOldTile->drawable, 
diff --git a/fb/fbpixmap.c b/fb/fbpixmap.c
index 232de82..41b12ce 100644
--- a/fb/fbpixmap.c
+++ b/fb/fbpixmap.c
@@ -30,7 +30,7 @@
 
 PixmapPtr
 fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp,
-		   unsigned class)
+		   unsigned usage_hint)
 {
     PixmapPtr	pPixmap;
     size_t	datasize;
@@ -54,7 +54,7 @@ fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp,
     if (!pPixmap)
 	return NullPixmap;
     pPixmap->drawable.type = DRAWABLE_PIXMAP;
-    pPixmap->drawable.class = class;
+    pPixmap->drawable.class = 0;
     pPixmap->drawable.pScreen = pScreen;
     pPixmap->drawable.depth = depth;
     pPixmap->drawable.bitsPerPixel = bpp;
@@ -78,12 +78,14 @@ fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp,
     pPixmap->screen_y = 0;
 #endif
 
+    pPixmap->usage_hint = usage_hint;
+
     return pPixmap;
 }
 
 PixmapPtr
 fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth,
-		unsigned class)
+		unsigned usage_hint)
 {
     int	bpp;
     bpp = BitsPerPixel (depth);
@@ -91,7 +93,7 @@ fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth,
     if (bpp == 32 && depth <= 24)
 	bpp = fbGetScreenPrivate(pScreen)->pix32bpp;
 #endif
-    return fbCreatePixmapBpp (pScreen, width, height, depth, bpp, class);
+    return fbCreatePixmapBpp (pScreen, width, height, depth, bpp, usage_hint);
 }
 
 Bool
diff --git a/hw/dmx/dmxpixmap.c b/hw/dmx/dmxpixmap.c
index a167364..81b7115 100644
--- a/hw/dmx/dmxpixmap.c
+++ b/hw/dmx/dmxpixmap.c
@@ -82,7 +82,7 @@ void dmxBECreatePixmap(PixmapPtr pPixmap)
 /** Create a pixmap for \a pScreen with the specified \a width, \a
  *  height, and \a depth. */
 PixmapPtr dmxCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
-			  unsigned class)
+			  unsigned usage_hint)
 {
     DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
     PixmapPtr      pPixmap;
@@ -104,7 +104,7 @@ PixmapPtr dmxCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
 	return NullPixmap;
 
     pPixmap->drawable.type = DRAWABLE_PIXMAP;
-    pPixmap->drawable.class = class;
+    pPixmap->drawable.class = 0;
     pPixmap->drawable.pScreen = pScreen;
     pPixmap->drawable.depth = depth;
     pPixmap->drawable.bitsPerPixel = bpp;
@@ -116,6 +116,7 @@ PixmapPtr dmxCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
     pPixmap->drawable.height = height;
     pPixmap->devKind = PixmapBytePad(width, bpp);
     pPixmap->refcnt = 1;
+    pPixmap->usage_hint = usage_hint;
 
     pPixPriv = DMX_GET_PIXMAP_PRIV(pPixmap);
     pPixPriv->pixmap = (Pixmap)0;
diff --git a/hw/dmx/dmxpixmap.h b/hw/dmx/dmxpixmap.h
index 4b4a8b2..59da788 100644
--- a/hw/dmx/dmxpixmap.h
+++ b/hw/dmx/dmxpixmap.h
@@ -50,7 +50,7 @@ extern Bool      dmxInitPixmap(ScreenPtr pScreen);
 
 extern PixmapPtr dmxCreatePixmap(ScreenPtr pScreen,
 				 int width, int height, int depth,
-				 unsigned class);
+				 unsigned usage_hint);
 extern Bool      dmxDestroyPixmap(PixmapPtr pPixmap);
 extern RegionPtr dmxBitmapToRegion(PixmapPtr pPixmap);
 
diff --git a/hw/xfree86/common/xf86VGAarbiter.c b/hw/xfree86/common/xf86VGAarbiter.c
index c5ebb27..215e845 100644
--- a/hw/xfree86/common/xf86VGAarbiter.c
+++ b/hw/xfree86/common/xf86VGAarbiter.c
@@ -369,13 +369,13 @@ VGAarbiterClearToBackground (
 }
 
 static PixmapPtr
-VGAarbiterCreatePixmap(ScreenPtr pScreen, int w, int h, int depth, unsigned class)
+VGAarbiterCreatePixmap(ScreenPtr pScreen, int w, int h, int depth, unsigned usage_hint)
 {
     PixmapPtr pPix;
 
     SCREEN_PROLOG ( CreatePixmap);
     VGAGet(pScreen);
-    pPix = (*pScreen->CreatePixmap) (pScreen, w, h, depth, class);
+    pPix = (*pScreen->CreatePixmap) (pScreen, w, h, depth, usage_hint);
     VGAPut();
     SCREEN_EPILOG (CreatePixmap, VGAarbiterCreatePixmap);
 
diff --git a/hw/xfree86/common/xf86VGAarbiterPriv.h b/hw/xfree86/common/xf86VGAarbiterPriv.h
index e1ac20f..848e45d 100644
--- a/hw/xfree86/common/xf86VGAarbiterPriv.h
+++ b/hw/xfree86/common/xf86VGAarbiterPriv.h
@@ -155,7 +155,7 @@ static void VGAarbiterCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg,
 static void VGAarbiterClearToBackground (WindowPtr pWin, int x, int y, int w,
     int h, Bool generateExposures);
 static PixmapPtr VGAarbiterCreatePixmap(ScreenPtr pScreen, int w, int h,
-    int depth, unsigned int class);
+    int depth, unsigned int usage_hint);
 static Bool  VGAarbiterCreateGC(GCPtr pGC);
 static Bool VGAarbiterSaveScreen(ScreenPtr pScreen, Bool unblank);
 static void VGAarbiterStoreColors (ColormapPtr pmap, int ndef, xColorItem
diff --git a/hw/xfree86/xaa/xaaInit.c b/hw/xfree86/xaa/xaaInit.c
index dcbd5ab..11443a6 100644
--- a/hw/xfree86/xaa/xaaInit.c
+++ b/hw/xfree86/xaa/xaaInit.c
@@ -34,7 +34,7 @@ static void XAAGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h,
 static void XAAGetSpans(DrawablePtr pDrawable, int wMax, DDXPointPtr ppt,
 			int *pwidth, int nspans, char *pdstStart);
 static PixmapPtr XAACreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
-				 unsigned class);
+				 unsigned usage_hint);
 static Bool XAADestroyPixmap(PixmapPtr pPixmap);
 static Bool XAAEnterVT (int index, int flags);
 static void XAALeaveVT (int index, int flags);
@@ -331,7 +331,7 @@ XAAInitializeOffscreenDepths (ScreenPtr pScreen)
 }
 
 static PixmapPtr 
-XAACreatePixmap(ScreenPtr pScreen, int w, int h, int depth, unsigned class)
+XAACreatePixmap(ScreenPtr pScreen, int w, int h, int depth, unsigned usage_hint)
 {
     XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
     ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
@@ -346,7 +346,7 @@ XAACreatePixmap(ScreenPtr pScreen, int w, int h, int depth, unsigned class)
 	XAAInitializeOffscreenDepths (pScreen);
 
     if(pScrn->vtSema &&
-	(class != CREATE_PIXMAP_USAGE_GLYPH_PICTURE) &&
+	(usage_hint != CREATE_PIXMAP_USAGE_GLYPH_PICTURE) &&
 	(infoRec->offscreenDepths & (1 << (depth - 1))) &&
 	(size >= MIN_OFFPIX_SIZE) && !SwitchedOut &&
 	(!infoRec->maxOffPixWidth || (w <= infoRec->maxOffPixWidth)) &&
@@ -379,7 +379,7 @@ XAACreatePixmap(ScreenPtr pScreen, int w, int h, int depth, unsigned class)
 	}
 
 	XAA_SCREEN_PROLOGUE (pScreen, CreatePixmap);
-	pPix = (*pScreen->CreatePixmap) (pScreen, 0, 0, depth, class);
+	pPix = (*pScreen->CreatePixmap) (pScreen, 0, 0, depth, usage_hint);
 	XAA_SCREEN_EPILOGUE (pScreen, CreatePixmap, XAACreatePixmap);
 
 	if (!pPix) {
@@ -411,7 +411,7 @@ XAACreatePixmap(ScreenPtr pScreen, int w, int h, int depth, unsigned class)
     }
 BAILOUT:
     XAA_SCREEN_PROLOGUE (pScreen, CreatePixmap);
-    pPix = (*pScreen->CreatePixmap) (pScreen, w, h, depth, class);
+    pPix = (*pScreen->CreatePixmap) (pScreen, w, h, depth, usage_hint);
     XAA_SCREEN_EPILOGUE (pScreen, CreatePixmap, XAACreatePixmap);
 
     if(pPix) {
diff --git a/hw/xnest/Pixmap.c b/hw/xnest/Pixmap.c
index c901db1..3a92ffd 100644
--- a/hw/xnest/Pixmap.c
+++ b/hw/xnest/Pixmap.c
@@ -37,7 +37,7 @@ DevPrivateKeyRec xnestPixmapPrivateKeyRec;
 
 PixmapPtr
 xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
-		  unsigned class)
+		  unsigned usage_hint)
 {
   PixmapPtr pPixmap;
 
@@ -45,7 +45,7 @@ xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
   if (!pPixmap)
     return NullPixmap;
   pPixmap->drawable.type = DRAWABLE_PIXMAP;
-  pPixmap->drawable.class = class;
+  pPixmap->drawable.class = 0;
   pPixmap->drawable.depth = depth;
   pPixmap->drawable.bitsPerPixel = depth;
   pPixmap->drawable.id = 0;
@@ -57,6 +57,7 @@ xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
   pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
   pPixmap->refcnt = 1;
   pPixmap->devKind = PixmapBytePad(width, depth);
+  pPixmap->usage_hint = usage_hint;
   if (width && height)
       xnestPixmapPriv(pPixmap)->pixmap = 
 	  XCreatePixmap(xnestDisplay, 
diff --git a/hw/xnest/XNPixmap.h b/hw/xnest/XNPixmap.h
index 638a43a..aa671ed 100644
--- a/hw/xnest/XNPixmap.h
+++ b/hw/xnest/XNPixmap.h
@@ -30,7 +30,7 @@ typedef struct {
 #define xnestSharePixmap(pPixmap) ((pPixmap)->refcnt++)
 
 PixmapPtr xnestCreatePixmap(ScreenPtr pScreen, int width, int height,
-			    int depth, unsigned class);
+			    int depth, unsigned usage_hint);
 Bool xnestDestroyPixmap(PixmapPtr pPixmap);
 RegionPtr xnestPixmapToRegion(PixmapPtr pPixmap);
 
diff --git a/hw/xwin/win.h b/hw/xwin/win.h
index 606645f..3f40fdb 100644
--- a/hw/xwin/win.h
+++ b/hw/xwin/win.h
@@ -1069,7 +1069,7 @@ winSetEngineFunctionsPrimaryDD (ScreenPtr pScreen);
 
 PixmapPtr
 winCreatePixmapNativeGDI (ScreenPtr pScreen, int width, int height, int depth,
-			  unsigned class);
+			  unsigned usage_hint);
 
 Bool
 winDestroyPixmapNativeGDI (PixmapPtr pPixmap);
diff --git a/hw/xwin/winpixmap.c b/hw/xwin/winpixmap.c
index 62717f3..8bd8e34 100644
--- a/hw/xwin/winpixmap.c
+++ b/hw/xwin/winpixmap.c
@@ -57,7 +57,7 @@ winCopyRotatePixmapNativeGDI (PixmapPtr psrcPix, PixmapPtr *ppdstPix,
 PixmapPtr
 winCreatePixmapNativeGDI (ScreenPtr pScreen,
 			  int iWidth, int iHeight,
-			  int iDepth, unsigned class)
+			  int iDepth, unsigned usage_hint)
 {
   winPrivPixmapPtr	pPixmapPriv = NULL;
   PixmapPtr		pPixmap = NULL;
@@ -72,13 +72,13 @@ winCreatePixmapNativeGDI (ScreenPtr pScreen,
 
 #if CYGDEBUG
   winDebug ("winCreatePixmap () - w %d h %d d %d uh %d bw %d\n",
-	  iWidth, iHeight, iDepth, class,
+	  iWidth, iHeight, iDepth, usage_hint,
 	  PixmapBytePad (iWidth, iDepth));
 #endif
 
   /* Setup pixmap values */
   pPixmap->drawable.type = DRAWABLE_PIXMAP;
-  pPixmap->drawable.class = class;
+  pPixmap->drawable.class = 0;
   pPixmap->drawable.pScreen = pScreen;
   pPixmap->drawable.depth = iDepth;
   pPixmap->drawable.bitsPerPixel = BitsPerPixel (iDepth);
@@ -91,6 +91,7 @@ winCreatePixmapNativeGDI (ScreenPtr pScreen,
   pPixmap->devKind = 0;
   pPixmap->refcnt = 1;
   pPixmap->devPrivate.ptr = NULL;
+  pPixmap->usage_hint = usage_hint;
 
   /* Pixmap privates are allocated by AllocatePixmap */
   pPixmapPriv = winGetPixmapPriv (pPixmap);
diff --git a/include/pixmapstr.h b/include/pixmapstr.h
index 542c381..702faf0 100644
--- a/include/pixmapstr.h
+++ b/include/pixmapstr.h
@@ -80,6 +80,7 @@ typedef struct _Pixmap {
     short		screen_x;
     short		screen_y;
 #endif
+    unsigned		usage_hint; /* see CREATE_PIXMAP_USAGE_* */
 } PixmapRec;
 
 #endif /* PIXMAPSTRUCT_H */
diff --git a/include/scrnintstr.h b/include/scrnintstr.h
index 302a561..a9357e8 100644
--- a/include/scrnintstr.h
+++ b/include/scrnintstr.h
@@ -208,7 +208,7 @@ typedef    PixmapPtr (* CreatePixmapProcPtr)(
 	int /*width*/,
 	int /*height*/,
 	int /*depth*/,
-	unsigned /*class*/);
+	unsigned /*usage_hint*/);
 
 typedef    Bool (* DestroyPixmapProcPtr)(
 	PixmapPtr /*pPixmap*/);


More information about the xorg-commit mailing list