diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2008-11-02 15:26:35 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2008-11-02 15:26:35 +0000 |
commit | dbca69c8a4f3e2d1ccb4f89152213b2861b33af6 (patch) | |
tree | f8963ef73903a7b4374adc2354dffbaa905112ac /xserver/cfb | |
parent | 33b2029f322f3c238b7ba528083195ad8dde33e1 (diff) |
xserver 1.5.2. tested by ckuethe@, oga@, and others.
Diffstat (limited to 'xserver/cfb')
-rw-r--r-- | xserver/cfb/Makefile.am | 1 | ||||
-rw-r--r-- | xserver/cfb/Makefile.am.inc | 4 | ||||
-rw-r--r-- | xserver/cfb/Makefile.in | 103 | ||||
-rw-r--r-- | xserver/cfb/cfb.h | 65 | ||||
-rw-r--r-- | xserver/cfb/cfballpriv.c | 40 | ||||
-rw-r--r-- | xserver/cfb/cfbbitblt.c | 11 | ||||
-rw-r--r-- | xserver/cfb/cfbblt.c | 26 | ||||
-rw-r--r-- | xserver/cfb/cfbbstore.c | 143 | ||||
-rw-r--r-- | xserver/cfb/cfbcppl.c | 6 | ||||
-rw-r--r-- | xserver/cfb/cfbfillrct.c | 4 | ||||
-rw-r--r-- | xserver/cfb/cfbfillsp.c | 60 | ||||
-rw-r--r-- | xserver/cfb/cfbglblt8.c | 4 | ||||
-rw-r--r-- | xserver/cfb/cfbmap.h | 138 | ||||
-rw-r--r-- | xserver/cfb/cfbmskbits.h | 40 | ||||
-rw-r--r-- | xserver/cfb/cfbpixmap.c | 19 | ||||
-rw-r--r-- | xserver/cfb/cfbpntwin.c | 768 | ||||
-rw-r--r-- | xserver/cfb/cfbrrop.h | 3 | ||||
-rw-r--r-- | xserver/cfb/cfbscrinit.c | 31 | ||||
-rw-r--r-- | xserver/cfb/cfbsolid.c | 12 | ||||
-rw-r--r-- | xserver/cfb/cfbtab.h | 16 | ||||
-rw-r--r-- | xserver/cfb/cfbtile32.c | 14 | ||||
-rw-r--r-- | xserver/cfb/cfbunmap.h | 9 | ||||
-rw-r--r-- | xserver/cfb/cfbwindow.c | 193 |
23 files changed, 178 insertions, 1532 deletions
diff --git a/xserver/cfb/Makefile.am b/xserver/cfb/Makefile.am index d24f027e7..901fc95ae 100644 --- a/xserver/cfb/Makefile.am +++ b/xserver/cfb/Makefile.am @@ -16,7 +16,6 @@ INCLUDES = $(CFB_INCLUDES) -I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir EXTRA_DIST = cfbline.c cfbfillarc.c cfbzerarc.c cfbblt.c cfbsolid.c \ cfbtileodd.c cfbtile32.c cfb8line.c cfbply1rct.c cfbglblt8.c \ cfb16.h cfb24.h cfb32.h cfb8bit.h cfbrrop.h \ - cfbtab.h \ stip68kgnu.h stipmips.s stipsparc.s stipsprc32.s sdk_HEADERS = cfb.h cfb32.h cfb16.h cfbmap.h cfbunmap.h cfbmskbits.h diff --git a/xserver/cfb/Makefile.am.inc b/xserver/cfb/Makefile.am.inc index 65e011ac4..a2ee143aa 100644 --- a/xserver/cfb/Makefile.am.inc +++ b/xserver/cfb/Makefile.am.inc @@ -8,14 +8,14 @@ DISTCLEANFILES = $(libcfb_gen_sources) CFB_INCLUDES = -I$(top_srcdir)/mfb -I$(top_srcdir)/cfb libcfb_common_sources = $(top_srcdir)/cfb/cfbgc.c $(top_srcdir)/cfb/cfbrrop.c \ - $(top_srcdir)/cfb/cfbwindow.c $(top_srcdir)/cfb/cfbpntwin.c \ + $(top_srcdir)/cfb/cfbwindow.c \ $(top_srcdir)/cfb/cfbmskbits.c $(top_srcdir)/cfb/cfbpixmap.c \ $(top_srcdir)/cfb/cfbbitblt.c $(top_srcdir)/cfb/cfbfillsp.c \ $(top_srcdir)/cfb/cfbsetsp.c $(top_srcdir)/cfb/cfbscrinit.c \ $(top_srcdir)/cfb/cfballpriv.c $(top_srcdir)/cfb/cfbgetsp.c \ $(top_srcdir)/cfb/cfbfillrct.c $(top_srcdir)/cfb/cfbigblt8.c \ $(top_srcdir)/cfb/cfbglblt8.c $(top_srcdir)/cfb/cfbtegblt.c \ - $(top_srcdir)/cfb/cfbbstore.c $(top_srcdir)/cfb/cfbpolypnt.c \ + $(top_srcdir)/cfb/cfbpolypnt.c \ $(top_srcdir)/cfb/cfbbres.c $(top_srcdir)/cfb/cfbline.c \ $(top_srcdir)/cfb/cfbhrzvert.c $(top_srcdir)/cfb/cfbbresd.c \ $(top_srcdir)/cfb/cfbimage.c $(top_srcdir)/cfb/cfbcppl.c \ diff --git a/xserver/cfb/Makefile.in b/xserver/cfb/Makefile.in index 566e7f100..9b0eec821 100644 --- a/xserver/cfb/Makefile.in +++ b/xserver/cfb/Makefile.in @@ -64,12 +64,12 @@ am__objects_1 = cfbseg.lo cfbfillarcC.lo cfbfillarcG.lo cfbzerarcC.lo \ cfb8lineCO.lo cfb8lineCP.lo cfb8lineX.lo cfb8lineG.lo \ cfb8segCS.lo cfb8segC.lo cfb8segX.lo cfb8setG.lo \ cfbply1rctC.lo cfbply1rctG.lo -am__objects_2 = cfbgc.lo cfbrrop.lo cfbwindow.lo cfbpntwin.lo \ - cfbmskbits.lo cfbpixmap.lo cfbbitblt.lo cfbfillsp.lo \ - cfbsetsp.lo cfbscrinit.lo cfballpriv.lo cfbgetsp.lo \ - cfbfillrct.lo cfbigblt8.lo cfbglblt8.lo cfbtegblt.lo \ - cfbbstore.lo cfbpolypnt.lo cfbbres.lo cfbline.lo cfbhrzvert.lo \ - cfbbresd.lo cfbimage.lo cfbcppl.lo cfbcmap.lo +am__objects_2 = cfbgc.lo cfbrrop.lo cfbwindow.lo cfbmskbits.lo \ + cfbpixmap.lo cfbbitblt.lo cfbfillsp.lo cfbsetsp.lo \ + cfbscrinit.lo cfballpriv.lo cfbgetsp.lo cfbfillrct.lo \ + cfbigblt8.lo cfbglblt8.lo cfbtegblt.lo cfbpolypnt.lo \ + cfbbres.lo cfbline.lo cfbhrzvert.lo cfbbresd.lo cfbimage.lo \ + cfbcppl.lo cfbcmap.lo am_libcfb_la_OBJECTS = cfb8bit.lo cfbteblt8.lo cfbglrop8.lo \ cfbpush8.lo cfbrctstp8.lo $(am__objects_1) $(am__objects_2) libcfb_la_OBJECTS = $(am_libcfb_la_OBJECTS) @@ -136,8 +136,6 @@ BSD_KQUEUE_APM_FALSE = @BSD_KQUEUE_APM_FALSE@ BSD_KQUEUE_APM_TRUE = @BSD_KQUEUE_APM_TRUE@ BUILDDOCS_FALSE = @BUILDDOCS_FALSE@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ -BUILD_DARWIN_FALSE = @BUILD_DARWIN_FALSE@ -BUILD_DARWIN_TRUE = @BUILD_DARWIN_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_IOPORT_FALSE = @BUILD_IOPORT_FALSE@ BUILD_IOPORT_TRUE = @BUILD_IOPORT_TRUE@ @@ -209,6 +207,10 @@ DMX_FALSE = @DMX_FALSE@ DMX_TRUE = @DMX_TRUE@ DPMSExtension_FALSE = @DPMSExtension_FALSE@ DPMSExtension_TRUE = @DPMSExtension_TRUE@ +DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ +DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ +DRI2_FALSE = @DRI2_FALSE@ +DRI2_TRUE = @DRI2_TRUE@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ @@ -238,7 +240,7 @@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ -FREETYPE_REQUIRES = @FREETYPE_REQUIRES@ +GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_FALSE = @GLX_FALSE@ GLX_TRUE = @GLX_TRUE@ @@ -252,8 +254,8 @@ HAVE_AGL_FRAMEWORK_FALSE = @HAVE_AGL_FRAMEWORK_FALSE@ HAVE_AGL_FRAMEWORK_TRUE = @HAVE_AGL_FRAMEWORK_TRUE@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ -HAVE_X_PLUGIN_FALSE = @HAVE_X_PLUGIN_FALSE@ -HAVE_X_PLUGIN_TRUE = @HAVE_X_PLUGIN_TRUE@ +HAVE_XPLUGIN_FALSE = @HAVE_XPLUGIN_FALSE@ +HAVE_XPLUGIN_TRUE = @HAVE_XPLUGIN_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -294,6 +296,9 @@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KDRIVE_TRUE = @KDRIVE_TRUE@ +LAUNCHD = @LAUNCHD@ +LAUNCHD_FALSE = @LAUNCHD_FALSE@ +LAUNCHD_TRUE = @LAUNCHD_TRUE@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -348,6 +353,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -355,12 +362,11 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ +PCIACCESS_LIBS = @PCIACCESS_LIBS@ +PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ -PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ -PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ -PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ @@ -372,13 +378,12 @@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ -RGB_DB = @RGB_DB@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ -SERVERCONFIGdir = @SERVERCONFIGdir@ +SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SGI_VIDEO_FALSE = @SGI_VIDEO_FALSE@ SGI_VIDEO_TRUE = @SGI_VIDEO_TRUE@ @@ -394,20 +399,21 @@ SPARC64_VIDEO_TRUE = @SPARC64_VIDEO_TRUE@ STRIP = @STRIP@ SUN_KBD_MODE_FALSE = @SUN_KBD_MODE_FALSE@ SUN_KBD_MODE_TRUE = @SUN_KBD_MODE_TRUE@ -SYS_LIBS = @SYS_LIBS@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_FALSE = @TSLIB_FALSE@ TSLIB_LIBS = @TSLIB_LIBS@ TSLIB_TRUE = @TSLIB_TRUE@ USE_CURSES_FALSE = @USE_CURSES_FALSE@ USE_CURSES_TRUE = @USE_CURSES_TRUE@ -USE_RGB_BUILTIN_FALSE = @USE_RGB_BUILTIN_FALSE@ -USE_RGB_BUILTIN_TRUE = @USE_RGB_BUILTIN_TRUE@ +UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +X11APP_ARCHS = @X11APP_ARCHS@ +X11APP_FALSE = @X11APP_FALSE@ +X11APP_TRUE = @X11APP_TRUE@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XACE_FALSE = @XACE_FALSE@ @@ -424,18 +430,22 @@ XDMCP_LIBS = @XDMCP_LIBS@ XDMCP_TRUE = @XDMCP_TRUE@ XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ +XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGLMODULES_LIBS = @XEGLMODULES_LIBS@ XEGL_FALSE = @XEGL_FALSE@ XEGL_LIBS = @XEGL_LIBS@ +XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEGL_TRUE = @XEGL_TRUE@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_FALSE = @XEPHYR_FALSE@ +XEPHYR_HAS_DRI_FALSE = @XEPHYR_HAS_DRI_FALSE@ +XEPHYR_HAS_DRI_TRUE = @XEPHYR_HAS_DRI_TRUE@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XEPHYR_TRUE = @XEPHYR_TRUE@ -XERRORDB_PATH = @XERRORDB_PATH@ XEVIE_FALSE = @XEVIE_FALSE@ XEVIE_TRUE = @XEVIE_TRUE@ XF86BIGFONT_FALSE = @XF86BIGFONT_FALSE@ @@ -459,10 +469,12 @@ XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ XGLX_FALSE = @XGLX_FALSE@ XGLX_LIBS = @XGLX_LIBS@ +XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ XGLX_TRUE = @XGLX_TRUE@ XGL_FALSE = @XGL_FALSE@ XGL_LIBS = @XGL_LIBS@ XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XGL_SYS_LIBS = @XGL_SYS_LIBS@ XGL_TRUE = @XGL_TRUE@ XINERAMA_FALSE = @XINERAMA_FALSE@ XINERAMA_TRUE = @XINERAMA_TRUE@ @@ -476,19 +488,18 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_FALSE = @XNEST_FALSE@ XNEST_LIBS = @XNEST_LIBS@ +XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XNEST_TRUE = @XNEST_TRUE@ XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ -XORG_BUS_FREEBSDPCI_FALSE = @XORG_BUS_FREEBSDPCI_FALSE@ -XORG_BUS_FREEBSDPCI_TRUE = @XORG_BUS_FREEBSDPCI_TRUE@ +XORG_BUS_BSDPCI_FALSE = @XORG_BUS_BSDPCI_FALSE@ +XORG_BUS_BSDPCI_TRUE = @XORG_BUS_BSDPCI_TRUE@ XORG_BUS_IX86PCI_FALSE = @XORG_BUS_IX86PCI_FALSE@ XORG_BUS_IX86PCI_TRUE = @XORG_BUS_IX86PCI_TRUE@ XORG_BUS_LINUXPCI_FALSE = @XORG_BUS_LINUXPCI_FALSE@ XORG_BUS_LINUXPCI_TRUE = @XORG_BUS_LINUXPCI_TRUE@ -XORG_BUS_NETBSDPCI_FALSE = @XORG_BUS_NETBSDPCI_FALSE@ -XORG_BUS_NETBSDPCI_TRUE = @XORG_BUS_NETBSDPCI_TRUE@ XORG_BUS_PPCPCI_FALSE = @XORG_BUS_PPCPCI_FALSE@ XORG_BUS_PPCPCI_TRUE = @XORG_BUS_PPCPCI_TRUE@ XORG_BUS_SPARCPCI_FALSE = @XORG_BUS_SPARCPCI_FALSE@ @@ -496,7 +507,6 @@ XORG_BUS_SPARCPCI_TRUE = @XORG_BUS_SPARCPCI_TRUE@ XORG_BUS_SPARC_FALSE = @XORG_BUS_SPARC_FALSE@ XORG_BUS_SPARC_TRUE = @XORG_BUS_SPARC_TRUE@ XORG_CFLAGS = @XORG_CFLAGS@ -XORG_CORE_LIBS = @XORG_CORE_LIBS@ XORG_FALSE = @XORG_FALSE@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -506,23 +516,31 @@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XORG_SYS_LIBS = @XORG_SYS_LIBS@ XORG_TRUE = @XORG_TRUE@ +XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ +XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ XPRINT_CFLAGS = @XPRINT_CFLAGS@ XPRINT_FALSE = @XPRINT_FALSE@ XPRINT_LIBS = @XPRINT_LIBS@ +XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ XPRINT_TRUE = @XPRINT_TRUE@ XP_USE_FREETYPE_FALSE = @XP_USE_FREETYPE_FALSE@ XP_USE_FREETYPE_TRUE = @XP_USE_FREETYPE_TRUE@ XQUARTZ_FALSE = @XQUARTZ_FALSE@ XQUARTZ_TRUE = @XQUARTZ_TRUE@ +XREGISTRY_FALSE = @XREGISTRY_FALSE@ +XREGISTRY_TRUE = @XREGISTRY_TRUE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDLSERVER_FALSE = @XSDLSERVER_FALSE@ XSDLSERVER_TRUE = @XSDLSERVER_TRUE@ XSDL_INCS = @XSDL_INCS@ XSDL_LIBS = @XSDL_LIBS@ +XSELINUX_FALSE = @XSELINUX_FALSE@ +XSELINUX_TRUE = @XSELINUX_TRUE@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ @@ -530,12 +548,14 @@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_DTRACE_FALSE = @XSERVER_DTRACE_FALSE@ XSERVER_DTRACE_TRUE = @XSERVER_DTRACE_TRUE@ XSERVER_LIBS = @XSERVER_LIBS@ +XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XTRAP_FALSE = @XTRAP_FALSE@ XTRAP_TRUE = @XTRAP_TRUE@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_FALSE = @XVFB_FALSE@ XVFB_LIBS = @XVFB_LIBS@ +XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XVFB_TRUE = @XVFB_TRUE@ XVMC_FALSE = @XVMC_FALSE@ XVMC_TRUE = @XVMC_TRUE@ @@ -560,7 +580,7 @@ XWIN_PRIMARYFB_TRUE = @XWIN_PRIMARYFB_TRUE@ XWIN_RANDR_FALSE = @XWIN_RANDR_FALSE@ XWIN_RANDR_TRUE = @XWIN_RANDR_TRUE@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ -XWIN_SYSTEM_LIBS = @XWIN_SYSTEM_LIBS@ +XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ XWIN_TRUE = @XWIN_TRUE@ XWIN_XV_FALSE = @XWIN_XV_FALSE@ XWIN_XV_TRUE = @XWIN_XV_TRUE@ @@ -568,6 +588,11 @@ X_PRIVSEP_FALSE = @X_PRIVSEP_FALSE@ X_PRIVSEP_TRUE = @X_PRIVSEP_TRUE@ YACC = @YACC@ __XCONFIGFILE__ = @__XCONFIGFILE__@ +abi_ansic = @abi_ansic@ +abi_extension = @abi_extension@ +abi_font = @abi_font@ +abi_videodrv = @abi_videodrv@ +abi_xinput = @abi_xinput@ ac_ct_AR = @ac_ct_AR@ ac_ct_AS = @ac_ct_AS@ ac_ct_CC = @ac_ct_CC@ @@ -610,6 +635,7 @@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ +launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ @@ -636,14 +662,14 @@ libcfb_gen_sources = cfbseg.c cfbfillarcC.c cfbfillarcG.c cfbzerarcC.c cfbzerarc DISTCLEANFILES = $(libcfb_gen_sources) cfbglrop8.c CFB_INCLUDES = -I$(top_srcdir)/mfb -I$(top_srcdir)/cfb libcfb_common_sources = $(top_srcdir)/cfb/cfbgc.c $(top_srcdir)/cfb/cfbrrop.c \ - $(top_srcdir)/cfb/cfbwindow.c $(top_srcdir)/cfb/cfbpntwin.c \ + $(top_srcdir)/cfb/cfbwindow.c \ $(top_srcdir)/cfb/cfbmskbits.c $(top_srcdir)/cfb/cfbpixmap.c \ $(top_srcdir)/cfb/cfbbitblt.c $(top_srcdir)/cfb/cfbfillsp.c \ $(top_srcdir)/cfb/cfbsetsp.c $(top_srcdir)/cfb/cfbscrinit.c \ $(top_srcdir)/cfb/cfballpriv.c $(top_srcdir)/cfb/cfbgetsp.c \ $(top_srcdir)/cfb/cfbfillrct.c $(top_srcdir)/cfb/cfbigblt8.c \ $(top_srcdir)/cfb/cfbglblt8.c $(top_srcdir)/cfb/cfbtegblt.c \ - $(top_srcdir)/cfb/cfbbstore.c $(top_srcdir)/cfb/cfbpolypnt.c \ + $(top_srcdir)/cfb/cfbpolypnt.c \ $(top_srcdir)/cfb/cfbbres.c $(top_srcdir)/cfb/cfbline.c \ $(top_srcdir)/cfb/cfbhrzvert.c $(top_srcdir)/cfb/cfbbresd.c \ $(top_srcdir)/cfb/cfbimage.c $(top_srcdir)/cfb/cfbcppl.c \ @@ -659,7 +685,6 @@ INCLUDES = $(CFB_INCLUDES) -I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir EXTRA_DIST = cfbline.c cfbfillarc.c cfbzerarc.c cfbblt.c cfbsolid.c \ cfbtileodd.c cfbtile32.c cfb8line.c cfbply1rct.c cfbglblt8.c \ cfb16.h cfb24.h cfb32.h cfb8bit.h cfbrrop.h \ - cfbtab.h \ stip68kgnu.h stipmips.s stipsparc.s stipsprc32.s sdk_HEADERS = cfb.h cfb32.h cfb16.h cfbmap.h cfbunmap.h cfbmskbits.h @@ -731,7 +756,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbbltX.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbbres.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbbresd.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbbstore.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbcmap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbcppl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbfillarcC.Plo@am__quote@ @@ -750,7 +774,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbpixmap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbply1rctC.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbply1rctG.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbpntwin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbpolypnt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbpush8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbrctstp8.Plo@am__quote@ @@ -814,13 +837,6 @@ cfbwindow.lo: $(top_srcdir)/cfb/cfbwindow.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbwindow.lo `test -f '$(top_srcdir)/cfb/cfbwindow.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbwindow.c -cfbpntwin.lo: $(top_srcdir)/cfb/cfbpntwin.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbpntwin.lo -MD -MP -MF "$(DEPDIR)/cfbpntwin.Tpo" -c -o cfbpntwin.lo `test -f '$(top_srcdir)/cfb/cfbpntwin.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbpntwin.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/cfbpntwin.Tpo" "$(DEPDIR)/cfbpntwin.Plo"; else rm -f "$(DEPDIR)/cfbpntwin.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbpntwin.c' object='cfbpntwin.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbpntwin.lo `test -f '$(top_srcdir)/cfb/cfbpntwin.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbpntwin.c - cfbmskbits.lo: $(top_srcdir)/cfb/cfbmskbits.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbmskbits.lo -MD -MP -MF "$(DEPDIR)/cfbmskbits.Tpo" -c -o cfbmskbits.lo `test -f '$(top_srcdir)/cfb/cfbmskbits.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbmskbits.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/cfbmskbits.Tpo" "$(DEPDIR)/cfbmskbits.Plo"; else rm -f "$(DEPDIR)/cfbmskbits.Tpo"; exit 1; fi @@ -905,13 +921,6 @@ cfbtegblt.lo: $(top_srcdir)/cfb/cfbtegblt.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbtegblt.lo `test -f '$(top_srcdir)/cfb/cfbtegblt.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbtegblt.c -cfbbstore.lo: $(top_srcdir)/cfb/cfbbstore.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbbstore.lo -MD -MP -MF "$(DEPDIR)/cfbbstore.Tpo" -c -o cfbbstore.lo `test -f '$(top_srcdir)/cfb/cfbbstore.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbbstore.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/cfbbstore.Tpo" "$(DEPDIR)/cfbbstore.Plo"; else rm -f "$(DEPDIR)/cfbbstore.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/cfb/cfbbstore.c' object='cfbbstore.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cfbbstore.lo `test -f '$(top_srcdir)/cfb/cfbbstore.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbbstore.c - cfbpolypnt.lo: $(top_srcdir)/cfb/cfbpolypnt.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cfbpolypnt.lo -MD -MP -MF "$(DEPDIR)/cfbpolypnt.Tpo" -c -o cfbpolypnt.lo `test -f '$(top_srcdir)/cfb/cfbpolypnt.c' || echo '$(srcdir)/'`$(top_srcdir)/cfb/cfbpolypnt.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/cfbpolypnt.Tpo" "$(DEPDIR)/cfbpolypnt.Plo"; else rm -f "$(DEPDIR)/cfbpolypnt.Tpo"; exit 1; fi diff --git a/xserver/cfb/cfb.h b/xserver/cfb/cfb.h index 8c682ae8d..aece13341 100644 --- a/xserver/cfb/cfb.h +++ b/xserver/cfb/cfb.h @@ -37,6 +37,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "colormap.h" #include "miscstruct.h" #include "servermd.h" +#include "privates.h" #include "windowstr.h" #include "mfb.h" #undef PixelType @@ -55,8 +56,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. pixmap.devKind = width_of_pixmap_in_bytes */ -extern int cfbGCPrivateIndex; -extern int cfbWindowPrivateIndex; +extern DevPrivateKey cfbGCPrivateKey; /* private field of GC */ typedef struct { @@ -71,7 +71,7 @@ typedef struct { typedef cfbPrivGC *cfbPrivGCPtr; #define cfbGetGCPrivate(pGC) ((cfbPrivGCPtr)\ - (pGC)->devPrivates[cfbGCPrivateIndex].ptr) + dixLookupPrivate(&(pGC)->devPrivates, cfbGCPrivateKey)) #define cfbGetCompositeClip(pGC) ((pGC)->pCompositeClip) @@ -81,20 +81,6 @@ typedef struct { CfbBits xor, and; } cfbRRopRec, *cfbRRopPtr; -/* private field of window */ -typedef struct { - unsigned char fastBorder; /* non-zero if border is 32 bits wide */ - unsigned char fastBackground; - unsigned short unused; /* pad for alignment with Sun compiler */ - DDXPointRec oldRotate; - PixmapPtr pRotatedBackground; - PixmapPtr pRotatedBorder; - } cfbPrivWin; - -#define cfbGetWindowPrivate(_pWin) ((cfbPrivWin *)\ - (_pWin)->devPrivates[cfbWindowPrivateIndex].ptr) - - /* cfb8bit.c */ extern int cfbSetStipple( @@ -313,8 +299,7 @@ extern int cfb8SegmentSS1RectXor( extern Bool cfbAllocatePrivates( ScreenPtr /*pScreen*/, - int * /*window_index*/, - int * /*gc_index*/ + DevPrivateKey * /*gc_key*/ ); /* cfbbitblt.c */ @@ -486,23 +471,7 @@ extern void cfbBresD( int /*e2*/, int /*len*/ ); -/* cfbbstore.c */ - -extern void cfbSaveAreas( - PixmapPtr /*pPixmap*/, - RegionPtr /*prgnSave*/, - int /*xorg*/, - int /*yorg*/, - WindowPtr /*pWin*/ -); -extern void cfbRestoreAreas( - PixmapPtr /*pPixmap*/, - RegionPtr /*prgnRestore*/, - int /*xorg*/, - int /*yorg*/, - WindowPtr /*pWin*/ -); /* cfbcmap.c */ #ifndef CFB_PROTOTYPES_ONLY @@ -771,7 +740,8 @@ extern PixmapPtr cfbCreatePixmap( ScreenPtr /*pScreen*/, int /*width*/, int /*height*/, - int /*depth*/ + int /*depth*/, + unsigned /*usage_hint*/ ); extern Bool cfbDestroyPixmap( @@ -822,27 +792,6 @@ extern void cfbFillPoly1RectGeneral( int /*count*/, DDXPointPtr /*ptsIn*/ ); -/* cfbpntwin.c */ - -extern void cfbPaintWindow( - WindowPtr /*pWin*/, - RegionPtr /*pRegion*/, - int /*what*/ -); - -extern void cfbFillBoxSolid( - DrawablePtr /*pDrawable*/, - int /*nBox*/, - BoxPtr /*pBox*/, - unsigned long /*pixel*/ -); - -extern void cfbFillBoxTile32( - DrawablePtr /*pDrawable*/, - int /*nBox*/, - BoxPtr /*pBox*/, - PixmapPtr /*tile*/ -); /* cfbpolypnt.c */ extern void cfbPolyPoint( @@ -1245,7 +1194,7 @@ extern void cfbZeroPolyArcSS8Xor( #define CFB_NEED_SCREEN_PRIVATE -extern int cfbScreenPrivateIndex; +extern DevPrivateKey cfbScreenPrivateKey; #endif #ifndef CFB_PROTOTYPES_ONLY diff --git a/xserver/cfb/cfballpriv.c b/xserver/cfb/cfballpriv.c index e0ccdf4d0..3b58266c5 100644 --- a/xserver/cfb/cfballpriv.c +++ b/xserver/cfb/cfballpriv.c @@ -45,48 +45,26 @@ in this Software without prior written authorization from The Open Group. #include "mibstore.h" #if 1 || PSZ==8 -int cfbWindowPrivateIndex = -1; -int cfbGCPrivateIndex = -1; +DevPrivateKey cfbGCPrivateKey = &cfbGCPrivateKey; #endif #ifdef CFB_NEED_SCREEN_PRIVATE -int cfbScreenPrivateIndex = -1; -static unsigned long cfbGeneration = 0; +DevPrivateKey cfbScreenPrivateKey = &cfbScreenPrivateKey; #endif Bool -cfbAllocatePrivates(pScreen, window_index, gc_index) - ScreenPtr pScreen; - int *window_index, *gc_index; +cfbAllocatePrivates(ScreenPtr pScreen, DevPrivateKey *gc_key) { - if (!window_index || !gc_index || - (*window_index == -1 && *gc_index == -1)) + if (!gc_key || !*gc_key) { - if (!mfbAllocatePrivates(pScreen, - &cfbWindowPrivateIndex, &cfbGCPrivateIndex)) + if (!mfbAllocatePrivates(pScreen, &cfbGCPrivateKey)) return FALSE; - if (window_index) - *window_index = cfbWindowPrivateIndex; - if (gc_index) - *gc_index = cfbGCPrivateIndex; + if (gc_key) + *gc_key = cfbGCPrivateKey; } else { - cfbWindowPrivateIndex = *window_index; - cfbGCPrivateIndex = *gc_index; + cfbGCPrivateKey = *gc_key; } - if (!AllocateWindowPrivate(pScreen, cfbWindowPrivateIndex, - sizeof(cfbPrivWin)) || - !AllocateGCPrivate(pScreen, cfbGCPrivateIndex, sizeof(cfbPrivGC))) - return FALSE; -#ifdef CFB_NEED_SCREEN_PRIVATE - if (cfbGeneration != serverGeneration) - { - cfbScreenPrivateIndex = AllocateScreenPrivateIndex (); - cfbGeneration = serverGeneration; - } - if (cfbScreenPrivateIndex == -1) - return FALSE; -#endif - return TRUE; + return dixRequestPrivate(cfbGCPrivateKey, sizeof(cfbPrivGC)); } diff --git a/xserver/cfb/cfbbitblt.c b/xserver/cfb/cfbbitblt.c index faf49b92d..00bf41367 100644 --- a/xserver/cfb/cfbbitblt.c +++ b/xserver/cfb/cfbbitblt.c @@ -296,7 +296,7 @@ cfbBitBlt ( numRects = REGION_NUM_RECTS(&rgnDst); if (numRects && width && height) { - if(!(pptSrc = (DDXPointPtr)ALLOCATE_LOCAL(numRects * + if(!(pptSrc = (DDXPointPtr)xalloc(numRects * sizeof(DDXPointRec)))) { REGION_UNINIT(pGC->pScreen, &rgnDst); @@ -313,7 +313,7 @@ cfbBitBlt ( } (*doBitBlt) (pSrcDrawable, pDstDrawable, pGC->alu, &rgnDst, pptSrc, pGC->planemask); - DEALLOCATE_LOCAL(pptSrc); + xfree(pptSrc); } prgnExposed = NULL; @@ -559,7 +559,7 @@ cfbCopyPlaneReduce ( numRects = REGION_NUM_RECTS(&rgnDst); if (numRects && width && height) { - if(!(pptSrc = (DDXPointPtr)ALLOCATE_LOCAL(numRects * + if(!(pptSrc = (DDXPointPtr)xalloc(numRects * sizeof(DDXPointRec)))) { REGION_UNINIT(pGC->pScreen, &rgnDst); @@ -576,7 +576,7 @@ cfbCopyPlaneReduce ( } (*doCopyPlane) (pSrcDrawable, pDstDrawable, pGC->alu, &rgnDst, pptSrc, pGC->planemask, bitPlane); - DEALLOCATE_LOCAL(pptSrc); + xfree(pptSrc); } prgnExposed = NULL; @@ -1407,7 +1407,8 @@ RegionPtr cfbCopyPlane(pSrcDrawable, pDstDrawable, ScreenPtr pScreen = pSrcDrawable->pScreen; GCPtr pGC1; - pBitmap = (*pScreen->CreatePixmap) (pScreen, width, height, 1); + pBitmap = (*pScreen->CreatePixmap) (pScreen, width, height, 1, + CREATE_PIXMAP_USAGE_SCRATCH); if (!pBitmap) return NULL; pGC1 = GetScratchGC (1, pScreen); diff --git a/xserver/cfb/cfbblt.c b/xserver/cfb/cfbblt.c index 1e577f526..ff34589ff 100644 --- a/xserver/cfb/cfbblt.c +++ b/xserver/cfb/cfbblt.c @@ -207,13 +207,13 @@ MROP_NAME(cfbDoBitblt)( if (nbox > 1) { /* keep ordering in each band, reverse order of bands */ - pboxNew1 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec) * nbox); + pboxNew1 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox); if(!pboxNew1) return; - pptNew1 = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec) * nbox); + pptNew1 = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * nbox); if(!pptNew1) { - DEALLOCATE_LOCAL(pboxNew1); + xfree(pboxNew1); return; } pboxBase = pboxNext = pbox+nbox-1; @@ -251,16 +251,16 @@ MROP_NAME(cfbDoBitblt)( if (nbox > 1) { /* reverse order of rects in each band */ - pboxNew2 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec) * nbox); - pptNew2 = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec) * nbox); + pboxNew2 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox); + pptNew2 = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * nbox); if(!pboxNew2 || !pptNew2) { - if (pptNew2) DEALLOCATE_LOCAL(pptNew2); - if (pboxNew2) DEALLOCATE_LOCAL(pboxNew2); + if (pptNew2) xfree(pptNew2); + if (pboxNew2) xfree(pboxNew2); if (pboxNew1) { - DEALLOCATE_LOCAL(pptNew1); - DEALLOCATE_LOCAL(pboxNew1); + xfree(pptNew1); + xfree(pboxNew1); } return; } @@ -922,12 +922,12 @@ bits1 = *--psrc; --pdst; \ } if (pboxNew2) { - DEALLOCATE_LOCAL(pptNew2); - DEALLOCATE_LOCAL(pboxNew2); + xfree(pptNew2); + xfree(pboxNew2); } if (pboxNew1) { - DEALLOCATE_LOCAL(pptNew1); - DEALLOCATE_LOCAL(pboxNew1); + xfree(pptNew1); + xfree(pboxNew1); } } diff --git a/xserver/cfb/cfbbstore.c b/xserver/cfb/cfbbstore.c deleted file mode 100644 index f09360ce9..000000000 --- a/xserver/cfb/cfbbstore.c +++ /dev/null @@ -1,143 +0,0 @@ -/*- - * cfbbstore.c -- - * Functions required by the backing-store implementation in MI. - * - * Copyright (c) 1987 by the Regents of the University of California - * - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies. The University of California - * makes no representations about the suitability of this - * software for any purpose. It is provided "as is" without - * express or implied warranty. - * - * - */ - -#ifdef HAVE_DIX_CONFIG_H -#include <dix-config.h> -#endif - -#include "cfb.h" -#include <X11/X.h> -#include "mibstore.h" -#include "regionstr.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "windowstr.h" - -/*- - *----------------------------------------------------------------------- - * cfbSaveAreas -- - * Function called by miSaveAreas to actually fetch the areas to be - * saved into the backing pixmap. This is very simple to do, since - * cfbDoBitblt is designed for this very thing. The region to save is - * already destination-relative and we're given the offset to the - * window origin, so we have only to create an array of points of the - * u.l. corners of the boxes in the region translated to the screen - * coordinate system and fetch the screen pixmap out of its devPrivate - * field.... - * - * Results: - * None. - * - * Side Effects: - * Data are copied from the screen into the pixmap. - * - *----------------------------------------------------------------------- - */ -void -cfbSaveAreas(pPixmap, prgnSave, xorg, yorg, pWin) - PixmapPtr pPixmap; /* Backing pixmap */ - RegionPtr prgnSave; /* Region to save (pixmap-relative) */ - int xorg; /* X origin of region */ - int yorg; /* Y origin of region */ - WindowPtr pWin; -{ - register DDXPointPtr pPt; - DDXPointPtr pPtsInit; - register BoxPtr pBox; - register int i; - ScreenPtr pScreen = pPixmap->drawable.pScreen; - PixmapPtr pScrPix; - - i = REGION_NUM_RECTS(prgnSave); - pPtsInit = (DDXPointPtr)ALLOCATE_LOCAL(i * sizeof(DDXPointRec)); - if (!pPtsInit) - return; - - pBox = REGION_RECTS(prgnSave); - pPt = pPtsInit; - while (--i >= 0) { - pPt->x = pBox->x1 + xorg; - pPt->y = pBox->y1 + yorg; - pPt++; - pBox++; - } - - pScrPix = (*pScreen->GetWindowPixmap)(pWin); - - - cfbDoBitbltCopy((DrawablePtr) pScrPix, (DrawablePtr)pPixmap, - GXcopy, prgnSave, pPtsInit, ~0L); - - DEALLOCATE_LOCAL (pPtsInit); -} - -/*- - *----------------------------------------------------------------------- - * cfbRestoreAreas -- - * Function called by miRestoreAreas to actually fetch the areas to be - * restored from the backing pixmap. This is very simple to do, since - * cfbDoBitblt is designed for this very thing. The region to restore is - * already destination-relative and we're given the offset to the - * window origin, so we have only to create an array of points of the - * u.l. corners of the boxes in the region translated to the pixmap - * coordinate system and fetch the screen pixmap out of its devPrivate - * field.... - * - * Results: - * None. - * - * Side Effects: - * Data are copied from the pixmap into the screen. - * - *----------------------------------------------------------------------- - */ -void -cfbRestoreAreas(pPixmap, prgnRestore, xorg, yorg, pWin) - PixmapPtr pPixmap; /* Backing pixmap */ - RegionPtr prgnRestore; /* Region to restore (screen-relative)*/ - int xorg; /* X origin of window */ - int yorg; /* Y origin of window */ - WindowPtr pWin; -{ - register DDXPointPtr pPt; - DDXPointPtr pPtsInit; - register BoxPtr pBox; - register int i; - ScreenPtr pScreen = pPixmap->drawable.pScreen; - PixmapPtr pScrPix; - - i = REGION_NUM_RECTS(prgnRestore); - pPtsInit = (DDXPointPtr)ALLOCATE_LOCAL(i*sizeof(DDXPointRec)); - if (!pPtsInit) - return; - - pBox = REGION_RECTS(prgnRestore); - pPt = pPtsInit; - while (--i >= 0) { - pPt->x = pBox->x1 - xorg; - pPt->y = pBox->y1 - yorg; - pPt++; - pBox++; - } - - pScrPix = (*pScreen->GetWindowPixmap)(pWin); - - cfbDoBitbltCopy((DrawablePtr)pPixmap, (DrawablePtr) pScrPix, - GXcopy, prgnRestore, pPtsInit, ~0L); - - DEALLOCATE_LOCAL (pPtsInit); -} diff --git a/xserver/cfb/cfbcppl.c b/xserver/cfb/cfbcppl.c index 91b61a711..00714cbc4 100644 --- a/xserver/cfb/cfbcppl.c +++ b/xserver/cfb/cfbcppl.c @@ -1,6 +1,4 @@ /* - * $TOG: cfb8cppl.c /main/16 1998/02/09 14:04:13 kaleb $ - * Copyright 1990, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its @@ -44,9 +42,7 @@ in this Software without prior written authorization from The Open Group. #include "maskbits.h" #define PSZ 8 #include "mergerop.h" -#else /* PSZ==8 */ -#include "cfbtab.h" /* provides starttab, endttab, partmasks */ -#endif /* PSZ==8 */ +#endif void diff --git a/xserver/cfb/cfbfillrct.c b/xserver/cfb/cfbfillrct.c index 4c78c24b3..fc2d31bdc 100644 --- a/xserver/cfb/cfbfillrct.c +++ b/xserver/cfb/cfbfillrct.c @@ -196,7 +196,7 @@ cfbPolyFillRect(pDrawable, pGC, nrectFill, prectInit) numRects = REGION_NUM_RECTS(prgnClip) * nrectFill; if (numRects > NUM_STACK_RECTS) { - pboxClippedBase = (BoxPtr)ALLOCATE_LOCAL(numRects * sizeof(BoxRec)); + pboxClippedBase = (BoxPtr)xalloc(numRects * sizeof(BoxRec)); if (!pboxClippedBase) return; } @@ -301,5 +301,5 @@ cfbPolyFillRect(pDrawable, pGC, nrectFill, prectInit) (*BoxFill) (pDrawable, pGC, pboxClipped-pboxClippedBase, pboxClippedBase); if (pboxClippedBase != stackRects) - DEALLOCATE_LOCAL(pboxClippedBase); + xfree(pboxClippedBase); } diff --git a/xserver/cfb/cfbfillsp.c b/xserver/cfb/cfbfillsp.c index ddd4f1421..36710b612 100644 --- a/xserver/cfb/cfbfillsp.c +++ b/xserver/cfb/cfbfillsp.c @@ -186,12 +186,12 @@ int fSorted; n = nInit * miFindMaxBand( cfbGetCompositeClip(pGC) ); if ( n == 0 ) return; - pwidth = (int *)ALLOCATE_LOCAL(n * sizeof(int)); - ppt = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); + pwidth = (int *)xalloc(n * sizeof(int)); + ppt = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec)); if(!ppt || !pwidth) { - if (ppt) DEALLOCATE_LOCAL(ppt); - if (pwidth) DEALLOCATE_LOCAL(pwidth); + if (ppt) xfree(ppt); + if (pwidth) xfree(pwidth); return; } n = miClipSpans( cfbGetCompositeClip(pGC), @@ -203,8 +203,8 @@ int fSorted; (*fill) (pDrawable, n, ppt, pwidth, pGC->tile.pixmap, xrot, yrot, pGC->alu, pGC->planemask); - DEALLOCATE_LOCAL(ppt); - DEALLOCATE_LOCAL(pwidth); + xfree(ppt); + xfree(pwidth); } #if PSZ == 8 @@ -251,12 +251,12 @@ int fSorted; n = nInit * miFindMaxBand( cfbGetCompositeClip(pGC) ); if ( n == 0 ) return; - pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); - pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); + pwidthFree = (int *)xalloc(n * sizeof(int)); + pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec)); if(!pptFree || !pwidthFree) { - if (pptFree) DEALLOCATE_LOCAL(pptFree); - if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); + if (pptFree) xfree(pptFree); + if (pwidthFree) xfree(pwidthFree); return; } @@ -392,8 +392,8 @@ int fSorted; } } } - DEALLOCATE_LOCAL(pptFree); - DEALLOCATE_LOCAL(pwidthFree); + xfree(pptFree); + xfree(pwidthFree); } #else /* PSZ != 8 */ @@ -434,12 +434,12 @@ int fSorted; n = nInit * miFindMaxBand( cfbGetCompositeClip(pGC) ); if ( n == 0 ) return; - pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); - pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); + pwidthFree = (int *)xalloc(n * sizeof(int)); + pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec)); if(!pptFree || !pwidthFree) { - if (pptFree) DEALLOCATE_LOCAL(pptFree); - if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); + if (pptFree) xfree(pptFree); + if (pwidthFree) xfree(pwidthFree); return; } pwidth = pwidthFree; @@ -599,8 +599,8 @@ int fSorted; ppt++; pwidth++; } - DEALLOCATE_LOCAL(pptFree); - DEALLOCATE_LOCAL(pwidthFree); + xfree(pptFree); + xfree(pwidthFree); } #endif /* PSZ == 8 */ @@ -648,12 +648,12 @@ cfb8Stipple32FS (pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) n = nInit * miFindMaxBand(pGC->pCompositeClip); if ( n == 0 ) return; - pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); - pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); + pwidthFree = (int *)xalloc(n * sizeof(int)); + pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec)); if(!pptFree || !pwidthFree) { - if (pptFree) DEALLOCATE_LOCAL(pptFree); - if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); + if (pptFree) xfree(pptFree); + if (pwidthFree) xfree(pwidthFree); return; } pwidth = pwidthFree; @@ -816,8 +816,8 @@ cfb8Stipple32FS (pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) } } } - DEALLOCATE_LOCAL(pptFree); - DEALLOCATE_LOCAL(pwidthFree); + xfree(pptFree); + xfree(pwidthFree); } void @@ -862,12 +862,12 @@ cfb8OpaqueStipple32FS (pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) n = nInit * miFindMaxBand(pGC->pCompositeClip); if ( n == 0 ) return; - pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); - pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); + pwidthFree = (int *)xalloc(n * sizeof(int)); + pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec)); if(!pptFree || !pwidthFree) { - if (pptFree) DEALLOCATE_LOCAL(pptFree); - if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); + if (pptFree) xfree(pptFree); + if (pwidthFree) xfree(pwidthFree); return; } pwidth = pwidthFree; @@ -997,8 +997,8 @@ cfb8OpaqueStipple32FS (pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) } } } - DEALLOCATE_LOCAL(pptFree); - DEALLOCATE_LOCAL(pwidthFree); + xfree(pptFree); + xfree(pwidthFree); } #endif /* PSZ == 8 */ diff --git a/xserver/cfb/cfbglblt8.c b/xserver/cfb/cfbglblt8.c index c4cba0e15..4d964b35d 100644 --- a/xserver/cfb/cfbglblt8.c +++ b/xserver/cfb/cfbglblt8.c @@ -355,7 +355,7 @@ cfbPolyGlyphBlt8Clipped( } if (!numRects) return; - clips = (CARD32 *)ALLOCATE_LOCAL ((maxAscent + maxDescent) * + clips = (CARD32 *)xalloc ((maxAscent + maxDescent) * sizeof (CARD32)); while (nglyph--) { @@ -471,7 +471,7 @@ cfbPolyGlyphBlt8Clipped( } } } - DEALLOCATE_LOCAL (clips); + xfree (clips); } #endif /* FOUR_BIT_CODE */ diff --git a/xserver/cfb/cfbmap.h b/xserver/cfb/cfbmap.h index 1d6a3f850..16e4afc3c 100644 --- a/xserver/cfb/cfbmap.h +++ b/xserver/cfb/cfbmap.h @@ -30,135 +30,6 @@ in this Software without prior written authorization from The Open Group. * Map names around so that multiple depths can be supported simultaneously */ -#if 0 -#undef QuartetBitsTable -#undef QuartetPixelMaskTable -#undef cfb8ClippedLineCopy -#undef cfb8ClippedLineGeneral -#undef cfb8ClippedLineXor -#undef cfb8LineSS1Rect -#undef cfb8LineSS1RectCopy -#undef cfb8LineSS1RectGeneral -#undef cfb8LineSS1RectPreviousCopy -#undef cfb8LineSS1RectXor -#undef cfb8SegmentSS1Rect -#undef cfb8SegmentSS1RectCopy -#undef cfb8SegmentSS1RectGeneral -#undef cfb8SegmentSS1RectShiftCopy -#undef cfb8SegmentSS1RectXor -#undef cfbAllocatePrivates -#undef cfbBSFuncRec -#undef cfbBitBlt -#undef cfbBresD -#undef cfbBresS -#undef cfbChangeWindowAttributes -#undef cfbCloseScreen -#undef cfbCopyArea -#undef cfbCopyImagePlane -#undef cfbCopyPixmap -#undef cfbCopyPlane -#undef cfbCopyPlaneReduce -#undef cfbCopyRotatePixmap -#undef cfbCopyWindow -#undef cfbCreateGC -#undef cfbCreatePixmap -#undef cfbCreateScreenResources -#undef cfbCreateWindow -#undef cfbDestroyPixmap -#undef cfbDestroyWindow -#undef cfbDoBitblt -#undef cfbDoBitbltCopy -#undef cfbDoBitbltGeneral -#undef cfbDoBitbltOr -#undef cfbDoBitbltXor -#undef cfbFillBoxSolid -#undef cfbFillBoxTile32 -#undef cfbFillBoxTile32sCopy -#undef cfbFillBoxTile32sGeneral -#undef cfbFillBoxTileOdd -#undef cfbFillBoxTileOddCopy -#undef cfbFillBoxTileOddGeneral -#undef cfbFillPoly1RectCopy -#undef cfbFillPoly1RectGeneral -#undef cfbFillRectSolidCopy -#undef cfbFillRectSolidGeneral -#undef cfbFillRectSolidXor -#undef cfbFillRectTile32Copy -#undef cfbFillRectTile32General -#undef cfbFillRectTileOdd -#undef cfbFillSpanTile32sCopy -#undef cfbFillSpanTile32sGeneral -#undef cfbFillSpanTileOddCopy -#undef cfbFillSpanTileOddGeneral -#undef cfbFinishScreenInit -#undef cfbGCFuncs -#undef cfbGCPrivateIndex -#undef cfbGetImage -#undef cfbGetScreenPixmap -#undef cfbGetSpans -#undef cfbHorzS -#undef cfbImageGlyphBlt8 -#undef cfbInitializeColormap -#undef cfbInstallColormap -#undef cfbLineSD -#undef cfbLineSS -#undef cfbListInstalledColormaps -#undef cfbMapWindow -#undef cfbMatchCommon -#undef cfbNonTEOps -#undef cfbNonTEOps1Rect -#undef cfbPadPixmap -#undef cfbPaintWindow -#undef cfbPolyFillArcSolidCopy -#undef cfbPolyFillArcSolidGeneral -#undef cfbPolyFillRect -#undef cfbPolyGlyphBlt8 -#undef cfbPolyGlyphRop8 -#undef cfbPolyPoint -#undef cfbPositionWindow -#undef cfbPutImage -#undef cfbReduceRasterOp -#undef cfbResolveColor -#undef cfbRestoreAreas -#undef cfbSaveAreas -#undef cfbScreenInit -#undef cfbScreenPrivateIndex -#undef cfbSegmentSD -#undef cfbSegmentSS -#undef cfbSetScanline -#undef cfbSetScreenPixmap -#undef cfbSetSpans -#undef cfbSetupScreen -#undef cfbSolidSpansCopy -#undef cfbSolidSpansGeneral -#undef cfbSolidSpansXor -#undef cfbStippleStack -#undef cfbStippleStackTE -#undef cfbTEGlyphBlt -#undef cfbTEOps -#undef cfbTEOps1Rect -#undef cfbTile32FSCopy -#undef cfbTile32FSGeneral -#undef cfbUninstallColormap -#undef cfbUnmapWindow -#undef cfbUnnaturalStippleFS -#undef cfbUnnaturalTileFS -#undef cfbValidateGC -#undef cfbVertS -#undef cfbWindowPrivateIndex -#undef cfbXRotatePixmap -#undef cfbYRotatePixmap -#undef cfbZeroPolyArcSS8Copy -#undef cfbZeroPolyArcSS8General -#undef cfbZeroPolyArcSS8Xor -#undef cfbendpartial -#undef cfbendtab -#undef cfbmask -#undef cfbrmask -#undef cfbstartpartial -#undef cfbstarttab -#endif - /* a losing vendor cpp dumps core if we define CFBNAME in terms of CATNAME */ #if PSZ != 8 @@ -250,8 +121,6 @@ cfb can not hack PSZ yet #define cfbDoBitbltOr CFBNAME(DoBitbltOr) #define cfbDoBitbltXor CFBNAME(DoBitbltXor) #define cfbExpandDirectColors CFBNAME(cfbExpandDirectColors) -#define cfbFillBoxSolid CFBNAME(FillBoxSolid) -#define cfbFillBoxTile32 CFBNAME(FillBoxTile32) #define cfbFillBoxTile32sCopy CFBNAME(FillBoxTile32sCopy) #define cfbFillBoxTile32sGeneral CFBNAME(FillBoxTile32sGeneral) #define cfbFillBoxTileOdd CFBNAME(FillBoxTileOdd) @@ -271,7 +140,7 @@ cfb can not hack PSZ yet #define cfbFillSpanTileOddGeneral CFBNAME(FillSpanTileOddGeneral) #define cfbFinishScreenInit CFBNAME(FinishScreenInit) #define cfbGCFuncs CFBNAME(GCFuncs) -#define cfbGCPrivateIndex CFBNAME(GCPrivateIndex) +#define cfbGCPrivateKey CFBNAME(GCPrivateKey) #define cfbGetImage CFBNAME(GetImage) #define cfbGetScreenPixmap CFBNAME(GetScreenPixmap) #define cfbGetSpans CFBNAME(GetSpans) @@ -288,7 +157,6 @@ cfb can not hack PSZ yet #define cfbNonTEOps CFBNAME(NonTEOps) #define cfbNonTEOps1Rect CFBNAME(NonTEOps1Rect) #define cfbPadPixmap CFBNAME(PadPixmap) -#define cfbPaintWindow CFBNAME(PaintWindow) #define cfbPolyFillArcSolidCopy CFBNAME(PolyFillArcSolidCopy) #define cfbPolyFillArcSolidGeneral CFBNAME(PolyFillArcSolidGeneral) #define cfbPolyFillRect CFBNAME(PolyFillRect) @@ -302,7 +170,7 @@ cfb can not hack PSZ yet #define cfbRestoreAreas CFBNAME(RestoreAreas) #define cfbSaveAreas CFBNAME(SaveAreas) #define cfbScreenInit CFBNAME(ScreenInit) -#define cfbScreenPrivateIndex CFBNAME(ScreenPrivateIndex) +#define cfbScreenPrivateKey CFBNAME(ScreenPrivateKey) #define cfbSegmentSD CFBNAME(SegmentSD) #define cfbSegmentSS CFBNAME(SegmentSS) #define cfbSetScanline CFBNAME(SetScanline) @@ -326,7 +194,7 @@ cfb can not hack PSZ yet #define cfbUnnaturalTileFS CFBNAME(UnnaturalTileFS) #define cfbValidateGC CFBNAME(ValidateGC) #define cfbVertS CFBNAME(VertS) -#define cfbWindowPrivateIndex CFBNAME(WindowPrivateIndex) +#define cfbWindowPrivateKey CFBNAME(WindowPrivateKey) #define cfbXRotatePixmap CFBNAME(XRotatePixmap) #define cfbYRotatePixmap CFBNAME(YRotatePixmap) #define cfbZeroPolyArcSS8Copy CFBNAME(ZeroPolyArcSSCopy) diff --git a/xserver/cfb/cfbmskbits.h b/xserver/cfb/cfbmskbits.h index 7aa446cb5..5ee9125dd 100644 --- a/xserver/cfb/cfbmskbits.h +++ b/xserver/cfb/cfbmskbits.h @@ -32,10 +32,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include <X11/X.h> #include <X11/Xmd.h> #include "servermd.h" -#if defined(XFREE86) || ( defined(__OpenBSD__) && defined(__alpha__) ) \ - || (defined(__bsdi__)) #include "compiler.h" -#endif /* * ========================================================================== @@ -834,42 +831,6 @@ if ((x) + (w) <= PPW) {\ *(destpix) = (*(psrcpix)) & QuartetPixelMaskTable[q]; \ } #if PSZ == 24 -# if 0 -#define getstipplepixels24(psrcstip,xt,w,ones,psrcpix,destpix,stipindex,srcindex,dstindex) \ -{ \ - PixelGroup q; \ - CfbBits src; \ - register unsigned int sidx; \ - register unsigned int didx; \ - sidx = ((srcindex) & 3)<<1; \ - didx = ((dstindex) & 3)<<1; \ - q = *(psrcstip) >> (xt); \ -/* if((srcindex)!=0)*/ \ -/* src = (((*(psrcpix)) << cfb24Shift[sidx]) & (cfbmask[sidx])) |*/ \ -/* (((*((psrcpix)+1)) << cfb24Shift[sidx+1]) & (cfbmask[sidx+1])); */\ -/* else */\ - src = (*(psrcpix))&0xFFFFFF; \ - if ( ((xt)+(w)) > PGSZ ) \ - q |= (*((psrcstip)+1)) << (PGSZ -(xt)); \ - q = QuartetBitsTable[(w)] & ((ones) ? q : ~q); \ - src &= QuartetPixelMaskTable[q]; \ - *(destpix) &= cfbrmask[didx]; \ - switch(didx) {\ - case 0: \ - *(destpix) |= (src &cfbmask[didx]); \ - break; \ - case 2: \ - case 4: \ - destpix++;didx++; \ - *(destpix) = ((*(destpix)) & (cfbrmask[didx]))| \ - (BitLeft(src, cfb24Shift[didx]) & (cfbmask[didx])); \ - destpix--; didx--;\ - case 6: \ - *(destpix) |= (BitRight(src, cfb24Shift[didx]) & cfbmask[didx]); \ - break; \ - }; \ -} -# else #define getstipplepixels24(psrcstip,xt,ones,psrcpix,destpix,stipindex) \ { \ PixelGroup q; \ @@ -877,7 +838,6 @@ if ((x) + (w) <= PPW) {\ q = ((ones) ? q : ~q) & 1; \ *(destpix) = (*(psrcpix)) & QuartetPixelMaskTable[q]; \ } -# endif #endif /* PSZ == 24 */ #endif diff --git a/xserver/cfb/cfbpixmap.c b/xserver/cfb/cfbpixmap.c index d51c5187c..1166f90b7 100644 --- a/xserver/cfb/cfbpixmap.c +++ b/xserver/cfb/cfbpixmap.c @@ -65,11 +65,12 @@ SOFTWARE. #include "cfbmskbits.h" PixmapPtr -cfbCreatePixmap (pScreen, width, height, depth) +cfbCreatePixmap (pScreen, width, height, depth, usage_hint) ScreenPtr pScreen; int width; int height; int depth; + unsigned usage_hint; { PixmapPtr pPixmap; size_t datasize; @@ -96,12 +97,9 @@ cfbCreatePixmap (pScreen, width, height, depth) pPixmap->drawable.height = height; pPixmap->devKind = paddedWidth; pPixmap->refcnt = 1; -#ifdef PIXPRIV pPixmap->devPrivate.ptr = datasize ? (pointer)((char *)pPixmap + pScreen->totalPixmapSize) : NULL; -#else - pPixmap->devPrivate.ptr = (pointer)(pPixmap + 1); -#endif + pPixmap->usage_hint = usage_hint; return pPixmap; } @@ -111,6 +109,7 @@ cfbDestroyPixmap(pPixmap) { if(--pPixmap->refcnt) return TRUE; + dixFreePrivates(pPixmap->devPrivates); xfree(pPixmap); return TRUE; } @@ -126,7 +125,7 @@ cfbCopyPixmap(pSrc) size = pSrc->drawable.height * pSrc->devKind; pScreen = pSrc->drawable.pScreen; pDst = (*pScreen->CreatePixmap) (pScreen, pSrc->drawable.width, - pSrc->drawable.height, pSrc->drawable.depth); + pSrc->drawable.height, pSrc->drawable.depth, 0); if (!pDst) return NullPixmap; memmove((char *)pDst->devPrivate.ptr, (char *)pSrc->devPrivate.ptr, size); @@ -273,7 +272,7 @@ cfbXRotatePixmap(pPix, rw) int size, tsize; tsize = PixmapBytePad(pPix->drawable.width - rot, pPix->drawable.depth); - pwTmp = (CfbBits *) ALLOCATE_LOCAL(pPix->drawable.height * tsize); + pwTmp = (CfbBits *) xalloc(pPix->drawable.height * tsize); if (!pwTmp) return; /* divide pw (the pixmap) in two vertically at (w - rot) and swap */ @@ -291,7 +290,7 @@ cfbXRotatePixmap(pPix, rw) 0, 0, rot, 0, (int)pPix->drawable.width - rot, (int)pPix->drawable.height, tsize, size); - DEALLOCATE_LOCAL(pwTmp); + xfree(pwTmp); #endif } } @@ -331,13 +330,13 @@ cfbYRotatePixmap(pPix, rh) nbyDown = rot * pPix->devKind; nbyUp = (pPix->devKind * pPix->drawable.height) - nbyDown; - if(!(ptmp = (char *)ALLOCATE_LOCAL(nbyUp))) + if(!(ptmp = (char *)xalloc(nbyUp))) return; memmove(ptmp, pbase, nbyUp); /* save the low rows */ memmove(pbase, pbase+nbyUp, nbyDown); /* slide the top rows down */ memmove(pbase+nbyDown, ptmp, nbyUp); /* move lower rows up to row rot */ - DEALLOCATE_LOCAL(ptmp); + xfree(ptmp); } void diff --git a/xserver/cfb/cfbpntwin.c b/xserver/cfb/cfbpntwin.c deleted file mode 100644 index 32f011e23..000000000 --- a/xserver/cfb/cfbpntwin.c +++ /dev/null @@ -1,768 +0,0 @@ -/*********************************************************** - -Copyright 1987, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software 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. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -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 name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include <dix-config.h> -#endif - -#include <X11/X.h> - -#include "windowstr.h" -#include "regionstr.h" -#include "pixmapstr.h" -#include "scrnintstr.h" - -#include "cfb.h" -#include "cfbmskbits.h" -#include "mi.h" - -#ifdef PANORAMIX -#include "panoramiX.h" -#include "panoramiXsrv.h" -#endif - -void -cfbPaintWindow(pWin, pRegion, what) - WindowPtr pWin; - RegionPtr pRegion; - int what; -{ - register cfbPrivWin *pPrivWin; - WindowPtr pBgWin; - - pPrivWin = cfbGetWindowPrivate(pWin); - - - switch (what) { - case PW_BACKGROUND: - switch (pWin->backgroundState) { - case None: - break; - case ParentRelative: - do { - pWin = pWin->parent; - } while (pWin->backgroundState == ParentRelative); - (*pWin->drawable.pScreen->PaintWindowBackground)(pWin, pRegion, - what); - break; - case BackgroundPixmap: - if (pPrivWin->fastBackground) - { - cfbFillBoxTile32 ((DrawablePtr)pWin, - (int)REGION_NUM_RECTS(pRegion), - REGION_RECTS(pRegion), - pPrivWin->pRotatedBackground); - } - else - { - int xorg = pWin->drawable.x; - int yorg = pWin->drawable.y; -#ifdef PANORAMIX - if(!noPanoramiXExtension) { - int index = pWin->drawable.pScreen->myNum; - if(WindowTable[index] == pWin) { - xorg -= panoramiXdataPtr[index].x; - yorg -= panoramiXdataPtr[index].y; - } - } -#endif - cfbFillBoxTileOdd ((DrawablePtr)pWin, - (int)REGION_NUM_RECTS(pRegion), - REGION_RECTS(pRegion), - pWin->background.pixmap, - xorg, yorg); - } - break; - case BackgroundPixel: - cfbFillBoxSolid ((DrawablePtr)pWin, - (int)REGION_NUM_RECTS(pRegion), - REGION_RECTS(pRegion), - pWin->background.pixel); - break; - } - break; - case PW_BORDER: - if (pWin->borderIsPixel) - { - cfbFillBoxSolid ((DrawablePtr)pWin, - (int)REGION_NUM_RECTS(pRegion), - REGION_RECTS(pRegion), - pWin->border.pixel); - } - else if (pPrivWin->fastBorder) - { - cfbFillBoxTile32 ((DrawablePtr)pWin, - (int)REGION_NUM_RECTS(pRegion), - REGION_RECTS(pRegion), - pPrivWin->pRotatedBorder); - } - else - { - int xorg, yorg; - - for (pBgWin = pWin; - pBgWin->backgroundState == ParentRelative; - pBgWin = pBgWin->parent); - - xorg = pBgWin->drawable.x; - yorg = pBgWin->drawable.y; - -#ifdef PANORAMIX - if(!noPanoramiXExtension) { - int index = pWin->drawable.pScreen->myNum; - if(WindowTable[index] == pBgWin) { - xorg -= panoramiXdataPtr[index].x; - yorg -= panoramiXdataPtr[index].y; - } - } -#endif - - cfbFillBoxTileOdd ((DrawablePtr)pWin, - (int)REGION_NUM_RECTS(pRegion), - REGION_RECTS(pRegion), - pWin->border.pixmap, - xorg, yorg); - } - break; - } -} - -/* - * Use the RROP macros in copy mode - */ - -#define RROP GXcopy -#include "cfbrrop.h" - -#ifdef RROP_UNROLL -# define Expand(left,right,leftAdjust) {\ - int part = nmiddle & RROP_UNROLL_MASK; \ - int widthStep; \ - widthStep = widthDst - nmiddle - leftAdjust; \ - nmiddle >>= RROP_UNROLL_SHIFT; \ - while (h--) { \ - left \ - pdst += part; \ - switch (part) { \ - RROP_UNROLL_CASE(pdst) \ - } \ - m = nmiddle; \ - while (m) { \ - pdst += RROP_UNROLL; \ - RROP_UNROLL_LOOP(pdst) \ - m--; \ - } \ - right \ - pdst += widthStep; \ - } \ -} - -#else -# define Expand(left, right, leftAdjust) { \ - int widthStep; \ - widthStep = widthDst - nmiddle - leftAdjust; \ - while (h--) { \ - left \ - m = nmiddle; \ - while (m--) {\ - RROP_SOLID(pdst); \ - pdst++; \ - } \ - right \ - pdst += widthStep; \ - } \ -} -#endif - -void -cfbFillBoxSolid (pDrawable, nBox, pBox, pixel) - DrawablePtr pDrawable; - int nBox; - BoxPtr pBox; - unsigned long pixel; -{ - CfbBits *pdstBase; - int widthDst; - register int h; - register CfbBits *pdst; - int nmiddle; - int w; -#if PSZ == 24 - int leftIndex, rightIndex; - CfbBits piQxelArray[3], *pdstULC; /*upper left corner*/ - - piQxelArray[0] = (pixel&0xFFFFFF) | ((pixel&0xFF)<<24); - piQxelArray[1] = ((pixel&0xFFFF00)>>8) | ((pixel&0xFFFF)<<16); - piQxelArray[2] = ((pixel&0xFFFFFF)<<8) | ((pixel&0xFF0000)>>16); -#else - register CfbBits rrop_xor; - register CfbBits leftMask, rightMask; - register int m; -#endif - - cfbGetLongWidthAndPointer(pDrawable, widthDst, pdstBase); - -#if PSZ != 24 - rrop_xor = PFILL(pixel); -#endif - for (; nBox; nBox--, pBox++) - { - pdst = pdstBase + pBox->y1 * widthDst; - h = pBox->y2 - pBox->y1; - w = pBox->x2 - pBox->x1; -#if PSZ == 8 - if (w == 1) - { - register char *pdstb = ((char *) pdst) + pBox->x1; - int incr = widthDst * PGSZB; - - while (h--) - { - *pdstb = rrop_xor; - pdstb += incr; - } - } - else - { -#endif -#if PSZ == 24 -/* _Box has x1, y1, x2, y2*/ - leftIndex = pBox->x1 & 3; - rightIndex = ((leftIndex+w)<5)?0:(pBox->x2 &3); - nmiddle = w - rightIndex; - if(leftIndex){ - nmiddle -= (4 - leftIndex); - } - nmiddle >>= 2; - if(nmiddle < 0) - nmiddle = 0; - - pdst = pdstBase + pBox->y1 * widthDst + ((pBox->x1*3) >> 2); - - switch(leftIndex+w){ - case 4: - switch(leftIndex){ - case 0: - while(h--){ - *pdst++ = piQxelArray[0]; - *pdst++ = piQxelArray[1]; - *pdst = piQxelArray[2]; - pdst -=2; - pdst += widthDst; - } - break; - case 1: - while(h--){ - *pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); - pdst++; - *pdst++ = piQxelArray[1]; - *pdst = piQxelArray[2]; - pdst -=2; - pdst += widthDst; - } - break; - case 2: - while(h--){ - *pdst = ((*pdst) & 0xFFFF) | (piQxelArray[1] & 0xFFFF0000); - pdst++; - *pdst-- = piQxelArray[2]; - pdst += widthDst; - } - break; - case 3: - while(h--){ - *pdst = ((*pdst) & 0xFF) | (piQxelArray[2] & 0xFFFFFF00); - pdst += widthDst; - } - break; - } - break; - case 3: - switch(leftIndex){ - case 0: - while(h--){ - *pdst++ = piQxelArray[0]; - *pdst++ = piQxelArray[1]; - *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF); - pdst--; - pdst--; - pdst += widthDst; - } - break; - case 1: - while(h--){ - *pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); - pdst++; - *pdst++ = piQxelArray[1]; - *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF); - pdst--; - pdst--; - pdst += widthDst; - } - break; - case 2: - while(h--){ - *pdst = ((*pdst) & 0xFFFF) | (piQxelArray[1] & 0xFFFF0000); - pdst++; - *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF); - pdst--; - pdst += widthDst; - } - break; - } - break; - case 2: - while(h--){ - if(leftIndex){ - *pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); - pdst++; - } - else{ - *pdst++ = piQxelArray[0]; - } - *pdst = ((*pdst) & 0xFFFF0000) | (piQxelArray[1] & 0xFFFF); - pdst--; - pdst += widthDst; - } - break; - case 1: /*only if leftIndex = 0 and w = 1*/ - while(h--){ - *pdst = ((*pdst) & 0xFF000000) | (piQxelArray[0] & 0xFFFFFF); - pdst += widthDst; - } - break; - case 0: /*never*/ - break; - default: - { - w = nmiddle; - pdstULC = pdst; -/* maskbits (pBox->x1, w, leftMask, rightMask, nmiddle);*/ - while(h--){ - nmiddle = w; - pdst = pdstULC; - switch(leftIndex){ - case 0: - break; - case 1: - *pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); - pdst++; - *pdst++ = piQxelArray[1]; - *pdst++ = piQxelArray[2]; - break; - case 2: - *pdst = ((*pdst) & 0xFFFF) | (piQxelArray[1] & 0xFFFF0000); - pdst++; - *pdst++ = piQxelArray[2]; - break; - case 3: - *pdst = ((*pdst) & 0xFF) | (piQxelArray[2] & 0xFFFFFF00); - pdst++; - break; - } - while(nmiddle--){ - *pdst++ = piQxelArray[0]; - *pdst++ = piQxelArray[1]; - *pdst++ = piQxelArray[2]; - } - switch(rightIndex){ - case 0: - break; - case 1: - *pdst = ((*pdst) & 0xFF000000) | (piQxelArray[0] & 0xFFFFFF); - break; - case 2: - *pdst++ = piQxelArray[0]; - *pdst = ((*pdst) & 0xFFFF0000) | (piQxelArray[1] & 0xFFFF); - break; - case 3: - *pdst++ = piQxelArray[0]; - *pdst++ = piQxelArray[1]; - *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF); - break; - } - pdstULC += widthDst; - } - - } - } -#else - pdst += (pBox->x1 >> PWSH); - if ((pBox->x1 & PIM) + w <= PPW) - { - maskpartialbits(pBox->x1, w, leftMask); - while (h--) { - *pdst = (*pdst & ~leftMask) | (rrop_xor & leftMask); - pdst += widthDst; - } - } - else - { - maskbits (pBox->x1, w, leftMask, rightMask, nmiddle); - if (leftMask) - { - if (rightMask) - { - Expand (RROP_SOLID_MASK (pdst, leftMask); pdst++; , - RROP_SOLID_MASK (pdst, rightMask); , - 1) - } - else - { - Expand (RROP_SOLID_MASK (pdst, leftMask); pdst++;, - ;, - 1) - } - } - else - { - if (rightMask) - { - Expand (;, - RROP_SOLID_MASK (pdst, rightMask);, - 0) - } - else - { - Expand (;, - ;, - 0) - } - } - } -#endif -#if PSZ == 8 - } -#endif - } -} - -void -cfbFillBoxTile32 (pDrawable, nBox, pBox, tile) - DrawablePtr pDrawable; - int nBox; /* number of boxes to fill */ - BoxPtr pBox; /* pointer to list of boxes to fill */ - PixmapPtr tile; /* rotated, expanded tile */ -{ - register CfbBits *pdst; - CfbBits *psrc; - int tileHeight; - - int widthDst; - int w; - int h; - int nmiddle; - int y; - int srcy; - - CfbBits *pdstBase; -#if PSZ == 24 - int leftIndex, rightIndex; - CfbBits piQxelArray[3], *pdstULC; -#else - register CfbBits rrop_xor; - register CfbBits leftMask; - register CfbBits rightMask; - register int m; -#endif - - tileHeight = tile->drawable.height; - psrc = (CfbBits *)tile->devPrivate.ptr; - - cfbGetLongWidthAndPointer (pDrawable, widthDst, pdstBase); - - while (nBox--) - { -#if PSZ == 24 - w = pBox->x2 - pBox->x1; - h = pBox->y2 - pBox->y1; - y = pBox->y1; - leftIndex = pBox->x1 & 3; -/* rightIndex = ((leftIndex+w)<5)?0:pBox->x2 &3;*/ - rightIndex = pBox->x2 &3; - nmiddle = w - rightIndex; - if(leftIndex){ - nmiddle -= (4 - leftIndex); - } - nmiddle >>= 2; - if(nmiddle < 0) - nmiddle = 0; - - pdst = pdstBase + ((pBox->x1 *3)>> 2) + pBox->y1 * widthDst; - srcy = y % tileHeight; - -#define StepTile piQxelArray[0] = (psrc[srcy] & 0xFFFFFF) | ((psrc[srcy] & 0xFF)<<24); \ - piQxelArray[1] = (psrc[srcy] & 0xFFFF00) | ((psrc[srcy] & 0xFFFF)<<16); \ - piQxelArray[2] = ((psrc[srcy] & 0xFF0000)>>16) | \ - ((psrc[srcy] & 0xFFFFFF)<<8); \ - /*rrop_xor = psrc[srcy];*/ \ - ++srcy; \ - if (srcy == tileHeight) \ - srcy = 0; - - switch(leftIndex+w){ - case 4: - switch(leftIndex){ - case 0: - while(h--){ - StepTile - *pdst++ = piQxelArray[0]; - *pdst++ = piQxelArray[1]; - *pdst = piQxelArray[2]; - pdst-=2; - pdst += widthDst; - } - break; - case 1: - while(h--){ - StepTile - *pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); - pdst++; - *pdst++ = piQxelArray[1]; - *pdst = piQxelArray[2]; - pdst-=2; - pdst += widthDst; - } - break; - case 2: - while(h--){ - StepTile - *pdst = ((*pdst) & 0xFFFF) | (piQxelArray[1] & 0xFFFF0000); - pdst++; - *pdst-- = piQxelArray[2]; - pdst += widthDst; - } - break; - case 3: - while(h--){ - StepTile - *pdst = ((*pdst) & 0xFF) | (piQxelArray[2] & 0xFFFFFF00); - pdst += widthDst; - } - break; - } - break; - case 3: - switch(leftIndex){ - case 0: - while(h--){ - StepTile - *pdst++ = piQxelArray[0]; - *pdst++ = piQxelArray[1]; - *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF); - pdst--; - pdst--; - pdst += widthDst; - } - break; - case 1: - while(h--){ - StepTile - *pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); - pdst++; - *pdst++ = piQxelArray[1]; - *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF); - pdst--; - pdst--; - pdst += widthDst; - } - break; - case 2: - while(h--){ - StepTile - *pdst = ((*pdst) & 0xFFFF) | (piQxelArray[1] & 0xFFFF0000); - pdst++; - *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF); - pdst--; - pdst += widthDst; - } - break; - } - break; - case 2: - while(h--){ - StepTile - if(leftIndex){ - *pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); - pdst++; - } - else{ - *pdst++ = piQxelArray[0]; - } - *pdst = ((*pdst) & 0xFFFF0000) | (piQxelArray[1] & 0xFFFF); - pdst--; - pdst += widthDst; - } - break; - case 1: /*only if leftIndex = 0 and w = 1*/ - while(h--){ - StepTile - *pdst = ((*pdst) & 0xFF000000) | (piQxelArray[0] & 0xFFFFFF); - pdst += widthDst; - } - break; - case 0: /*never*/ - break; - default: - { - w = nmiddle; - pdstULC = pdst; - - while(h--){ - StepTile - nmiddle = w; - pdst = pdstULC; - switch(leftIndex){ - case 0: - break; - case 1: - *pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); - pdst++; - *pdst++ = piQxelArray[1]; - *pdst++ = piQxelArray[2]; - break; - case 2: - *pdst = ((*pdst) & 0xFFFF) | (piQxelArray[1] & 0xFFFF0000); - pdst++; - *pdst++ = piQxelArray[2]; - break; - case 3: - *pdst = ((*pdst) & 0xFF) | (piQxelArray[2] & 0xFFFFFF00); - pdst++; - break; - } - while(nmiddle--){ - *pdst++ = piQxelArray[0]; - *pdst++ = piQxelArray[1]; - *pdst++ = piQxelArray[2]; - } - switch(rightIndex){ - case 0: - break; - case 1: - *pdst = ((*pdst) & 0xFF000000) | (piQxelArray[0] & 0xFFFFFF); - break; - case 2: - *pdst++ = piQxelArray[0]; - *pdst = ((*pdst) & 0xFFFF0000) | (piQxelArray[1] & 0xFFFF); - break; - case 3: - *pdst++ = piQxelArray[0]; - *pdst++ = piQxelArray[1]; - *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF); - break; - } - pdstULC += widthDst; - } - } - } -#else - w = pBox->x2 - pBox->x1; - h = pBox->y2 - pBox->y1; - y = pBox->y1; - pdst = pdstBase + (pBox->y1 * widthDst) + (pBox->x1 >> PWSH); - srcy = y % tileHeight; - -#define StepTile rrop_xor = psrc[srcy]; \ - ++srcy; \ - if (srcy == tileHeight) \ - srcy = 0; - - if ( ((pBox->x1 & PIM) + w) < PPW) - { - maskpartialbits(pBox->x1, w, leftMask); - rightMask = ~leftMask; - while (h--) - { - StepTile - *pdst = (*pdst & rightMask) | (rrop_xor & leftMask); - pdst += widthDst; - } - } - else - { - maskbits(pBox->x1, w, leftMask, rightMask, nmiddle); - - if (leftMask) - { - if (rightMask) - { - Expand (StepTile - RROP_SOLID_MASK(pdst, leftMask); pdst++;, - RROP_SOLID_MASK(pdst, rightMask);, - 1) - } - else - { - Expand (StepTile - RROP_SOLID_MASK(pdst, leftMask); pdst++;, - ;, - 1) - } - } - else - { - if (rightMask) - { - Expand (StepTile - , - RROP_SOLID_MASK(pdst, rightMask);, - 0) - } - else - { - Expand (StepTile - , - ;, - 0) - } - } - } -#endif - pBox++; - } -} diff --git a/xserver/cfb/cfbrrop.h b/xserver/cfb/cfbrrop.h index eeb373a5e..e9ca881be 100644 --- a/xserver/cfb/cfbrrop.h +++ b/xserver/cfb/cfbrrop.h @@ -35,7 +35,8 @@ in this Software without prior written authorization from The Open Group. #endif #define RROP_FETCH_GC(gc) \ - RROP_FETCH_GCPRIV(((cfbPrivGCPtr)(gc)->devPrivates[cfbGCPrivateIndex].ptr)) + RROP_FETCH_GCPRIV((cfbPrivGCPtr)dixLookupPrivate(&(gc)->devPrivates, \ + cfbGCPrivateKey)) #ifndef RROP #define RROP GXset diff --git a/xserver/cfb/cfbscrinit.c b/xserver/cfb/cfbscrinit.c index 9f411ab27..6f9ba2e85 100644 --- a/xserver/cfb/cfbscrinit.c +++ b/xserver/cfb/cfbscrinit.c @@ -46,14 +46,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "cfbmskbits.h" #include "mibstore.h" -BSFuncRec cfbBSFuncRec = { - cfbSaveAreas, - cfbRestoreAreas, - (BackingStoreSetClipmaskRgnProcPtr) 0, - (BackingStoreGetImagePixmapProcPtr) 0, - (BackingStoreGetSpansPixmapProcPtr) 0, -}; - Bool cfbCloseScreen (index, pScreen) int index; @@ -67,7 +59,7 @@ cfbCloseScreen (index, pScreen) xfree (depths); xfree (pScreen->visuals); #ifdef CFB_NEED_SCREEN_PRIVATE - xfree (pScreen->devPrivates[cfbScreenPrivateIndex].ptr); + xfree (dixLookupPrivate(&pScreen->devPrivates, cfbScreenPrivateKey)); #else xfree (pScreen->devPrivate); #endif @@ -96,7 +88,7 @@ cfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width) int dpix, dpiy; /* dots per inch */ int width; /* pixel width of frame buffer */ { - if (!cfbAllocatePrivates(pScreen, (int *) 0, (int *) 0)) + if (!cfbAllocatePrivates(pScreen, NULL)) return FALSE; pScreen->defColormap = FakeClientID(0); /* let CreateDefColormap do whatever it wants for pixels */ @@ -111,8 +103,6 @@ cfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width) pScreen->ChangeWindowAttributes = cfbChangeWindowAttributes; pScreen->RealizeWindow = cfbMapWindow; pScreen->UnrealizeWindow = cfbUnmapWindow; - pScreen->PaintWindowBackground = cfbPaintWindow; - pScreen->PaintWindowBorder = cfbPaintWindow; pScreen->CopyWindow = cfbCopyWindow; pScreen->CreatePixmap = cfbCreatePixmap; pScreen->DestroyPixmap = cfbDestroyPixmap; @@ -140,9 +130,11 @@ cfbCreateScreenResources(pScreen) Bool retval; pointer oldDevPrivate = pScreen->devPrivate; - pScreen->devPrivate = pScreen->devPrivates[cfbScreenPrivateIndex].ptr; + pScreen->devPrivate = dixLookupPrivate(&pScreen->devPrivates, + cfbScreenPrivateKey); retval = miCreateScreenResources(pScreen); - pScreen->devPrivates[cfbScreenPrivateIndex].ptr = pScreen->devPrivate; + dixSetPrivate(&pScreen->devPrivates, cfbScreenPrivateKey, + pScreen->devPrivate); pScreen->devPrivate = oldDevPrivate; return retval; } @@ -181,10 +173,10 @@ cfbFinishScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width) pScreen->CloseScreen = cfbCloseScreen; #ifdef CFB_NEED_SCREEN_PRIVATE pScreen->CreateScreenResources = cfbCreateScreenResources; - pScreen->devPrivates[cfbScreenPrivateIndex].ptr = pScreen->devPrivate; + dixSetPrivate(&pScreen->devPrivates, cfbScreenPrivateKey, + pScreen->devPrivate); pScreen->devPrivate = oldDevPrivate; #endif - pScreen->BackingStoreFuncs = cfbBSFuncRec; pScreen->GetScreenPixmap = cfbGetScreenPixmap; pScreen->SetScreenPixmap = cfbSetScreenPixmap; return TRUE; @@ -209,7 +201,8 @@ cfbGetScreenPixmap(pScreen) ScreenPtr pScreen; { #ifdef CFB_NEED_SCREEN_PRIVATE - return (PixmapPtr)pScreen->devPrivates[cfbScreenPrivateIndex].ptr; + return (PixmapPtr)dixLookupPrivate(&pScreen->devPrivates, + cfbScreenPrivateKey); #else return (PixmapPtr)pScreen->devPrivate; #endif @@ -221,8 +214,8 @@ cfbSetScreenPixmap(pPix) { #ifdef CFB_NEED_SCREEN_PRIVATE if (pPix) - pPix->drawable.pScreen->devPrivates[cfbScreenPrivateIndex].ptr = - (pointer)pPix; + dixSetPrivate(&pPix->drawable.pScreen->devPrivates, + cfbScreenPrivateKey, pPix); #else if (pPix) pPix->drawable.pScreen->devPrivate = (pointer)pPix; diff --git a/xserver/cfb/cfbsolid.c b/xserver/cfb/cfbsolid.c index f0da05ef0..6b8238dd9 100644 --- a/xserver/cfb/cfbsolid.c +++ b/xserver/cfb/cfbsolid.c @@ -811,12 +811,12 @@ RROP_NAME(cfbSolidSpans) (pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) devPriv = cfbGetGCPrivate(pGC); RROP_FETCH_GCPRIV(devPriv) n = nInit * miFindMaxBand(pGC->pCompositeClip); - pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); - pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); + pwidthFree = (int *)xalloc(n * sizeof(int)); + pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec)); if(!pptFree || !pwidthFree) { - if (pptFree) DEALLOCATE_LOCAL(pptFree); - if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); + if (pptFree) xfree(pptFree); + if (pwidthFree) xfree(pwidthFree); return; } pwidth = pwidthFree; @@ -1359,7 +1359,7 @@ RROP_NAME(cfbSolidSpans) (pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) } #endif } - DEALLOCATE_LOCAL(pptFree); - DEALLOCATE_LOCAL(pwidthFree); + xfree(pptFree); + xfree(pwidthFree); RROP_UNDECLARE } diff --git a/xserver/cfb/cfbtab.h b/xserver/cfb/cfbtab.h deleted file mode 100644 index d95efd66d..000000000 --- a/xserver/cfb/cfbtab.h +++ /dev/null @@ -1,16 +0,0 @@ -/* $XFree86$ */ - -#ifdef HAVE_DIX_CONFIG_H -#include <dix-config.h> -#endif - -#ifndef _CFBTAB_H_ -#define _CFBTAB_H_ - -/* prototypes */ -#if 0 -extern int starttab[32], endtab[32]; -extern unsigned int partmasks[32][32]; -#endif - -#endif /* _CFBTAB_H_ */ diff --git a/xserver/cfb/cfbtile32.c b/xserver/cfb/cfbtile32.c index fb6a10613..be016a70a 100644 --- a/xserver/cfb/cfbtile32.c +++ b/xserver/cfb/cfbtile32.c @@ -1,5 +1,5 @@ /* - * Fill 32 bit tiled rectangles. Used by both PolyFillRect and PaintWindow. + * Fill 32 bit tiled rectangles. Used by PolyFillRect. * no depth dependencies. */ @@ -367,12 +367,12 @@ MROP_NAME(cfbTile32FS)(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) #endif n = nInit * miFindMaxBand( cfbGetCompositeClip(pGC) ); - pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); - pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); + pwidthFree = (int *)xalloc(n * sizeof(int)); + pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec)); if(!pptFree || !pwidthFree) { - if (pptFree) DEALLOCATE_LOCAL(pptFree); - if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); + if (pptFree) xfree(pptFree); + if (pwidthFree) xfree(pwidthFree); return; } pwidth = pwidthFree; @@ -512,6 +512,6 @@ MROP_NAME(cfbTile32FS)(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) } } } - DEALLOCATE_LOCAL(pptFree); - DEALLOCATE_LOCAL(pwidthFree); + xfree(pptFree); + xfree(pwidthFree); } diff --git a/xserver/cfb/cfbunmap.h b/xserver/cfb/cfbunmap.h index 61c7fc942..db9889217 100644 --- a/xserver/cfb/cfbunmap.h +++ b/xserver/cfb/cfbunmap.h @@ -74,8 +74,6 @@ #undef cfbDoBitbltOr #undef cfbDoBitbltXor #undef cfbExpandDirectColors -#undef cfbFillBoxSolid -#undef cfbFillBoxTile32 #undef cfbFillBoxTile32sCopy #undef cfbFillBoxTile32sGeneral #undef cfbFillBoxTileOdd @@ -95,7 +93,7 @@ #undef cfbFillSpanTileOddGeneral #undef cfbFinishScreenInit #undef cfbGCFuncs -#undef cfbGCPrivateIndex +#undef cfbGCPrivateKey #undef cfbGetImage #undef cfbGetScreenPixmap #undef cfbGetSpans @@ -112,7 +110,6 @@ #undef cfbNonTEOps #undef cfbNonTEOps1Rect #undef cfbPadPixmap -#undef cfbPaintWindow #undef cfbPolyFillArcSolidCopy #undef cfbPolyFillArcSolidGeneral #undef cfbPolyFillRect @@ -126,7 +123,7 @@ #undef cfbRestoreAreas #undef cfbSaveAreas #undef cfbScreenInit -#undef cfbScreenPrivateIndex +#undef cfbScreenPrivateKey #undef cfbSegmentSD #undef cfbSegmentSS #undef cfbSetScanline @@ -150,7 +147,7 @@ #undef cfbUnnaturalTileFS #undef cfbValidateGC #undef cfbVertS -#undef cfbWindowPrivateIndex +#undef cfbWindowPrivateKey #undef cfbXRotatePixmap #undef cfbYRotatePixmap #undef cfbZeroPolyArcSS8Copy diff --git a/xserver/cfb/cfbwindow.c b/xserver/cfb/cfbwindow.c index e04b73df2..50728764e 100644 --- a/xserver/cfb/cfbwindow.c +++ b/xserver/cfb/cfbwindow.c @@ -60,40 +60,20 @@ SOFTWARE. #include "cfbmskbits.h" Bool -cfbCreateWindow(pWin) - WindowPtr pWin; +cfbCreateWindow(WindowPtr pWin) { - cfbPrivWin *pPrivWin; - - pPrivWin = cfbGetWindowPrivate(pWin); - pPrivWin->pRotatedBorder = NullPixmap; - pPrivWin->pRotatedBackground = NullPixmap; - pPrivWin->fastBackground = FALSE; - pPrivWin->fastBorder = FALSE; - pPrivWin->oldRotate.x = 0; - pPrivWin->oldRotate.y = 0; - #ifdef PIXMAP_PER_WINDOW /* Setup pointer to Screen pixmap */ - pWin->devPrivates[frameWindowPrivateIndex].ptr = - (pointer) cfbGetScreenPixmap(pWin->drawable.pScreen); + dixSetPrivate(&pWin->devPrivates, frameWindowPrivateKey, + cfbGetScreenPixmap(pWin->drawable.pScreen)); #endif return TRUE; } Bool -cfbDestroyWindow(pWin) - WindowPtr pWin; +cfbDestroyWindow(WindowPtr pWin) { - cfbPrivWin *pPrivWin; - - pPrivWin = cfbGetWindowPrivate(pWin); - - if (pPrivWin->pRotatedBorder) - (*pWin->drawable.pScreen->DestroyPixmap)(pPrivWin->pRotatedBorder); - if (pPrivWin->pRotatedBackground) - (*pWin->drawable.pScreen->DestroyPixmap)(pPrivWin->pRotatedBackground); return(TRUE); } @@ -105,47 +85,10 @@ cfbMapWindow(pWindow) return(TRUE); } -/* (x, y) is the upper left corner of the window on the screen - do we really need to pass this? (is it a;ready in pWin->absCorner?) - we only do the rotation for pixmaps that are 32 bits wide (padded -or otherwise.) - cfbChangeWindowAttributes() has already put a copy of the pixmap -in pPrivWin->pRotated* -*/ /*ARGSUSED*/ Bool -cfbPositionWindow(pWin, x, y) - WindowPtr pWin; - int x, y; +cfbPositionWindow(WindowPtr pWin, int x, int y) { - cfbPrivWin *pPrivWin; - int setxy = 0; - - pPrivWin = cfbGetWindowPrivate(pWin); - if (pWin->backgroundState == BackgroundPixmap && pPrivWin->fastBackground) - { - cfbXRotatePixmap(pPrivWin->pRotatedBackground, - pWin->drawable.x - pPrivWin->oldRotate.x); - cfbYRotatePixmap(pPrivWin->pRotatedBackground, - pWin->drawable.y - pPrivWin->oldRotate.y); - setxy = 1; - } - - if (!pWin->borderIsPixel && pPrivWin->fastBorder) - { - while (pWin->backgroundState == ParentRelative) - pWin = pWin->parent; - cfbXRotatePixmap(pPrivWin->pRotatedBorder, - pWin->drawable.x - pPrivWin->oldRotate.x); - cfbYRotatePixmap(pPrivWin->pRotatedBorder, - pWin->drawable.y - pPrivWin->oldRotate.y); - setxy = 1; - } - if (setxy) - { - pPrivWin->oldRotate.x = pWin->drawable.x; - pPrivWin->oldRotate.y = pWin->drawable.y; - } return (TRUE); } @@ -190,7 +133,7 @@ cfbCopyWindow(pWin, ptOldOrg, prgnSrc) pbox = REGION_RECTS(&rgnDst); nbox = REGION_NUM_RECTS(&rgnDst); - if(!nbox || !(pptSrc = (DDXPointPtr )ALLOCATE_LOCAL(nbox * sizeof(DDXPointRec)))) + if(!nbox || !(pptSrc = (DDXPointPtr )xalloc(nbox * sizeof(DDXPointRec)))) { REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); return; @@ -205,133 +148,13 @@ cfbCopyWindow(pWin, ptOldOrg, prgnSrc) cfbDoBitbltCopy((DrawablePtr)pwinRoot, (DrawablePtr)pwinRoot, GXcopy, &rgnDst, pptSrc, ~0L); - DEALLOCATE_LOCAL(pptSrc); + xfree(pptSrc); REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); } - - -/* swap in correct PaintWindow* routine. If we can use a fast output -routine (i.e. the pixmap is paddable to 32 bits), also pre-rotate a copy -of it in devPrivates[cfbWindowPrivateIndex].ptr. -*/ Bool -cfbChangeWindowAttributes(pWin, mask) - WindowPtr pWin; - unsigned long mask; +cfbChangeWindowAttributes(WindowPtr pWin, unsigned long mask) { - register unsigned long index; - register cfbPrivWin *pPrivWin; - int width; - WindowPtr pBgWin; - - pPrivWin = cfbGetWindowPrivate(pWin); - - /* - * When background state changes from ParentRelative and - * we had previously rotated the fast border pixmap to match - * the parent relative origin, rerotate to match window - */ - if (mask & (CWBackPixmap | CWBackPixel) && - pWin->backgroundState != ParentRelative && - pPrivWin->fastBorder && - (pPrivWin->oldRotate.x != pWin->drawable.x || - pPrivWin->oldRotate.y != pWin->drawable.y)) - { - cfbXRotatePixmap(pPrivWin->pRotatedBorder, - pWin->drawable.x - pPrivWin->oldRotate.x); - cfbYRotatePixmap(pPrivWin->pRotatedBorder, - pWin->drawable.y - pPrivWin->oldRotate.y); - pPrivWin->oldRotate.x = pWin->drawable.x; - pPrivWin->oldRotate.y = pWin->drawable.y; - } - while(mask) - { - index = lowbit (mask); - mask &= ~index; - switch(index) - { - case CWBackPixmap: - if (pWin->backgroundState == None) - { - pPrivWin->fastBackground = FALSE; - } - else if (pWin->backgroundState == ParentRelative) - { - pPrivWin->fastBackground = FALSE; - /* Rotate border to match parent origin */ - if (pPrivWin->pRotatedBorder) { - for (pBgWin = pWin->parent; - pBgWin->backgroundState == ParentRelative; - pBgWin = pBgWin->parent); - cfbXRotatePixmap(pPrivWin->pRotatedBorder, - pBgWin->drawable.x - pPrivWin->oldRotate.x); - cfbYRotatePixmap(pPrivWin->pRotatedBorder, - pBgWin->drawable.y - pPrivWin->oldRotate.y); - pPrivWin->oldRotate.x = pBgWin->drawable.x; - pPrivWin->oldRotate.y = pBgWin->drawable.y; - } - } - else if (((width = (pWin->background.pixmap->drawable.width * PSZ)) - <= PGSZ) && !(width & (width - 1))) - { - cfbCopyRotatePixmap(pWin->background.pixmap, - &pPrivWin->pRotatedBackground, - pWin->drawable.x, - pWin->drawable.y); - if (pPrivWin->pRotatedBackground) - { - pPrivWin->fastBackground = TRUE; - pPrivWin->oldRotate.x = pWin->drawable.x; - pPrivWin->oldRotate.y = pWin->drawable.y; - } - else - { - pPrivWin->fastBackground = FALSE; - } - } - else - { - pPrivWin->fastBackground = FALSE; - } - break; - - case CWBackPixel: - pPrivWin->fastBackground = FALSE; - break; - - case CWBorderPixmap: - if (((width = (pWin->border.pixmap->drawable.width * PSZ)) <= PGSZ) && - !(width & (width - 1))) - { - for (pBgWin = pWin; - pBgWin->backgroundState == ParentRelative; - pBgWin = pBgWin->parent); - cfbCopyRotatePixmap(pWin->border.pixmap, - &pPrivWin->pRotatedBorder, - pBgWin->drawable.x, - pBgWin->drawable.y); - if (pPrivWin->pRotatedBorder) - { - pPrivWin->fastBorder = TRUE; - pPrivWin->oldRotate.x = pBgWin->drawable.x; - pPrivWin->oldRotate.y = pBgWin->drawable.y; - } - else - { - pPrivWin->fastBorder = FALSE; - } - } - else - { - pPrivWin->fastBorder = FALSE; - } - break; - case CWBorderPixel: - pPrivWin->fastBorder = FALSE; - break; - } - } return (TRUE); } |