diff options
author | marha <marha@users.sourceforge.net> | 2009-06-28 22:07:26 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-06-28 22:07:26 +0000 |
commit | 3562e78743202e43aec8727005182a2558117eca (patch) | |
tree | 8f9113a77d12470c5c851a2a8e4cb02e89df7d43 /xorg-server/hw/xfree86/xf8_32bpp | |
download | vcxsrv-3562e78743202e43aec8727005182a2558117eca.tar.gz vcxsrv-3562e78743202e43aec8727005182a2558117eca.tar.bz2 vcxsrv-3562e78743202e43aec8727005182a2558117eca.zip |
Checked in the following released items:
xkeyboard-config-1.4.tar.gz
ttf-bitstream-vera-1.10.tar.gz
font-alias-1.0.1.tar.gz
font-sun-misc-1.0.0.tar.gz
font-sun-misc-1.0.0.tar.gz
font-sony-misc-1.0.0.tar.gz
font-schumacher-misc-1.0.0.tar.gz
font-mutt-misc-1.0.0.tar.gz
font-misc-misc-1.0.0.tar.gz
font-misc-meltho-1.0.0.tar.gz
font-micro-misc-1.0.0.tar.gz
font-jis-misc-1.0.0.tar.gz
font-isas-misc-1.0.0.tar.gz
font-dec-misc-1.0.0.tar.gz
font-daewoo-misc-1.0.0.tar.gz
font-cursor-misc-1.0.0.tar.gz
font-arabic-misc-1.0.0.tar.gz
font-winitzki-cyrillic-1.0.0.tar.gz
font-misc-cyrillic-1.0.0.tar.gz
font-cronyx-cyrillic-1.0.0.tar.gz
font-screen-cyrillic-1.0.1.tar.gz
font-xfree86-type1-1.0.1.tar.gz
font-adobe-utopia-type1-1.0.1.tar.gz
font-ibm-type1-1.0.0.tar.gz
font-bitstream-type1-1.0.0.tar.gz
font-bitstream-speedo-1.0.0.tar.gz
font-bh-ttf-1.0.0.tar.gz
font-bh-type1-1.0.0.tar.gz
font-bitstream-100dpi-1.0.0.tar.gz
font-bh-lucidatypewriter-100dpi-1.0.0.tar.gz
font-bh-100dpi-1.0.0.tar.gz
font-adobe-utopia-100dpi-1.0.1.tar.gz
font-adobe-100dpi-1.0.0.tar.gz
font-util-1.0.1.tar.gz
font-bitstream-75dpi-1.0.0.tar.gz
font-bh-lucidatypewriter-75dpi-1.0.0.tar.gz
font-adobe-utopia-75dpi-1.0.1.tar.gz
font-bh-75dpi-1.0.0.tar.gz
bdftopcf-1.0.1.tar.gz
font-adobe-75dpi-1.0.0.tar.gz
mkfontscale-1.0.6.tar.gz
openssl-0.9.8k.tar.gz
bigreqsproto-1.0.2.tar.gz
xtrans-1.2.2.tar.gz
resourceproto-1.0.2.tar.gz
inputproto-1.4.4.tar.gz
compositeproto-0.4.tar.gz
damageproto-1.1.0.tar.gz
zlib-1.2.3.tar.gz
xkbcomp-1.0.5.tar.gz
freetype-2.3.9.tar.gz
pthreads-w32-2-8-0-release.tar.gz
pixman-0.12.0.tar.gz
kbproto-1.0.3.tar.gz
evieext-1.0.2.tar.gz
fixesproto-4.0.tar.gz
recordproto-1.13.2.tar.gz
randrproto-1.2.2.tar.gz
scrnsaverproto-1.1.0.tar.gz
renderproto-0.9.3.tar.gz
xcmiscproto-1.1.2.tar.gz
fontsproto-2.0.2.tar.gz
xextproto-7.0.3.tar.gz
xproto-7.0.14.tar.gz
libXdmcp-1.0.2.tar.gz
libxkbfile-1.0.5.tar.gz
libfontenc-1.0.4.tar.gz
libXfont-1.3.4.tar.gz
libX11-1.1.5.tar.gz
libXau-1.0.4.tar.gz
libxcb-1.1.tar.gz
xorg-server-1.5.3.tar.gz
Diffstat (limited to 'xorg-server/hw/xfree86/xf8_32bpp')
-rw-r--r-- | xorg-server/hw/xfree86/xf8_32bpp/Makefile.am | 37 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/xf8_32bpp/Makefile.in | 739 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/xf8_32bpp/cfb8_32.h | 191 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/xf8_32bpp/cfb8_32module.c | 39 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/xf8_32bpp/cfbcpyarea.c | 549 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/xf8_32bpp/cfbcpyplane.c | 41 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/xf8_32bpp/cfbgc.c | 646 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/xf8_32bpp/cfbgc32.c | 2 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/xf8_32bpp/cfbgc8.c | 2 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/xf8_32bpp/cfbgcmisc.c | 150 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/xf8_32bpp/cfbgcunder.c | 620 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/xf8_32bpp/cfbimage.c | 174 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/xf8_32bpp/cfbpntwin.c | 51 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/xf8_32bpp/cfbscrinit.c | 311 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/xf8_32bpp/cfbwindow.c | 116 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/xf8_32bpp/xf86overlay.c | 1179 |
16 files changed, 4847 insertions, 0 deletions
diff --git a/xorg-server/hw/xfree86/xf8_32bpp/Makefile.am b/xorg-server/hw/xfree86/xf8_32bpp/Makefile.am new file mode 100644 index 000000000..6f51a628e --- /dev/null +++ b/xorg-server/hw/xfree86/xf8_32bpp/Makefile.am @@ -0,0 +1,37 @@ +module_LTLIBRARIES = libxf8_32bpp.la + +sdk_HEADERS = cfb8_32.h + +INCLUDES = $(XORG_INCS) -I$(top_srcdir)/mfb -I$(top_srcdir)/cfb + +AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) + +libxf8_32bpp_la_LDFLAGS = -avoid-version + +libxf8_32bpp_la_SOURCES = \ + cfbcpyarea.c \ + cfbcpyplane.c \ + cfbgcmisc.c \ + cfbimage.c \ + cfbpntwin.c \ + cfbscrinit.c \ + cfbwindow.c \ + xf86overlay.c \ + cfb8_32module.c \ + cfbgc8.c \ + cfbgc32.c \ + cfbgcunder.c + +libxf8_32bpp_la_LIBADD = $(top_builddir)/cfb32/libcfb32.la + +EXTRA_DIST = cfbgc.c + +cfbgc8.c: $(srcdir)/cfbgc.c + echo '#define PSZ 8' > $@ + echo '#include "$(srcdir)/cfbgc.c"' >> $@ + +cfbgc32.c: $(srcdir)/cfbgc.c + echo '#define PSZ 32' > $@ + echo '#include "$(srcdir)/cfbgc.c"' >> $@ + +DISTCLEANFILES = cfbgc8.c cfbgc32.c diff --git a/xorg-server/hw/xfree86/xf8_32bpp/Makefile.in b/xorg-server/hw/xfree86/xf8_32bpp/Makefile.in new file mode 100644 index 000000000..5bea22162 --- /dev/null +++ b/xorg-server/hw/xfree86/xf8_32bpp/Makefile.in @@ -0,0 +1,739 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = hw/xfree86/xf8_32bpp +DIST_COMMON = $(sdk_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/xgl-config.h \ + $(top_builddir)/include/xorg-config.h \ + $(top_builddir)/include/xkb-config.h \ + $(top_builddir)/include/xwin-config.h \ + $(top_builddir)/include/kdrive-config.h +CONFIG_CLEAN_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(sdkdir)" +moduleLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(module_LTLIBRARIES) +libxf8_32bpp_la_DEPENDENCIES = $(top_builddir)/cfb32/libcfb32.la +am_libxf8_32bpp_la_OBJECTS = cfbcpyarea.lo cfbcpyplane.lo cfbgcmisc.lo \ + cfbimage.lo cfbpntwin.lo cfbscrinit.lo cfbwindow.lo \ + xf86overlay.lo cfb8_32module.lo cfbgc8.lo cfbgc32.lo \ + cfbgcunder.lo +libxf8_32bpp_la_OBJECTS = $(am_libxf8_32bpp_la_OBJECTS) +libxf8_32bpp_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libxf8_32bpp_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libxf8_32bpp_la_SOURCES) +DIST_SOURCES = $(libxf8_32bpp_la_SOURCES) +sdkHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(sdk_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +APPDEFAULTDIR = @APPDEFAULTDIR@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_LIBS = @DGA_LIBS@ +DIX_CFLAGS = @DIX_CFLAGS@ +DLLTOOL = @DLLTOOL@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ +DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DSYMUTIL = @DSYMUTIL@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ +GLX_DEFINES = @GLX_DEFINES@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +LAUNCHD = @LAUNCHD@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MESA_SOURCE = @MESA_SOURCE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ +MKFONTDIR = @MKFONTDIR@ +MKFONTSCALE = @MKFONTSCALE@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +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@ +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@ +PKG_CONFIG = @PKG_CONFIG@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +SED = @SED@ +SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +STRIP = @STRIP@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +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@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +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@ +XEGL_LIBS = @XEGL_LIBS@ +XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ +XGLMODULES_LIBS = @XGLMODULES_LIBS@ +XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ +XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ +XGLX_LIBS = @XGLX_LIBS@ +XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ +XGL_LIBS = @XGL_LIBS@ +XGL_MODULE_PATH = @XGL_MODULE_PATH@ +XGL_SYS_LIBS = @XGL_SYS_LIBS@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_LIBS = @XNEST_LIBS@ +XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ +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_CFLAGS = @XORG_CFLAGS@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +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@ +XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ +XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ +XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ +XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_LIBS = @XSERVER_LIBS@ +XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abi_ansic = @abi_ansic@ +abi_extension = @abi_extension@ +abi_font = @abi_font@ +abi_videodrv = @abi_videodrv@ +abi_xinput = @abi_xinput@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverdir = @driverdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extdir = @extdir@ +ft_config = @ft_config@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +launchagentsdir = @launchagentsdir@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +logdir = @logdir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +moduledir = @moduledir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sdkdir = @sdkdir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xglmoduledir = @xglmoduledir@ +xpconfigdir = @xpconfigdir@ +module_LTLIBRARIES = libxf8_32bpp.la +sdk_HEADERS = cfb8_32.h +INCLUDES = $(XORG_INCS) -I$(top_srcdir)/mfb -I$(top_srcdir)/cfb +AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) +libxf8_32bpp_la_LDFLAGS = -avoid-version +libxf8_32bpp_la_SOURCES = \ + cfbcpyarea.c \ + cfbcpyplane.c \ + cfbgcmisc.c \ + cfbimage.c \ + cfbpntwin.c \ + cfbscrinit.c \ + cfbwindow.c \ + xf86overlay.c \ + cfb8_32module.c \ + cfbgc8.c \ + cfbgc32.c \ + cfbgcunder.c + +libxf8_32bpp_la_LIBADD = $(top_builddir)/cfb32/libcfb32.la +EXTRA_DIST = cfbgc.c +DISTCLEANFILES = cfbgc8.c cfbgc32.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/xf8_32bpp/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign hw/xfree86/xf8_32bpp/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-moduleLTLIBRARIES: $(module_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(moduledir)" || $(MKDIR_P) "$(DESTDIR)$(moduledir)" + @list='$(module_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(moduleLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(moduledir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(moduleLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(moduledir)/$$f"; \ + else :; fi; \ + done + +uninstall-moduleLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(module_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(moduledir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(moduledir)/$$p"; \ + done + +clean-moduleLTLIBRARIES: + -test -z "$(module_LTLIBRARIES)" || rm -f $(module_LTLIBRARIES) + @list='$(module_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libxf8_32bpp.la: $(libxf8_32bpp_la_OBJECTS) $(libxf8_32bpp_la_DEPENDENCIES) + $(libxf8_32bpp_la_LINK) -rpath $(moduledir) $(libxf8_32bpp_la_OBJECTS) $(libxf8_32bpp_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfb8_32module.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbcpyarea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbcpyplane.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbgc32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbgc8.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbgcmisc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbgcunder.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbimage.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbpntwin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbscrinit.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbwindow.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86overlay.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-sdkHEADERS: $(sdk_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(sdkdir)" || $(MKDIR_P) "$(DESTDIR)$(sdkdir)" + @list='$(sdk_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(sdkHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(sdkdir)/$$f'"; \ + $(sdkHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(sdkdir)/$$f"; \ + done + +uninstall-sdkHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(sdk_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(sdkdir)/$$f'"; \ + rm -f "$(DESTDIR)$(sdkdir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(sdkdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-moduleLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-moduleLTLIBRARIES install-sdkHEADERS + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-moduleLTLIBRARIES uninstall-sdkHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-moduleLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-moduleLTLIBRARIES install-pdf install-pdf-am \ + install-ps install-ps-am install-sdkHEADERS install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-moduleLTLIBRARIES \ + uninstall-sdkHEADERS + + +cfbgc8.c: $(srcdir)/cfbgc.c + echo '#define PSZ 8' > $@ + echo '#include "$(srcdir)/cfbgc.c"' >> $@ + +cfbgc32.c: $(srcdir)/cfbgc.c + echo '#define PSZ 32' > $@ + echo '#include "$(srcdir)/cfbgc.c"' >> $@ +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xorg-server/hw/xfree86/xf8_32bpp/cfb8_32.h b/xorg-server/hw/xfree86/xf8_32bpp/cfb8_32.h new file mode 100644 index 000000000..6e985da20 --- /dev/null +++ b/xorg-server/hw/xfree86/xf8_32bpp/cfb8_32.h @@ -0,0 +1,191 @@ + +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif + +#ifndef _CFB8_32_H +#define _CFB8_32_H + +#include "gcstruct.h" + +typedef struct { + GCOps *Ops8bpp; + GCOps *Ops32bpp; + unsigned long changes; + Bool OpsAre8bpp; +} cfb8_32GCRec, *cfb8_32GCPtr; + +typedef struct { + unsigned char key; + void (*EnableDisableFBAccess)(int scrnIndex, Bool enable); + pointer visualData; +} cfb8_32ScreenRec, *cfb8_32ScreenPtr; + + +extern DevPrivateKey cfb8_32GetGCPrivateKey(void); +extern DevPrivateKey cfb8_32GetScreenPrivateKey(void); + +RegionPtr +cfb8_32CopyArea( + DrawablePtr pSrcDraw, + DrawablePtr pDstDraw, + GC *pGC, + int srcx, int srcy, + int width, int height, + int dstx, int dsty +); + +void +cfbDoBitblt8To32( + DrawablePtr pSrc, + DrawablePtr pDst, + int rop, + RegionPtr prgnDst, + DDXPointPtr pptSrc, + unsigned long planemask +); + +void +cfbDoBitblt32To8( + DrawablePtr pSrc, + DrawablePtr pDst, + int rop, + RegionPtr prgnDst, + DDXPointPtr pptSrc, + unsigned long planemask +); + + +void +cfb8_32ValidateGC8( + GCPtr pGC, + unsigned long changes, + DrawablePtr pDrawable +); + +void +cfb8_32ValidateGC32( + GCPtr pGC, + unsigned long changes, + DrawablePtr pDrawable +); + +void +cfb32ValidateGC_Underlay( + GCPtr pGC, + unsigned long changes, + DrawablePtr pDrawable +); + +Bool cfb8_32CreateGC(GCPtr pGC); + +void +cfb8_32GetSpans( + DrawablePtr pDraw, + int wMax, + DDXPointPtr ppt, + int *pwidth, + int nspans, + char *pchardstStart +); + +void +cfb8_32PutImage ( + DrawablePtr pDraw, + GCPtr pGC, + int depth, + int x, int y, int w, int h, + int leftPad, + int format, + char *pImage +); + +void +cfb8_32GetImage ( + DrawablePtr pDraw, + int sx, int sy, int w, int h, + unsigned int format, + unsigned long planeMask, + char *pdstLine +); + +Bool +cfb8_32ScreenInit ( + ScreenPtr pScreen, + pointer pbits, + int xsize, int ysize, + int dpix, int dpiy, + int width +); + +void +cfb8_32FillBoxSolid8 ( + DrawablePtr pDraw, + int nbox, + BoxPtr pBox, + unsigned long color +); + +RegionPtr +cfb8_32CopyPlane( + DrawablePtr pSrc, + DrawablePtr pDst, + GCPtr pGC, + int srcx, int srcy, + int width, int height, + int dstx, int dsty, + unsigned long bitPlane +); + +void +cfbDoBitblt8To8GXcopy( + DrawablePtr pSrc, + DrawablePtr pDst, + int rop, + RegionPtr prgnDst, + DDXPointPtr pptSrc, + unsigned long pm +); + +void +cfbDoBitblt24To24GXcopy( + DrawablePtr pSrc, + DrawablePtr pDst, + int rop, + RegionPtr prgnDst, + DDXPointPtr pptSrc, + unsigned long pm +); + +Bool cfb8_32CreateWindow(WindowPtr pWin); +Bool cfb8_32DestroyWindow(WindowPtr pWin); + +Bool +cfb8_32PositionWindow( + WindowPtr pWin, + int x, int y +); + +void +cfb8_32CopyWindow( + WindowPtr pWin, + DDXPointRec ptOldOrg, + RegionPtr prgnSrc +); + +Bool +cfb8_32ChangeWindowAttributes( + WindowPtr pWin, + unsigned long mask +); + + +#define CFB8_32_GET_GC_PRIVATE(pGC) ((cfb8_32GCPtr) \ + dixLookupPrivate(&(pGC)->devPrivates, cfb8_32GetGCPrivateKey())) + +#define CFB8_32_GET_SCREEN_PRIVATE(pScreen) ((cfb8_32ScreenPtr) \ + dixLookupPrivate(&(pScreen)->devPrivates, cfb8_32GetScreenPrivateKey())) + +Bool xf86Overlay8Plus32Init (ScreenPtr pScreen); + +#endif /* _CFB8_32_H */ diff --git a/xorg-server/hw/xfree86/xf8_32bpp/cfb8_32module.c b/xorg-server/hw/xfree86/xf8_32bpp/cfb8_32module.c new file mode 100644 index 000000000..5afabe52d --- /dev/null +++ b/xorg-server/hw/xfree86/xf8_32bpp/cfb8_32module.c @@ -0,0 +1,39 @@ +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif + +#include "xf86Module.h" + +static MODULESETUPPROTO(xf8_32bppSetup); + +static XF86ModuleVersionInfo VersRec = +{ + "xf8_32bpp", + MODULEVENDORSTRING, + MODINFOSTRING1, + MODINFOSTRING2, + XORG_VERSION_CURRENT, + 1, 0, 0, + ABI_CLASS_ANSIC, /* Only need the ansic layer */ + ABI_ANSIC_VERSION, + MOD_CLASS_NONE, + {0,0,0,0} /* signature, to be patched into the file by a tool */ +}; + +_X_EXPORT XF86ModuleData xf8_32bppModuleData = { + &VersRec, + xf8_32bppSetup, + NULL +}; + +static pointer +xf8_32bppSetup(pointer module, pointer opts, int *errmaj, int *errmin) +{ + if (!LoadSubModule(module, "cfb", NULL, NULL, NULL, NULL, + errmaj, errmin)) + return NULL; + if (!LoadSubModule(module, "cfb32", NULL, NULL, NULL, NULL, + errmaj, errmin)) + return NULL; + return (pointer)1; /* non-NULL required to indicate success */ +} diff --git a/xorg-server/hw/xfree86/xf8_32bpp/cfbcpyarea.c b/xorg-server/hw/xfree86/xf8_32bpp/cfbcpyarea.c new file mode 100644 index 000000000..d8f0c6d76 --- /dev/null +++ b/xorg-server/hw/xfree86/xf8_32bpp/cfbcpyarea.c @@ -0,0 +1,549 @@ + +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif + +#include <stdlib.h> + +#include <X11/X.h> +#include <X11/Xmd.h> +#include "servermd.h" +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "resource.h" +#include "colormap.h" +#include "colormapst.h" +#define PSZ 8 +#include "cfb.h" +#undef PSZ +#include "cfb32.h" +#include "cfb8_32.h" +#include "mi.h" +#include "mistruct.h" +#include "dix.h" +#include "mibstore.h" + + +RegionPtr +cfb8_32CopyArea( + DrawablePtr pSrcDraw, + DrawablePtr pDstDraw, + GC *pGC, + int srcx, int srcy, + int width, int height, + int dstx, int dsty +){ + + if(pSrcDraw->bitsPerPixel == 32) { + if(pDstDraw->bitsPerPixel == 32) { + if((pGC->alu == GXcopy) && (pGC->planemask == 0xff000000)) { + return cfb32BitBlt (pSrcDraw, pDstDraw, + pGC, srcx, srcy, width, height, dstx, dsty, + cfbDoBitblt8To8GXcopy, 0L); + } + return(cfb32CopyArea(pSrcDraw, pDstDraw, pGC, srcx, srcy, + width, height, dstx, dsty)); + } else { + /* have to translate 32 -> 8 copies */ + return cfb32BitBlt (pSrcDraw, pDstDraw, + pGC, srcx, srcy, width, height, dstx, dsty, + cfbDoBitblt32To8, 0L); + } + } else { + if(pDstDraw->bitsPerPixel == 32) { + /* have to translate 8 -> 32 copies */ + return cfb32BitBlt (pSrcDraw, pDstDraw, + pGC, srcx, srcy, width, height, dstx, dsty, + cfbDoBitblt8To32, 0L); + } else { + return(cfbCopyArea(pSrcDraw, pDstDraw, pGC, srcx, srcy, + width, height, dstx, dsty)); + } + } +} + + + + +void +cfbDoBitblt8To32( + DrawablePtr pSrc, + DrawablePtr pDst, + int rop, + RegionPtr prgnDst, + DDXPointPtr pptSrc, + unsigned long pm +){ + BoxPtr pbox = REGION_RECTS(prgnDst); + int nbox = REGION_NUM_RECTS(prgnDst); + unsigned char *ptr8, *ptr32; + unsigned char *data8, *data32; + int pitch8, pitch32; + int height, width, i; + + cfbGetByteWidthAndPointer(pSrc, pitch8, ptr8); + cfbGetByteWidthAndPointer(pDst, pitch32, ptr32); + ptr32 += 3; /* point to the top byte */ + + pm >>= 24; + + if((pm == 0xff) && (rop == GXcopy)) { + for(;nbox; pbox++, pptSrc++, nbox--) { + data8 = ptr8 + (pptSrc->y * pitch8) + pptSrc->x; + data32 = ptr32 + (pbox->y1 * pitch32) + (pbox->x1 << 2); + width = pbox->x2 - pbox->x1; + height = pbox->y2 - pbox->y1; + + while(height--) { + for(i = 0; i < width; i++) + data32[i << 2] = data8[i]; + data8 += pitch8; + data32 += pitch32; + } + } + } else { /* it ain't pretty, but hey */ + for(;nbox; pbox++, pptSrc++, nbox--) { + data8 = ptr8 + (pptSrc->y * pitch8) + pptSrc->x; + data32 = ptr32 + (pbox->y1 * pitch32) + (pbox->x1 << 2); + width = pbox->x2 - pbox->x1; + height = pbox->y2 - pbox->y1; + + while(height--) { + switch(rop) { + case GXcopy: + for(i = 0; i < width; i++) + data32[i<<2] = (data8[i] & pm) | (data32[i<<2] & ~pm); + break; + case GXor: + for(i = 0; i < width; i++) + data32[i<<2] |= data8[i] & pm; + break; + case GXclear: + for(i = 0; i < width; i++) + data32[i<<2] &= ~pm; + break; + case GXand: + for(i = 0; i < width; i++) + data32[i<<2] &= data8[i] | ~pm; + break; + case GXandReverse: + for(i = 0; i < width; i++) + data32[i<<2] = ~data32[i<<2] & (data8[i] | ~pm); + break; + case GXandInverted: + for(i = 0; i < width; i++) + data32[i<<2] &= ~data8[i] | ~pm; + break; + case GXnoop: + return; + case GXxor: + for(i = 0; i < width; i++) + data32[i<<2] ^= data8[i] & pm; + break; + case GXnor: + for(i = 0; i < width; i++) + data32[i<<2] = ~(data32[i<<2] | (data8[i] & pm)); + break; + case GXequiv: + for(i = 0; i < width; i++) + data32[i<<2] = ~(data32[i<<2] ^ (data8[i] & pm)); + break; + case GXinvert: + for(i = 0; i < width; i++) + data32[i<<2] ^= pm; + break; + case GXorReverse: + for(i = 0; i < width; i++) + data32[i<<2] = ~data32[i<<2] | (data8[i] & pm); + break; + case GXcopyInverted: + for(i = 0; i < width; i++) + data32[i<<2] = (~data8[i] & pm) | (data32[i<<2] & ~pm); + break; + case GXorInverted: + for(i = 0; i < width; i++) + data32[i<<2] |= ~data8[i] & pm; + break; + case GXnand: + for(i = 0; i < width; i++) + data32[i<<2] = ~(data32[i<<2] & (data8[i] | ~pm)); + break; + case GXset: + for(i = 0; i < width; i++) + data32[i<<2] |= pm; + break; + } + data8 += pitch8; + data32 += pitch32; + } + } + } +} + + +void +cfbDoBitblt32To8( + DrawablePtr pSrc, + DrawablePtr pDst, + int rop, + RegionPtr prgnDst, + DDXPointPtr pptSrc, + unsigned long pm +){ + BoxPtr pbox = REGION_RECTS(prgnDst); + int nbox = REGION_NUM_RECTS(prgnDst); + unsigned char *ptr8, *ptr32; + unsigned char *data8, *data32; + int pitch8, pitch32; + int height, width, i; + + cfbGetByteWidthAndPointer(pDst, pitch8, ptr8); + cfbGetByteWidthAndPointer(pSrc, pitch32, ptr32); + ptr32 += 3; /* point to the top byte */ + + if(((pm & 0xff) == 0xff) && (rop == GXcopy)) { + for(;nbox; pbox++, pptSrc++, nbox--) { + data8 = ptr8 + (pbox->y1 * pitch8) + pbox->x1; + data32 = ptr32 + (pptSrc->y * pitch32) + (pptSrc->x << 2); + + width = pbox->x2 - pbox->x1; + height = pbox->y2 - pbox->y1; + + while(height--) { + for(i = 0; i < width; i++) + data8[i] = data32[i << 2]; + data8 += pitch8; + data32 += pitch32; + } + } + } else { + for(;nbox; pbox++, pptSrc++, nbox--) { + data8 = ptr8 + (pbox->y1 * pitch8) + pbox->x1; + data32 = ptr32 + (pptSrc->y * pitch32) + (pptSrc->x << 2); + + width = pbox->x2 - pbox->x1; + height = pbox->y2 - pbox->y1; + + while(height--) { + switch(rop) { + case GXcopy: + for(i = 0; i < width; i++) + data8[i] = (data32[i<<2] & pm) | (data8[i] & ~pm); + break; + case GXor: + for(i = 0; i < width; i++) + data8[i] |= data32[i<<2] & pm; + break; + case GXclear: + for(i = 0; i < width; i++) + data8[i] &= ~pm; + break; + case GXand: + for(i = 0; i < width; i++) + data8[i] &= data32[i<<2] | ~pm; + break; + case GXandReverse: + for(i = 0; i < width; i++) + data8[i] = ~data8[i] & (data32[i<<2] | ~pm); + break; + case GXandInverted: + for(i = 0; i < width; i++) + data8[i] &= ~data32[i<<2] | ~pm; + break; + case GXnoop: + return; + case GXxor: + for(i = 0; i < width; i++) + data8[i] ^= data32[i<<2] & pm; + break; + case GXnor: + for(i = 0; i < width; i++) + data8[i] = ~(data8[i] | (data32[i<<2] & pm)); + break; + case GXequiv: + for(i = 0; i < width; i++) + data8[i] = ~(data8[i] ^ (data32[i<<2] & pm)); + break; + case GXinvert: + for(i = 0; i < width; i++) + data8[i] ^= pm; + break; + case GXorReverse: + for(i = 0; i < width; i++) + data8[i] = ~data8[i] | (data32[i<<2] & pm); + break; + case GXcopyInverted: + for(i = 0; i < width; i++) + data8[i] = (~data32[i<<2] & pm) | (data8[i] & ~pm); + break; + case GXorInverted: + for(i = 0; i < width; i++) + data8[i] |= ~data32[i<<2] & pm; + break; + case GXnand: + for(i = 0; i < width; i++) + data8[i] = ~(data8[i] & (data32[i<<2] | ~pm)); + break; + case GXset: + for(i = 0; i < width; i++) + data8[i] |= pm; + break; + } + data8 += pitch8; + data32 += pitch32; + } + } + } +} + + + +static void +Do8To8Blt( + unsigned char *SrcPtr, + int SrcPitch, + unsigned char *DstPtr, + int DstPitch, + int nbox, + DDXPointPtr pptSrc, + BoxPtr pbox, + int xdir, int ydir +){ + int i, j, width, height, ydir2; + CARD8 *src, *dst; + + SrcPtr += 3; + DstPtr += 3; + xdir *= 4; + ydir2 = ydir * DstPitch; + ydir *= SrcPitch; + + for(;nbox; pbox++, pptSrc++, nbox--) { + src = SrcPtr + (pptSrc->y * SrcPitch) + (pptSrc->x << 2); + dst = DstPtr + (pbox->y1 * DstPitch) + (pbox->x1 << 2); + width = pbox->x2 - pbox->x1; + height = pbox->y2 - pbox->y1; + + if(ydir < 0) { + src += (height - 1) * SrcPitch; + dst += (height - 1) * DstPitch; + } + + if(xdir < 0) { + register int tmp = (width - 1) << 2; + src += tmp; + dst += tmp; + } + + while(height--) { + for(i = width, j = 0; i--; j+=xdir) + dst[j] = src[j]; + src += ydir; + dst += ydir2; + } + } +} + +static void +Do24To24Blt( + unsigned char *SrcPtr, + int SrcPitch, + unsigned char *DstPtr, + int DstPitch, + int nbox, + DDXPointPtr pptSrc, + BoxPtr pbox, + int xdir, int ydir +){ + int i, j, width, height, ydir2; + CARD8 *src, *dst; + + xdir *= 4; + ydir2 = ydir * DstPitch; + ydir *= SrcPitch; + + for(;nbox; pbox++, pptSrc++, nbox--) { + src = SrcPtr + (pptSrc->y * SrcPitch) + (pptSrc->x << 2); + dst = DstPtr + (pbox->y1 * DstPitch) + (pbox->x1 << 2); + width = pbox->x2 - pbox->x1; + height = pbox->y2 - pbox->y1; + + if(ydir < 0) { + src += (height - 1) * SrcPitch; + dst += (height - 1) * DstPitch; + } + + if(xdir < 0) { + register int tmp = (width - 1) << 2; + src += tmp; + dst += tmp; + } + + while(height--) { + for(i = width, j = 0; i--; j+=xdir) { + *((CARD16*)(dst + j)) = *((CARD32*)(src + j)); + dst[j + 2] = src[j + 2]; + } + src += ydir; + dst += ydir2; + } + } +} + + +static void +cfb8_32DoBitBlt( + DrawablePtr pSrc, + DrawablePtr pDst, + RegionPtr prgnDst, + DDXPointPtr pptSrc, + void (*DoBlt)( + unsigned char *SrcPtr, + int SrcPitch, + unsigned char *DstPtr, + int DstPitch, + int nbox, + DDXPointPtr pptSrc, + BoxPtr pbox, + int xdir, int ydir) +){ + int nbox, careful, SrcPitch, DstPitch; + BoxPtr pbox, pboxTmp, pboxNext, pboxBase, pboxNew1, pboxNew2; + DDXPointPtr pptTmp, pptNew1, pptNew2; + int xdir, ydir; + unsigned char *SrcPtr, *DstPtr; + + /* XXX we have to err on the side of safety when both are windows, + * because we don't know if IncludeInferiors is being used. + */ + careful = ((pSrc == pDst) || + ((pSrc->type == DRAWABLE_WINDOW) && + (pDst->type == DRAWABLE_WINDOW))); + + pbox = REGION_RECTS(prgnDst); + nbox = REGION_NUM_RECTS(prgnDst); + + pboxNew1 = NULL; + pptNew1 = NULL; + pboxNew2 = NULL; + pptNew2 = NULL; + if (careful && (pptSrc->y < pbox->y1)) { + /* walk source botttom to top */ + ydir = -1; + + if (nbox > 1) { + /* keep ordering in each band, reverse order of bands */ + pboxNew1 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox); + if(!pboxNew1) + return; + pptNew1 = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * nbox); + if(!pptNew1) { + xfree(pboxNew1); + return; + } + pboxBase = pboxNext = pbox+nbox-1; + while (pboxBase >= pbox) { + while ((pboxNext >= pbox) && + (pboxBase->y1 == pboxNext->y1)) + pboxNext--; + pboxTmp = pboxNext+1; + pptTmp = pptSrc + (pboxTmp - pbox); + while (pboxTmp <= pboxBase) { + *pboxNew1++ = *pboxTmp++; + *pptNew1++ = *pptTmp++; + } + pboxBase = pboxNext; + } + pboxNew1 -= nbox; + pbox = pboxNew1; + pptNew1 -= nbox; + pptSrc = pptNew1; + } + } else { + /* walk source top to bottom */ + ydir = 1; + } + + if (careful && (pptSrc->x < pbox->x1)) { + /* walk source right to left */ + xdir = -1; + + if (nbox > 1) { + /* reverse order of rects in each band */ + pboxNew2 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox); + pptNew2 = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * nbox); + if(!pboxNew2 || !pptNew2) { + if (pptNew2) xfree(pptNew2); + if (pboxNew2) xfree(pboxNew2); + if (pboxNew1) { + xfree(pptNew1); + xfree(pboxNew1); + } + return; + } + pboxBase = pboxNext = pbox; + while (pboxBase < pbox+nbox) { + while ((pboxNext < pbox+nbox) && + (pboxNext->y1 == pboxBase->y1)) + pboxNext++; + pboxTmp = pboxNext; + pptTmp = pptSrc + (pboxTmp - pbox); + while (pboxTmp != pboxBase) { + *pboxNew2++ = *--pboxTmp; + *pptNew2++ = *--pptTmp; + } + pboxBase = pboxNext; + } + pboxNew2 -= nbox; + pbox = pboxNew2; + pptNew2 -= nbox; + pptSrc = pptNew2; + } + } else { + /* walk source left to right */ + xdir = 1; + } + + cfbGetByteWidthAndPointer(pSrc, SrcPitch, SrcPtr); + cfbGetByteWidthAndPointer(pDst, DstPitch, DstPtr); + + (*DoBlt)(SrcPtr,SrcPitch,DstPtr,DstPitch,nbox,pptSrc,pbox,xdir,ydir); + + if (pboxNew2) { + xfree(pptNew2); + xfree(pboxNew2); + } + if (pboxNew1) { + xfree(pptNew1); + xfree(pboxNew1); + } + +} + + +/* A couple routines to speed up full planemask copies */ + +void +cfbDoBitblt8To8GXcopy( + DrawablePtr pSrc, + DrawablePtr pDst, + int rop, + RegionPtr prgnDst, + DDXPointPtr pptSrc, + unsigned long pm +){ + cfb8_32DoBitBlt(pSrc, pDst, prgnDst, pptSrc, Do8To8Blt); +} + + +void +cfbDoBitblt24To24GXcopy( + DrawablePtr pSrc, + DrawablePtr pDst, + int rop, + RegionPtr prgnDst, + DDXPointPtr pptSrc, + unsigned long pm +){ + cfb8_32DoBitBlt(pSrc, pDst, prgnDst, pptSrc, Do24To24Blt); +} diff --git a/xorg-server/hw/xfree86/xf8_32bpp/cfbcpyplane.c b/xorg-server/hw/xfree86/xf8_32bpp/cfbcpyplane.c new file mode 100644 index 000000000..e10b52525 --- /dev/null +++ b/xorg-server/hw/xfree86/xf8_32bpp/cfbcpyplane.c @@ -0,0 +1,41 @@ +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif + +#include <X11/X.h> +#include <X11/Xmd.h> +#include <X11/Xproto.h> +#include "gcstruct.h" +#include "windowstr.h" +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "regionstr.h" +#define PSZ 8 +#include "cfb.h" +#undef PSZ +#include "cfb32.h" +#include "cfb8_32.h" +#include "mi.h" + + +RegionPtr +cfb8_32CopyPlane( + DrawablePtr pSrc, + DrawablePtr pDst, + GCPtr pGC, + int srcx, int srcy, + int width, int height, + int dstx, int dsty, + unsigned long bitPlane +){ + /* There's actually much more to it than this */ + + if((pDst->bitsPerPixel == 8) && (pSrc->bitsPerPixel != 32)){ + return(cfbCopyPlane(pSrc, pDst, + pGC, srcx, srcy, width, height, dstx, dsty, bitPlane)); + } + + + return(miCopyPlane (pSrc, pDst, + pGC, srcx, srcy, width, height, dstx, dsty, bitPlane)); +} diff --git a/xorg-server/hw/xfree86/xf8_32bpp/cfbgc.c b/xorg-server/hw/xfree86/xf8_32bpp/cfbgc.c new file mode 100644 index 000000000..a7787caa9 --- /dev/null +++ b/xorg-server/hw/xfree86/xf8_32bpp/cfbgc.c @@ -0,0 +1,646 @@ +/*********************************************************** + +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. + +******************************************************************/ + + +/* + +PSZ 8 16 24 32 +PIXEL_ADDR True True True True +NO_ONE_RECT False False False False +WriteBitGroup True True True True +FOUR_BIT_CODE True False False False +LOWMEMFTPT False False False False + +*/ + + +/* This gets built twice. Once for 8bpp and another for 32bpp */ + +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif + +#include <X11/X.h> +#include <X11/Xmd.h> +#include <X11/Xproto.h> +#include "cfb.h" +#include <X11/fonts/fontstruct.h> +#include "dixfontstr.h" +#include "gcstruct.h" +#include "windowstr.h" +#include "pixmapstr.h" +#include "scrnintstr.h" +#include "region.h" + +#include "mistruct.h" +#include "mibstore.h" +#include "migc.h" +#include "mioverlay.h" + +#include "cfb8_32.h" +#include "cfbmskbits.h" +#include "cfb8bit.h" + + +#if PSZ == 8 +# define useTEGlyphBlt cfbTEGlyphBlt8 +#else +# ifdef WriteBitGroup +# define useTEGlyphBlt cfbImageGlyphBlt8 +# else +# define useTEGlyphBlt cfbTEGlyphBlt +# endif +#endif + +#ifdef WriteBitGroup +# define useImageGlyphBlt cfbImageGlyphBlt8 +# define usePolyGlyphBlt cfbPolyGlyphBlt8 +#else +# define useImageGlyphBlt miImageGlyphBlt +# define usePolyGlyphBlt miPolyGlyphBlt +#endif + +#ifdef FOUR_BIT_CODE +# define usePushPixels cfbPushPixels8 +#else +# define usePushPixels mfbPushPixels +#endif + +#ifdef PIXEL_ADDR +# define ZeroPolyArc cfbZeroPolyArcSS8Copy +#else +# define ZeroPolyArc miZeroPolyArc +#endif + + +static GCOps cfb8_32TEOps1Rect = { + cfbSolidSpansCopy, + cfbSetSpans, + cfb8_32PutImage, + cfb8_32CopyArea, + cfb8_32CopyPlane, + cfbPolyPoint, +#ifdef PIXEL_ADDR + cfb8LineSS1Rect, + cfb8SegmentSS1Rect, +#else + cfbLineSS, + cfbSegmentSS, +#endif + miPolyRectangle, + ZeroPolyArc, + cfbFillPoly1RectCopy, + cfbPolyFillRect, + cfbPolyFillArcSolidCopy, + miPolyText8, + miPolyText16, + miImageText8, + miImageText16, + useTEGlyphBlt, + usePolyGlyphBlt, + usePushPixels +}; + +static GCOps cfb8_32NonTEOps1Rect = { + cfbSolidSpansCopy, + cfbSetSpans, + cfb8_32PutImage, + cfb8_32CopyArea, + cfb8_32CopyPlane, + cfbPolyPoint, +#ifdef PIXEL_ADDR + cfb8LineSS1Rect, + cfb8SegmentSS1Rect, +#else + cfbLineSS, + cfbSegmentSS, +#endif + miPolyRectangle, + ZeroPolyArc, + cfbFillPoly1RectCopy, + cfbPolyFillRect, + cfbPolyFillArcSolidCopy, + miPolyText8, + miPolyText16, + miImageText8, + miImageText16, + useImageGlyphBlt, + usePolyGlyphBlt, + usePushPixels +}; + +static GCOps cfb8_32TEOps = { + cfbSolidSpansCopy, + cfbSetSpans, + cfb8_32PutImage, + cfb8_32CopyArea, + cfb8_32CopyPlane, + cfbPolyPoint, + cfbLineSS, + cfbSegmentSS, + miPolyRectangle, + ZeroPolyArc, + miFillPolygon, + cfbPolyFillRect, + cfbPolyFillArcSolidCopy, + miPolyText8, + miPolyText16, + miImageText8, + miImageText16, + useTEGlyphBlt, + usePolyGlyphBlt, + usePushPixels +}; + +static GCOps cfb8_32NonTEOps = { + cfbSolidSpansCopy, + cfbSetSpans, + cfb8_32PutImage, + cfb8_32CopyArea, + cfb8_32CopyPlane, + cfbPolyPoint, + cfbLineSS, + cfbSegmentSS, + miPolyRectangle, +#ifdef PIXEL_ADDR + cfbZeroPolyArcSS8Copy, +#else + miZeroPolyArc, +#endif + miFillPolygon, + cfbPolyFillRect, + cfbPolyFillArcSolidCopy, + miPolyText8, + miPolyText16, + miImageText8, + miImageText16, + useImageGlyphBlt, + usePolyGlyphBlt, + usePushPixels +}; + +static GCOps * +cfb8_32MatchCommon (GCPtr pGC, cfbPrivGCPtr devPriv) +{ + if (pGC->lineWidth != 0) + return 0; + if (pGC->lineStyle != LineSolid) + return 0; + if (pGC->fillStyle != FillSolid) + return 0; + if (devPriv->rop != GXcopy) + return 0; + if (pGC->font && + FONTMAXBOUNDS(pGC->font,rightSideBearing) - + FONTMINBOUNDS(pGC->font,leftSideBearing) <= 32 && + FONTMINBOUNDS(pGC->font,characterWidth) >= 0) + { + if (TERMINALFONT(pGC->font) +#ifdef FOUR_BIT_CODE + && FONTMAXBOUNDS(pGC->font,characterWidth) >= PGSZB +#endif + ) +#ifdef NO_ONE_RECT + return &cfb8_32TEOps1Rect; +#else + if (devPriv->oneRect) + return &cfb8_32TEOps1Rect; + else + return &cfb8_32TEOps; +#endif + else +#ifdef NO_ONE_RECT + return &cfb8_32NonTEOps1Rect; +#else + if (devPriv->oneRect) + return &cfb8_32NonTEOps1Rect; + else + return &cfb8_32NonTEOps; +#endif + } + return 0; +} + + +/* Clipping conventions + if the drawable is a window + CT_REGION ==> pCompositeClip really is the composite + CT_other ==> pCompositeClip is the window clip region + if the drawable is a pixmap + CT_REGION ==> pCompositeClip is the translated client region + clipped to the pixmap boundary + CT_other ==> pCompositeClip is the pixmap bounding box +*/ + +void +#if PSZ == 8 +cfb8_32ValidateGC8( +#else +cfb8_32ValidateGC32( +#endif + GCPtr pGC, + unsigned long changes, + DrawablePtr pDrawable +){ + int mask; /* stateChanges */ + int index; /* used for stepping through bitfields */ + int new_rrop; + int new_line, new_text, new_fillspans, new_fillarea; + /* flags for changing the proc vector */ + cfbPrivGCPtr devPriv; + int oneRect; + + pGC->lastWinOrg.x = pDrawable->x; + pGC->lastWinOrg.y = pDrawable->y; + devPriv = cfbGetGCPrivate(pGC); + + new_rrop = FALSE; + new_line = FALSE; + new_text = FALSE; + new_fillspans = FALSE; + new_fillarea = FALSE; + + /* + * if the client clip is different or moved OR the subwindowMode has + * changed OR the window's clip has changed since the last validation + * we need to recompute the composite clip + */ + + if ((changes & (GCClipXOrigin|GCClipYOrigin|GCClipMask|GCSubwindowMode)) || + (pDrawable->serialNumber != (pGC->serialNumber & DRAWABLE_SERIAL_BITS))) + { + miComputeCompositeClip (pGC, pDrawable); +#ifdef NO_ONE_RECT + devPriv->oneRect = FALSE; +#else + oneRect = REGION_NUM_RECTS(pGC->pCompositeClip) == 1; + if (oneRect != devPriv->oneRect) + new_line = TRUE; + devPriv->oneRect = oneRect; +#endif + } + + mask = changes; + while (mask) { + index = lowbit (mask); + mask &= ~index; + + switch (index) { + case GCFunction: + case GCForeground: + new_rrop = TRUE; + break; + case GCPlaneMask: + new_rrop = TRUE; + new_text = TRUE; + break; + case GCBackground: + break; + case GCLineStyle: + case GCLineWidth: + new_line = TRUE; + break; + case GCJoinStyle: + case GCCapStyle: + break; + case GCFillStyle: + new_text = TRUE; + new_fillspans = TRUE; + new_line = TRUE; + new_fillarea = TRUE; + break; + case GCFillRule: + break; + case GCTile: + new_fillspans = TRUE; + new_fillarea = TRUE; + break; + case GCStipple: + new_fillspans = TRUE; + new_fillarea = TRUE; + break; + case GCTileStipXOrigin: + case GCTileStipYOrigin: + break; + case GCFont: + new_text = TRUE; + break; + case GCSubwindowMode: + case GCGraphicsExposures: + case GCClipXOrigin: + case GCClipYOrigin: + case GCClipMask: + case GCDashOffset: + case GCDashList: + case GCArcMode: + default: + break; + } + } + + /* + * If the drawable has changed, ensure suitable + * entries are in the proc vector. + */ + if (pDrawable->serialNumber != (pGC->serialNumber & (DRAWABLE_SERIAL_BITS))) + new_fillspans = TRUE; /* deal with FillSpans later */ + + if (new_rrop) + { + int old_rrop; + + old_rrop = devPriv->rop; + devPriv->rop = cfbReduceRasterOp (pGC->alu, pGC->fgPixel, + pGC->planemask, + &devPriv->and, &devPriv->xor); + if (old_rrop == devPriv->rop) + new_rrop = FALSE; + else + { +#ifdef PIXEL_ADDR + new_line = TRUE; +#endif +#ifdef WriteBitGroup + new_text = TRUE; +#endif + new_fillspans = TRUE; + new_fillarea = TRUE; + } + } + + if(!pGC->ops) + pGC->ops = & cfb8_32NonTEOps; + + if (new_rrop || new_fillspans || new_text || new_fillarea || new_line) + { + GCOps *newops; + + if ((newops = cfb8_32MatchCommon (pGC, devPriv))) + { + if (pGC->ops->devPrivate.val) + miDestroyGCOps (pGC->ops); + pGC->ops = newops; + new_rrop = new_line = new_fillspans = new_text = new_fillarea = 0; + } + else + { + if (!pGC->ops->devPrivate.val) + { + pGC->ops = miCreateGCOps (pGC->ops); + pGC->ops->devPrivate.val = 1; + } + } + } + + /* deal with the changes we've collected */ + if (new_line) + { + pGC->ops->FillPolygon = miFillPolygon; +#ifdef NO_ONE_RECT + if (pGC->fillStyle == FillSolid) + { + switch (devPriv->rop) { + case GXcopy: + pGC->ops->FillPolygon = cfbFillPoly1RectCopy; + break; + default: + pGC->ops->FillPolygon = cfbFillPoly1RectGeneral; + break; + } + } +#else + if (devPriv->oneRect && pGC->fillStyle == FillSolid) + { + switch (devPriv->rop) { + case GXcopy: + pGC->ops->FillPolygon = cfbFillPoly1RectCopy; + break; + default: + pGC->ops->FillPolygon = cfbFillPoly1RectGeneral; + break; + } + } +#endif + if (pGC->lineWidth == 0) + { +#ifdef PIXEL_ADDR + if ((pGC->lineStyle == LineSolid) && (pGC->fillStyle == FillSolid)) + { + switch (devPriv->rop) + { + case GXxor: + pGC->ops->PolyArc = cfbZeroPolyArcSS8Xor; + break; + case GXcopy: + pGC->ops->PolyArc = cfbZeroPolyArcSS8Copy; + break; + default: + pGC->ops->PolyArc = cfbZeroPolyArcSS8General; + break; + } + } + else +#endif + pGC->ops->PolyArc = miZeroPolyArc; + } + else + pGC->ops->PolyArc = miPolyArc; + pGC->ops->PolySegment = miPolySegment; + switch (pGC->lineStyle) + { + case LineSolid: + if(pGC->lineWidth == 0) + { + if (pGC->fillStyle == FillSolid) + { +#if defined(PIXEL_ADDR) && !defined(NO_ONE_RECT) + if (devPriv->oneRect && + ((pDrawable->x >= pGC->pScreen->width - 32768) && + (pDrawable->y >= pGC->pScreen->height - 32768))) + { + pGC->ops->Polylines = cfb8LineSS1Rect; + pGC->ops->PolySegment = cfb8SegmentSS1Rect; + } else +#endif +#ifdef NO_ONE_RECT + { + pGC->ops->Polylines = cfb8LineSS1Rect; + pGC->ops->PolySegment = cfb8SegmentSS1Rect; + } +#else + { + pGC->ops->Polylines = cfbLineSS; + pGC->ops->PolySegment = cfbSegmentSS; + } +#endif + } + else + pGC->ops->Polylines = miZeroLine; + } + else + pGC->ops->Polylines = miWideLine; + break; + case LineOnOffDash: + case LineDoubleDash: + if (pGC->lineWidth == 0 && pGC->fillStyle == FillSolid) + { + pGC->ops->Polylines = cfbLineSD; + pGC->ops->PolySegment = cfbSegmentSD; + } else + pGC->ops->Polylines = miWideDash; + break; + } + } + + if (new_text && (pGC->font)) + { + if (FONTMAXBOUNDS(pGC->font,rightSideBearing) - + FONTMINBOUNDS(pGC->font,leftSideBearing) > 32 || + FONTMINBOUNDS(pGC->font,characterWidth) < 0) + { + pGC->ops->PolyGlyphBlt = miPolyGlyphBlt; + pGC->ops->ImageGlyphBlt = miImageGlyphBlt; + } + else + { +#ifdef WriteBitGroup + if (pGC->fillStyle == FillSolid) + { + if (devPriv->rop == GXcopy) + pGC->ops->PolyGlyphBlt = cfbPolyGlyphBlt8; + else +#ifdef FOUR_BIT_CODE + pGC->ops->PolyGlyphBlt = cfbPolyGlyphRop8; +#else + pGC->ops->PolyGlyphBlt = miPolyGlyphBlt; +#endif + } + else +#endif + pGC->ops->PolyGlyphBlt = miPolyGlyphBlt; + /* special case ImageGlyphBlt for terminal emulator fonts */ +#if !defined(WriteBitGroup) || PSZ == 8 + if (TERMINALFONT(pGC->font) && + (pGC->planemask & PMSK) == PMSK +#ifdef FOUR_BIT_CODE + && FONTMAXBOUNDS(pGC->font,characterWidth) >= PGSZB +#endif + ) + { + pGC->ops->ImageGlyphBlt = useTEGlyphBlt; + } + else +#endif + { +#ifdef WriteBitGroup + if (devPriv->rop == GXcopy && + pGC->fillStyle == FillSolid && + (pGC->planemask & PMSK) == PMSK) + pGC->ops->ImageGlyphBlt = cfbImageGlyphBlt8; + else +#endif + pGC->ops->ImageGlyphBlt = miImageGlyphBlt; + } + } + } + + + if (new_fillspans) { + switch (pGC->fillStyle) { + case FillSolid: + switch (devPriv->rop) { + case GXcopy: + pGC->ops->FillSpans = cfbSolidSpansCopy; + break; + case GXxor: + pGC->ops->FillSpans = cfbSolidSpansXor; + break; + default: + pGC->ops->FillSpans = cfbSolidSpansGeneral; + break; + } + break; + case FillTiled: + pGC->ops->FillSpans = cfbUnnaturalTileFS; + break; + case FillStippled: + case FillOpaqueStippled: + pGC->ops->FillSpans = cfbUnnaturalStippleFS; + break; + default: + FatalError("cfbValidateGC: illegal fillStyle\n"); + } + } /* end of new_fillspans */ + + if (new_fillarea) { +#ifndef FOUR_BIT_CODE + pGC->ops->PolyFillRect = miPolyFillRect; + if (pGC->fillStyle == FillSolid || pGC->fillStyle == FillTiled) + { + pGC->ops->PolyFillRect = cfbPolyFillRect; + } +#endif +#ifdef FOUR_BIT_CODE + pGC->ops->PushPixels = mfbPushPixels; + if (pGC->fillStyle == FillSolid && devPriv->rop == GXcopy) + pGC->ops->PushPixels = cfbPushPixels8; +#endif + pGC->ops->PolyFillArc = miPolyFillArc; + if (pGC->fillStyle == FillSolid) + { + switch (devPriv->rop) + { + case GXcopy: + pGC->ops->PolyFillArc = cfbPolyFillArcSolidCopy; + break; + default: + pGC->ops->PolyFillArc = cfbPolyFillArcSolidGeneral; + break; + } + } + } +} diff --git a/xorg-server/hw/xfree86/xf8_32bpp/cfbgc32.c b/xorg-server/hw/xfree86/xf8_32bpp/cfbgc32.c new file mode 100644 index 000000000..61a97b97b --- /dev/null +++ b/xorg-server/hw/xfree86/xf8_32bpp/cfbgc32.c @@ -0,0 +1,2 @@ +#define PSZ 32 +#include "./cfbgc.c" diff --git a/xorg-server/hw/xfree86/xf8_32bpp/cfbgc8.c b/xorg-server/hw/xfree86/xf8_32bpp/cfbgc8.c new file mode 100644 index 000000000..53e4f95e4 --- /dev/null +++ b/xorg-server/hw/xfree86/xf8_32bpp/cfbgc8.c @@ -0,0 +1,2 @@ +#define PSZ 8 +#include "./cfbgc.c" diff --git a/xorg-server/hw/xfree86/xf8_32bpp/cfbgcmisc.c b/xorg-server/hw/xfree86/xf8_32bpp/cfbgcmisc.c new file mode 100644 index 000000000..f009afc0c --- /dev/null +++ b/xorg-server/hw/xfree86/xf8_32bpp/cfbgcmisc.c @@ -0,0 +1,150 @@ +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif + +#include <stdlib.h> + +#include <X11/X.h> +#include <X11/Xmd.h> +#include <X11/Xproto.h> +#define PSZ 8 +#include "cfb.h" +#undef PSZ +#include "cfb32.h" +#include "cfb8_32.h" +#include <X11/fonts/fontstruct.h> +#include "dixfontstr.h" +#include "gcstruct.h" +#include "windowstr.h" +#include "pixmapstr.h" +#include "scrnintstr.h" +#include "region.h" + +#include "mistruct.h" +#include "mibstore.h" +#include "migc.h" + + +static void cfb8_32ValidateGC(GCPtr, unsigned long, DrawablePtr); +static void cfb8_32DestroyGC(GCPtr pGC); +static void cfb32DestroyGC_Underlay(GCPtr pGC); + +static +GCFuncs cfb8_32GCFuncs = { + cfb8_32ValidateGC, + miChangeGC, + miCopyGC, + cfb8_32DestroyGC, + miChangeClip, + miDestroyClip, + miCopyClip, +}; + + +static +GCFuncs cfb32GCFuncs_Underlay = { + cfb32ValidateGC_Underlay, + miChangeGC, + miCopyGC, + cfb32DestroyGC_Underlay, + miChangeClip, + miDestroyClip, + miCopyClip, +}; + +static void +cfb32DestroyGC_Underlay(GCPtr pGC) +{ + if (pGC->freeCompClip) + REGION_DESTROY(pGC->pScreen, pGC->pCompositeClip); + + if(pGC->ops) + miDestroyGCOps(pGC->ops); +} + + +static void +cfb8_32DestroyGC(GCPtr pGC) +{ + cfb8_32GCPtr pGCPriv = CFB8_32_GET_GC_PRIVATE(pGC); + + if (pGC->freeCompClip) + REGION_DESTROY(pGC->pScreen, pGC->pCompositeClip); + if(pGCPriv->Ops8bpp) + miDestroyGCOps(pGCPriv->Ops8bpp); + if(pGCPriv->Ops32bpp) + miDestroyGCOps(pGCPriv->Ops32bpp); +} + +Bool +cfb8_32CreateGC(GCPtr pGC) +{ + cfb8_32GCPtr pGCPriv; + cfbPrivGC *pPriv; + + if (PixmapWidthPaddingInfo[pGC->depth].padPixelsLog2 == LOG2_BITMAP_PAD) + return (mfbCreateGC(pGC)); + + pGC->clientClip = NULL; + pGC->clientClipType = CT_NONE; + pGC->miTranslate = 1; + pGC->fExpose = TRUE; + pGC->freeCompClip = FALSE; + pGC->pRotatedPixmap = (PixmapPtr) NULL; + + pPriv = cfbGetGCPrivate(pGC); + pPriv->rop = pGC->alu; + pPriv->oneRect = FALSE; + + pGC->ops = NULL; + + if (pGC->depth == 8) { + pGC->funcs = &cfb8_32GCFuncs; + + pGCPriv = CFB8_32_GET_GC_PRIVATE(pGC); + pGCPriv->Ops8bpp = NULL; + pGCPriv->Ops32bpp = NULL; + pGCPriv->OpsAre8bpp = FALSE; + pGCPriv->changes = 0; + } else + pGC->funcs = &cfb32GCFuncs_Underlay; + + return TRUE; +} + + +static void +cfb8_32ValidateGC( + GCPtr pGC, + unsigned long changes, + DrawablePtr pDraw +){ + cfb8_32GCPtr pGCPriv = CFB8_32_GET_GC_PRIVATE(pGC); + + if(pDraw->bitsPerPixel == 32) { + if(pGCPriv->OpsAre8bpp) { + int origChanges = changes; + pGC->ops = pGCPriv->Ops32bpp; + changes |= pGCPriv->changes; + pGCPriv->changes = origChanges; + pGCPriv->OpsAre8bpp = FALSE; + } else + pGCPriv->changes |= changes; + + cfb8_32ValidateGC32(pGC, changes, pDraw); + pGCPriv->Ops32bpp = pGC->ops; + } else { /* bitsPerPixel == 8 */ + if(!pGCPriv->OpsAre8bpp) { + int origChanges = changes; + pGC->ops = pGCPriv->Ops8bpp; + changes |= pGCPriv->changes; + pGCPriv->changes = origChanges; + pGCPriv->OpsAre8bpp = TRUE; + } else + pGCPriv->changes |= changes; + + cfb8_32ValidateGC8(pGC, changes, pDraw); + pGCPriv->Ops8bpp = pGC->ops; + } +} + diff --git a/xorg-server/hw/xfree86/xf8_32bpp/cfbgcunder.c b/xorg-server/hw/xfree86/xf8_32bpp/cfbgcunder.c new file mode 100644 index 000000000..d90321355 --- /dev/null +++ b/xorg-server/hw/xfree86/xf8_32bpp/cfbgcunder.c @@ -0,0 +1,620 @@ +/*********************************************************** + +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. + +******************************************************************/ +#define PSZ 32 + +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif + +#include <X11/X.h> +#include <X11/Xmd.h> +#include <X11/Xproto.h> +#include "cfb.h" +#include <X11/fonts/fontstruct.h> +#include "dixfontstr.h" +#include "gcstruct.h" +#include "windowstr.h" +#include "pixmapstr.h" +#include "scrnintstr.h" +#include "region.h" + +#include "mistruct.h" +#include "mibstore.h" +#include "migc.h" +#include "mioverlay.h" + +#include "cfbmskbits.h" +#include "cfb8bit.h" +#include "cfb8_32.h" + +#ifdef WriteBitGroup +# define useTEGlyphBlt cfbImageGlyphBlt8 +#else +# define useTEGlyphBlt cfbTEGlyphBlt +#endif + +#ifdef WriteBitGroup +# define useImageGlyphBlt cfbImageGlyphBlt8 +# define usePolyGlyphBlt cfbPolyGlyphBlt8 +#else +# define useImageGlyphBlt miImageGlyphBlt +# define usePolyGlyphBlt miPolyGlyphBlt +#endif + +#ifdef FOUR_BIT_CODE +# define usePushPixels cfbPushPixels8 +#else +# define usePushPixels mfbPushPixels +#endif + +#ifdef PIXEL_ADDR +# define ZeroPolyArc cfbZeroPolyArcSS8Copy +#else +# define ZeroPolyArc miZeroPolyArc +#endif + + +static GCOps cfbTEOps1Rect = { + cfbSolidSpansCopy, + cfbSetSpans, + cfbPutImage, + cfbCopyArea, + cfbCopyPlane, + cfbPolyPoint, +#ifdef PIXEL_ADDR + cfb8LineSS1Rect, + cfb8SegmentSS1Rect, +#else + cfbLineSS, + cfbSegmentSS, +#endif + miPolyRectangle, + ZeroPolyArc, + cfbFillPoly1RectCopy, + cfbPolyFillRect, + cfbPolyFillArcSolidCopy, + miPolyText8, + miPolyText16, + miImageText8, + miImageText16, + useTEGlyphBlt, + usePolyGlyphBlt, + usePushPixels +}; + +static GCOps cfbNonTEOps1Rect = { + cfbSolidSpansCopy, + cfbSetSpans, + cfbPutImage, + cfbCopyArea, + cfbCopyPlane, + cfbPolyPoint, +#ifdef PIXEL_ADDR + cfb8LineSS1Rect, + cfb8SegmentSS1Rect, +#else + cfbLineSS, + cfbSegmentSS, +#endif + miPolyRectangle, + ZeroPolyArc, + cfbFillPoly1RectCopy, + cfbPolyFillRect, + cfbPolyFillArcSolidCopy, + miPolyText8, + miPolyText16, + miImageText8, + miImageText16, + useImageGlyphBlt, + usePolyGlyphBlt, + usePushPixels +}; + +static GCOps cfbTEOps = { + cfbSolidSpansCopy, + cfbSetSpans, + cfbPutImage, + cfbCopyArea, + cfbCopyPlane, + cfbPolyPoint, + cfbLineSS, + cfbSegmentSS, + miPolyRectangle, + ZeroPolyArc, + miFillPolygon, + cfbPolyFillRect, + cfbPolyFillArcSolidCopy, + miPolyText8, + miPolyText16, + miImageText8, + miImageText16, + useTEGlyphBlt, + usePolyGlyphBlt, + usePushPixels +}; + +static GCOps cfbNonTEOps = { + cfbSolidSpansCopy, + cfbSetSpans, + cfbPutImage, + cfbCopyArea, + cfbCopyPlane, + cfbPolyPoint, + cfbLineSS, + cfbSegmentSS, + miPolyRectangle, +#ifdef PIXEL_ADDR + cfbZeroPolyArcSS8Copy, +#else + miZeroPolyArc, +#endif + miFillPolygon, + cfbPolyFillRect, + cfbPolyFillArcSolidCopy, + miPolyText8, + miPolyText16, + miImageText8, + miImageText16, + useImageGlyphBlt, + usePolyGlyphBlt, + usePushPixels +}; + +static GCOps * +cfb32MatchCommon_Underlay( + GCPtr pGC, + cfbPrivGCPtr devPriv) +{ + if (pGC->lineWidth != 0) + return 0; + if (pGC->lineStyle != LineSolid) + return 0; + if (pGC->fillStyle != FillSolid) + return 0; + if (devPriv->rop != GXcopy) + return 0; + if (pGC->font && + FONTMAXBOUNDS(pGC->font,rightSideBearing) - + FONTMINBOUNDS(pGC->font,leftSideBearing) <= 32 && + FONTMINBOUNDS(pGC->font,characterWidth) >= 0) + { + if (TERMINALFONT(pGC->font) +#ifdef FOUR_BIT_CODE + && FONTMAXBOUNDS(pGC->font,characterWidth) >= PGSZB +#endif + ) +#ifdef NO_ONE_RECT + return &cfbTEOps1Rect; +#else + if (devPriv->oneRect) + return &cfbTEOps1Rect; + else + return &cfbTEOps; +#endif + else +#ifdef NO_ONE_RECT + return &cfbNonTEOps1Rect; +#else + if (devPriv->oneRect) + return &cfbNonTEOps1Rect; + else + return &cfbNonTEOps; +#endif + } + return 0; +} + + +void +cfb32ValidateGC_Underlay( + GCPtr pGC, + unsigned long changes, + DrawablePtr pDrawable +){ + int mask; /* stateChanges */ + int index; /* used for stepping through bitfields */ + int new_rrop; + int new_line, new_text, new_fillspans, new_fillarea; + /* flags for changing the proc vector */ + cfbPrivGCPtr devPriv; + int oneRect; + + pGC->lastWinOrg.x = pDrawable->x; + pGC->lastWinOrg.y = pDrawable->y; + devPriv = cfbGetGCPrivate(pGC); + + new_rrop = FALSE; + new_line = FALSE; + new_text = FALSE; + new_fillspans = FALSE; + new_fillarea = FALSE; + + /* + * if the client clip is different or moved OR the subwindowMode has + * changed OR the window's clip has changed since the last validation + * we need to recompute the composite clip + */ + + if ((changes & (GCClipXOrigin|GCClipYOrigin|GCClipMask|GCSubwindowMode)) || + (pDrawable->serialNumber != (pGC->serialNumber & DRAWABLE_SERIAL_BITS)) + ) + { + if(pDrawable->type == DRAWABLE_WINDOW) + miOverlayComputeCompositeClip (pGC, (WindowPtr)pDrawable); + else + miComputeCompositeClip (pGC, pDrawable); +#ifdef NO_ONE_RECT + devPriv->oneRect = FALSE; +#else + oneRect = REGION_NUM_RECTS(pGC->pCompositeClip) == 1; + if (oneRect != devPriv->oneRect) + new_line = TRUE; + devPriv->oneRect = oneRect; +#endif + } + + mask = changes; + while (mask) { + index = lowbit (mask); + mask &= ~index; + + switch (index) { + case GCFunction: + case GCForeground: + new_rrop = TRUE; + break; + case GCPlaneMask: + new_rrop = TRUE; + new_text = TRUE; + break; + case GCBackground: + break; + case GCLineStyle: + case GCLineWidth: + new_line = TRUE; + break; + case GCJoinStyle: + case GCCapStyle: + break; + case GCFillStyle: + new_text = TRUE; + new_fillspans = TRUE; + new_line = TRUE; + new_fillarea = TRUE; + break; + case GCFillRule: + break; + case GCTile: + new_fillspans = TRUE; + new_fillarea = TRUE; + break; + case GCStipple: + new_fillspans = TRUE; + new_fillarea = TRUE; + break; + case GCTileStipXOrigin: + case GCTileStipYOrigin: + break; + case GCFont: + new_text = TRUE; + break; + case GCSubwindowMode: + case GCGraphicsExposures: + case GCClipXOrigin: + case GCClipYOrigin: + case GCClipMask: + case GCDashOffset: + case GCDashList: + case GCArcMode: + default: + break; + } + } + + /* + * If the drawable has changed, ensure suitable + * entries are in the proc vector. + */ + if (pDrawable->serialNumber != (pGC->serialNumber & (DRAWABLE_SERIAL_BITS))) + new_fillspans = TRUE; /* deal with FillSpans later */ + + if (new_rrop) + { + int old_rrop; + + old_rrop = devPriv->rop; + devPriv->rop = cfbReduceRasterOp (pGC->alu, pGC->fgPixel, + pGC->planemask, + &devPriv->and, &devPriv->xor); + if (old_rrop == devPriv->rop) + new_rrop = FALSE; + else + { +#ifdef PIXEL_ADDR + new_line = TRUE; +#endif +#ifdef WriteBitGroup + new_text = TRUE; +#endif + new_fillspans = TRUE; + new_fillarea = TRUE; + } + } + + if(!pGC->ops) + pGC->ops = & cfbNonTEOps; + + + if (new_rrop || new_fillspans || new_text || new_fillarea || new_line) + { + GCOps *newops; + + if ((newops = cfb32MatchCommon_Underlay (pGC, devPriv))) + { + if (pGC->ops->devPrivate.val) + miDestroyGCOps (pGC->ops); + pGC->ops = newops; + new_rrop = new_line = new_fillspans = new_text = new_fillarea = 0; + } + else + { + if (!pGC->ops->devPrivate.val) + { + pGC->ops = miCreateGCOps (pGC->ops); + pGC->ops->devPrivate.val = 1; + } + } + } + + /* deal with the changes we've collected */ + if (new_line) + { + pGC->ops->FillPolygon = miFillPolygon; +#ifdef NO_ONE_RECT + if (pGC->fillStyle == FillSolid) + { + switch (devPriv->rop) { + case GXcopy: + pGC->ops->FillPolygon = cfbFillPoly1RectCopy; + break; + default: + pGC->ops->FillPolygon = cfbFillPoly1RectGeneral; + break; + } + } +#else + if (devPriv->oneRect && pGC->fillStyle == FillSolid) + { + switch (devPriv->rop) { + case GXcopy: + pGC->ops->FillPolygon = cfbFillPoly1RectCopy; + break; + default: + pGC->ops->FillPolygon = cfbFillPoly1RectGeneral; + break; + } + } +#endif + if (pGC->lineWidth == 0) + { +#ifdef PIXEL_ADDR + if ((pGC->lineStyle == LineSolid) && (pGC->fillStyle == FillSolid)) + { + switch (devPriv->rop) + { + case GXxor: + pGC->ops->PolyArc = cfbZeroPolyArcSS8Xor; + break; + case GXcopy: + pGC->ops->PolyArc = cfbZeroPolyArcSS8Copy; + break; + default: + pGC->ops->PolyArc = cfbZeroPolyArcSS8General; + break; + } + } + else +#endif + pGC->ops->PolyArc = miZeroPolyArc; + } + else + pGC->ops->PolyArc = miPolyArc; + pGC->ops->PolySegment = miPolySegment; + switch (pGC->lineStyle) + { + case LineSolid: + if(pGC->lineWidth == 0) + { + if (pGC->fillStyle == FillSolid) + { +#if defined(PIXEL_ADDR) && !defined(NO_ONE_RECT) + if (devPriv->oneRect && + ((pDrawable->x >= pGC->pScreen->width - 32768) && + (pDrawable->y >= pGC->pScreen->height - 32768))) + { + pGC->ops->Polylines = cfb8LineSS1Rect; + pGC->ops->PolySegment = cfb8SegmentSS1Rect; + } else +#endif +#ifdef NO_ONE_RECT + { + pGC->ops->Polylines = cfb8LineSS1Rect; + pGC->ops->PolySegment = cfb8SegmentSS1Rect; + } +#else + { + pGC->ops->Polylines = cfbLineSS; + pGC->ops->PolySegment = cfbSegmentSS; + } +#endif + } + else + pGC->ops->Polylines = miZeroLine; + } + else + pGC->ops->Polylines = miWideLine; + break; + case LineOnOffDash: + case LineDoubleDash: + if (pGC->lineWidth == 0 && pGC->fillStyle == FillSolid) + { + pGC->ops->Polylines = cfbLineSD; + pGC->ops->PolySegment = cfbSegmentSD; + } else + pGC->ops->Polylines = miWideDash; + break; + } + } + + if (new_text && (pGC->font)) + { + if (FONTMAXBOUNDS(pGC->font,rightSideBearing) - + FONTMINBOUNDS(pGC->font,leftSideBearing) > 32 || + FONTMINBOUNDS(pGC->font,characterWidth) < 0) + { + pGC->ops->PolyGlyphBlt = miPolyGlyphBlt; + pGC->ops->ImageGlyphBlt = miImageGlyphBlt; + } + else + { +#ifdef WriteBitGroup + if (pGC->fillStyle == FillSolid) + { + if (devPriv->rop == GXcopy) + pGC->ops->PolyGlyphBlt = cfbPolyGlyphBlt8; + else +#ifdef FOUR_BIT_CODE + pGC->ops->PolyGlyphBlt = cfbPolyGlyphRop8; +#else + pGC->ops->PolyGlyphBlt = miPolyGlyphBlt; +#endif + } + else +#endif + pGC->ops->PolyGlyphBlt = miPolyGlyphBlt; + /* special case ImageGlyphBlt for terminal emulator fonts */ +#if !defined(WriteBitGroup) || PSZ == 8 + if (TERMINALFONT(pGC->font) && + (pGC->planemask & PMSK) == PMSK +#ifdef FOUR_BIT_CODE + && FONTMAXBOUNDS(pGC->font,characterWidth) >= PGSZB +#endif + ) + { + pGC->ops->ImageGlyphBlt = useTEGlyphBlt; + } + else +#endif + { +#ifdef WriteBitGroup + if (devPriv->rop == GXcopy && + pGC->fillStyle == FillSolid && + (pGC->planemask & PMSK) == PMSK) + pGC->ops->ImageGlyphBlt = cfbImageGlyphBlt8; + else +#endif + pGC->ops->ImageGlyphBlt = miImageGlyphBlt; + } + } + } + + + if (new_fillspans) { + switch (pGC->fillStyle) { + case FillSolid: + switch (devPriv->rop) { + case GXcopy: + pGC->ops->FillSpans = cfbSolidSpansCopy; + break; + case GXxor: + pGC->ops->FillSpans = cfbSolidSpansXor; + break; + default: + pGC->ops->FillSpans = cfbSolidSpansGeneral; + break; + } + break; + case FillTiled: + pGC->ops->FillSpans = cfbUnnaturalTileFS; + break; + case FillStippled: + case FillOpaqueStippled: + pGC->ops->FillSpans = cfbUnnaturalStippleFS; + break; + default: + FatalError("cfbValidateGC: illegal fillStyle\n"); + } + } /* end of new_fillspans */ + + if (new_fillarea) { +#ifndef FOUR_BIT_CODE + pGC->ops->PolyFillRect = miPolyFillRect; + if (pGC->fillStyle == FillSolid || pGC->fillStyle == FillTiled) + { + pGC->ops->PolyFillRect = cfbPolyFillRect; + } +#endif +#ifdef FOUR_BIT_CODE + pGC->ops->PushPixels = mfbPushPixels; + if (pGC->fillStyle == FillSolid && devPriv->rop == GXcopy) + pGC->ops->PushPixels = cfbPushPixels8; +#endif + pGC->ops->PolyFillArc = miPolyFillArc; + if (pGC->fillStyle == FillSolid) + { + switch (devPriv->rop) + { + case GXcopy: + pGC->ops->PolyFillArc = cfbPolyFillArcSolidCopy; + break; + default: + pGC->ops->PolyFillArc = cfbPolyFillArcSolidGeneral; + break; + } + } + } +} diff --git a/xorg-server/hw/xfree86/xf8_32bpp/cfbimage.c b/xorg-server/hw/xfree86/xf8_32bpp/cfbimage.c new file mode 100644 index 000000000..01a5a5eb6 --- /dev/null +++ b/xorg-server/hw/xfree86/xf8_32bpp/cfbimage.c @@ -0,0 +1,174 @@ + +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif + +#include <stdlib.h> +#include <string.h> + +#include <X11/X.h> +#include "windowstr.h" +#include "pixmapstr.h" +#include "scrnintstr.h" +#include "gcstruct.h" +#define PSZ 8 +#include "cfb.h" +#undef PSZ +#include "cfb32.h" +#include "cfb8_32.h" +#include "servermd.h" +#include "mi.h" + + +void +cfb8_32GetImage ( + DrawablePtr pDraw, + int sx, int sy, int w, int h, + unsigned int format, + unsigned long planemask, + char *pdstLine +){ + if(!w || !h) return; + + if (!cfbDrawableEnabled (pDraw)) + return; + + if(pDraw->depth == 24){ + cfb32GetImage(pDraw, sx, sy, w, h, format, planemask, pdstLine); + return; + } + + if((pDraw->bitsPerPixel == 8) || (pDraw->bitsPerPixel == 1)){ + cfbGetImage(pDraw, sx, sy, w, h, format, planemask, pdstLine); + return; + } + + /* source is depth 8, 32 bpp */ + if(format != ZPixmap) { + miGetImage(pDraw, sx, sy, w, h, format, planemask, pdstLine); + return; + } else { + BoxRec box; + DDXPointRec ptSrc; + RegionRec rgnDst; + ScreenPtr pScreen; + PixmapPtr pPixmap; + + pScreen = pDraw->pScreen; + pPixmap = GetScratchPixmapHeader(pScreen, w, h, 8, 8, + PixmapBytePad(w,8), (pointer)pdstLine); + if (!pPixmap) + return; + if ((planemask & 0xff) != 0xff) + memset((char *)pdstLine, 0, pPixmap->devKind * h); + ptSrc.x = sx + pDraw->x; + ptSrc.y = sy + pDraw->y; + box.x1 = 0; + box.y1 = 0; + box.x2 = w; + box.y2 = h; + REGION_INIT(pScreen, &rgnDst, &box, 1); + cfbDoBitblt32To8(pDraw, (DrawablePtr)pPixmap, GXcopy, &rgnDst, + &ptSrc, planemask); + REGION_UNINIT(pScreen, &rgnDst); + FreeScratchPixmapHeader(pPixmap); + } +} + +void +cfb8_32PutImage ( + DrawablePtr pDraw, + GCPtr pGC, + int depth, + int x, int y, int w, int h, + int leftPad, + int format, + char *pImage +){ + if(!w || !h) return; + + if((pDraw->bitsPerPixel == 8) || (format != XYPixmap)){ + cfbPutImage(pDraw, pGC, depth, x, y, w, h, leftPad, format, pImage); + return; + } else { /* moving an 8bpp XYPixmap to a 32bpp screen */ + unsigned long oldFg, oldBg; + XID gcv[3]; + unsigned long oldPlanemask; + unsigned long i; + long bytesPer; + + oldPlanemask = pGC->planemask; + oldFg = pGC->fgPixel; + oldBg = pGC->bgPixel; + gcv[0] = ~0L; + gcv[1] = 0; + DoChangeGC(pGC, GCForeground | GCBackground, gcv, 0); + bytesPer = (long)h * BitmapBytePad(w + leftPad); + + for (i = 0x80000000; i & 0xff000000; i >>= 1, pImage += bytesPer) + { + if (i & oldPlanemask) + { + gcv[0] = i; + DoChangeGC(pGC, GCPlaneMask, gcv, 0); + ValidateGC(pDraw, pGC); + (*pGC->ops->PutImage)(pDraw, pGC, 1, x, y, w, h, leftPad, + XYBitmap, pImage); + } + } + gcv[0] = oldPlanemask; + gcv[1] = oldFg; + gcv[2] = oldBg; + DoChangeGC(pGC, GCPlaneMask | GCForeground | GCBackground, gcv, 0); + ValidateGC(pDraw, pGC); + } +} + + + + +void +cfb8_32GetSpans( + DrawablePtr pDraw, + int wMax, + DDXPointPtr ppt, + int *pwidth, + int nspans, + char *pDst +){ + int pitch, i; + CARD8 *ptr, *ptrBase; + + if (!cfbDrawableEnabled (pDraw)) + return; + + if(pDraw->bitsPerPixel == 1) { + mfbGetSpans(pDraw, wMax, ppt, pwidth, nspans, pDst); + return; + } + + if(pDraw->depth == 24) { + cfb32GetSpans(pDraw, wMax, ppt, pwidth, nspans, pDst); + return; + } else if(pDraw->bitsPerPixel == 8) { + cfbGetSpans(pDraw, wMax, ppt, pwidth, nspans, pDst); + return; + } + + /* gotta get spans from a depth 8 window */ + cfbGetByteWidthAndPointer(pDraw, pitch, ptrBase); + ptrBase += 3; /* point to top byte */ + + while(nspans--) { + ptr = ptrBase + (ppt->y * pitch) + (ppt->x << 2); + + for(i = *pwidth; i--; ptr += 4) + *(pDst++) = *ptr; + + pDst = (char*)((long)(pDst + 3) & ~3L); + + ppt++; pwidth++; + } +} + + diff --git a/xorg-server/hw/xfree86/xf8_32bpp/cfbpntwin.c b/xorg-server/hw/xfree86/xf8_32bpp/cfbpntwin.c new file mode 100644 index 000000000..fbf597d22 --- /dev/null +++ b/xorg-server/hw/xfree86/xf8_32bpp/cfbpntwin.c @@ -0,0 +1,51 @@ + +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif + +#include <X11/X.h> + +#include "windowstr.h" +#include "regionstr.h" +#include "pixmapstr.h" +#include "scrnintstr.h" + +#define PSZ 8 +#include "cfb.h" +#undef PSZ +#include "cfb32.h" +#include "cfb8_32.h" +#include "mi.h" + +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" +#endif + +void +cfb8_32FillBoxSolid8( + DrawablePtr pDraw, + int nbox, + BoxPtr pbox, + unsigned long color +){ + CARD8 *ptr, *data; + int pitch, height, width, i; + CARD8 c = (CARD8)color; + + cfbGetByteWidthAndPointer(pDraw, pitch, ptr); + ptr += 3; /* point to the top byte */ + + while(nbox--) { + data = ptr + (pbox->y1 * pitch) + (pbox->x1 << 2); + width = (pbox->x2 - pbox->x1) << 2; + height = pbox->y2 - pbox->y1; + + while(height--) { + for(i = 0; i < width; i+=4) + data[i] = c; + data += pitch; + } + pbox++; + } +} diff --git a/xorg-server/hw/xfree86/xf8_32bpp/cfbscrinit.c b/xorg-server/hw/xfree86/xf8_32bpp/cfbscrinit.c new file mode 100644 index 000000000..c3432b803 --- /dev/null +++ b/xorg-server/hw/xfree86/xf8_32bpp/cfbscrinit.c @@ -0,0 +1,311 @@ + + +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif + +#include <X11/X.h> +#include <X11/Xmd.h> +#include "misc.h" +#include "servermd.h" +#include "scrnintstr.h" +#include "pixmapstr.h" +#include "resource.h" +#include "colormap.h" +#include "colormapst.h" +#define PSZ 8 +#include "cfb.h" +#undef PSZ +#include "cfb32.h" +#include "cfb8_32.h" +#include "mi.h" +#include "micmap.h" +#include "mistruct.h" +#include "dix.h" +#include "mibstore.h" +#include "mioverlay.h" +#include "xf86.h" +#include "xf86str.h" +#include "globals.h" + +/* CAUTION: We require that cfb8 and cfb32 were NOT + compiled with CFB_NEED_SCREEN_PRIVATE */ + +static DevPrivateKey cfb8_32GCPrivateKey = &cfb8_32GCPrivateKey; +DevPrivateKey cfb8_32GetGCPrivateKey(void) +{ + return cfb8_32GCPrivateKey; +} + +static DevPrivateKey cfb8_32ScreenPrivateKey = &cfb8_32ScreenPrivateKey; +DevPrivateKey cfb8_32GetScreenPrivateKey(void) +{ + return cfb8_32ScreenPrivateKey; +} + +static Bool +cfb8_32AllocatePrivates(ScreenPtr pScreen) +{ + cfb8_32ScreenPtr pScreenPriv; + + if (!(pScreenPriv = xalloc(sizeof(cfb8_32ScreenRec)))) + return FALSE; + + dixSetPrivate(&pScreen->devPrivates, cfb8_32ScreenPrivateKey, pScreenPriv); + + + /* All cfb will have the same GC and Window private indicies */ + if(!mfbAllocatePrivates(pScreen, &cfbGCPrivateKey)) + return FALSE; + + if(!dixRequestPrivate(cfbGCPrivateKey, sizeof(cfbPrivGC))) + return FALSE; + + if(!dixRequestPrivate(cfb8_32GCPrivateKey, sizeof(cfb8_32GCRec))) + return FALSE; + + return TRUE; +} + +static void DestroyColormapNoop( + ColormapPtr pColormap) +{ + /* NOOP */ +} + +static void StoreColorsNoop( + ColormapPtr pColormap, + int ndef, + xColorItem * pdef) +{ + /* NOOP */ +} + +static Bool +cfb8_32SetupScreen( + ScreenPtr pScreen, + pointer pbits, /* pointer to screen bitmap */ + int xsize, int ysize, /* in pixels */ + int dpix, int dpiy, /* dots per inch */ + int width /* pixel width of frame buffer */ +){ + if (!cfb8_32AllocatePrivates(pScreen)) + return FALSE; + pScreen->defColormap = FakeClientID(0); + /* let CreateDefColormap do whatever it wants for pixels */ + pScreen->blackPixel = pScreen->whitePixel = (Pixel) 0; + pScreen->QueryBestSize = mfbQueryBestSize; + /* SaveScreen */ + pScreen->GetImage = cfb8_32GetImage; + pScreen->GetSpans = cfb8_32GetSpans; + pScreen->CreateWindow = cfb8_32CreateWindow; + pScreen->DestroyWindow = cfb8_32DestroyWindow; + pScreen->PositionWindow = cfb8_32PositionWindow; + pScreen->ChangeWindowAttributes = cfb8_32ChangeWindowAttributes; + pScreen->RealizeWindow = cfb32MapWindow; /* OK */ + pScreen->UnrealizeWindow = cfb32UnmapWindow; /* OK */ + pScreen->CopyWindow = cfb8_32CopyWindow; + pScreen->CreatePixmap = cfb32CreatePixmap; /* OK */ + pScreen->DestroyPixmap = cfb32DestroyPixmap; /* OK */ + pScreen->RealizeFont = mfbRealizeFont; + pScreen->UnrealizeFont = mfbUnrealizeFont; + pScreen->CreateGC = cfb8_32CreateGC; + pScreen->CreateColormap = miInitializeColormap; + pScreen->DestroyColormap = DestroyColormapNoop; + pScreen->InstallColormap = miInstallColormap; + pScreen->UninstallColormap = miUninstallColormap; + pScreen->ListInstalledColormaps = miListInstalledColormaps; + pScreen->StoreColors = StoreColorsNoop; + pScreen->ResolveColor = miResolveColor; + pScreen->BitmapToRegion = mfbPixmapToRegion; + + mfbRegisterCopyPlaneProc (pScreen, cfb8_32CopyPlane); + return TRUE; +} + +typedef struct { + pointer pbits; + int width; +} miScreenInitParmsRec, *miScreenInitParmsPtr; + +static Bool +cfb8_32CreateScreenResources(ScreenPtr pScreen) +{ + miScreenInitParmsPtr pScrInitParms; + int pitch; + Bool retval; + + /* get the pitch before mi destroys it */ + pScrInitParms = (miScreenInitParmsPtr)pScreen->devPrivate; + pitch = pScrInitParms->width << 2; + + if((retval = miCreateScreenResources(pScreen))) { + /* fix the screen pixmap */ + PixmapPtr pPix = (PixmapPtr)pScreen->devPrivate; + pPix->drawable.bitsPerPixel = 32; + pPix->drawable.depth = 8; + pPix->devKind = pitch; + } + + return retval; +} + + +static Bool +cfb8_32CloseScreen (int i, ScreenPtr pScreen) +{ + cfb8_32ScreenPtr pScreenPriv = CFB8_32_GET_SCREEN_PRIVATE(pScreen); + if(pScreenPriv->visualData) + xfree(pScreenPriv->visualData); + + xfree((pointer) pScreenPriv); + dixSetPrivate(&pScreen->devPrivates, cfb8_32ScreenPrivateKey, NULL); + + return(cfb32CloseScreen(i, pScreen)); +} + +static void +cfb8_32TransFunc( + ScreenPtr pScreen, + int nbox, + BoxPtr pbox +){ + cfb8_32FillBoxSolid8(&(WindowTable[pScreen->myNum]->drawable), + nbox, pbox, xf86Screens[pScreen->myNum]->colorKey); +} + +static Bool +cfb8_32InOverlayFunc(WindowPtr pWin) +{ + return (pWin->drawable.depth == 8); +} + +static Bool +cfb8_32FinishScreenInit( + ScreenPtr pScreen, + pointer pbits, /* pointer to screen bitmap */ + int xsize, int ysize, /* in pixels */ + int dpix, int dpiy, /* dots per inch */ + int width /* pixel width of frame buffer */ +){ + VisualPtr visuals; + DepthPtr depths; + int nvisuals; + int ndepths; + int rootdepth; + VisualID defaultVisual; + + rootdepth = 0; + if (!miInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &rootdepth, + &defaultVisual,((unsigned long)1<<(32-1)), 8, -1)) + return FALSE; + if (! miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, + rootdepth, ndepths, depths, + defaultVisual, nvisuals, visuals)) + return FALSE; + + pScreen->CreateScreenResources = cfb8_32CreateScreenResources; + pScreen->CloseScreen = cfb8_32CloseScreen; + pScreen->GetScreenPixmap = cfb32GetScreenPixmap; /* OK */ + pScreen->SetScreenPixmap = cfb32SetScreenPixmap; /* OK */ + + if (! miInitOverlay(pScreen, cfb8_32InOverlayFunc, cfb8_32TransFunc)) + return FALSE; + + return TRUE; +} + +static void +cfb8_32EnableDisableFBAccess ( + int index, + Bool enable +){ + ScreenPtr pScreen = screenInfo.screens[index]; + cfb8_32ScreenPtr pScreenPriv = CFB8_32_GET_SCREEN_PRIVATE(pScreen); + + miOverlaySetRootClip(pScreen, enable); + + (*pScreenPriv->EnableDisableFBAccess) (index, enable); +} + +static Atom overlayVisualsAtom; + +typedef struct { + CARD32 overlay_visual; + CARD32 transparent_type; + CARD32 value; + CARD32 layer; +} overlayVisualRec; + +static void +cfb8_32SetupVisuals (ScreenPtr pScreen) +{ + cfb8_32ScreenPtr pScreenPriv = CFB8_32_GET_SCREEN_PRIVATE(pScreen); + char atomString[] = {"SERVER_OVERLAY_VISUALS"}; + overlayVisualRec *overlayVisuals; + VisualID *visuals = NULL; + int numVisuals = 0; + DepthPtr pDepth = pScreen->allowedDepths; + int numDepths = pScreen->numDepths; + int i; + + /* find depth 8 visuals */ + for(i = 0; i < numDepths; i++, pDepth++) { + if(pDepth->depth == 8) { + numVisuals = pDepth->numVids; + visuals = pDepth->vids; + break; + } + } + + if(!numVisuals || !visuals) { + ErrorF("No overlay visuals found!\n"); + return; + } + + if(!(overlayVisuals = xalloc(numVisuals * sizeof(overlayVisualRec)))) + return; + + for(i = 0; i < numVisuals; i++) { + overlayVisuals[i].overlay_visual = visuals[i]; + overlayVisuals[i].transparent_type = 1; /* transparent pixel */ + overlayVisuals[i].value = pScreenPriv->key; + overlayVisuals[i].layer = 1; + } + + overlayVisualsAtom = MakeAtom(atomString, sizeof(atomString) - 1, TRUE); + xf86RegisterRootWindowProperty(pScreen->myNum, overlayVisualsAtom, + overlayVisualsAtom, 32, numVisuals * 4, overlayVisuals); + pScreenPriv->visualData = (pointer)overlayVisuals; +} + +Bool +cfb8_32ScreenInit( + ScreenPtr pScreen, + pointer pbits, /* pointer to screen bitmap */ + int xsize, int ysize, /* in pixels */ + int dpix, int dpiy, /* dots per inch */ + int w /* pixel width of frame buffer */ +){ + cfb8_32ScreenPtr pScreenPriv; + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + + if (!cfb8_32SetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, w)) + return FALSE; + + pScreenPriv = CFB8_32_GET_SCREEN_PRIVATE(pScreen); + pScreenPriv->key = pScrn->colorKey; + pScreenPriv->visualData = NULL; + + + pScreenPriv->EnableDisableFBAccess = pScrn->EnableDisableFBAccess; + pScrn->EnableDisableFBAccess = cfb8_32EnableDisableFBAccess; + + + if(cfb8_32FinishScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, w)) + { + cfb8_32SetupVisuals(pScreen); + return TRUE; + } + return FALSE; +} diff --git a/xorg-server/hw/xfree86/xf8_32bpp/cfbwindow.c b/xorg-server/hw/xfree86/xf8_32bpp/cfbwindow.c new file mode 100644 index 000000000..2e6057f12 --- /dev/null +++ b/xorg-server/hw/xfree86/xf8_32bpp/cfbwindow.c @@ -0,0 +1,116 @@ + + +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif + +#include <stdlib.h> + +#include <X11/X.h> +#include "scrnintstr.h" +#include "windowstr.h" +#define PSZ 8 +#include "cfb.h" +#undef PSZ +#include "cfb32.h" +#include "cfb8_32.h" +#include "mistruct.h" +#include "regionstr.h" +#include "cfbmskbits.h" +#include "mioverlay.h" + + +/* We don't bother with cfb's fastBackground/Border so we don't + need to use the Window privates */ + + +Bool +cfb8_32CreateWindow(WindowPtr pWin) +{ + pWin->drawable.bitsPerPixel = 32; + return TRUE; +} + + +Bool +cfb8_32DestroyWindow(WindowPtr pWin) +{ + return TRUE; +} + +Bool +cfb8_32PositionWindow( + WindowPtr pWin, + int x, int y +){ + return TRUE; +} + +void +cfb8_32CopyWindow(pWin, ptOldOrg, prgnSrc) + WindowPtr pWin; + DDXPointRec ptOldOrg; + RegionPtr prgnSrc; +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + DDXPointPtr ppt, pptSrc; + RegionRec rgnDst; + RegionPtr borderClip = &pWin->borderClip; + BoxPtr pbox; + int dx, dy, i, nbox; + WindowPtr pwinRoot; + Bool doUnderlay = miOverlayCopyUnderlay(pScreen); + Bool freeReg = FALSE; + + pwinRoot = WindowTable[pScreen->myNum]; + + if(doUnderlay) + freeReg = miOverlayCollectUnderlayRegions(pWin, &borderClip); + + REGION_NULL(pScreen, &rgnDst); + + dx = ptOldOrg.x - pWin->drawable.x; + dy = ptOldOrg.y - pWin->drawable.y; + REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy); + REGION_INTERSECT(pScreen, &rgnDst, borderClip, prgnSrc); + + pbox = REGION_RECTS(&rgnDst); + nbox = REGION_NUM_RECTS(&rgnDst); + if(!nbox || + !(pptSrc = (DDXPointPtr )xalloc(nbox * sizeof(DDXPointRec)))) + { + REGION_UNINIT(pScreen, &rgnDst); + return; + } + ppt = pptSrc; + + for (i = nbox; --i >= 0; ppt++, pbox++) + { + ppt->x = pbox->x1 + dx; + ppt->y = pbox->y1 + dy; + } + + if(doUnderlay) + cfbDoBitblt24To24GXcopy((DrawablePtr)pwinRoot, (DrawablePtr)pwinRoot, + GXcopy, &rgnDst, pptSrc, ~0); + else + cfbDoBitblt8To8GXcopy((DrawablePtr)pwinRoot, (DrawablePtr)pwinRoot, + GXcopy, &rgnDst, pptSrc, ~0); + + xfree(pptSrc); + REGION_UNINIT(pScreen, &rgnDst); + if(freeReg) + REGION_DESTROY(pScreen, borderClip); +} + +Bool +cfb8_32ChangeWindowAttributes( + WindowPtr pWin, + unsigned long mask +){ + return TRUE; +} + + + + diff --git a/xorg-server/hw/xfree86/xf8_32bpp/xf86overlay.c b/xorg-server/hw/xfree86/xf8_32bpp/xf86overlay.c new file mode 100644 index 000000000..c63b3cfd1 --- /dev/null +++ b/xorg-server/hw/xfree86/xf8_32bpp/xf86overlay.c @@ -0,0 +1,1179 @@ + +/* + Copyright (C) 1998. The XFree86 Project Inc. + + Written by Mark Vojkovich (mvojkovi@ucsd.edu) +*/ + +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif + +#include "misc.h" +#include "xf86.h" +#include "xf86_OSproc.h" + +#include <X11/X.h> +#include "scrnintstr.h" +#include "regionstr.h" +#include "windowstr.h" +#include "xf86str.h" +#include "migc.h" +#include "gcstruct.h" +#include "pixmapstr.h" +#include "colormapst.h" +#include "cfb8_32.h" + +#define IS_DIRTY 1 +#define IS_SHARED 2 + +/** Screen Functions **/ + +static Bool OverlayCloseScreen (int, ScreenPtr); +static Bool OverlayCreateGC(GCPtr pGC); +static Bool OverlayDestroyPixmap(PixmapPtr); +static PixmapPtr OverlayCreatePixmap(ScreenPtr, int, int, int, unsigned); +static Bool OverlayChangeWindowAttributes(WindowPtr, unsigned long); + +/** Funcs **/ +static void OverlayValidateGC(GCPtr, unsigned long, DrawablePtr); +static void OverlayChangeGC(GCPtr, unsigned long); +static void OverlayCopyGC(GCPtr, unsigned long, GCPtr); +static void OverlayDestroyGC(GCPtr); +static void OverlayChangeClip(GCPtr, int, pointer, int); +static void OverlayDestroyClip(GCPtr); +static void OverlayCopyClip(GCPtr, GCPtr); + + +static PixmapPtr OverlayRefreshPixmap(PixmapPtr); + +static GCFuncs OverlayGCFuncs = { + OverlayValidateGC, OverlayChangeGC, + OverlayCopyGC, OverlayDestroyGC, + OverlayChangeClip, OverlayDestroyClip, + OverlayCopyClip +}; + + +/** Pixmap Ops */ +static void PixmapFillSpans(DrawablePtr, GCPtr, int, DDXPointPtr, int *, + int); +static void PixmapSetSpans(DrawablePtr, GCPtr, char *, DDXPointPtr, + int *, int, int); +static void PixmapPutImage(DrawablePtr, GCPtr, int, int, int, int, int, + int, int, char *); +static void PixmapPushPixels(GCPtr, PixmapPtr, DrawablePtr, int, int, + int, int); +static RegionPtr PixmapCopyArea(DrawablePtr, DrawablePtr, GCPtr, int, int, + int, int, int, int); +static RegionPtr PixmapCopyPlane(DrawablePtr, DrawablePtr, GCPtr, int, int, + int, int, int, int, unsigned long); +static void PixmapPolyPoint(DrawablePtr, GCPtr, int, int, xPoint *); +static void PixmapPolylines(DrawablePtr, GCPtr, int, int, DDXPointPtr); +static void PixmapPolySegment(DrawablePtr, GCPtr, int, xSegment *); +static void PixmapPolyRectangle(DrawablePtr, GCPtr, int, xRectangle *); +static void PixmapPolyArc(DrawablePtr, GCPtr, int, xArc *); +static void PixmapFillPolygon(DrawablePtr, GCPtr, int, int, int, + DDXPointPtr); +static void PixmapPolyFillRect(DrawablePtr, GCPtr, int, xRectangle *); +static void PixmapPolyFillArc(DrawablePtr, GCPtr, int, xArc *); +static int PixmapPolyText8(DrawablePtr, GCPtr, int, int, int, char *); +static int PixmapPolyText16(DrawablePtr, GCPtr, int, int, int, + unsigned short *); +static void PixmapImageText8(DrawablePtr, GCPtr, int, int, int, char *); +static void PixmapImageText16(DrawablePtr, GCPtr, int, int, int, + unsigned short *); +static void PixmapImageGlyphBlt(DrawablePtr, GCPtr, int, int, + unsigned int, CharInfoPtr *, pointer); +static void PixmapPolyGlyphBlt(DrawablePtr, GCPtr, int, int, + unsigned int, CharInfoPtr *, pointer); + +static GCOps PixmapGCOps = { + PixmapFillSpans, PixmapSetSpans, + PixmapPutImage, PixmapCopyArea, + PixmapCopyPlane, PixmapPolyPoint, + PixmapPolylines, PixmapPolySegment, + PixmapPolyRectangle, PixmapPolyArc, + PixmapFillPolygon, PixmapPolyFillRect, + PixmapPolyFillArc, PixmapPolyText8, + PixmapPolyText16, PixmapImageText8, + PixmapImageText16, PixmapImageGlyphBlt, + PixmapPolyGlyphBlt, PixmapPushPixels, + {NULL} /* devPrivate */ +}; + + +/** Window Ops **/ +static void WindowFillSpans(DrawablePtr, GCPtr, int, DDXPointPtr, int *, + int); +static void WindowSetSpans(DrawablePtr, GCPtr, char *, DDXPointPtr, + int *, int, int); +static void WindowPutImage(DrawablePtr, GCPtr, int, int, int, int, int, + int, int, char *); +static void WindowPushPixels(GCPtr, PixmapPtr, DrawablePtr, int, int, + int, int); +static RegionPtr WindowCopyArea(DrawablePtr, DrawablePtr, GCPtr, int, int, + int, int, int, int); +static RegionPtr WindowCopyPlane(DrawablePtr, DrawablePtr, GCPtr, int, int, + int, int, int, int, unsigned long); +static void WindowPolyPoint(DrawablePtr, GCPtr, int, int, xPoint *); +static void WindowPolylines(DrawablePtr, GCPtr, int, int, DDXPointPtr); +static void WindowPolySegment(DrawablePtr, GCPtr, int, xSegment *); +static void WindowPolyRectangle(DrawablePtr, GCPtr, int, xRectangle *); +static void WindowPolyArc(DrawablePtr, GCPtr, int, xArc *); +static void WindowFillPolygon(DrawablePtr, GCPtr, int, int, int, + DDXPointPtr); +static void WindowPolyFillRect(DrawablePtr, GCPtr, int, xRectangle *); +static void WindowPolyFillArc(DrawablePtr, GCPtr, int, xArc *); +static int WindowPolyText8(DrawablePtr, GCPtr, int, int, int, char *); +static int WindowPolyText16(DrawablePtr, GCPtr, int, int, int, + unsigned short *); +static void WindowImageText8(DrawablePtr, GCPtr, int, int, int, char *); +static void WindowImageText16(DrawablePtr, GCPtr, int, int, int, + unsigned short *); +static void WindowImageGlyphBlt(DrawablePtr, GCPtr, int, int, + unsigned int, CharInfoPtr *, pointer); +static void WindowPolyGlyphBlt(DrawablePtr, GCPtr, int, int, + unsigned int, CharInfoPtr *, pointer); + +static GCOps WindowGCOps = { + WindowFillSpans, WindowSetSpans, + WindowPutImage, WindowCopyArea, + WindowCopyPlane, WindowPolyPoint, + WindowPolylines, WindowPolySegment, + WindowPolyRectangle, WindowPolyArc, + WindowFillPolygon, WindowPolyFillRect, + WindowPolyFillArc, WindowPolyText8, + WindowPolyText16, WindowImageText8, + WindowImageText16, WindowImageGlyphBlt, + WindowPolyGlyphBlt, WindowPushPixels, + {NULL} /* devPrivate */ +}; + +/** privates **/ + +typedef struct { + CloseScreenProcPtr CloseScreen; + CreateGCProcPtr CreateGC; + CreatePixmapProcPtr CreatePixmap; + DestroyPixmapProcPtr DestroyPixmap; + ChangeWindowAttributesProcPtr ChangeWindowAttributes; + int LockPrivate; +} OverlayScreenRec, *OverlayScreenPtr; + +typedef struct { + GCFuncs *wrapFuncs; + GCOps *wrapOps; + GCOps *overlayOps; + unsigned long fg; + unsigned long bg; + unsigned long pm; + PixmapPtr tile; +} OverlayGCRec, *OverlayGCPtr; + +typedef struct { + PixmapPtr pix32; + CARD32 dirty; +} OverlayPixmapRec, *OverlayPixmapPtr; + + +static DevPrivateKey OverlayScreenKey = &OverlayScreenKey; +static DevPrivateKey OverlayGCKey = &OverlayGCKey; +static DevPrivateKey OverlayPixmapKey = &OverlayPixmapKey; + +/** Macros **/ + +#define TILE_EXISTS(pGC) (!(pGC)->tileIsPixel && (pGC)->tile.pixmap) + +#define OVERLAY_GET_PIXMAP_PRIVATE(pPix) ((OverlayPixmapPtr) \ + dixLookupPrivate(&(pPix)->devPrivates, OverlayPixmapKey)) + +#define OVERLAY_GET_SCREEN_PRIVATE(pScreen) ((OverlayScreenPtr) \ + dixLookupPrivate(&(pScreen)->devPrivates, OverlayScreenKey)) + +#define OVERLAY_GET_GC_PRIVATE(pGC) ((OverlayGCPtr) \ + dixLookupPrivate(&(pGC)->devPrivates, OverlayGCKey)) + +#define OVERLAY_GC_FUNC_PROLOGUE(pGC)\ + OverlayGCPtr pGCPriv = OVERLAY_GET_GC_PRIVATE(pGC);\ + (pGC)->funcs = pGCPriv->wrapFuncs;\ + if(pGCPriv->overlayOps) \ + (pGC)->ops = pGCPriv->wrapOps + +#define OVERLAY_GC_FUNC_EPILOGUE(pGC)\ + pGCPriv->wrapFuncs = (pGC)->funcs;\ + (pGC)->funcs = &OverlayGCFuncs;\ + if(pGCPriv->overlayOps) { \ + pGCPriv->wrapOps = (pGC)->ops;\ + (pGC)->ops = pGCPriv->overlayOps;\ + } + +#define WINDOW_GC_OP_PROLOGUE(pGC)\ + OverlayScreenPtr pScreenPriv = OVERLAY_GET_SCREEN_PRIVATE((pGC)->pScreen);\ + OverlayGCPtr pGCPriv = OVERLAY_GET_GC_PRIVATE(pGC);\ + unsigned long oldfg = (pGC)->fgPixel;\ + unsigned long oldbg = (pGC)->bgPixel;\ + unsigned long oldpm = (pGC)->planemask;\ + PixmapPtr oldtile = (pGC)->tile.pixmap;\ + (pGC)->fgPixel = pGCPriv->fg;\ + (pGC)->bgPixel = pGCPriv->bg;\ + (pGC)->planemask = pGCPriv->pm;\ + if(pGCPriv->tile) (pGC)->tile.pixmap = pGCPriv->tile;\ + (pGC)->funcs = pGCPriv->wrapFuncs;\ + (pGC)->ops = pGCPriv->wrapOps;\ + pScreenPriv->LockPrivate++ + + +#define WINDOW_GC_OP_EPILOGUE(pGC)\ + pGCPriv->wrapOps = (pGC)->ops;\ + pGCPriv->wrapFuncs = (pGC)->funcs;\ + (pGC)->fgPixel = oldfg;\ + (pGC)->bgPixel = oldbg;\ + (pGC)->planemask = oldpm;\ + (pGC)->tile.pixmap = oldtile;\ + (pGC)->funcs = &OverlayGCFuncs;\ + (pGC)->ops = &WindowGCOps;\ + pScreenPriv->LockPrivate-- + + +#define PIXMAP_GC_OP_PROLOGUE(pGC)\ + OverlayGCPtr pGCPriv = OVERLAY_GET_GC_PRIVATE(pGC);\ + OverlayPixmapPtr pPixPriv = OVERLAY_GET_PIXMAP_PRIVATE((PixmapPtr)pDraw);\ + pGC->funcs = pGCPriv->wrapFuncs;\ + pGC->ops = pGCPriv->wrapOps + +#define PIXMAP_GC_OP_EPILOGUE(pGC)\ + pGCPriv->wrapOps = pGC->ops;\ + pGC->funcs = &OverlayGCFuncs;\ + pGC->ops = &PixmapGCOps;\ + pPixPriv->dirty |= IS_DIRTY + + +Bool +xf86Overlay8Plus32Init (ScreenPtr pScreen) +{ + OverlayScreenPtr pScreenPriv; + + if (!dixRequestPrivate(OverlayGCKey, sizeof(OverlayGCRec))) + return FALSE; + + if (!dixRequestPrivate(OverlayPixmapKey, sizeof(OverlayPixmapRec))) + return FALSE; + + if (!(pScreenPriv = xalloc(sizeof(OverlayScreenRec)))) + return FALSE; + + dixSetPrivate(&pScreen->devPrivates, OverlayScreenKey, pScreenPriv); + + pScreenPriv->CreateGC = pScreen->CreateGC; + pScreenPriv->CloseScreen = pScreen->CloseScreen; + pScreenPriv->CreatePixmap = pScreen->CreatePixmap; + pScreenPriv->DestroyPixmap = pScreen->DestroyPixmap; + pScreenPriv->ChangeWindowAttributes = pScreen->ChangeWindowAttributes; + + pScreen->CreateGC = OverlayCreateGC; + pScreen->CloseScreen = OverlayCloseScreen; + pScreen->CreatePixmap = OverlayCreatePixmap; + pScreen->DestroyPixmap = OverlayDestroyPixmap; + pScreen->ChangeWindowAttributes = OverlayChangeWindowAttributes; + + pScreenPriv->LockPrivate = 0; + + /* allocate the key in the default map */ + if(pScreen->defColormap) { + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ColormapPtr pmap; + xColorItem color; + + pmap = (ColormapPtr)LookupIDByType(pScreen->defColormap, RT_COLORMAP); + + pmap->red[pScrn->colorKey].refcnt = AllocPrivate; + pmap->red[pScrn->colorKey].fShared = FALSE; + pmap->freeRed--; + + color.red = color.blue = color.green = 0; + color.pixel = pScrn->colorKey; + color.flags = DoRed | DoGreen | DoBlue; + + StoreColors(pmap, 1, &color); + } + + return TRUE; +} + + +/*********************** Screen Funcs ***********************/ + +Bool +OverlayCreateGC(GCPtr pGC) +{ + ScreenPtr pScreen = pGC->pScreen; + OverlayGCPtr pGCPriv = OVERLAY_GET_GC_PRIVATE(pGC); + OverlayScreenPtr pScreenPriv = OVERLAY_GET_SCREEN_PRIVATE(pScreen); + Bool ret; + + pScreen->CreateGC = pScreenPriv->CreateGC; + + if((ret = (*pScreen->CreateGC)(pGC)) && (pGC->depth != 1)) { + pGCPriv->wrapFuncs = pGC->funcs; + pGC->funcs = &OverlayGCFuncs; + pGCPriv->wrapOps = NULL; + pGCPriv->overlayOps = NULL; + pGCPriv->tile = NULL; + } + + pScreen->CreateGC = OverlayCreateGC; + + return ret; +} + +static PixmapPtr +OverlayCreatePixmap(ScreenPtr pScreen, int w, int h, int depth, + unsigned usage_hint) +{ + OverlayScreenPtr pScreenPriv = OVERLAY_GET_SCREEN_PRIVATE(pScreen); + PixmapPtr pPix; + + pScreen->CreatePixmap = pScreenPriv->CreatePixmap; + pPix = (*pScreen->CreatePixmap) (pScreen, w, h, depth, usage_hint); + pScreen->CreatePixmap = OverlayCreatePixmap; + + /* We initialize all the privates */ + if(pPix) { + OverlayPixmapPtr pPriv = OVERLAY_GET_PIXMAP_PRIVATE(pPix); + pPriv->pix32 = NULL; + pPriv->dirty = IS_DIRTY; + if(!w || !h) + pPriv->dirty |= IS_SHARED; + } + + return pPix; +} + +static Bool +OverlayDestroyPixmap(PixmapPtr pPix) +{ + ScreenPtr pScreen = pPix->drawable.pScreen; + OverlayScreenPtr pScreenPriv = OVERLAY_GET_SCREEN_PRIVATE(pScreen); + Bool result; + + pScreen->DestroyPixmap = pScreenPriv->DestroyPixmap; + + if((pPix->refcnt == 1) && (pPix->drawable.bitsPerPixel == 8)) { + OverlayPixmapPtr pPriv = OVERLAY_GET_PIXMAP_PRIVATE(pPix); + if(pPriv->pix32) { + if(pPriv->pix32->refcnt != 1) + ErrorF("Warning! private pix refcnt = %i\n", pPriv->pix32->refcnt); + (*pScreen->DestroyPixmap)(pPriv->pix32); + } + pPriv->pix32 = NULL; + } + + result = (*pScreen->DestroyPixmap) (pPix); + pScreen->DestroyPixmap = OverlayDestroyPixmap; + + return result; +} + +static Bool +OverlayCloseScreen (int i, ScreenPtr pScreen) +{ + OverlayScreenPtr pScreenPriv = OVERLAY_GET_SCREEN_PRIVATE(pScreen); + + pScreen->CreateGC = pScreenPriv->CreateGC; + pScreen->CloseScreen = pScreenPriv->CloseScreen; + pScreen->CreatePixmap = pScreenPriv->CreatePixmap; + pScreen->DestroyPixmap = pScreenPriv->DestroyPixmap; + pScreen->ChangeWindowAttributes = pScreenPriv->ChangeWindowAttributes; + + xfree ((pointer) pScreenPriv); + + return (*pScreen->CloseScreen) (i, pScreen); +} + + + +static Bool +OverlayChangeWindowAttributes (WindowPtr pWin, unsigned long mask) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + OverlayScreenPtr pScreenPriv = OVERLAY_GET_SCREEN_PRIVATE(pScreen); + Bool result; + + if(pWin->drawable.depth == 8) { + if((mask & CWBackPixmap) && + (pWin->backgroundState == BackgroundPixmap)) + OverlayRefreshPixmap(pWin->background.pixmap); + + if((mask & CWBorderPixmap) && !pWin->borderIsPixel) + OverlayRefreshPixmap(pWin->border.pixmap); + } + + pScreen->ChangeWindowAttributes = pScreenPriv->ChangeWindowAttributes; + result = (*pScreen->ChangeWindowAttributes) (pWin, mask); + pScreen->ChangeWindowAttributes = OverlayChangeWindowAttributes; + + return result; +} + +/*********************** GC Funcs *****************************/ + + +static PixmapPtr +OverlayRefreshPixmap(PixmapPtr pix8) +{ + OverlayPixmapPtr pixPriv = OVERLAY_GET_PIXMAP_PRIVATE(pix8); + ScreenPtr pScreen = pix8->drawable.pScreen; + + if(!pixPriv->pix32) { + PixmapPtr newPix; + + newPix = (*pScreen->CreatePixmap)(pScreen, pix8->drawable.width, + pix8->drawable.height, 24, 0); + newPix->drawable.depth = 8; /* Bad Mark! Bad Mark! */ + pixPriv->pix32 = newPix; + } + + if(pixPriv->dirty) { + OverlayScreenPtr pScreenPriv = OVERLAY_GET_SCREEN_PRIVATE(pScreen); + GCPtr pGC; + + pGC = GetScratchGC(8, pScreen); + + pScreenPriv->LockPrivate++; /* don't modify this one */ + ValidateGC((DrawablePtr)pixPriv->pix32, pGC); + + (*pGC->ops->CopyArea)((DrawablePtr)pix8, (DrawablePtr)pixPriv->pix32, + pGC, 0, 0, pix8->drawable.width, pix8->drawable.height, 0, 0); + pScreenPriv->LockPrivate--; + FreeScratchGC(pGC); + + pixPriv->dirty &= ~IS_DIRTY; + pixPriv->pix32->drawable.serialNumber = NEXT_SERIAL_NUMBER; + } + + return pixPriv->pix32; +} + + +static void +OverlayValidateGC( + GCPtr pGC, + unsigned long changes, + DrawablePtr pDraw +){ + OverlayScreenPtr pScreenPriv = OVERLAY_GET_SCREEN_PRIVATE(pGC->pScreen); + OVERLAY_GC_FUNC_PROLOGUE (pGC); + + if(pScreenPriv->LockPrivate < 0) { + ErrorF("Something is wrong in OverlayValidateGC!\n"); + pScreenPriv->LockPrivate = 0; + } + + if(pGC->depth == 24) { + unsigned long oldpm = pGC->planemask; + pGCPriv->overlayOps = NULL; + + if(pDraw->type == DRAWABLE_WINDOW) + pGC->planemask &= 0x00ffffff; + else + pGC->planemask |= 0xff000000; + + if(oldpm != pGC->planemask) changes |= GCPlaneMask; + + (*pGC->funcs->ValidateGC)(pGC, changes, pDraw); + + } else { /* depth == 8 */ + unsigned long newChanges = 0; + + if(pDraw->bitsPerPixel == 32) { + + if(pGC->fillStyle == FillTiled) + pGCPriv->tile = OverlayRefreshPixmap(pGC->tile.pixmap); + else pGCPriv->tile = NULL; + + if(pGCPriv->overlayOps != &WindowGCOps) { + newChanges = GCForeground | GCBackground | GCPlaneMask; + if(pGCPriv->tile) + newChanges |= GCTile; + } + pGCPriv->overlayOps = &WindowGCOps; + + if(!pScreenPriv->LockPrivate) { + unsigned long oldfg = pGC->fgPixel; + unsigned long oldbg = pGC->bgPixel; + unsigned long oldpm = pGC->planemask; + PixmapPtr oldtile = pGC->tile.pixmap; + + pGC->fgPixel = pGCPriv->fg = oldfg << 24; + pGC->bgPixel = pGCPriv->bg = oldbg << 24; + pGC->planemask = pGCPriv->pm = oldpm << 24; + if(pGCPriv->tile) + pGC->tile.pixmap = pGCPriv->tile; + + (*pGC->funcs->ValidateGC)(pGC, changes | newChanges, pDraw); + + pGC->fgPixel = oldfg; + pGC->bgPixel = oldbg; + pGC->planemask = oldpm; + pGC->tile.pixmap = oldtile; + } else { + pGCPriv->fg = pGC->fgPixel; + pGCPriv->bg = pGC->bgPixel; + pGCPriv->pm = pGC->planemask; + + (*pGC->funcs->ValidateGC)(pGC, changes | newChanges, pDraw); + } + + } else { /* bitsPerPixel == 8 */ + if(pGCPriv->overlayOps == &WindowGCOps) { + newChanges = GCForeground | GCBackground | GCPlaneMask; + if(pGCPriv->tile) + newChanges |= GCTile; + } + pGCPriv->overlayOps = &PixmapGCOps; + + (*pGC->funcs->ValidateGC)(pGC, changes | newChanges, pDraw); + } + } + + OVERLAY_GC_FUNC_EPILOGUE (pGC); +} + + +static void +OverlayDestroyGC(GCPtr pGC) +{ + OVERLAY_GC_FUNC_PROLOGUE (pGC); + (*pGC->funcs->DestroyGC)(pGC); + OVERLAY_GC_FUNC_EPILOGUE (pGC); +} + +static void +OverlayChangeGC ( + GCPtr pGC, + unsigned long mask +){ + OVERLAY_GC_FUNC_PROLOGUE (pGC); + (*pGC->funcs->ChangeGC) (pGC, mask); + OVERLAY_GC_FUNC_EPILOGUE (pGC); +} + +static void +OverlayCopyGC ( + GCPtr pGCSrc, + unsigned long mask, + GCPtr pGCDst +){ + OVERLAY_GC_FUNC_PROLOGUE (pGCDst); + (*pGCDst->funcs->CopyGC) (pGCSrc, mask, pGCDst); + OVERLAY_GC_FUNC_EPILOGUE (pGCDst); +} +static void +OverlayChangeClip ( + GCPtr pGC, + int type, + pointer pvalue, + int nrects +){ + OVERLAY_GC_FUNC_PROLOGUE (pGC); + (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects); + OVERLAY_GC_FUNC_EPILOGUE (pGC); +} + +static void +OverlayCopyClip(GCPtr pgcDst, GCPtr pgcSrc) +{ + OVERLAY_GC_FUNC_PROLOGUE (pgcDst); + (* pgcDst->funcs->CopyClip)(pgcDst, pgcSrc); + OVERLAY_GC_FUNC_EPILOGUE (pgcDst); +} + +static void +OverlayDestroyClip(GCPtr pGC) +{ + OVERLAY_GC_FUNC_PROLOGUE (pGC); + (* pGC->funcs->DestroyClip)(pGC); + OVERLAY_GC_FUNC_EPILOGUE (pGC); +} + + + +/******************* Window GC ops ***********************/ + +static void +WindowFillSpans( + DrawablePtr pDraw, + GC *pGC, + int nInit, + DDXPointPtr pptInit, + int *pwidthInit, + int fSorted +){ + WINDOW_GC_OP_PROLOGUE(pGC); + (*pGC->ops->FillSpans)(pDraw, pGC, nInit, pptInit, pwidthInit, fSorted); + WINDOW_GC_OP_EPILOGUE(pGC); +} + +static void +WindowSetSpans( + DrawablePtr pDraw, + GCPtr pGC, + char *pcharsrc, + register DDXPointPtr ppt, + int *pwidth, + int nspans, + int fSorted +){ + WINDOW_GC_OP_PROLOGUE(pGC); + (*pGC->ops->SetSpans)(pDraw, pGC, pcharsrc, ppt, pwidth, nspans, fSorted); + WINDOW_GC_OP_EPILOGUE(pGC); +} + +static void +WindowPutImage( + DrawablePtr pDraw, + GCPtr pGC, + int depth, + int x, int y, int w, int h, + int leftPad, + int format, + char *pImage +){ + WINDOW_GC_OP_PROLOGUE(pGC); + (*pGC->ops->PutImage)(pDraw, pGC, depth, x, y, w, h, + leftPad, format, pImage); + WINDOW_GC_OP_EPILOGUE(pGC); +} + +static RegionPtr +WindowCopyArea( + DrawablePtr pSrc, + DrawablePtr pDst, + GC *pGC, + int srcx, int srcy, + int width, int height, + int dstx, int dsty +){ + RegionPtr ret; + + WINDOW_GC_OP_PROLOGUE(pGC); + ret = (*pGC->ops->CopyArea)(pSrc, pDst, + pGC, srcx, srcy, width, height, dstx, dsty); + WINDOW_GC_OP_EPILOGUE(pGC); + return ret; +} + +static RegionPtr +WindowCopyPlane( + DrawablePtr pSrc, + DrawablePtr pDst, + GCPtr pGC, + int srcx, int srcy, + int width, int height, + int dstx, int dsty, + unsigned long bitPlane +){ + RegionPtr ret; + + WINDOW_GC_OP_PROLOGUE(pGC); + ret = (*pGC->ops->CopyPlane)(pSrc, pDst, + pGC, srcx, srcy, width, height, dstx, dsty, bitPlane); + WINDOW_GC_OP_EPILOGUE(pGC); + return ret; +} + +static void +WindowPolyPoint( + DrawablePtr pDraw, + GCPtr pGC, + int mode, + int npt, + xPoint *pptInit +){ + WINDOW_GC_OP_PROLOGUE(pGC); + (*pGC->ops->PolyPoint)(pDraw, pGC, mode, npt, pptInit); + WINDOW_GC_OP_EPILOGUE(pGC); +} + +static void +WindowPolylines( + DrawablePtr pDraw, + GCPtr pGC, + int mode, + int npt, + DDXPointPtr pptInit +){ + WINDOW_GC_OP_PROLOGUE(pGC); + (*pGC->ops->Polylines)(pDraw, pGC, mode, npt, pptInit); + WINDOW_GC_OP_EPILOGUE(pGC); +} + +static void +WindowPolySegment( + DrawablePtr pDraw, + GCPtr pGC, + int nseg, + xSegment *pSeg +){ + WINDOW_GC_OP_PROLOGUE(pGC); + (*pGC->ops->PolySegment)(pDraw, pGC, nseg, pSeg); + WINDOW_GC_OP_EPILOGUE(pGC); +} + +static void +WindowPolyRectangle( + DrawablePtr pDraw, + GCPtr pGC, + int nRectsInit, + xRectangle *pRectsInit +){ + WINDOW_GC_OP_PROLOGUE(pGC); + (*pGC->ops->PolyRectangle)(pDraw, pGC, nRectsInit, pRectsInit); + WINDOW_GC_OP_EPILOGUE(pGC); +} + +static void +WindowPolyArc( + DrawablePtr pDraw, + GCPtr pGC, + int narcs, + xArc *parcs +){ + WINDOW_GC_OP_PROLOGUE(pGC); + (*pGC->ops->PolyArc)(pDraw, pGC, narcs, parcs); + WINDOW_GC_OP_EPILOGUE(pGC); +} + +static void +WindowFillPolygon( + DrawablePtr pDraw, + GCPtr pGC, + int shape, + int mode, + int count, + DDXPointPtr ptsIn +){ + WINDOW_GC_OP_PROLOGUE(pGC); + (*pGC->ops->FillPolygon)(pDraw, pGC, shape, mode, count, ptsIn); + WINDOW_GC_OP_EPILOGUE(pGC); +} + +static void +WindowPolyFillRect( + DrawablePtr pDraw, + GCPtr pGC, + int nrectFill, + xRectangle *prectInit +){ + WINDOW_GC_OP_PROLOGUE(pGC); + (*pGC->ops->PolyFillRect)(pDraw, pGC, nrectFill, prectInit); + WINDOW_GC_OP_EPILOGUE(pGC); +} + +static void +WindowPolyFillArc( + DrawablePtr pDraw, + GCPtr pGC, + int narcs, + xArc *parcs +){ + WINDOW_GC_OP_PROLOGUE(pGC); + (*pGC->ops->PolyFillArc)(pDraw, pGC, narcs, parcs); + WINDOW_GC_OP_EPILOGUE(pGC); +} + +static int +WindowPolyText8( + DrawablePtr pDraw, + GCPtr pGC, + int x, + int y, + int count, + char *chars +){ + int ret; + + WINDOW_GC_OP_PROLOGUE(pGC); + ret = (*pGC->ops->PolyText8)(pDraw, pGC, x, y, count, chars); + WINDOW_GC_OP_EPILOGUE(pGC); + return ret; +} + +static int +WindowPolyText16( + DrawablePtr pDraw, + GCPtr pGC, + int x, + int y, + int count, + unsigned short *chars +){ + int ret; + + WINDOW_GC_OP_PROLOGUE(pGC); + ret = (*pGC->ops->PolyText16)(pDraw, pGC, x, y, count, chars); + WINDOW_GC_OP_EPILOGUE(pGC); + return ret; +} + +static void +WindowImageText8( + DrawablePtr pDraw, + GCPtr pGC, + int x, + int y, + int count, + char *chars +){ + WINDOW_GC_OP_PROLOGUE(pGC); + (*pGC->ops->ImageText8)(pDraw, pGC, x, y, count, chars); + WINDOW_GC_OP_EPILOGUE(pGC); +} + +static void +WindowImageText16( + DrawablePtr pDraw, + GCPtr pGC, + int x, + int y, + int count, + unsigned short *chars +){ + WINDOW_GC_OP_PROLOGUE(pGC); + (*pGC->ops->ImageText16)(pDraw, pGC, x, y, count, chars); + WINDOW_GC_OP_EPILOGUE(pGC); +} + +static void +WindowImageGlyphBlt( + DrawablePtr pDraw, + GCPtr pGC, + int xInit, int yInit, + unsigned int nglyph, + CharInfoPtr *ppci, + pointer pglyphBase +){ + WINDOW_GC_OP_PROLOGUE(pGC); + (*pGC->ops->ImageGlyphBlt)(pDraw, pGC, xInit, yInit, nglyph, + ppci, pglyphBase); + WINDOW_GC_OP_EPILOGUE(pGC); +} + +static void +WindowPolyGlyphBlt( + DrawablePtr pDraw, + GCPtr pGC, + int xInit, int yInit, + unsigned int nglyph, + CharInfoPtr *ppci, + pointer pglyphBase +){ + WINDOW_GC_OP_PROLOGUE(pGC); + (*pGC->ops->PolyGlyphBlt)(pDraw, pGC, xInit, yInit, nglyph, + ppci, pglyphBase); + WINDOW_GC_OP_EPILOGUE(pGC); +} + +static void +WindowPushPixels( + GCPtr pGC, + PixmapPtr pBitMap, + DrawablePtr pDraw, + int dx, int dy, int xOrg, int yOrg +){ + WINDOW_GC_OP_PROLOGUE(pGC); + (*pGC->ops->PushPixels)(pGC, pBitMap, pDraw, dx, dy, xOrg, yOrg); + WINDOW_GC_OP_EPILOGUE(pGC); +} + + +/******************* Pixmap GC ops ***********************/ + +static void +PixmapFillSpans( + DrawablePtr pDraw, + GC *pGC, + int nInit, + DDXPointPtr pptInit, + int *pwidthInit, + int fSorted +){ + PIXMAP_GC_OP_PROLOGUE(pGC); + (*pGC->ops->FillSpans)(pDraw, pGC, nInit, pptInit, pwidthInit, fSorted); + PIXMAP_GC_OP_EPILOGUE(pGC); +} + +static void +PixmapSetSpans( + DrawablePtr pDraw, + GCPtr pGC, + char *pcharsrc, + register DDXPointPtr ppt, + int *pwidth, + int nspans, + int fSorted +){ + PIXMAP_GC_OP_PROLOGUE(pGC); + (*pGC->ops->SetSpans)(pDraw, pGC, pcharsrc, ppt, pwidth, nspans, fSorted); + PIXMAP_GC_OP_EPILOGUE(pGC); +} + +static void +PixmapPutImage( + DrawablePtr pDraw, + GCPtr pGC, + int depth, + int x, int y, int w, int h, + int leftPad, + int format, + char *pImage +){ + PIXMAP_GC_OP_PROLOGUE(pGC); + (*pGC->ops->PutImage)(pDraw, pGC, depth, x, y, w, h, + leftPad, format, pImage); + PIXMAP_GC_OP_EPILOGUE(pGC); +} + +static RegionPtr +PixmapCopyArea( + DrawablePtr pSrc, + DrawablePtr pDraw, + GC *pGC, + int srcx, int srcy, + int width, int height, + int dstx, int dsty +){ + RegionPtr ret; + + PIXMAP_GC_OP_PROLOGUE(pGC); + ret = (*pGC->ops->CopyArea)(pSrc, pDraw, + pGC, srcx, srcy, width, height, dstx, dsty); + PIXMAP_GC_OP_EPILOGUE(pGC); + return ret; +} + +static RegionPtr +PixmapCopyPlane( + DrawablePtr pSrc, + DrawablePtr pDraw, + GCPtr pGC, + int srcx, int srcy, + int width, int height, + int dstx, int dsty, + unsigned long bitPlane +){ + RegionPtr ret; + + PIXMAP_GC_OP_PROLOGUE(pGC); + ret = (*pGC->ops->CopyPlane)(pSrc, pDraw, + pGC, srcx, srcy, width, height, dstx, dsty, bitPlane); + PIXMAP_GC_OP_EPILOGUE(pGC); + return ret; +} + +static void +PixmapPolyPoint( + DrawablePtr pDraw, + GCPtr pGC, + int mode, + int npt, + xPoint *pptInit +){ + PIXMAP_GC_OP_PROLOGUE(pGC); + (*pGC->ops->PolyPoint)(pDraw, pGC, mode, npt, pptInit); + PIXMAP_GC_OP_EPILOGUE(pGC); +} + +static void +PixmapPolylines( + DrawablePtr pDraw, + GCPtr pGC, + int mode, + int npt, + DDXPointPtr pptInit +){ + PIXMAP_GC_OP_PROLOGUE(pGC); + (*pGC->ops->Polylines)(pDraw, pGC, mode, npt, pptInit); + PIXMAP_GC_OP_EPILOGUE(pGC); +} + +static void +PixmapPolySegment( + DrawablePtr pDraw, + GCPtr pGC, + int nseg, + xSegment *pSeg +){ + PIXMAP_GC_OP_PROLOGUE(pGC); + (*pGC->ops->PolySegment)(pDraw, pGC, nseg, pSeg); + PIXMAP_GC_OP_EPILOGUE(pGC); +} + +static void +PixmapPolyRectangle( + DrawablePtr pDraw, + GCPtr pGC, + int nRectsInit, + xRectangle *pRectsInit +){ + PIXMAP_GC_OP_PROLOGUE(pGC); + (*pGC->ops->PolyRectangle)(pDraw, pGC, nRectsInit, pRectsInit); + PIXMAP_GC_OP_EPILOGUE(pGC); +} + +static void +PixmapPolyArc( + DrawablePtr pDraw, + GCPtr pGC, + int narcs, + xArc *parcs +){ + PIXMAP_GC_OP_PROLOGUE(pGC); + (*pGC->ops->PolyArc)(pDraw, pGC, narcs, parcs); + PIXMAP_GC_OP_EPILOGUE(pGC); +} + +static void +PixmapFillPolygon( + DrawablePtr pDraw, + GCPtr pGC, + int shape, + int mode, + int count, + DDXPointPtr ptsIn +){ + PIXMAP_GC_OP_PROLOGUE(pGC); + (*pGC->ops->FillPolygon)(pDraw, pGC, shape, mode, count, ptsIn); + PIXMAP_GC_OP_EPILOGUE(pGC); +} + +static void +PixmapPolyFillRect( + DrawablePtr pDraw, + GCPtr pGC, + int nrectFill, + xRectangle *prectInit +){ + PIXMAP_GC_OP_PROLOGUE(pGC); + (*pGC->ops->PolyFillRect)(pDraw, pGC, nrectFill, prectInit); + PIXMAP_GC_OP_EPILOGUE(pGC); +} + +static void +PixmapPolyFillArc( + DrawablePtr pDraw, + GCPtr pGC, + int narcs, + xArc *parcs +){ + PIXMAP_GC_OP_PROLOGUE(pGC); + (*pGC->ops->PolyFillArc)(pDraw, pGC, narcs, parcs); + PIXMAP_GC_OP_EPILOGUE(pGC); +} + +static int +PixmapPolyText8( + DrawablePtr pDraw, + GCPtr pGC, + int x, + int y, + int count, + char *chars +){ + int ret; + + PIXMAP_GC_OP_PROLOGUE(pGC); + ret = (*pGC->ops->PolyText8)(pDraw, pGC, x, y, count, chars); + PIXMAP_GC_OP_EPILOGUE(pGC); + return ret; +} + +static int +PixmapPolyText16( + DrawablePtr pDraw, + GCPtr pGC, + int x, + int y, + int count, + unsigned short *chars +){ + int ret; + + PIXMAP_GC_OP_PROLOGUE(pGC); + ret = (*pGC->ops->PolyText16)(pDraw, pGC, x, y, count, chars); + PIXMAP_GC_OP_EPILOGUE(pGC); + return ret; +} + +static void +PixmapImageText8( + DrawablePtr pDraw, + GCPtr pGC, + int x, + int y, + int count, + char *chars +){ + PIXMAP_GC_OP_PROLOGUE(pGC); + (*pGC->ops->ImageText8)(pDraw, pGC, x, y, count, chars); + PIXMAP_GC_OP_EPILOGUE(pGC); +} + +static void +PixmapImageText16( + DrawablePtr pDraw, + GCPtr pGC, + int x, + int y, + int count, + unsigned short *chars +){ + PIXMAP_GC_OP_PROLOGUE(pGC); + (*pGC->ops->ImageText16)(pDraw, pGC, x, y, count, chars); + PIXMAP_GC_OP_EPILOGUE(pGC); +} + +static void +PixmapImageGlyphBlt( + DrawablePtr pDraw, + GCPtr pGC, + int xInit, int yInit, + unsigned int nglyph, + CharInfoPtr *ppci, + pointer pglyphBase +){ + PIXMAP_GC_OP_PROLOGUE(pGC); + (*pGC->ops->ImageGlyphBlt)(pDraw, pGC, xInit, yInit, nglyph, + ppci, pglyphBase); + PIXMAP_GC_OP_EPILOGUE(pGC); +} + +static void +PixmapPolyGlyphBlt( + DrawablePtr pDraw, + GCPtr pGC, + int xInit, int yInit, + unsigned int nglyph, + CharInfoPtr *ppci, + pointer pglyphBase +){ + PIXMAP_GC_OP_PROLOGUE(pGC); + (*pGC->ops->PolyGlyphBlt)(pDraw, pGC, xInit, yInit, nglyph, + ppci, pglyphBase); + PIXMAP_GC_OP_EPILOGUE(pGC); +} + +static void +PixmapPushPixels( + GCPtr pGC, + PixmapPtr pBitMap, + DrawablePtr pDraw, + int dx, int dy, int xOrg, int yOrg +){ + PIXMAP_GC_OP_PROLOGUE(pGC); + (*pGC->ops->PushPixels)(pGC, pBitMap, pDraw, dx, dy, xOrg, yOrg); + PIXMAP_GC_OP_EPILOGUE(pGC); +} + + |