[PATCH 8/9] fb: split off a few functions into a seperate file and enhance them slightly.
- Compatibility wrappers, if deemed neccesary will come later. --- fb/Makefile.am |3 +- fb/fb.h | 37 +- fb/fb24_32.c|4 +- fb/fbcopy.c | 342 ++- fb/fbcopy_helpers.c | 367 +++ fb/fbcopy_helpers.h | 52 +++ fb/fboverlay.c |1 + fb/fbwindow.c |5 +- 8 files changed, 448 insertions(+), 363 deletions(-) create mode 100644 fb/fbcopy_helpers.c create mode 100644 fb/fbcopy_helpers.h diff --git a/fb/Makefile.am b/fb/Makefile.am index 64e49f3..cfd9364 100644 --- a/fb/Makefile.am +++ b/fb/Makefile.am @@ -7,7 +7,7 @@ INCLUDES = \ AM_CFLAGS = $(DIX_CFLAGS) if XORG -sdk_HEADERS = fb.h fbrop.h fboverlay.h wfbrename.h fbpict.h +sdk_HEADERS = fb.h fbrop.h fboverlay.h wfbrename.h fbpict.h fbcopy_helpers.h endif libfb_la_CFLAGS = $(AM_CFLAGS) @@ -24,6 +24,7 @@ libfb_la_SOURCES =\ fbbits.h\ fbblt.c \ fbbltone.c \ + fbcopy_helpers.c\ fbcopy.c\ fbfill.c\ fbfillrect.c\ diff --git a/fb/fb.h b/fb/fb.h index 8384315..b0898b0 100644 --- a/fb/fb.h +++ b/fb/fb.h @@ -788,7 +788,7 @@ fb24_32GetImage (DrawablePtr pDrawable, unsigned long planeMask, char*d); -extern _X_EXPORT void +extern _X_EXPORT Bool fb24_32CopyMtoN (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, @@ -1306,7 +1306,7 @@ fbInitVisuals (VisualPtr*visualp, * fbcopy.c */ -typedef void (*fbCopyProc) (DrawablePtr pSrcDrawable, +typedef Bool (*fbCopyProc) (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtrpGC, BoxPtr pDstBox, @@ -1318,7 +1318,7 @@ typedef void (*fbCopyProc) (DrawablePtr pSrcDrawable, Pixelbitplane, void *closure); -extern _X_EXPORT void +extern _X_EXPORT Bool fbCopyNtoN (DrawablePtrpSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, @@ -1331,7 +1331,7 @@ fbCopyNtoN (DrawablePtr pSrcDrawable, Pixel bitplane, void*closure); -extern _X_EXPORT void +extern _X_EXPORT Bool fbCopy1toN (DrawablePtrpSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, @@ -1344,7 +1344,7 @@ fbCopy1toN (DrawablePtr pSrcDrawable, Pixel bitplane, void*closure); -extern _X_EXPORT void +extern _X_EXPORT Bool fbCopyNto1 (DrawablePtrpSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, @@ -1357,31 +1357,6 @@ fbCopyNto1 (DrawablePtr pSrcDrawable, Pixel bitplane, void*closure); -extern _X_EXPORT void -fbCopyRegion (DrawablePtr pSrcDrawable, - DrawablePtr pDstDrawable, - GCPtr pGC, - RegionPtr pDstRegion, - int dx, - int dy, - fbCopyProccopyProc, - Pixel bitPlane, - void *closure); - -extern _X_EXPORT RegionPtr -fbDoCopy (DrawablePtr pSrcDrawable, - DrawablePtr pDstDrawable, - GCPtr pGC, - int xIn, - int yIn, - int widthSrc, - int heightSrc, - int xOut, - int yOut, - fbCopyProccopyProc, - Pixel bitplane, - void *closure); - extern _X_EXPORT RegionPtr fbCopyArea (DrawablePtrpSrcDrawable, DrawablePtr pDstDrawable, @@ -2036,7 +2011,7 @@ fbPositionWindow(WindowPtr pWin, int x, int y); extern _X_EXPORT Bool fbUnmapWindow(WindowPtr pWindow); -extern _X_EXPORT void +extern _X_EXPORT Bool fbCopyWindowProc (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, diff --git a/fb/fb24_32.c b/fb/fb24_32.c index 1ebd598..952b9ff 100644 --- a/fb/fb24_32.c +++ b/fb/fb24_32.c @@ -472,7 +472,7 @@ fb24_32GetImage (DrawablePtr pDrawable, fbFinishAccess (pDrawable); } -void +Bool fb24_32CopyMtoN (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, @@ -529,6 +529,8 @@ fb24_32CopyMtoN (DrawablePtr pSrcDrawable, fbFinishAccess (pSrcDrawable); fbFinishAccess (pDstDrawable); + +return TRUE; } PixmapPtr diff --git a/fb/fbcopy.c b/fb/fbcopy.c index b8b0b6a..2f430b7 100644 --- a/fb/fbcopy.c +++ b/fb/fbcopy.c @@ -27,8 +27,9 @@ #include stdlib.h #include fb.h +#include fbcopy_helpers.h -void +Bool fbCopyNtoN (DrawablePtrpSrcDrawable, DrawablePtr pDstDrawable,
[PATCH 8/9] fb: split off a few functions into a seperate file and enhance them slightly.
- Compatibility wrappers, if deemed neccesary will come later. --- fb/Makefile.am |3 +- fb/fb.h | 37 +- fb/fb24_32.c|4 +- fb/fbcopy.c | 342 ++- fb/fbcopy_helpers.c | 367 +++ fb/fbcopy_helpers.h | 52 +++ fb/fboverlay.c |1 + fb/fbwindow.c |5 +- 8 files changed, 448 insertions(+), 363 deletions(-) create mode 100644 fb/fbcopy_helpers.c create mode 100644 fb/fbcopy_helpers.h diff --git a/fb/Makefile.am b/fb/Makefile.am index 64e49f3..cfd9364 100644 --- a/fb/Makefile.am +++ b/fb/Makefile.am @@ -7,7 +7,7 @@ INCLUDES = \ AM_CFLAGS = $(DIX_CFLAGS) if XORG -sdk_HEADERS = fb.h fbrop.h fboverlay.h wfbrename.h fbpict.h +sdk_HEADERS = fb.h fbrop.h fboverlay.h wfbrename.h fbpict.h fbcopy_helpers.h endif libfb_la_CFLAGS = $(AM_CFLAGS) @@ -24,6 +24,7 @@ libfb_la_SOURCES =\ fbbits.h\ fbblt.c \ fbbltone.c \ + fbcopy_helpers.c\ fbcopy.c\ fbfill.c\ fbfillrect.c\ diff --git a/fb/fb.h b/fb/fb.h index 8384315..b0898b0 100644 --- a/fb/fb.h +++ b/fb/fb.h @@ -788,7 +788,7 @@ fb24_32GetImage (DrawablePtr pDrawable, unsigned long planeMask, char*d); -extern _X_EXPORT void +extern _X_EXPORT Bool fb24_32CopyMtoN (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, @@ -1306,7 +1306,7 @@ fbInitVisuals (VisualPtr*visualp, * fbcopy.c */ -typedef void (*fbCopyProc) (DrawablePtr pSrcDrawable, +typedef Bool (*fbCopyProc) (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtrpGC, BoxPtr pDstBox, @@ -1318,7 +1318,7 @@ typedef void (*fbCopyProc) (DrawablePtr pSrcDrawable, Pixelbitplane, void *closure); -extern _X_EXPORT void +extern _X_EXPORT Bool fbCopyNtoN (DrawablePtrpSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, @@ -1331,7 +1331,7 @@ fbCopyNtoN (DrawablePtr pSrcDrawable, Pixel bitplane, void*closure); -extern _X_EXPORT void +extern _X_EXPORT Bool fbCopy1toN (DrawablePtrpSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, @@ -1344,7 +1344,7 @@ fbCopy1toN (DrawablePtr pSrcDrawable, Pixel bitplane, void*closure); -extern _X_EXPORT void +extern _X_EXPORT Bool fbCopyNto1 (DrawablePtrpSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, @@ -1357,31 +1357,6 @@ fbCopyNto1 (DrawablePtr pSrcDrawable, Pixel bitplane, void*closure); -extern _X_EXPORT void -fbCopyRegion (DrawablePtr pSrcDrawable, - DrawablePtr pDstDrawable, - GCPtr pGC, - RegionPtr pDstRegion, - int dx, - int dy, - fbCopyProccopyProc, - Pixel bitPlane, - void *closure); - -extern _X_EXPORT RegionPtr -fbDoCopy (DrawablePtr pSrcDrawable, - DrawablePtr pDstDrawable, - GCPtr pGC, - int xIn, - int yIn, - int widthSrc, - int heightSrc, - int xOut, - int yOut, - fbCopyProccopyProc, - Pixel bitplane, - void *closure); - extern _X_EXPORT RegionPtr fbCopyArea (DrawablePtrpSrcDrawable, DrawablePtr pDstDrawable, @@ -2036,7 +2011,7 @@ fbPositionWindow(WindowPtr pWin, int x, int y); extern _X_EXPORT Bool fbUnmapWindow(WindowPtr pWindow); -extern _X_EXPORT void +extern _X_EXPORT Bool fbCopyWindowProc (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, diff --git a/fb/fb24_32.c b/fb/fb24_32.c index 1ebd598..952b9ff 100644 --- a/fb/fb24_32.c +++ b/fb/fb24_32.c @@ -472,7 +472,7 @@ fb24_32GetImage (DrawablePtr pDrawable, fbFinishAccess (pDrawable); } -void +Bool fb24_32CopyMtoN (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, @@ -529,6 +529,8 @@ fb24_32CopyMtoN (DrawablePtr pSrcDrawable, fbFinishAccess (pSrcDrawable); fbFinishAccess (pDstDrawable); + +return TRUE; } PixmapPtr diff --git a/fb/fbcopy.c b/fb/fbcopy.c index b8b0b6a..2f430b7 100644 --- a/fb/fbcopy.c +++ b/fb/fbcopy.c @@ -27,8 +27,9 @@ #include stdlib.h #include fb.h +#include fbcopy_helpers.h -void +Bool fbCopyNtoN (DrawablePtrpSrcDrawable, DrawablePtr pDstDrawable,