diff options
Diffstat (limited to 'xorg-server/fb')
-rw-r--r-- | xorg-server/fb/Makefile.am | 2 | ||||
-rw-r--r-- | xorg-server/fb/Makefile.in | 39 | ||||
-rw-r--r-- | xorg-server/fb/fb.h | 379 | ||||
-rw-r--r-- | xorg-server/fb/fbcmap.c | 6 | ||||
-rw-r--r-- | xorg-server/fb/fbcopy.c | 364 | ||||
-rw-r--r-- | xorg-server/fb/fboverlay.c | 2 | ||||
-rw-r--r-- | xorg-server/fb/fboverlay.h | 24 | ||||
-rw-r--r-- | xorg-server/fb/fbpict.c | 131 | ||||
-rw-r--r-- | xorg-server/fb/fbpict.h | 16 | ||||
-rw-r--r-- | xorg-server/fb/fbrop.h | 14 | ||||
-rw-r--r-- | xorg-server/fb/fbscreen.c | 8 | ||||
-rw-r--r-- | xorg-server/fb/fbtrap.c | 4 | ||||
-rw-r--r-- | xorg-server/fb/fbwindow.c | 4 |
13 files changed, 388 insertions, 605 deletions
diff --git a/xorg-server/fb/Makefile.am b/xorg-server/fb/Makefile.am index 399426933..64e49f345 100644 --- a/xorg-server/fb/Makefile.am +++ b/xorg-server/fb/Makefile.am @@ -7,7 +7,7 @@ INCLUDES = \ AM_CFLAGS = $(DIX_CFLAGS) if XORG -sdk_HEADERS = fb.h fbrop.h fboverlay.h wfbrename.h +sdk_HEADERS = fb.h fbrop.h fboverlay.h wfbrename.h fbpict.h endif libfb_la_CFLAGS = $(AM_CFLAGS) diff --git a/xorg-server/fb/Makefile.in b/xorg-server/fb/Makefile.in index 9e240a845..8a5bd3918 100644 --- a/xorg-server/fb/Makefile.in +++ b/xorg-server/fb/Makefile.in @@ -39,8 +39,11 @@ subdir = fb DIST_COMMON = $(am__sdk_HEADERS_DIST) $(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__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -50,7 +53,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-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 + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @@ -99,7 +103,7 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libfb_la_SOURCES) $(libwfb_la_SOURCES) DIST_SOURCES = $(libfb_la_SOURCES) $(libwfb_la_SOURCES) -am__sdk_HEADERS_DIST = fb.h fbrop.h fboverlay.h wfbrename.h +am__sdk_HEADERS_DIST = fb.h fbrop.h fboverlay.h wfbrename.h fbpict.h am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -131,6 +135,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -151,9 +156,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -182,7 +190,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -191,9 +201,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -232,12 +246,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ 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@ @@ -257,7 +272,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -267,6 +281,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -280,11 +295,10 @@ 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@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -320,6 +334,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -344,7 +359,6 @@ 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@ @@ -367,6 +381,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -398,7 +413,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -411,7 +428,7 @@ INCLUDES = \ -I$(top_srcdir)/hw/xfree86/common AM_CFLAGS = $(DIX_CFLAGS) -@XORG_TRUE@sdk_HEADERS = fb.h fbrop.h fboverlay.h wfbrename.h +@XORG_TRUE@sdk_HEADERS = fb.h fbrop.h fboverlay.h wfbrename.h fbpict.h libfb_la_CFLAGS = $(AM_CFLAGS) libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACCESS_WRAPPER libfb_la_SOURCES = \ diff --git a/xorg-server/fb/fb.h b/xorg-server/fb/fb.h index 4572af612..2d3c85d44 100644 --- a/xorg-server/fb/fb.h +++ b/xorg-server/fb/fb.h @@ -167,9 +167,9 @@ typedef int FbStride; #ifdef FB_DEBUG -extern void fbValidateDrawable(DrawablePtr d); -extern void fbInitializeDrawable(DrawablePtr d); -extern void fbSetBits (FbStip *bits, int stride, FbStip data); +extern _X_EXPORT void fbValidateDrawable(DrawablePtr d); +extern _X_EXPORT void fbInitializeDrawable(DrawablePtr d); +extern _X_EXPORT void fbSetBits (FbStip *bits, int stride, FbStip data); #define FB_HEAD_BITS (FbStip) (0xbaadf00d) #define FB_TAIL_BITS (FbStip) (0xbaddf0ad) #else @@ -595,10 +595,10 @@ extern void fbSetBits (FbStip *bits, int stride, FbStip data); } \ } -extern DevPrivateKey fbGetGCPrivateKey(void); -extern DevPrivateKey fbGetWinPrivateKey(void); -extern const GCOps fbGCOps; -extern const GCFuncs fbGCFuncs; +extern _X_EXPORT DevPrivateKey fbGetGCPrivateKey(void); +extern _X_EXPORT DevPrivateKey fbGetWinPrivateKey(void); +extern _X_EXPORT const GCOps fbGCOps; +extern _X_EXPORT const GCFuncs fbGCFuncs; #ifdef FB_24_32BIT #define FB_SCREEN_PRIVATE @@ -631,7 +631,7 @@ typedef void (*FinishWrapProcPtr)(DrawablePtr pDraw); #ifdef FB_SCREEN_PRIVATE -extern DevPrivateKey fbGetScreenPrivateKey(void); +extern _X_EXPORT DevPrivateKey fbGetScreenPrivateKey(void); /* private field of a screen */ typedef struct { @@ -749,7 +749,7 @@ typedef struct { /* * fb24_32.c */ -void +extern _X_EXPORT void fb24_32GetSpans(DrawablePtr pDrawable, int wMax, DDXPointPtr ppt, @@ -757,7 +757,7 @@ fb24_32GetSpans(DrawablePtr pDrawable, int nspans, char *pchardstStart); -void +extern _X_EXPORT void fb24_32SetSpans (DrawablePtr pDrawable, GCPtr pGC, char *src, @@ -766,7 +766,7 @@ fb24_32SetSpans (DrawablePtr pDrawable, int nspans, int fSorted); -void +extern _X_EXPORT void fb24_32PutZImage (DrawablePtr pDrawable, RegionPtr pClip, int alu, @@ -778,7 +778,7 @@ fb24_32PutZImage (DrawablePtr pDrawable, CARD8 *src, FbStride srcStride); -void +extern _X_EXPORT void fb24_32GetImage (DrawablePtr pDrawable, int x, int y, @@ -788,7 +788,7 @@ fb24_32GetImage (DrawablePtr pDrawable, unsigned long planeMask, char *d); -void +extern _X_EXPORT void fb24_32CopyMtoN (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, @@ -801,13 +801,13 @@ fb24_32CopyMtoN (DrawablePtr pSrcDrawable, Pixel bitplane, void *closure); -PixmapPtr +extern _X_EXPORT PixmapPtr fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel); -Bool +extern _X_EXPORT Bool fb24_32CreateScreenResources(ScreenPtr pScreen); -Bool +extern _X_EXPORT Bool fb24_32ModifyPixmapHeader (PixmapPtr pPixmap, int width, int height, @@ -819,14 +819,16 @@ fb24_32ModifyPixmapHeader (PixmapPtr pPixmap, /* * fballpriv.c */ -Bool +extern _X_EXPORT DevPrivateKey fbGetWinPrivateKey(void); + +extern _X_EXPORT Bool fbAllocatePrivates(ScreenPtr pScreen, DevPrivateKey *pGCIndex); /* * fbarc.c */ -void +extern _X_EXPORT void fbPolyArc (DrawablePtr pDrawable, GCPtr pGC, int narcs, @@ -836,7 +838,7 @@ fbPolyArc (DrawablePtr pDrawable, * fbbits.c */ -void +extern _X_EXPORT void fbBresSolid8(DrawablePtr pDrawable, GCPtr pGC, int dashOffset, @@ -850,7 +852,7 @@ fbBresSolid8(DrawablePtr pDrawable, int e3, int len); -void +extern _X_EXPORT void fbBresDash8 (DrawablePtr pDrawable, GCPtr pGC, int dashOffset, @@ -864,7 +866,7 @@ fbBresDash8 (DrawablePtr pDrawable, int e3, int len); -void +extern _X_EXPORT void fbDots8 (FbBits *dst, FbStride dstStride, int dstBpp, @@ -878,7 +880,7 @@ fbDots8 (FbBits *dst, FbBits and, FbBits xor); -void +extern _X_EXPORT void fbArc8 (FbBits *dst, FbStride dstStride, int dstBpp, @@ -888,7 +890,7 @@ fbArc8 (FbBits *dst, FbBits and, FbBits xor); -void +extern _X_EXPORT void fbGlyph8 (FbBits *dstLine, FbStride dstStride, int dstBpp, @@ -897,20 +899,20 @@ fbGlyph8 (FbBits *dstLine, int height, int shift); -void +extern _X_EXPORT void fbPolyline8 (DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ptsOrig); -void +extern _X_EXPORT void fbPolySegment8 (DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment *pseg); -void +extern _X_EXPORT void fbBresSolid16(DrawablePtr pDrawable, GCPtr pGC, int dashOffset, @@ -924,7 +926,7 @@ fbBresSolid16(DrawablePtr pDrawable, int e3, int len); -void +extern _X_EXPORT void fbBresDash16(DrawablePtr pDrawable, GCPtr pGC, int dashOffset, @@ -938,7 +940,7 @@ fbBresDash16(DrawablePtr pDrawable, int e3, int len); -void +extern _X_EXPORT void fbDots16(FbBits *dst, FbStride dstStride, int dstBpp, @@ -952,7 +954,7 @@ fbDots16(FbBits *dst, FbBits and, FbBits xor); -void +extern _X_EXPORT void fbArc16(FbBits *dst, FbStride dstStride, int dstBpp, @@ -962,7 +964,7 @@ fbArc16(FbBits *dst, FbBits and, FbBits xor); -void +extern _X_EXPORT void fbGlyph16(FbBits *dstLine, FbStride dstStride, int dstBpp, @@ -971,21 +973,21 @@ fbGlyph16(FbBits *dstLine, int height, int shift); -void +extern _X_EXPORT void fbPolyline16 (DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ptsOrig); -void +extern _X_EXPORT void fbPolySegment16 (DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment *pseg); -void +extern _X_EXPORT void fbBresSolid24(DrawablePtr pDrawable, GCPtr pGC, int dashOffset, @@ -999,7 +1001,7 @@ fbBresSolid24(DrawablePtr pDrawable, int e3, int len); -void +extern _X_EXPORT void fbBresDash24(DrawablePtr pDrawable, GCPtr pGC, int dashOffset, @@ -1013,7 +1015,7 @@ fbBresDash24(DrawablePtr pDrawable, int e3, int len); -void +extern _X_EXPORT void fbDots24(FbBits *dst, FbStride dstStride, int dstBpp, @@ -1027,7 +1029,7 @@ fbDots24(FbBits *dst, FbBits and, FbBits xor); -void +extern _X_EXPORT void fbArc24(FbBits *dst, FbStride dstStride, int dstBpp, @@ -1037,7 +1039,7 @@ fbArc24(FbBits *dst, FbBits and, FbBits xor); -void +extern _X_EXPORT void fbGlyph24(FbBits *dstLine, FbStride dstStride, int dstBpp, @@ -1046,21 +1048,21 @@ fbGlyph24(FbBits *dstLine, int height, int shift); -void +extern _X_EXPORT void fbPolyline24 (DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ptsOrig); -void +extern _X_EXPORT void fbPolySegment24 (DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment *pseg); -void +extern _X_EXPORT void fbBresSolid32(DrawablePtr pDrawable, GCPtr pGC, int dashOffset, @@ -1074,7 +1076,7 @@ fbBresSolid32(DrawablePtr pDrawable, int e3, int len); -void +extern _X_EXPORT void fbBresDash32(DrawablePtr pDrawable, GCPtr pGC, int dashOffset, @@ -1088,7 +1090,7 @@ fbBresDash32(DrawablePtr pDrawable, int e3, int len); -void +extern _X_EXPORT void fbDots32(FbBits *dst, FbStride dstStride, int dstBpp, @@ -1102,7 +1104,7 @@ fbDots32(FbBits *dst, FbBits and, FbBits xor); -void +extern _X_EXPORT void fbArc32(FbBits *dst, FbStride dstStride, int dstBpp, @@ -1112,7 +1114,7 @@ fbArc32(FbBits *dst, FbBits and, FbBits xor); -void +extern _X_EXPORT void fbGlyph32(FbBits *dstLine, FbStride dstStride, int dstBpp, @@ -1120,14 +1122,14 @@ fbGlyph32(FbBits *dstLine, FbBits fg, int height, int shift); -void +extern _X_EXPORT void fbPolyline32 (DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ptsOrig); -void +extern _X_EXPORT void fbPolySegment32 (DrawablePtr pDrawable, GCPtr pGC, int nseg, @@ -1136,7 +1138,7 @@ fbPolySegment32 (DrawablePtr pDrawable, /* * fbblt.c */ -void +extern _X_EXPORT void fbBlt (FbBits *src, FbStride srcStride, int srcX, @@ -1155,7 +1157,7 @@ fbBlt (FbBits *src, Bool reverse, Bool upsidedown); -void +extern _X_EXPORT void fbBlt24 (FbBits *srcLine, FbStride srcStride, int srcX, @@ -1173,7 +1175,7 @@ fbBlt24 (FbBits *srcLine, Bool reverse, Bool upsidedown); -void +extern _X_EXPORT void fbBltStip (FbStip *src, FbStride srcStride, /* in FbStip units, not FbBits units */ int srcX, @@ -1192,7 +1194,7 @@ fbBltStip (FbStip *src, /* * fbbltone.c */ -void +extern _X_EXPORT void fbBltOne (FbStip *src, FbStride srcStride, int srcX, @@ -1210,7 +1212,7 @@ fbBltOne (FbStip *src, FbBits bgxor); #ifdef FB_24BIT -void +extern _X_EXPORT void fbBltOne24 (FbStip *src, FbStride srcStride, /* FbStip units per scanline */ int srcX, /* bit position of source */ @@ -1228,7 +1230,7 @@ fbBltOne24 (FbStip *src, FbBits bgxor); #endif -void +extern _X_EXPORT void fbBltPlane (FbBits *src, FbStride srcStride, int srcX, @@ -1250,47 +1252,47 @@ fbBltPlane (FbBits *src, /* * fbcmap.c */ -int +extern _X_EXPORT int fbListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps); -void +extern _X_EXPORT void fbInstallColormap(ColormapPtr pmap); -void +extern _X_EXPORT void fbUninstallColormap(ColormapPtr pmap); -void +extern _X_EXPORT void fbResolveColor(unsigned short *pred, unsigned short *pgreen, unsigned short *pblue, VisualPtr pVisual); -Bool +extern _X_EXPORT Bool fbInitializeColormap(ColormapPtr pmap); -int +extern _X_EXPORT int fbExpandDirectColors (ColormapPtr pmap, int ndef, xColorItem *indefs, xColorItem *outdefs); -Bool +extern _X_EXPORT Bool fbCreateDefColormap(ScreenPtr pScreen); -void +extern _X_EXPORT void fbClearVisualTypes(void); -Bool +extern _X_EXPORT Bool fbHasVisualTypes (int depth); -Bool +extern _X_EXPORT Bool fbSetVisualTypes (int depth, int visuals, int bitsPerRGB); -Bool +extern _X_EXPORT Bool fbSetVisualTypesAndMasks (int depth, int visuals, int bitsPerRGB, Pixel redMask, Pixel greenMask, Pixel blueMask); -Bool +extern _X_EXPORT Bool fbInitVisuals (VisualPtr *visualp, DepthPtr *depthp, int *nvisualp, @@ -1304,19 +1306,20 @@ fbInitVisuals (VisualPtr *visualp, * fbcopy.c */ -typedef void (*fbCopyProc) (DrawablePtr pSrcDrawable, - DrawablePtr pDstDrawable, - GCPtr pGC, - BoxPtr pDstBox, - int nbox, - int dx, - int dy, - Bool reverse, - Bool upsidedown, - Pixel bitplane, - void *closure); - -void +/* Compatibility definition, to be removed at next ABI change. */ +typedef void (*fbCopyProc) (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pDstBox, + int nbox, + int dx, + int dy, + Bool reverse, + Bool upsidedown, + Pixel bitplane, + void *closure); + +extern _X_EXPORT void fbCopyNtoN (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, @@ -1329,7 +1332,34 @@ fbCopyNtoN (DrawablePtr pSrcDrawable, Pixel bitplane, void *closure); -void +/* Compatibility wrapper, to be removed at next ABI change. */ +extern _X_EXPORT void +fbCopyRegion (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + RegionPtr pDstRegion, + int dx, + int dy, + fbCopyProc copyProc, + Pixel bitPlane, + void *closure); + +/* Compatibility wrapper, to be removed at next ABI change. */ +extern _X_EXPORT RegionPtr +fbDoCopy (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + int xIn, + int yIn, + int widthSrc, + int heightSrc, + int xOut, + int yOut, + fbCopyProc copyProc, + Pixel bitplane, + void *closure); + +extern _X_EXPORT void fbCopy1toN (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, @@ -1342,7 +1372,7 @@ fbCopy1toN (DrawablePtr pSrcDrawable, Pixel bitplane, void *closure); -void +extern _X_EXPORT void fbCopyNto1 (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, @@ -1355,32 +1385,7 @@ fbCopyNto1 (DrawablePtr pSrcDrawable, Pixel bitplane, void *closure); -void -fbCopyRegion (DrawablePtr pSrcDrawable, - DrawablePtr pDstDrawable, - GCPtr pGC, - RegionPtr pDstRegion, - int dx, - int dy, - fbCopyProc copyProc, - Pixel bitPlane, - void *closure); - -RegionPtr -fbDoCopy (DrawablePtr pSrcDrawable, - DrawablePtr pDstDrawable, - GCPtr pGC, - int xIn, - int yIn, - int widthSrc, - int heightSrc, - int xOut, - int yOut, - fbCopyProc copyProc, - Pixel bitplane, - void *closure); - -RegionPtr +extern _X_EXPORT RegionPtr fbCopyArea (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, @@ -1391,7 +1396,7 @@ fbCopyArea (DrawablePtr pSrcDrawable, int xOut, int yOut); -RegionPtr +extern _X_EXPORT RegionPtr fbCopyPlane (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, @@ -1406,7 +1411,7 @@ fbCopyPlane (DrawablePtr pSrcDrawable, /* * fbfill.c */ -void +extern _X_EXPORT void fbFill (DrawablePtr pDrawable, GCPtr pGC, int x, @@ -1414,7 +1419,7 @@ fbFill (DrawablePtr pDrawable, int width, int height); -void +extern _X_EXPORT void fbSolidBoxClipped (DrawablePtr pDrawable, RegionPtr pClip, int xa, @@ -1427,7 +1432,7 @@ fbSolidBoxClipped (DrawablePtr pDrawable, /* * fbfillrect.c */ -void +extern _X_EXPORT void fbPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectInit, @@ -1440,7 +1445,7 @@ fbPolyFillRect(DrawablePtr pDrawable, /* * fbfillsp.c */ -void +extern _X_EXPORT void fbFillSpans (DrawablePtr pDrawable, GCPtr pGC, int nInit, @@ -1453,19 +1458,19 @@ fbFillSpans (DrawablePtr pDrawable, * fbgc.c */ -Bool +extern _X_EXPORT Bool fbCreateGC(GCPtr pGC); -void +extern _X_EXPORT void fbPadPixmap (PixmapPtr pPixmap); -void +extern _X_EXPORT void fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable); /* * fbgetsp.c */ -void +extern _X_EXPORT void fbGetSpans(DrawablePtr pDrawable, int wMax, DDXPointPtr ppt, @@ -1477,14 +1482,14 @@ fbGetSpans(DrawablePtr pDrawable, * fbglyph.c */ -Bool +extern _X_EXPORT Bool fbGlyphIn (RegionPtr pRegion, int x, int y, int width, int height); -void +extern _X_EXPORT void fbPolyGlyphBlt (DrawablePtr pDrawable, GCPtr pGC, int x, @@ -1493,7 +1498,7 @@ fbPolyGlyphBlt (DrawablePtr pDrawable, CharInfoPtr *ppci, pointer pglyphBase); -void +extern _X_EXPORT void fbImageGlyphBlt (DrawablePtr pDrawable, GCPtr pGC, int x, @@ -1506,7 +1511,7 @@ fbImageGlyphBlt (DrawablePtr pDrawable, * fbimage.c */ -void +extern _X_EXPORT void fbPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, @@ -1518,7 +1523,7 @@ fbPutImage (DrawablePtr pDrawable, int format, char *pImage); -void +extern _X_EXPORT void fbPutZImage (DrawablePtr pDrawable, RegionPtr pClip, int alu, @@ -1530,7 +1535,7 @@ fbPutZImage (DrawablePtr pDrawable, FbStip *src, FbStride srcStride); -void +extern _X_EXPORT void fbPutXYImage (DrawablePtr pDrawable, RegionPtr pClip, FbBits fg, @@ -1548,7 +1553,7 @@ fbPutXYImage (DrawablePtr pDrawable, FbStride srcStride, int srcX); -void +extern _X_EXPORT void fbGetImage (DrawablePtr pDrawable, int x, int y, @@ -1561,31 +1566,31 @@ fbGetImage (DrawablePtr pDrawable, * fbline.c */ -void +extern _X_EXPORT void fbZeroLine (DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ppt); -void +extern _X_EXPORT void fbZeroSegment (DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment *pSegs); -void +extern _X_EXPORT void fbPolyLine (DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ppt); -void +extern _X_EXPORT void fbFixCoordModePrevious (int npt, DDXPointPtr ppt); -void +extern _X_EXPORT void fbPolySegment (DrawablePtr pDrawable, GCPtr pGC, int nseg, @@ -1597,7 +1602,7 @@ fbPolySegment (DrawablePtr pDrawable, * fbpict.c */ -Bool +extern _X_EXPORT Bool fbPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats); @@ -1606,25 +1611,25 @@ fbPictureInit (ScreenPtr pScreen, * fbpixmap.c */ -PixmapPtr +extern _X_EXPORT PixmapPtr fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp, unsigned usage_hint); -PixmapPtr +extern _X_EXPORT PixmapPtr fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth, unsigned usage_hint); -Bool +extern _X_EXPORT Bool fbDestroyPixmap (PixmapPtr pPixmap); -RegionPtr +extern _X_EXPORT RegionPtr fbPixmapToRegion(PixmapPtr pPix); /* * fbpoint.c */ -void +extern _X_EXPORT void fbDots (FbBits *dstOrig, FbStride dstStride, int dstBpp, @@ -1638,7 +1643,7 @@ fbDots (FbBits *dstOrig, FbBits andOrig, FbBits xorOrig); -void +extern _X_EXPORT void fbPolyPoint (DrawablePtr pDrawable, GCPtr pGC, int mode, @@ -1648,7 +1653,7 @@ fbPolyPoint (DrawablePtr pDrawable, /* * fbpush.c */ -void +extern _X_EXPORT void fbPushPattern (DrawablePtr pDrawable, GCPtr pGC, @@ -1662,7 +1667,7 @@ fbPushPattern (DrawablePtr pDrawable, int width, int height); -void +extern _X_EXPORT void fbPushFill (DrawablePtr pDrawable, GCPtr pGC, @@ -1675,20 +1680,7 @@ fbPushFill (DrawablePtr pDrawable, int width, int height); -void -fbPush1toN (DrawablePtr pSrcDrawable, - DrawablePtr pDstDrawable, - GCPtr pGC, - BoxPtr pbox, - int nbox, - int dx, - int dy, - Bool reverse, - Bool upsidedown, - Pixel bitplane, - void *closure); - -void +extern _X_EXPORT void fbPushImage (DrawablePtr pDrawable, GCPtr pGC, @@ -1701,7 +1693,7 @@ fbPushImage (DrawablePtr pDrawable, int width, int height); -void +extern _X_EXPORT void fbPushPixels (GCPtr pGC, PixmapPtr pBitmap, DrawablePtr pDrawable, @@ -1715,27 +1707,27 @@ fbPushPixels (GCPtr pGC, * fbscreen.c */ -Bool +extern _X_EXPORT Bool fbCloseScreen (int indx, ScreenPtr pScreen); -Bool +extern _X_EXPORT Bool fbRealizeFont(ScreenPtr pScreen, FontPtr pFont); -Bool +extern _X_EXPORT Bool fbUnrealizeFont(ScreenPtr pScreen, FontPtr pFont); -void +extern _X_EXPORT void fbQueryBestSize (int class, unsigned short *width, unsigned short *height, ScreenPtr pScreen); -PixmapPtr +extern _X_EXPORT PixmapPtr _fbGetWindowPixmap (WindowPtr pWindow); -void +extern _X_EXPORT void _fbSetWindowPixmap (WindowPtr pWindow, PixmapPtr pPixmap); -Bool +extern _X_EXPORT Bool fbSetupScreen(ScreenPtr pScreen, pointer pbits, /* pointer to screen bitmap */ int xsize, /* in pixels */ @@ -1745,7 +1737,7 @@ fbSetupScreen(ScreenPtr pScreen, int width, /* pixel width of frame buffer */ int bpp); /* bits per pixel of frame buffer */ -Bool +extern _X_EXPORT Bool wfbFinishScreenInit(ScreenPtr pScreen, pointer pbits, int xsize, @@ -1757,7 +1749,7 @@ wfbFinishScreenInit(ScreenPtr pScreen, SetupWrapProcPtr setupWrap, FinishWrapProcPtr finishWrap); -Bool +extern _X_EXPORT Bool wfbScreenInit(ScreenPtr pScreen, pointer pbits, int xsize, @@ -1769,7 +1761,7 @@ wfbScreenInit(ScreenPtr pScreen, SetupWrapProcPtr setupWrap, FinishWrapProcPtr finishWrap); -Bool +extern _X_EXPORT Bool fbFinishScreenInit(ScreenPtr pScreen, pointer pbits, int xsize, @@ -1779,7 +1771,7 @@ fbFinishScreenInit(ScreenPtr pScreen, int width, int bpp); -Bool +extern _X_EXPORT Bool fbScreenInit(ScreenPtr pScreen, pointer pbits, int xsize, @@ -1788,9 +1780,6 @@ fbScreenInit(ScreenPtr pScreen, int dpiy, int width, int bpp); - -void -fbInitializeBackingStore (ScreenPtr pScreen); /* * fbseg.c @@ -1808,12 +1797,12 @@ typedef void FbBres (DrawablePtr pDrawable, int e3, int len); -FbBres fbBresSolid, fbBresDash, fbBresFill, fbBresFillDash; +extern _X_EXPORT FbBres fbBresSolid, fbBresDash, fbBresFill, fbBresFillDash; /* * fbsetsp.c */ -void +extern _X_EXPORT void fbSetSpans (DrawablePtr pDrawable, GCPtr pGC, char *src, @@ -1822,11 +1811,11 @@ fbSetSpans (DrawablePtr pDrawable, int nspans, int fSorted); -FbBres * +extern _X_EXPORT FbBres * fbSelectBres (DrawablePtr pDrawable, GCPtr pGC); -void +extern _X_EXPORT void fbBres (DrawablePtr pDrawable, GCPtr pGC, int dashOffset, @@ -1840,7 +1829,7 @@ fbBres (DrawablePtr pDrawable, int e3, int len); -void +extern _X_EXPORT void fbSegment (DrawablePtr pDrawable, GCPtr pGC, int xa, @@ -1855,7 +1844,7 @@ fbSegment (DrawablePtr pDrawable, * fbsolid.c */ -void +extern _X_EXPORT void fbSolid (FbBits *dst, FbStride dstStride, int dstX, @@ -1868,7 +1857,7 @@ fbSolid (FbBits *dst, FbBits xor); #ifdef FB_24BIT -void +extern _X_EXPORT void fbSolid24 (FbBits *dst, FbStride dstStride, int dstX, @@ -1884,13 +1873,13 @@ fbSolid24 (FbBits *dst, * fbstipple.c */ -void +extern _X_EXPORT void fbTransparentSpan (FbBits *dst, FbBits stip, FbBits fgxor, int n); -void +extern _X_EXPORT void fbEvenStipple (FbBits *dst, FbStride dstStride, int dstX, @@ -1911,7 +1900,7 @@ fbEvenStipple (FbBits *dst, int xRot, int yRot); -void +extern _X_EXPORT void fbOddStipple (FbBits *dst, FbStride dstStride, int dstX, @@ -1933,7 +1922,7 @@ fbOddStipple (FbBits *dst, int xRot, int yRot); -void +extern _X_EXPORT void fbStipple (FbBits *dst, FbStride dstStride, int dstX, @@ -1960,7 +1949,7 @@ fbStipple (FbBits *dst, * fbtile.c */ -void +extern _X_EXPORT void fbEvenTile (FbBits *dst, FbStride dstStride, int dstX, @@ -1977,7 +1966,7 @@ fbEvenTile (FbBits *dst, int xRot, int yRot); -void +extern _X_EXPORT void fbOddTile (FbBits *dst, FbStride dstStride, int dstX, @@ -1997,7 +1986,7 @@ fbOddTile (FbBits *dst, int xRot, int yRot); -void +extern _X_EXPORT void fbTile (FbBits *dst, FbStride dstStride, int dstX, @@ -2020,37 +2009,37 @@ fbTile (FbBits *dst, /* * fbutil.c */ -FbBits +extern _X_EXPORT FbBits fbReplicatePixel (Pixel p, int bpp); -void +extern _X_EXPORT void fbReduceRasterOp (int rop, FbBits fg, FbBits pm, FbBits *andp, FbBits *xorp); #ifdef FB_ACCESS_WRAPPER -extern ReadMemoryProcPtr wfbReadMemory; -extern WriteMemoryProcPtr wfbWriteMemory; +extern _X_EXPORT ReadMemoryProcPtr wfbReadMemory; +extern _X_EXPORT WriteMemoryProcPtr wfbWriteMemory; #endif /* * fbwindow.c */ -Bool +extern _X_EXPORT Bool fbCreateWindow(WindowPtr pWin); -Bool +extern _X_EXPORT Bool fbDestroyWindow(WindowPtr pWin); -Bool +extern _X_EXPORT Bool fbMapWindow(WindowPtr pWindow); -Bool +extern _X_EXPORT Bool fbPositionWindow(WindowPtr pWin, int x, int y); -Bool +extern _X_EXPORT Bool fbUnmapWindow(WindowPtr pWindow); -void +extern _X_EXPORT void fbCopyWindowProc (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, @@ -2063,23 +2052,25 @@ fbCopyWindowProc (DrawablePtr pSrcDrawable, Pixel bitplane, void *closure); -void +extern _X_EXPORT void fbCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); -Bool +extern _X_EXPORT Bool fbChangeWindowAttributes(WindowPtr pWin, unsigned long mask); -void +extern _X_EXPORT void fbFillRegionSolid (DrawablePtr pDrawable, RegionPtr pRegion, FbBits and, FbBits xor); -pixman_image_t *image_from_pict (PicturePtr pict, - Bool has_clip); -void free_pixman_pict (PicturePtr, pixman_image_t *); +extern _X_EXPORT pixman_image_t * +image_from_pict (PicturePtr pict, + Bool has_clip, + Bool is_src); +extern _X_EXPORT void free_pixman_pict (PicturePtr, pixman_image_t *); #endif /* _FB_H_ */ diff --git a/xorg-server/fb/fbcmap.c b/xorg-server/fb/fbcmap.c index c29a5131c..207c6aefc 100644 --- a/xorg-server/fb/fbcmap.c +++ b/xorg-server/fb/fbcmap.c @@ -85,8 +85,10 @@ fbUninstallColormap(ColormapPtr pmap) { if (pmap->mid != pmap->pScreen->defColormap) { - curpmap = (ColormapPtr) LookupIDByType(pmap->pScreen->defColormap, - RT_COLORMAP); + dixLookupResourceByType((pointer *)&curpmap, + pmap->pScreen->defColormap, + RT_COLORMAP, + serverClient, DixInstallAccess); (*pmap->pScreen->InstallColormap)(curpmap); } } diff --git a/xorg-server/fb/fbcopy.c b/xorg-server/fb/fbcopy.c index b8b0b6a8c..07eb663c6 100644 --- a/xorg-server/fb/fbcopy.c +++ b/xorg-server/fb/fbcopy.c @@ -28,6 +28,39 @@ #include "fb.h" +/* Compatibility wrapper, to be removed at next ABI change. */ +void +fbCopyRegion (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + RegionPtr pDstRegion, + int dx, + int dy, + fbCopyProc copyProc, + Pixel bitPlane, + void *closure) +{ + miCopyRegion(pSrcDrawable, pDstDrawable, pGC, pDstRegion, dx, dy, copyProc, bitPlane, closure); +} + +/* Compatibility wrapper, to be removed at next ABI change. */ +RegionPtr +fbDoCopy (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + int xIn, + int yIn, + int widthSrc, + int heightSrc, + int xOut, + int yOut, + fbCopyProc copyProc, + Pixel bitPlane, + void *closure) +{ + return miDoCopy(pSrcDrawable, pDstDrawable, pGC, xIn, yIn, widthSrc, heightSrc, xOut, yOut, copyProc, bitPlane, closure); +} + void fbCopyNtoN (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, @@ -289,329 +322,6 @@ fbCopyNto1 (DrawablePtr pSrcDrawable, } } -void -fbCopyRegion (DrawablePtr pSrcDrawable, - DrawablePtr pDstDrawable, - GCPtr pGC, - RegionPtr pDstRegion, - int dx, - int dy, - fbCopyProc copyProc, - Pixel bitPlane, - void *closure) -{ - int careful; - Bool reverse; - Bool upsidedown; - BoxPtr pbox; - int nbox; - BoxPtr pboxNew1, pboxNew2, pboxBase, pboxNext, pboxTmp; - - pbox = REGION_RECTS(pDstRegion); - nbox = REGION_NUM_RECTS(pDstRegion); - - /* 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 = ((pSrcDrawable == pDstDrawable) || - ((pSrcDrawable->type == DRAWABLE_WINDOW) && - (pDstDrawable->type == DRAWABLE_WINDOW))); - - pboxNew1 = NULL; - pboxNew2 = NULL; - if (careful && dy < 0) - { - upsidedown = TRUE; - - if (nbox > 1) - { - /* keep ordering in each band, reverse order of bands */ - pboxNew1 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox); - if(!pboxNew1) - return; - pboxBase = pboxNext = pbox+nbox-1; - while (pboxBase >= pbox) - { - while ((pboxNext >= pbox) && - (pboxBase->y1 == pboxNext->y1)) - pboxNext--; - pboxTmp = pboxNext+1; - while (pboxTmp <= pboxBase) - { - *pboxNew1++ = *pboxTmp++; - } - pboxBase = pboxNext; - } - pboxNew1 -= nbox; - pbox = pboxNew1; - } - } - else - { - /* walk source top to bottom */ - upsidedown = FALSE; - } - - if (careful && dx < 0) - { - /* walk source right to left */ - if (dy <= 0) - reverse = TRUE; - else - reverse = FALSE; - - if (nbox > 1) - { - /* reverse order of rects in each band */ - pboxNew2 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox); - if(!pboxNew2) - { - if (pboxNew1) - xfree(pboxNew1); - return; - } - pboxBase = pboxNext = pbox; - while (pboxBase < pbox+nbox) - { - while ((pboxNext < pbox+nbox) && - (pboxNext->y1 == pboxBase->y1)) - pboxNext++; - pboxTmp = pboxNext; - while (pboxTmp != pboxBase) - { - *pboxNew2++ = *--pboxTmp; - } - pboxBase = pboxNext; - } - pboxNew2 -= nbox; - pbox = pboxNew2; - } - } - else - { - /* walk source left to right */ - reverse = FALSE; - } - - (*copyProc) (pSrcDrawable, - pDstDrawable, - pGC, - pbox, - nbox, - dx, dy, - reverse, upsidedown, bitPlane, closure); - - if (pboxNew1) - xfree (pboxNew1); - if (pboxNew2) - xfree (pboxNew2); -} - -RegionPtr -fbDoCopy (DrawablePtr pSrcDrawable, - DrawablePtr pDstDrawable, - GCPtr pGC, - int xIn, - int yIn, - int widthSrc, - int heightSrc, - int xOut, - int yOut, - fbCopyProc copyProc, - Pixel bitPlane, - void *closure) -{ - RegionPtr prgnSrcClip = NULL; /* may be a new region, or just a copy */ - Bool freeSrcClip = FALSE; - RegionPtr prgnExposed = NULL; - RegionRec rgnDst; - int dx; - int dy; - int numRects; - int box_x1; - int box_y1; - int box_x2; - int box_y2; - Bool fastSrc = FALSE; /* for fast clipping with pixmap source */ - Bool fastDst = FALSE; /* for fast clipping with one rect dest */ - Bool fastExpose = FALSE; /* for fast exposures with pixmap source */ - - /* Short cut for unmapped windows */ - - if (pDstDrawable->type == DRAWABLE_WINDOW && - !((WindowPtr)pDstDrawable)->realized) - { - return NULL; - } - - if ((pSrcDrawable != pDstDrawable) && - pSrcDrawable->pScreen->SourceValidate) - { - (*pSrcDrawable->pScreen->SourceValidate) (pSrcDrawable, xIn, yIn, widthSrc, heightSrc); - } - - /* Compute source clip region */ - if (pSrcDrawable->type == DRAWABLE_PIXMAP) - { - if ((pSrcDrawable == pDstDrawable) && (pGC->clientClipType == CT_NONE)) - prgnSrcClip = fbGetCompositeClip(pGC); - else - fastSrc = TRUE; - } - else - { - if (pGC->subWindowMode == IncludeInferiors) - { - /* - * XFree86 DDX empties the border clip when the - * VT is inactive, make sure the region isn't empty - */ - if (!((WindowPtr) pSrcDrawable)->parent && - REGION_NOTEMPTY (pSrcDrawable->pScreen, - &((WindowPtr) pSrcDrawable)->borderClip)) - { - /* - * special case bitblt from root window in - * IncludeInferiors mode; just like from a pixmap - */ - fastSrc = TRUE; - } - else if ((pSrcDrawable == pDstDrawable) && - (pGC->clientClipType == CT_NONE)) - { - prgnSrcClip = fbGetCompositeClip(pGC); - } - else - { - prgnSrcClip = NotClippedByChildren((WindowPtr)pSrcDrawable); - freeSrcClip = TRUE; - } - } - else - { - prgnSrcClip = &((WindowPtr)pSrcDrawable)->clipList; - } - } - - xIn += pSrcDrawable->x; - yIn += pSrcDrawable->y; - - xOut += pDstDrawable->x; - yOut += pDstDrawable->y; - - box_x1 = xIn; - box_y1 = yIn; - box_x2 = xIn + widthSrc; - box_y2 = yIn + heightSrc; - - dx = xIn - xOut; - dy = yIn - yOut; - - /* Don't create a source region if we are doing a fast clip */ - if (fastSrc) - { - RegionPtr cclip; - - fastExpose = TRUE; - /* - * clip the source; if regions extend beyond the source size, - * make sure exposure events get sent - */ - if (box_x1 < pSrcDrawable->x) - { - box_x1 = pSrcDrawable->x; - fastExpose = FALSE; - } - if (box_y1 < pSrcDrawable->y) - { - box_y1 = pSrcDrawable->y; - fastExpose = FALSE; - } - if (box_x2 > pSrcDrawable->x + (int) pSrcDrawable->width) - { - box_x2 = pSrcDrawable->x + (int) pSrcDrawable->width; - fastExpose = FALSE; - } - if (box_y2 > pSrcDrawable->y + (int) pSrcDrawable->height) - { - box_y2 = pSrcDrawable->y + (int) pSrcDrawable->height; - fastExpose = FALSE; - } - - /* Translate and clip the dst to the destination composite clip */ - box_x1 -= dx; - box_x2 -= dx; - box_y1 -= dy; - box_y2 -= dy; - - /* If the destination composite clip is one rectangle we can - do the clip directly. Otherwise we have to create a full - blown region and call intersect */ - - cclip = fbGetCompositeClip(pGC); - if (REGION_NUM_RECTS(cclip) == 1) - { - BoxPtr pBox = REGION_RECTS(cclip); - - if (box_x1 < pBox->x1) box_x1 = pBox->x1; - if (box_x2 > pBox->x2) box_x2 = pBox->x2; - if (box_y1 < pBox->y1) box_y1 = pBox->y1; - if (box_y2 > pBox->y2) box_y2 = pBox->y2; - fastDst = TRUE; - } - } - - /* Check to see if the region is empty */ - if (box_x1 >= box_x2 || box_y1 >= box_y2) - { - REGION_NULL(pGC->pScreen, &rgnDst); - } - else - { - BoxRec box; - box.x1 = box_x1; - box.y1 = box_y1; - box.x2 = box_x2; - box.y2 = box_y2; - REGION_INIT(pGC->pScreen, &rgnDst, &box, 1); - } - - /* Clip against complex source if needed */ - if (!fastSrc) - { - REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, prgnSrcClip); - REGION_TRANSLATE(pGC->pScreen, &rgnDst, -dx, -dy); - } - - /* Clip against complex dest if needed */ - if (!fastDst) - { - REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, - fbGetCompositeClip(pGC)); - } - - /* Do bit blitting */ - numRects = REGION_NUM_RECTS(&rgnDst); - if (numRects && widthSrc && heightSrc) - fbCopyRegion (pSrcDrawable, pDstDrawable, pGC, - &rgnDst, dx, dy, copyProc, bitPlane, closure); - - /* Pixmap sources generate a NoExposed (we return NULL to do this) */ - if (!fastExpose && pGC->fExpose) - prgnExposed = miHandleExposures(pSrcDrawable, pDstDrawable, pGC, - xIn - pSrcDrawable->x, - yIn - pSrcDrawable->y, - widthSrc, heightSrc, - xOut - pDstDrawable->x, - yOut - pDstDrawable->y, - (unsigned long) bitPlane); - REGION_UNINIT(pGC->pScreen, &rgnDst); - if (freeSrcClip) - REGION_DESTROY(pGC->pScreen, prgnSrcClip); - fbValidateDrawable (pDstDrawable); - return prgnExposed; -} - RegionPtr fbCopyArea (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, @@ -623,7 +333,7 @@ fbCopyArea (DrawablePtr pSrcDrawable, int xOut, int yOut) { - fbCopyProc copy; + miCopyProc copy; #ifdef FB_24_32BIT if (pSrcDrawable->bitsPerPixel != pDstDrawable->bitsPerPixel) @@ -631,7 +341,7 @@ fbCopyArea (DrawablePtr pSrcDrawable, else #endif copy = fbCopyNtoN; - return fbDoCopy (pSrcDrawable, pDstDrawable, pGC, xIn, yIn, + return miDoCopy (pSrcDrawable, pDstDrawable, pGC, xIn, yIn, widthSrc, heightSrc, xOut, yOut, copy, 0, 0); } @@ -648,11 +358,11 @@ fbCopyPlane (DrawablePtr pSrcDrawable, unsigned long bitplane) { if (pSrcDrawable->bitsPerPixel > 1) - return fbDoCopy (pSrcDrawable, pDstDrawable, pGC, + return miDoCopy (pSrcDrawable, pDstDrawable, pGC, xIn, yIn, widthSrc, heightSrc, xOut, yOut, fbCopyNto1, (Pixel) bitplane, 0); else if (bitplane & 1) - return fbDoCopy (pSrcDrawable, pDstDrawable, pGC, xIn, yIn, + return miDoCopy (pSrcDrawable, pDstDrawable, pGC, xIn, yIn, widthSrc, heightSrc, xOut, yOut, fbCopy1toN, (Pixel) bitplane, 0); else diff --git a/xorg-server/fb/fboverlay.c b/xorg-server/fb/fboverlay.c index 1432cb6f0..99939e8bf 100644 --- a/xorg-server/fb/fboverlay.c +++ b/xorg-server/fb/fboverlay.c @@ -248,7 +248,7 @@ fbOverlayCopyWindow(WindowPtr pWin, { REGION_TRANSLATE(pScreen, &layerRgn[i], -dx, -dy); pPixmap = pScrPriv->layer[i].u.run.pixmap; - fbCopyRegion (&pPixmap->drawable, &pPixmap->drawable, + miCopyRegion (&pPixmap->drawable, &pPixmap->drawable, 0, &layerRgn[i], dx, dy, pScrPriv->CopyWindow, 0, (void *)(long) i); diff --git a/xorg-server/fb/fboverlay.h b/xorg-server/fb/fboverlay.h index f3db0bb7d..b626a7702 100644 --- a/xorg-server/fb/fboverlay.h +++ b/xorg-server/fb/fboverlay.h @@ -27,7 +27,7 @@ #include "privates.h" -extern DevPrivateKey fbOverlayGetScreenPrivateKey(void); +extern _X_EXPORT DevPrivateKey fbOverlayGetScreenPrivateKey(void); #ifndef FB_OVERLAY_MAX #define FB_OVERLAY_MAX 2 @@ -53,46 +53,46 @@ typedef struct _fbOverlayLayer { typedef struct _fbOverlayScrPriv { int nlayers; fbOverlayPaintKeyProc PaintKey; - fbCopyProc CopyWindow; + miCopyProc CopyWindow; FbOverlayLayer layer[FB_OVERLAY_MAX]; } FbOverlayScrPrivRec, *FbOverlayScrPrivPtr; #define fbOverlayGetScrPriv(s) \ dixLookupPrivate(&(s)->devPrivates, fbOverlayGetScreenPrivateKey()) -Bool +extern _X_EXPORT Bool fbOverlayCreateWindow(WindowPtr pWin); -Bool +extern _X_EXPORT Bool fbOverlayCloseScreen (int iScreen, ScreenPtr pScreen); -int +extern _X_EXPORT int fbOverlayWindowLayer(WindowPtr pWin); -Bool +extern _X_EXPORT Bool fbOverlayCreateScreenResources(ScreenPtr pScreen); -void +extern _X_EXPORT void fbOverlayPaintKey (DrawablePtr pDrawable, RegionPtr pRegion, CARD32 pixel, int layer); -void +extern _X_EXPORT void fbOverlayUpdateLayerRegion (ScreenPtr pScreen, int layer, RegionPtr prgn); -void +extern _X_EXPORT void fbOverlayCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); -void +extern _X_EXPORT void fbOverlayWindowExposures (WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed); -Bool +extern _X_EXPORT Bool fbOverlaySetupScreen(ScreenPtr pScreen, pointer pbits1, pointer pbits2, @@ -105,7 +105,7 @@ fbOverlaySetupScreen(ScreenPtr pScreen, int bpp1, int bpp2); -Bool +extern _X_EXPORT Bool fbOverlayFinishScreenInit(ScreenPtr pScreen, pointer pbits1, pointer pbits2, diff --git a/xorg-server/fb/fbpict.c b/xorg-server/fb/fbpict.c index 1355e9071..dd9cefe15 100644 --- a/xorg-server/fb/fbpict.c +++ b/xorg-server/fb/fbpict.c @@ -159,26 +159,13 @@ fbComposite (CARD8 op, { pixman_image_t *src, *mask, *dest; - xDst += pDst->pDrawable->x; - yDst += pDst->pDrawable->y; - if (pSrc->pDrawable) - { - xSrc += pSrc->pDrawable->x; - ySrc += pSrc->pDrawable->y; - } - if (pMask && pMask->pDrawable) - { - xMask += pMask->pDrawable->x; - yMask += pMask->pDrawable->y; - } - miCompositeSourceValidate (pSrc, xSrc, ySrc, width, height); if (pMask) miCompositeSourceValidate (pMask, xMask, yMask, width, height); - src = image_from_pict (pSrc, TRUE); - mask = image_from_pict (pMask, TRUE); - dest = image_from_pict (pDst, TRUE); + src = image_from_pict (pSrc, TRUE, TRUE); + mask = image_from_pict (pMask, TRUE, TRUE); + dest = image_from_pict (pDst, TRUE, FALSE); if (src && dest && !(pMask && !mask)) { @@ -281,22 +268,78 @@ create_conical_gradient_image (PictGradient *gradient) gradient->nstops); } +static DrawablePtr +copy_drawable (DrawablePtr pDraw) +{ + ScreenPtr pScreen = pDraw->pScreen; + PixmapPtr pPixmap; + GCPtr pGC; + int width, height; + ChangeGCVal gcv[2]; + + width = pDraw->width; + height = pDraw->height; + + pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, pDraw->depth, 0); + + if (!pPixmap) + return NULL; + + pGC = GetScratchGC (pDraw->depth, pScreen); + + if (!pGC) + { + (*pScreen->DestroyPixmap) (pPixmap); + return NULL; + } + + /* First fill the pixmap with zeros */ + gcv[0].val = 0x00000000; + gcv[1].val = IncludeInferiors; + dixChangeGC (NullClient, pGC, GCBackground | GCSubwindowMode, NULL, gcv); + ValidateGC ((DrawablePtr)pPixmap, pGC); + miClearDrawable ((DrawablePtr)pPixmap, pGC); + + /* Then copy the window there */ + ValidateGC(&pPixmap->drawable, pGC); + (* pGC->ops->CopyArea) (pDraw, &pPixmap->drawable, pGC, 0, 0, width, height, 0, 0); + + FreeScratchGC (pGC); + + return &pPixmap->drawable; +} + +static void +destroy_drawable (pixman_image_t *image, void *data) +{ + DrawablePtr pDrawable = data; + ScreenPtr pScreen = pDrawable->pScreen; + + pScreen->DestroyPixmap ((PixmapPtr)pDrawable); +} + static pixman_image_t * create_bits_picture (PicturePtr pict, - Bool has_clip) + Bool has_clip, + Bool is_src) { FbBits *bits; FbStride stride; int bpp, xoff, yoff; pixman_image_t *image; + DrawablePtr drawable; + + if (is_src && pict->pDrawable->type == DRAWABLE_WINDOW) + drawable = copy_drawable (pict->pDrawable); + else + drawable = pict->pDrawable; - fbGetDrawable (pict->pDrawable, bits, stride, bpp, xoff, yoff); + fbGetDrawable (drawable, bits, stride, bpp, xoff, yoff); - bits = (FbBits*)((CARD8*)bits + yoff * stride * sizeof(FbBits) + xoff * (bpp / 8)); + bits = (FbBits*)((CARD8*)bits + drawable->y * stride * sizeof(FbBits) + drawable->x * (bpp / 8)); image = pixman_image_create_bits ( - pict->format, - pict->pDrawable->width, pict->pDrawable->height, + pict->format, drawable->width, drawable->height, (uint32_t *)bits, stride * sizeof (FbStride)); @@ -314,21 +357,46 @@ create_bits_picture (PicturePtr pict, #endif #endif - /* pCompositeClip is undefined for source pictures, so - * only set the clip region for pictures with drawables - */ if (has_clip) { - if (pict->clientClipType != CT_NONE) - pixman_image_set_has_client_clip (image, TRUE); - - pixman_image_set_clip_region (image, pict->pCompositeClip); + if (is_src) + { + if (pict->clientClipType != CT_NONE) + { + pixman_image_set_has_client_clip (image, TRUE); + + pixman_region_translate (pict->clientClip, + pict->clipOrigin.x, + pict->clipOrigin.y); + + pixman_image_set_clip_region (image, pict->clientClip); + + pixman_region_translate (pict->clientClip, + - pict->clipOrigin.x, + - pict->clipOrigin.y); + } + } + else + { + pixman_region_translate (pict->pCompositeClip, + - pict->pDrawable->x, + - pict->pDrawable->y); + + pixman_image_set_clip_region (image, pict->pCompositeClip); + + pixman_region_translate (pict->pCompositeClip, + pict->pDrawable->x, + pict->pDrawable->y); + } } /* Indexed table */ if (pict->pFormat->index.devPrivate) pixman_image_set_indexed (image, pict->pFormat->index.devPrivate); + if (drawable != pict->pDrawable) + pixman_image_set_destroy_function (image, destroy_drawable, drawable); + return image; } @@ -368,7 +436,7 @@ set_image_properties (pixman_image_t *image, PicturePtr pict) if (pict->alphaMap) { - pixman_image_t *alpha_map = image_from_pict (pict->alphaMap, TRUE); + pixman_image_t *alpha_map = image_from_pict (pict->alphaMap, TRUE, TRUE); pixman_image_set_alpha_map ( image, alpha_map, pict->alphaOrigin.x, pict->alphaOrigin.y); @@ -402,7 +470,8 @@ set_image_properties (pixman_image_t *image, PicturePtr pict) pixman_image_t * image_from_pict (PicturePtr pict, - Bool has_clip) + Bool has_clip, + Bool is_src) { pixman_image_t *image = NULL; @@ -411,7 +480,7 @@ image_from_pict (PicturePtr pict, if (pict->pDrawable) { - image = create_bits_picture (pict, has_clip); + image = create_bits_picture (pict, has_clip, is_src); } else if (pict->pSourcePict) { diff --git a/xorg-server/fb/fbpict.h b/xorg-server/fb/fbpict.h index b4c1dcf12..b89f90ff1 100644 --- a/xorg-server/fb/fbpict.h +++ b/xorg-server/fb/fbpict.h @@ -95,6 +95,8 @@ fbCanGetSolid(PicturePtr pict) case PICT_x8r8g8b8: case PICT_a8b8g8r8: case PICT_x8b8g8r8: + case PICT_b8g8r8a8: + case PICT_b8g8r8x8: case PICT_r8g8b8: case PICT_b8g8r8: case PICT_r5g6b5: @@ -383,7 +385,7 @@ typedef struct _FbComposeData { CARD16 height; } FbComposeData; -void +extern _X_EXPORT void fbCompositeRect (const FbComposeData *data, CARD32 *scanline_buffer); typedef FASTCALL void (*CombineMaskU) (CARD32 *src, const CARD32 *mask, int width); @@ -398,7 +400,7 @@ typedef struct _FbComposeFunctions { /* fbcompose.c */ -void +extern _X_EXPORT void fbCompositeGeneral (CARD8 op, PicturePtr pSrc, PicturePtr pMask, @@ -413,7 +415,7 @@ fbCompositeGeneral (CARD8 op, CARD16 height); /* fbpict.c */ -void +extern _X_EXPORT void fbComposite (CARD8 op, PicturePtr pSrc, PicturePtr pMask, @@ -440,7 +442,7 @@ typedef void (*CompositeFunc) (CARD8 op, CARD16 width, CARD16 height); -void +extern _X_EXPORT void fbWalkCompositeRegion (CARD8 op, PicturePtr pSrc, PicturePtr pMask, @@ -459,20 +461,20 @@ fbWalkCompositeRegion (CARD8 op, /* fbtrap.c */ -void +extern _X_EXPORT void fbAddTraps (PicturePtr pPicture, INT16 xOff, INT16 yOff, int ntrap, xTrap *traps); -void +extern _X_EXPORT void fbRasterizeTrapezoid (PicturePtr alpha, xTrapezoid *trap, int x_off, int y_off); -void +extern _X_EXPORT void fbAddTriangles (PicturePtr pPicture, INT16 xOff, INT16 yOff, diff --git a/xorg-server/fb/fbrop.h b/xorg-server/fb/fbrop.h index 1685ee836..a01fdabfe 100644 --- a/xorg-server/fb/fbrop.h +++ b/xorg-server/fb/fbrop.h @@ -27,7 +27,7 @@ typedef struct _mergeRopBits { FbBits ca1, cx1, ca2, cx2; } FbMergeRopRec, *FbMergeRopPtr; -extern const FbMergeRopRec FbMergeRopBits[16]; +extern _X_EXPORT const FbMergeRopRec FbMergeRopBits[16]; #define FbDeclareMergeRop() FbBits _ca1, _cx1, _ca2, _cx2; #define FbDeclarePrebuiltMergeRop() FbBits _cca, _ccx; @@ -95,14 +95,14 @@ extern const FbMergeRopRec FbMergeRopBits[16]; * Stippling operations; */ -extern const FbBits fbStipple16Bits[256]; /* half of table */ +extern _X_EXPORT const FbBits fbStipple16Bits[256]; /* half of table */ #define FbStipple16Bits(b) \ (fbStipple16Bits[(b)&0xff] | fbStipple16Bits[(b) >> 8] << FB_HALFUNIT) -extern const FbBits fbStipple8Bits[256]; -extern const FbBits fbStipple4Bits[16]; -extern const FbBits fbStipple2Bits[4]; -extern const FbBits fbStipple1Bits[2]; -extern const FbBits *const fbStippleTable[]; +extern _X_EXPORT const FbBits fbStipple8Bits[256]; +extern _X_EXPORT const FbBits fbStipple4Bits[16]; +extern _X_EXPORT const FbBits fbStipple2Bits[4]; +extern _X_EXPORT const FbBits fbStipple1Bits[2]; +extern _X_EXPORT const FbBits *const fbStippleTable[]; #define FbStippleRRop(dst, b, fa, fx, ba, bx) \ (FbDoRRop(dst, fa, fx) & b) | (FbDoRRop(dst, ba, bx) & ~b) diff --git a/xorg-server/fb/fbscreen.c b/xorg-server/fb/fbscreen.c index ea2491211..24eadde1a 100644 --- a/xorg-server/fb/fbscreen.c +++ b/xorg-server/fb/fbscreen.c @@ -242,14 +242,6 @@ fbFinishScreenInit(ScreenPtr pScreen, pScreen->CreateScreenResources = fb24_32CreateScreenResources; } #endif -#if 0 - /* leave backing store initialization to the enclosing code so - * it can choose the correct order of wrappers - */ - /* init backing store here so we can overwrite CloseScreen without stepping - * on the backing store wrapped version */ - fbInitializeBackingStore (pScreen); -#endif return TRUE; } diff --git a/xorg-server/fb/fbtrap.c b/xorg-server/fb/fbtrap.c index 830603ae7..b1e1eff4a 100644 --- a/xorg-server/fb/fbtrap.c +++ b/xorg-server/fb/fbtrap.c @@ -40,7 +40,7 @@ fbAddTraps (PicturePtr pPicture, int ntrap, xTrap *traps) { - pixman_image_t *image = image_from_pict (pPicture, FALSE); + pixman_image_t *image = image_from_pict (pPicture, FALSE, FALSE); if (!image) return; @@ -56,7 +56,7 @@ fbRasterizeTrapezoid (PicturePtr pPicture, int x_off, int y_off) { - pixman_image_t *image = image_from_pict (pPicture, FALSE); + pixman_image_t *image = image_from_pict (pPicture, FALSE, FALSE); if (!image) return; diff --git a/xorg-server/fb/fbwindow.c b/xorg-server/fb/fbwindow.c index 70e75a9e9..46c033448 100644 --- a/xorg-server/fb/fbwindow.c +++ b/xorg-server/fb/fbwindow.c @@ -115,7 +115,7 @@ fbCopyWindowProc (DrawablePtr pSrcDrawable, fbFinishAccess (pSrcDrawable); } -void +void fbCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) @@ -140,7 +140,7 @@ fbCopyWindow(WindowPtr pWin, -pPixmap->screen_x, -pPixmap->screen_y); #endif - fbCopyRegion (pDrawable, pDrawable, + miCopyRegion (pDrawable, pDrawable, 0, &rgnDst, dx, dy, fbCopyWindowProc, 0, 0); |