summaryrefslogtreecommitdiff
path: root/xserver/fb
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2015-09-16 19:10:27 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2015-09-16 19:10:27 +0000
commit4f2941d7bdfb60a6b2ca49d7e2ee50dd5eb11ddd (patch)
tree5f7f0cf3d5aeb655a950fae516224a3d61a820cf /xserver/fb
parentc84734bf28ef1ec0ce3cc7d1c45dfb920484e68e (diff)
Update to xserver 1.17.2. tested by dcoppa@, jsg@, jasper@ & naddy@
Diffstat (limited to 'xserver/fb')
-rw-r--r--xserver/fb/Makefile.am2
-rw-r--r--xserver/fb/Makefile.in43
-rw-r--r--xserver/fb/fb.h342
-rw-r--r--xserver/fb/fb24_32.c2
-rw-r--r--xserver/fb/fb24_32.h2
-rw-r--r--xserver/fb/fbbits.c12
-rw-r--r--xserver/fb/fbblt.c271
-rw-r--r--xserver/fb/fbbltone.c320
-rw-r--r--xserver/fb/fbcopy.c2
-rw-r--r--xserver/fb/fbfill.c84
-rw-r--r--xserver/fb/fbfillrect.c2
-rw-r--r--xserver/fb/fbgc.c85
-rw-r--r--xserver/fb/fbglyph.c10
-rw-r--r--xserver/fb/fbline.c4
-rw-r--r--xserver/fb/fboverlay.c7
-rw-r--r--xserver/fb/fboverlay.h6
-rw-r--r--xserver/fb/fbpict.c18
-rw-r--r--xserver/fb/fbpict.h4
-rw-r--r--xserver/fb/fbpixmap.c6
-rw-r--r--xserver/fb/fbpoint.c2
-rw-r--r--xserver/fb/fbpush.c4
-rw-r--r--xserver/fb/fbrop.h12
-rw-r--r--xserver/fb/fbscreen.c4
-rw-r--r--xserver/fb/fbseg.c22
-rw-r--r--xserver/fb/fbstipple.c264
-rw-r--r--xserver/fb/fbtile.c163
-rw-r--r--xserver/fb/fbutil.c308
-rw-r--r--xserver/fb/fbwindow.c4
-rw-r--r--xserver/fb/wfbrename.h25
29 files changed, 267 insertions, 1763 deletions
diff --git a/xserver/fb/Makefile.am b/xserver/fb/Makefile.am
index 752eabeb7..65b5d9432 100644
--- a/xserver/fb/Makefile.am
+++ b/xserver/fb/Makefile.am
@@ -44,8 +44,6 @@ libfb_la_SOURCES = \
fbseg.c \
fbsetsp.c \
fbsolid.c \
- fbstipple.c \
- fbtile.c \
fbtrap.c \
fbutil.c \
fbwindow.c
diff --git a/xserver/fb/Makefile.in b/xserver/fb/Makefile.in
index 0db6f3041..fcc7e4c29 100644
--- a/xserver/fb/Makefile.in
+++ b/xserver/fb/Makefile.in
@@ -84,9 +84,8 @@ am_libfb_la_OBJECTS = libfb_la-fb24_32.lo libfb_la-fballpriv.lo \
libfb_la-fbimage.lo libfb_la-fbline.lo libfb_la-fboverlay.lo \
libfb_la-fbpict.lo libfb_la-fbpixmap.lo libfb_la-fbpoint.lo \
libfb_la-fbpush.lo libfb_la-fbscreen.lo libfb_la-fbseg.lo \
- libfb_la-fbsetsp.lo libfb_la-fbsolid.lo libfb_la-fbstipple.lo \
- libfb_la-fbtile.lo libfb_la-fbtrap.lo libfb_la-fbutil.lo \
- libfb_la-fbwindow.lo
+ libfb_la-fbsetsp.lo libfb_la-fbsolid.lo libfb_la-fbtrap.lo \
+ libfb_la-fbutil.lo libfb_la-fbwindow.lo
libfb_la_OBJECTS = $(am_libfb_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -106,8 +105,7 @@ am__objects_1 = libwfb_la-fb24_32.lo libwfb_la-fballpriv.lo \
libwfb_la-fboverlay.lo libwfb_la-fbpict.lo \
libwfb_la-fbpixmap.lo libwfb_la-fbpoint.lo libwfb_la-fbpush.lo \
libwfb_la-fbscreen.lo libwfb_la-fbseg.lo libwfb_la-fbsetsp.lo \
- libwfb_la-fbsolid.lo libwfb_la-fbstipple.lo \
- libwfb_la-fbtile.lo libwfb_la-fbtrap.lo libwfb_la-fbutil.lo \
+ libwfb_la-fbsolid.lo libwfb_la-fbtrap.lo libwfb_la-fbutil.lo \
libwfb_la-fbwindow.lo
am_libwfb_la_OBJECTS = $(am__objects_1)
libwfb_la_OBJECTS = $(am_libwfb_la_OBJECTS)
@@ -296,6 +294,7 @@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@
KDRIVE_INCS = @KDRIVE_INCS@
KDRIVE_LIBS = @KDRIVE_LIBS@
KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@
+KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@
KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@
KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@
KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@
@@ -572,8 +571,6 @@ libfb_la_SOURCES = \
fbseg.c \
fbsetsp.c \
fbsolid.c \
- fbstipple.c \
- fbtile.c \
fbtrap.c \
fbutil.c \
fbwindow.c
@@ -660,8 +657,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbseg.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbsetsp.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbsolid.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbstipple.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbtile.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbtrap.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbutil.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbwindow.Plo@am__quote@
@@ -690,8 +685,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbseg.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbsetsp.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbsolid.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbstipple.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbtile.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbtrap.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbutil.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbwindow.Plo@am__quote@
@@ -892,20 +885,6 @@ libfb_la-fbsolid.lo: fbsolid.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbsolid.lo `test -f 'fbsolid.c' || echo '$(srcdir)/'`fbsolid.c
-libfb_la-fbstipple.lo: fbstipple.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbstipple.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbstipple.Tpo -c -o libfb_la-fbstipple.lo `test -f 'fbstipple.c' || echo '$(srcdir)/'`fbstipple.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbstipple.Tpo $(DEPDIR)/libfb_la-fbstipple.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbstipple.c' object='libfb_la-fbstipple.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbstipple.lo `test -f 'fbstipple.c' || echo '$(srcdir)/'`fbstipple.c
-
-libfb_la-fbtile.lo: fbtile.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbtile.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbtile.Tpo -c -o libfb_la-fbtile.lo `test -f 'fbtile.c' || echo '$(srcdir)/'`fbtile.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbtile.Tpo $(DEPDIR)/libfb_la-fbtile.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbtile.c' object='libfb_la-fbtile.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbtile.lo `test -f 'fbtile.c' || echo '$(srcdir)/'`fbtile.c
-
libfb_la-fbtrap.lo: fbtrap.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbtrap.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbtrap.Tpo -c -o libfb_la-fbtrap.lo `test -f 'fbtrap.c' || echo '$(srcdir)/'`fbtrap.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbtrap.Tpo $(DEPDIR)/libfb_la-fbtrap.Plo
@@ -1102,20 +1081,6 @@ libwfb_la-fbsolid.lo: fbsolid.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbsolid.lo `test -f 'fbsolid.c' || echo '$(srcdir)/'`fbsolid.c
-libwfb_la-fbstipple.lo: fbstipple.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbstipple.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbstipple.Tpo -c -o libwfb_la-fbstipple.lo `test -f 'fbstipple.c' || echo '$(srcdir)/'`fbstipple.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbstipple.Tpo $(DEPDIR)/libwfb_la-fbstipple.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbstipple.c' object='libwfb_la-fbstipple.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbstipple.lo `test -f 'fbstipple.c' || echo '$(srcdir)/'`fbstipple.c
-
-libwfb_la-fbtile.lo: fbtile.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbtile.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbtile.Tpo -c -o libwfb_la-fbtile.lo `test -f 'fbtile.c' || echo '$(srcdir)/'`fbtile.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbtile.Tpo $(DEPDIR)/libwfb_la-fbtile.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbtile.c' object='libwfb_la-fbtile.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbtile.lo `test -f 'fbtile.c' || echo '$(srcdir)/'`fbtile.c
-
libwfb_la-fbtrap.lo: fbtrap.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbtrap.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbtrap.Tpo -c -o libwfb_la-fbtrap.lo `test -f 'fbtrap.c' || echo '$(srcdir)/'`fbtrap.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbtrap.Tpo $(DEPDIR)/libwfb_la-fbtrap.Plo
diff --git a/xserver/fb/fb.h b/xserver/fb/fb.h
index 90577677b..ab110f327 100644
--- a/xserver/fb/fb.h
+++ b/xserver/fb/fb.h
@@ -83,11 +83,7 @@
#define FB_SHIFT LOG2_BITMAP_PAD
#endif
-#if FB_SHIFT < LOG2_BITMAP_PAD
-error FB_SHIFT must be >= LOG2_BITMAP_PAD
-#endif
#define FB_UNIT (1 << FB_SHIFT)
-#define FB_HALFUNIT (1 << (FB_SHIFT-1))
#define FB_MASK (FB_UNIT - 1)
#define FB_ALLONES ((FbBits) -1)
#if GLYPHPADBYTES != 4
@@ -105,37 +101,15 @@ error FB_SHIFT must be >= LOG2_BITMAP_PAD
#define FbStipStrideToBitsStride(s) (((s) >> (FB_SHIFT - FB_STIP_SHIFT)))
#define FbBitsStrideToStipStride(s) (((s) << (FB_SHIFT - FB_STIP_SHIFT)))
#define FbFullMask(n) ((n) == FB_UNIT ? FB_ALLONES : ((((FbBits) 1) << n) - 1))
-#if FB_SHIFT == 6
-#ifdef WIN32
-typedef unsigned __int64 FbBits;
-#else
-#if defined(__alpha__) || defined(__alpha) || \
- defined(ia64) || defined(__ia64__) || \
- defined(__sparc64__) || defined(_LP64) || \
- defined(__s390x__) || \
- defined(amd64) || defined (__amd64__) || \
- defined (__powerpc64__)
-typedef unsigned long FbBits;
-#else
-typedef unsigned long long FbBits;
-#endif
-#endif
-#endif
#if FB_SHIFT == 5
typedef CARD32 FbBits;
-#endif
-
-#if FB_SHIFT == 4
-typedef CARD16 FbBits;
+#else
+#error "Unsupported FB_SHIFT"
#endif
#if LOG2_BITMAP_PAD == FB_SHIFT
typedef FbBits FbStip;
-#else
-#if LOG2_BITMAP_PAD == 5
-typedef CARD32 FbStip;
-#endif
#endif
typedef int FbStride;
@@ -264,122 +238,8 @@ extern _X_EXPORT void fbSetBits(FbStip * bits, int stride, FbStip data);
n >>= FB_SHIFT; \
}
-#if FB_SHIFT == 6
-#define FbDoLeftMaskByteRRop6Cases(dst,xor) \
- case (sizeof (FbBits) - 7) | (1 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 7) | (2 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 7) | (3 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
- break; \
- case (sizeof (FbBits) - 7) | (4 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 7) | (5 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
- break; \
- case (sizeof (FbBits) - 7) | (6 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 7): \
- FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
- break; \
- case (sizeof (FbBits) - 6) | (1 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 6) | (2 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
- break; \
- case (sizeof (FbBits) - 6) | (3 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 6) | (4 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
- break; \
- case (sizeof (FbBits) - 6) | (5 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 6): \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
- break; \
- case (sizeof (FbBits) - 5) | (1 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 5) | (2 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 5) | (3 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
- break; \
- case (sizeof (FbBits) - 5) | (4 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 5): \
- FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
- break; \
- case (sizeof (FbBits) - 4) | (1 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 4) | (2 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
- break; \
- case (sizeof (FbBits) - 4) | (3 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 4): \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
- break;
-
-#define FbDoRightMaskByteRRop6Cases(dst,xor) \
- case 4: \
- FbStorePart(dst,0,CARD32,xor); \
- break; \
- case 5: \
- FbStorePart(dst,0,CARD32,xor); \
- FbStorePart(dst,4,CARD8,xor); \
- break; \
- case 6: \
- FbStorePart(dst,0,CARD32,xor); \
- FbStorePart(dst,4,CARD16,xor); \
- break; \
- case 7: \
- FbStorePart(dst,0,CARD32,xor); \
- FbStorePart(dst,4,CARD16,xor); \
- FbStorePart(dst,6,CARD8,xor); \
- break;
-#else
-#define FbDoLeftMaskByteRRop6Cases(dst,xor)
-#define FbDoRightMaskByteRRop6Cases(dst,xor)
-#endif
-
#define FbDoLeftMaskByteRRop(dst,lb,l,and,xor) { \
switch (lb) { \
- FbDoLeftMaskByteRRop6Cases(dst,xor) \
case (sizeof (FbBits) - 3) | (1 << (FB_SHIFT - 3)): \
FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
break; \
@@ -416,7 +276,6 @@ extern _X_EXPORT void fbSetBits(FbStip * bits, int stride, FbStip data);
FbStorePart(dst,0,CARD16,xor); \
FbStorePart(dst,2,CARD8,xor); \
break; \
- FbDoRightMaskByteRRop6Cases(dst,xor) \
default: \
WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, r)); \
} \
@@ -470,21 +329,7 @@ extern _X_EXPORT void fbSetBits(FbStip * bits, int stride, FbStip data);
FbLaneCase2((n)>>2,a,(o)+2) \
}
-#define FbLaneCase8(n,a,o) \
- if ((n) == 0x0ff) { \
- *(FbBits *) ((a)+(o)) = fgxor; \
- } else { \
- FbLaneCase4((n)&15,a,o) \
- FbLaneCase4((n)>>4,a,(o)+4) \
- }
-
-#if FB_SHIFT == 6
-#define FbLaneCase(n,a) FbLaneCase8(n,(CARD8 *) (a),0)
-#endif
-
-#if FB_SHIFT == 5
#define FbLaneCase(n,a) FbLaneCase4(n,(CARD8 *) (a),0)
-#endif
/* Rotate a filled pixel value to the specified alignement */
#define FbRot24(p,b) (FbScrRight(p,b) | FbScrLeft(p,24-(b)))
@@ -497,19 +342,6 @@ extern _X_EXPORT void fbSetBits(FbStip * bits, int stride, FbStip data);
#define FbPrev24Stip(p) (FbRot24(p,FB_STIP_UNIT%24))
/* step a rotation value to the next/previous rotation value */
-#if FB_UNIT == 64
-#define FbNext24Rot(r) ((r) == 16 ? 0 : (r) + 8)
-#define FbPrev24Rot(r) ((r) == 0 ? 16 : (r) - 8)
-
-#if IMAGE_BYTE_ORDER == MSBFirst
-#define FbFirst24Rot(x) (((x) + 8) % 24)
-#else
-#define FbFirst24Rot(x) ((x) % 24)
-#endif
-
-#endif
-
-#if FB_UNIT == 32
#define FbNext24Rot(r) ((r) == 0 ? 16 : (r) - 8)
#define FbPrev24Rot(r) ((r) == 16 ? 0 : (r) + 8)
@@ -518,7 +350,6 @@ extern _X_EXPORT void fbSetBits(FbStip * bits, int stride, FbStip data);
#else
#define FbFirst24Rot(x) ((x) % 24)
#endif
-#endif
#define FbNext24RotStip(r) ((r) == 0 ? 16 : (r) - 8)
#define FbPrev24RotStip(r) ((r) == 16 ? 0 : (r) + 8)
@@ -621,7 +452,6 @@ typedef struct {
FbBits bgand, bgxor; /* for stipples */
FbBits fg, bg, pm; /* expanded and filled */
unsigned int dashLength; /* total of all dash elements */
- unsigned char evenStipple; /* stipple is even */
unsigned char bpp; /* current drawable bpp */
} FbGCPrivRec, *FbGCPrivPtr;
@@ -714,11 +544,6 @@ typedef struct {
* Accelerated tiles are power of 2 width <= FB_UNIT
*/
#define FbEvenTile(w) ((w) <= FB_UNIT && FbPowerOfTwo(w))
-/*
- * Accelerated stipples are power of 2 width and <= FB_UNIT/dstBpp
- * with dstBpp a power of 2 as well
- */
-#define FbEvenStip(w,bpp) ((w) * (bpp) <= FB_UNIT && FbPowerOfTwo(w) && FbPowerOfTwo(bpp))
/*
* fb24_32.c
@@ -925,13 +750,6 @@ fbArc24(FbBits * dst,
int dstBpp, xArc * arc, int dx, int dy, FbBits and, FbBits xor);
extern _X_EXPORT void
-
-fbGlyph24(FbBits * dstLine,
- FbStride dstStride,
- int dstBpp, FbStip * stipple, FbBits fg, int height, int shift);
-
-extern _X_EXPORT void
-
fbPolyline24(DrawablePtr pDrawable,
GCPtr pGC, int mode, int npt, DDXPointPtr ptsOrig);
@@ -1220,9 +1038,6 @@ fbGetSpans(DrawablePtr pDrawable,
* fbglyph.c
*/
-extern _X_EXPORT Bool
- fbGlyphIn(RegionPtr pRegion, int x, int y, int width, int height);
-
extern _X_EXPORT void
fbPolyGlyphBlt(DrawablePtr pDrawable,
@@ -1283,15 +1098,6 @@ fbGetImage(DrawablePtr pDrawable,
*/
extern _X_EXPORT void
-
-fbZeroLine(DrawablePtr pDrawable,
- GCPtr pGC, int mode, int npt, DDXPointPtr ppt);
-
-extern _X_EXPORT void
- fbZeroSegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pSegs);
-
-extern _X_EXPORT void
-
fbPolyLine(DrawablePtr pDrawable,
GCPtr pGC, int mode, int npt, DDXPointPtr ppt);
@@ -1339,36 +1145,12 @@ extern _X_EXPORT RegionPtr
extern _X_EXPORT void
-fbDots(FbBits * dstOrig,
- FbStride dstStride,
- int dstBpp,
- BoxPtr pBox,
- xPoint * pts,
- int npt,
- int xorg, int yorg, int xoff, int yoff, FbBits andOrig, FbBits xorOrig);
-
-extern _X_EXPORT void
-
fbPolyPoint(DrawablePtr pDrawable,
GCPtr pGC, int mode, int npt, xPoint * pptInit);
/*
* fbpush.c
*/
-extern _X_EXPORT void
-
-fbPushPattern(DrawablePtr pDrawable,
- GCPtr pGC,
- FbStip * src,
- FbStride srcStride,
- int srcX, int x, int y, int width, int height);
-
-extern _X_EXPORT void
-
-fbPushFill(DrawablePtr pDrawable,
- GCPtr pGC,
- FbStip * src,
- FbStride srcStride, int srcX, int x, int y, int width, int height);
extern _X_EXPORT void
@@ -1462,34 +1244,20 @@ typedef void FbBres(DrawablePtr pDrawable,
int signdy,
int axis, int x, int y, int e, int e1, int e3, int len);
-extern _X_EXPORT FbBres fbBresSolid, fbBresDash, fbBresFill, fbBresFillDash;
+extern _X_EXPORT void
+fbSegment(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int xa, int ya, int xb, int yb, Bool drawLast, int *dashOffset);
/*
* fbsetsp.c
*/
extern _X_EXPORT void
-
fbSetSpans(DrawablePtr pDrawable,
GCPtr pGC,
char *src, DDXPointPtr ppt, int *pwidth, int nspans, int fSorted);
-extern _X_EXPORT FbBres *fbSelectBres(DrawablePtr pDrawable, GCPtr pGC);
-
-extern _X_EXPORT void
-
-fbBres(DrawablePtr pDrawable,
- GCPtr pGC,
- int dashOffset,
- int signdx,
- int signdy, int axis, int x, int y, int e, int e1, int e3, int len);
-
-extern _X_EXPORT void
-
-fbSegment(DrawablePtr pDrawable,
- GCPtr pGC,
- int xa, int ya, int xb, int yb, Bool drawLast, int *dashOffset);
-
/*
* fbsolid.c
*/
@@ -1507,104 +1275,10 @@ fbSolid24(FbBits * dst,
int dstX, int width, int height, FbBits and, FbBits xor);
/*
- * fbstipple.c
- */
-
-extern _X_EXPORT void
- fbTransparentSpan(FbBits * dst, FbBits stip, FbBits fgxor, int n);
-
-extern _X_EXPORT void
-
-fbEvenStipple(FbBits * dst,
- FbStride dstStride,
- int dstX,
- int dstBpp,
- int width,
- int height,
- FbStip * stip,
- FbStride stipStride,
- int stipHeight,
- FbBits fgand,
- FbBits fgxor, FbBits bgand, FbBits bgxor, int xRot, int yRot);
-
-extern _X_EXPORT void
-
-fbOddStipple(FbBits * dst,
- FbStride dstStride,
- int dstX,
- int dstBpp,
- int width,
- int height,
- FbStip * stip,
- FbStride stipStride,
- int stipWidth,
- int stipHeight,
- FbBits fgand,
- FbBits fgxor, FbBits bgand, FbBits bgxor, int xRot, int yRot);
-
-extern _X_EXPORT void
-
-fbStipple(FbBits * dst,
- FbStride dstStride,
- int dstX,
- int dstBpp,
- int width,
- int height,
- FbStip * stip,
- FbStride stipStride,
- int stipWidth,
- int stipHeight,
- Bool even,
- FbBits fgand,
- FbBits fgxor, FbBits bgand, FbBits bgxor, int xRot, int yRot);
-
-/*
- * fbtile.c
- */
-
-extern _X_EXPORT void
-
-fbEvenTile(FbBits * dst,
- FbStride dstStride,
- int dstX,
- int width,
- int height,
- FbBits * tile,
- FbStride tileStride,
- int tileHeight, int alu, FbBits pm, int xRot, int yRot);
-
-extern _X_EXPORT void
-
-fbOddTile(FbBits * dst,
- FbStride dstStride,
- int dstX,
- int width,
- int height,
- FbBits * tile,
- FbStride tileStride,
- int tileWidth,
- int tileHeight, int alu, FbBits pm, int bpp, int xRot, int yRot);
-
-extern _X_EXPORT void
-
-fbTile(FbBits * dst,
- FbStride dstStride,
- int dstX,
- int width,
- int height,
- FbBits * tile,
- FbStride tileStride,
- int tileWidth,
- int tileHeight, int alu, FbBits pm, int bpp, int xRot, int yRot);
-
-/*
* fbutil.c
*/
extern _X_EXPORT FbBits fbReplicatePixel(Pixel p, int bpp);
-extern _X_EXPORT void
- fbReduceRasterOp(int rop, FbBits fg, FbBits pm, FbBits * andp, FbBits * xorp);
-
#ifdef FB_ACCESS_WRAPPER
extern _X_EXPORT ReadMemoryProcPtr wfbReadMemory;
extern _X_EXPORT WriteMemoryProcPtr wfbWriteMemory;
@@ -1621,13 +1295,13 @@ extern _X_EXPORT Bool
fbDestroyWindow(WindowPtr pWin);
extern _X_EXPORT Bool
- fbMapWindow(WindowPtr pWindow);
+ fbRealizeWindow(WindowPtr pWindow);
extern _X_EXPORT Bool
fbPositionWindow(WindowPtr pWin, int x, int y);
extern _X_EXPORT Bool
- fbUnmapWindow(WindowPtr pWindow);
+ fbUnrealizeWindow(WindowPtr pWindow);
extern _X_EXPORT void
diff --git a/xserver/fb/fb24_32.c b/xserver/fb/fb24_32.c
index ecb39510d..b95019eb6 100644
--- a/xserver/fb/fb24_32.c
+++ b/xserver/fb/fb24_32.c
@@ -15,7 +15,7 @@
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
* 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
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Keith Packard, SuSE, Inc.
diff --git a/xserver/fb/fb24_32.h b/xserver/fb/fb24_32.h
index b357edf38..77eef2339 100644
--- a/xserver/fb/fb24_32.h
+++ b/xserver/fb/fb24_32.h
@@ -15,7 +15,7 @@
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
* 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
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Keith Packard, SuSE, Inc.
diff --git a/xserver/fb/fbbits.c b/xserver/fb/fbbits.c
index ac44f3e67..d7d089c17 100644
--- a/xserver/fb/fbbits.c
+++ b/xserver/fb/fbbits.c
@@ -70,9 +70,6 @@
#define POLYSEGMENT fbPolySegment16
#define BITS CARD16
#define BITS2 CARD32
-#if FB_SHIFT == 6
-#define BITS4 FbBits
-#endif
#include "fbbits.h"
@@ -85,9 +82,6 @@
#undef POLYSEGMENT
#undef BITS
#undef BITS2
-#if FB_SHIFT == 6
-#undef BITS4
-#endif
#define BRESSOLID fbBresSolid24
#define BRESDASH fbBresDash24
@@ -155,9 +149,6 @@
#define POLYLINE fbPolyline32
#define POLYSEGMENT fbPolySegment32
#define BITS CARD32
-#if FB_SHIFT == 6
-#define BITS2 FbBits
-#endif
#include "fbbits.h"
@@ -169,6 +160,3 @@
#undef POLYLINE
#undef POLYSEGMENT
#undef BITS
-#if FB_SHIFT == 6
-#undef BITS2
-#endif
diff --git a/xserver/fb/fbblt.c b/xserver/fb/fbblt.c
index c615106d1..b4123656a 100644
--- a/xserver/fb/fbblt.c
+++ b/xserver/fb/fbblt.c
@@ -520,277 +520,12 @@ fbBlt24(FbBits * srcLine,
#endif
}
-#if FB_SHIFT == FB_STIP_SHIFT + 1
-
-/*
- * Could be generalized to FB_SHIFT > FB_STIP_SHIFT + 1 by
- * creating an ring of values stepped through for each line
- */
-
-void
-fbBltOdd(FbBits * srcLine,
- FbStride srcStrideEven,
- FbStride srcStrideOdd,
- int srcXEven,
- int srcXOdd,
- FbBits * dstLine,
- FbStride dstStrideEven,
- FbStride dstStrideOdd,
- int dstXEven,
- int dstXOdd, int width, int height, int alu, FbBits pm, int bpp)
-{
- FbBits *src;
- int leftShiftEven, rightShiftEven;
- FbBits startmaskEven, endmaskEven;
- int nmiddleEven;
-
- FbBits *dst;
- int leftShiftOdd, rightShiftOdd;
- FbBits startmaskOdd, endmaskOdd;
- int nmiddleOdd;
-
- int leftShift, rightShift;
- FbBits startmask, endmask;
- int nmiddle;
-
- int srcX, dstX;
-
- FbBits bits, bits1;
- int n;
-
- Bool destInvarient;
- Bool even;
-
- FbDeclareMergeRop();
-
- FbInitializeMergeRop(alu, pm);
- destInvarient = FbDestInvarientMergeRop();
-
- srcLine += srcXEven >> FB_SHIFT;
- dstLine += dstXEven >> FB_SHIFT;
- srcXEven &= FB_MASK;
- dstXEven &= FB_MASK;
- srcXOdd &= FB_MASK;
- dstXOdd &= FB_MASK;
-
- FbMaskBits(dstXEven, width, startmaskEven, nmiddleEven, endmaskEven);
- FbMaskBits(dstXOdd, width, startmaskOdd, nmiddleOdd, endmaskOdd);
-
- even = TRUE;
- InitializeShifts(srcXEven, dstXEven, leftShiftEven, rightShiftEven);
- InitializeShifts(srcXOdd, dstXOdd, leftShiftOdd, rightShiftOdd);
- while (height--) {
- src = srcLine;
- dst = dstLine;
- if (even) {
- srcX = srcXEven;
- dstX = dstXEven;
- startmask = startmaskEven;
- endmask = endmaskEven;
- nmiddle = nmiddleEven;
- leftShift = leftShiftEven;
- rightShift = rightShiftEven;
- srcLine += srcStrideEven;
- dstLine += dstStrideEven;
- even = FALSE;
- }
- else {
- srcX = srcXOdd;
- dstX = dstXOdd;
- startmask = startmaskOdd;
- endmask = endmaskOdd;
- nmiddle = nmiddleOdd;
- leftShift = leftShiftOdd;
- rightShift = rightShiftOdd;
- srcLine += srcStrideOdd;
- dstLine += dstStrideOdd;
- even = TRUE;
- }
- if (srcX == dstX) {
- if (startmask) {
- bits = READ(src++);
- WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), startmask));
- dst++;
- }
- n = nmiddle;
- if (destInvarient) {
- while (n--) {
- bits = READ(src++);
- WRITE(dst, FbDoDestInvarientMergeRop(bits));
- dst++;
- }
- }
- else {
- while (n--) {
- bits = READ(src++);
- WRITE(dst, FbDoMergeRop(bits, READ(dst)));
- dst++;
- }
- }
- if (endmask) {
- bits = READ(src);
- WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), endmask));
- }
- }
- else {
- bits = 0;
- if (srcX > dstX)
- bits = READ(src++);
- if (startmask) {
- bits1 = FbScrLeft(bits, leftShift);
- bits = READ(src++);
- bits1 |= FbScrRight(bits, rightShift);
- WRITE(dst, FbDoMaskMergeRop(bits1, READ(dst), startmask));
- dst++;
- }
- n = nmiddle;
- if (destInvarient) {
- while (n--) {
- bits1 = FbScrLeft(bits, leftShift);
- bits = READ(src++);
- bits1 |= FbScrRight(bits, rightShift);
- WRITE(dst, FbDoDestInvarientMergeRop(bits1));
- dst++;
- }
- }
- else {
- while (n--) {
- bits1 = FbScrLeft(bits, leftShift);
- bits = READ(src++);
- bits1 |= FbScrRight(bits, rightShift);
- WRITE(dst, FbDoMergeRop(bits1, READ(dst)));
- dst++;
- }
- }
- if (endmask) {
- bits1 = FbScrLeft(bits, leftShift);
- if (FbScrLeft(endmask, rightShift)) {
- bits = READ(src);
- bits1 |= FbScrRight(bits, rightShift);
- }
- WRITE(dst, FbDoMaskMergeRop(bits1, READ(dst), endmask));
- }
- }
- }
-}
-
-void
-fbBltOdd24(FbBits * srcLine,
- FbStride srcStrideEven,
- FbStride srcStrideOdd,
- int srcXEven,
- int srcXOdd,
- FbBits * dstLine,
- FbStride dstStrideEven,
- FbStride dstStrideOdd,
- int dstXEven, int dstXOdd, int width, int height, int alu, FbBits pm)
-{
- Bool even = TRUE;
-
- while (height--) {
- if (even) {
- fbBlt24Line(srcLine, srcXEven, dstLine, dstXEven,
- width, alu, pm, FALSE);
- srcLine += srcStrideEven;
- dstLine += dstStrideEven;
- even = FALSE;
- }
- else {
- fbBlt24Line(srcLine, srcXOdd, dstLine, dstXOdd,
- width, alu, pm, FALSE);
- srcLine += srcStrideOdd;
- dstLine += dstStrideOdd;
- even = TRUE;
- }
- }
-}
-
-#endif
-
-#if FB_STIP_SHIFT != FB_SHIFT
-void
-fbSetBltOdd(FbStip * stip,
- FbStride stipStride,
- int srcX,
- FbBits ** bits,
- FbStride * strideEven,
- FbStride * strideOdd, int *srcXEven, int *srcXOdd)
-{
- int srcAdjust;
- int strideAdjust;
-
- /*
- * bytes needed to align source
- */
- srcAdjust = (((int) stip) & (FB_MASK >> 3));
- /*
- * FbStip units needed to align stride
- */
- strideAdjust = stipStride & (FB_MASK >> FB_STIP_SHIFT);
-
- *bits = (FbBits *) ((char *) stip - srcAdjust);
- if (srcAdjust) {
- *strideEven = FbStipStrideToBitsStride(stipStride + 1);
- *strideOdd = FbStipStrideToBitsStride(stipStride);
-
- *srcXEven = srcX + (srcAdjust << 3);
- *srcXOdd = srcX + (srcAdjust << 3) - (strideAdjust << FB_STIP_SHIFT);
- }
- else {
- *strideEven = FbStipStrideToBitsStride(stipStride);
- *strideOdd = FbStipStrideToBitsStride(stipStride + 1);
-
- *srcXEven = srcX;
- *srcXOdd = srcX + (strideAdjust << FB_STIP_SHIFT);
- }
-}
-#endif
-
void
fbBltStip(FbStip * src, FbStride srcStride, /* in FbStip units, not FbBits units */
int srcX, FbStip * dst, FbStride dstStride, /* in FbStip units, not FbBits units */
int dstX, int width, int height, int alu, FbBits pm, int bpp)
{
-#if FB_STIP_SHIFT != FB_SHIFT
- if (FB_STIP_ODDSTRIDE(srcStride) || FB_STIP_ODDPTR(src) ||
- FB_STIP_ODDSTRIDE(dstStride) || FB_STIP_ODDPTR(dst)) {
- FbStride srcStrideEven, srcStrideOdd;
- FbStride dstStrideEven, dstStrideOdd;
- int srcXEven, srcXOdd;
- int dstXEven, dstXOdd;
- FbBits *s, *d;
- int sx, dx;
-
- src += srcX >> FB_STIP_SHIFT;
- srcX &= FB_STIP_MASK;
- dst += dstX >> FB_STIP_SHIFT;
- dstX &= FB_STIP_MASK;
-
- fbSetBltOdd(src, srcStride, srcX,
- &s, &srcStrideEven, &srcStrideOdd, &srcXEven, &srcXOdd);
-
- fbSetBltOdd(dst, dstStride, dstX,
- &d, &dstStrideEven, &dstStrideOdd, &dstXEven, &dstXOdd);
-
- if (bpp == 24 && !FbCheck24Pix(pm)) {
- fbBltOdd24(s, srcStrideEven, srcStrideOdd,
- srcXEven, srcXOdd,
- d, dstStrideEven, dstStrideOdd,
- dstXEven, dstXOdd, width, height, alu, pm);
- }
- else {
- fbBltOdd(s, srcStrideEven, srcStrideOdd,
- srcXEven, srcXOdd,
- d, dstStrideEven, dstStrideOdd,
- dstXEven, dstXOdd, width, height, alu, pm, bpp);
- }
- }
- else
-#endif
- {
- fbBlt((FbBits *) src, FbStipStrideToBitsStride(srcStride),
- srcX,
- (FbBits *) dst, FbStipStrideToBitsStride(dstStride),
- dstX, width, height, alu, pm, bpp, FALSE, FALSE);
- }
+ fbBlt((FbBits *) src, FbStipStrideToBitsStride(srcStride), srcX,
+ (FbBits *) dst, FbStipStrideToBitsStride(dstStride), dstX,
+ width, height, alu, pm, bpp, FALSE, FALSE);
}
diff --git a/xserver/fb/fbbltone.c b/xserver/fb/fbbltone.c
index bfcb5a263..d089a433c 100644
--- a/xserver/fb/fbbltone.c
+++ b/xserver/fb/fbbltone.c
@@ -26,6 +26,101 @@
#include "fb.h"
+/*
+ * Stipple masks are independent of bit/byte order as long
+ * as bitorder == byteorder. FB doesn't handle the case
+ * where these differ
+ */
+#define BitsMask(x,w) ((FB_ALLONES << ((x) & FB_MASK)) & \
+ (FB_ALLONES >> ((FB_UNIT - ((x) + (w))) & FB_MASK)))
+
+#define Mask(x,w) BitsMask((x)*(w),(w))
+
+#define SelMask(b,n,w) ((((b) >> n) & 1) * Mask(n,w))
+
+#define C1(b,w) \
+ (SelMask(b,0,w))
+
+#define C2(b,w) \
+ (SelMask(b,0,w) | \
+ SelMask(b,1,w))
+
+#define C4(b,w) \
+ (SelMask(b,0,w) | \
+ SelMask(b,1,w) | \
+ SelMask(b,2,w) | \
+ SelMask(b,3,w))
+
+#define C8(b,w) \
+ (SelMask(b,0,w) | \
+ SelMask(b,1,w) | \
+ SelMask(b,2,w) | \
+ SelMask(b,3,w) | \
+ SelMask(b,4,w) | \
+ SelMask(b,5,w) | \
+ SelMask(b,6,w) | \
+ SelMask(b,7,w))
+
+static const FbBits fbStipple8Bits[256] = {
+ C8(0, 4), C8(1, 4), C8(2, 4), C8(3, 4), C8(4, 4), C8(5, 4),
+ C8(6, 4), C8(7, 4), C8(8, 4), C8(9, 4), C8(10, 4), C8(11, 4),
+ C8(12, 4), C8(13, 4), C8(14, 4), C8(15, 4), C8(16, 4), C8(17, 4),
+ C8(18, 4), C8(19, 4), C8(20, 4), C8(21, 4), C8(22, 4), C8(23, 4),
+ C8(24, 4), C8(25, 4), C8(26, 4), C8(27, 4), C8(28, 4), C8(29, 4),
+ C8(30, 4), C8(31, 4), C8(32, 4), C8(33, 4), C8(34, 4), C8(35, 4),
+ C8(36, 4), C8(37, 4), C8(38, 4), C8(39, 4), C8(40, 4), C8(41, 4),
+ C8(42, 4), C8(43, 4), C8(44, 4), C8(45, 4), C8(46, 4), C8(47, 4),
+ C8(48, 4), C8(49, 4), C8(50, 4), C8(51, 4), C8(52, 4), C8(53, 4),
+ C8(54, 4), C8(55, 4), C8(56, 4), C8(57, 4), C8(58, 4), C8(59, 4),
+ C8(60, 4), C8(61, 4), C8(62, 4), C8(63, 4), C8(64, 4), C8(65, 4),
+ C8(66, 4), C8(67, 4), C8(68, 4), C8(69, 4), C8(70, 4), C8(71, 4),
+ C8(72, 4), C8(73, 4), C8(74, 4), C8(75, 4), C8(76, 4), C8(77, 4),
+ C8(78, 4), C8(79, 4), C8(80, 4), C8(81, 4), C8(82, 4), C8(83, 4),
+ C8(84, 4), C8(85, 4), C8(86, 4), C8(87, 4), C8(88, 4), C8(89, 4),
+ C8(90, 4), C8(91, 4), C8(92, 4), C8(93, 4), C8(94, 4), C8(95, 4),
+ C8(96, 4), C8(97, 4), C8(98, 4), C8(99, 4), C8(100, 4), C8(101, 4),
+ C8(102, 4), C8(103, 4), C8(104, 4), C8(105, 4), C8(106, 4), C8(107, 4),
+ C8(108, 4), C8(109, 4), C8(110, 4), C8(111, 4), C8(112, 4), C8(113, 4),
+ C8(114, 4), C8(115, 4), C8(116, 4), C8(117, 4), C8(118, 4), C8(119, 4),
+ C8(120, 4), C8(121, 4), C8(122, 4), C8(123, 4), C8(124, 4), C8(125, 4),
+ C8(126, 4), C8(127, 4), C8(128, 4), C8(129, 4), C8(130, 4), C8(131, 4),
+ C8(132, 4), C8(133, 4), C8(134, 4), C8(135, 4), C8(136, 4), C8(137, 4),
+ C8(138, 4), C8(139, 4), C8(140, 4), C8(141, 4), C8(142, 4), C8(143, 4),
+ C8(144, 4), C8(145, 4), C8(146, 4), C8(147, 4), C8(148, 4), C8(149, 4),
+ C8(150, 4), C8(151, 4), C8(152, 4), C8(153, 4), C8(154, 4), C8(155, 4),
+ C8(156, 4), C8(157, 4), C8(158, 4), C8(159, 4), C8(160, 4), C8(161, 4),
+ C8(162, 4), C8(163, 4), C8(164, 4), C8(165, 4), C8(166, 4), C8(167, 4),
+ C8(168, 4), C8(169, 4), C8(170, 4), C8(171, 4), C8(172, 4), C8(173, 4),
+ C8(174, 4), C8(175, 4), C8(176, 4), C8(177, 4), C8(178, 4), C8(179, 4),
+ C8(180, 4), C8(181, 4), C8(182, 4), C8(183, 4), C8(184, 4), C8(185, 4),
+ C8(186, 4), C8(187, 4), C8(188, 4), C8(189, 4), C8(190, 4), C8(191, 4),
+ C8(192, 4), C8(193, 4), C8(194, 4), C8(195, 4), C8(196, 4), C8(197, 4),
+ C8(198, 4), C8(199, 4), C8(200, 4), C8(201, 4), C8(202, 4), C8(203, 4),
+ C8(204, 4), C8(205, 4), C8(206, 4), C8(207, 4), C8(208, 4), C8(209, 4),
+ C8(210, 4), C8(211, 4), C8(212, 4), C8(213, 4), C8(214, 4), C8(215, 4),
+ C8(216, 4), C8(217, 4), C8(218, 4), C8(219, 4), C8(220, 4), C8(221, 4),
+ C8(222, 4), C8(223, 4), C8(224, 4), C8(225, 4), C8(226, 4), C8(227, 4),
+ C8(228, 4), C8(229, 4), C8(230, 4), C8(231, 4), C8(232, 4), C8(233, 4),
+ C8(234, 4), C8(235, 4), C8(236, 4), C8(237, 4), C8(238, 4), C8(239, 4),
+ C8(240, 4), C8(241, 4), C8(242, 4), C8(243, 4), C8(244, 4), C8(245, 4),
+ C8(246, 4), C8(247, 4), C8(248, 4), C8(249, 4), C8(250, 4), C8(251, 4),
+ C8(252, 4), C8(253, 4), C8(254, 4), C8(255, 4),
+};
+
+static const FbBits fbStipple4Bits[16] = {
+ C4(0, 8), C4(1, 8), C4(2, 8), C4(3, 8), C4(4, 8), C4(5, 8),
+ C4(6, 8), C4(7, 8), C4(8, 8), C4(9, 8), C4(10, 8), C4(11, 8),
+ C4(12, 8), C4(13, 8), C4(14, 8), C4(15, 8),
+};
+
+static const FbBits fbStipple2Bits[4] = {
+ C2(0, 16), C2(1, 16), C2(2, 16), C2(3, 16),
+};
+
+static const FbBits fbStipple1Bits[2] = {
+ C1(0, 32), C1(1, 32),
+};
+
#ifdef __clang__
/* shift overflow is intentional */
#pragma clang diagnostic ignored "-Wshift-overflow"
@@ -62,85 +157,6 @@
bits = (src < srcEnd ? READ(src++) : 0); \
}
-#define LaneCases1(n,a) case n: FbLaneCase(n,a); break
-#define LaneCases2(n,a) LaneCases1(n,a); LaneCases1(n+1,a)
-#define LaneCases4(n,a) LaneCases2(n,a); LaneCases2(n+2,a)
-#define LaneCases8(n,a) LaneCases4(n,a); LaneCases4(n+4,a)
-#define LaneCases16(n,a) LaneCases8(n,a); LaneCases8(n+8,a)
-#define LaneCases32(n,a) LaneCases16(n,a); LaneCases16(n+16,a)
-#define LaneCases64(n,a) LaneCases32(n,a); LaneCases32(n+32,a)
-#define LaneCases128(n,a) LaneCases64(n,a); LaneCases64(n+64,a)
-#define LaneCases256(n,a) LaneCases128(n,a); LaneCases128(n+128,a)
-
-#if FB_SHIFT == 6
-#define LaneCases(a) LaneCases256(0,a)
-#endif
-
-#if FB_SHIFT == 5
-#define LaneCases(a) LaneCases16(0,a)
-#endif
-
-#if FB_SHIFT == 6
-CARD8 fb8Lane[256] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
- 21,
- 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
- 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
- 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
- 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
- 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
- 113, 114, 115,
- 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130,
- 131, 132, 133,
- 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
- 149, 150, 151,
- 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
- 167, 168, 169,
- 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
- 185, 186, 187,
- 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
- 203, 204, 205,
- 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220,
- 221, 222, 223,
- 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
- 239, 240, 241,
- 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
-};
-
-CARD8 fb16Lane[256] = {
- 0x00, 0x03, 0x0c, 0x0f,
- 0x30, 0x33, 0x3c, 0x3f,
- 0xc0, 0xc3, 0xcc, 0xcf,
- 0xf0, 0xf3, 0xfc, 0xff,
-};
-
-CARD8 fb32Lane[16] = {
- 0x00, 0x0f, 0xf0, 0xff,
-};
-#endif
-
-#if FB_SHIFT == 5
-CARD8 fb8Lane[16] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
-};
-
-CARD8 fb16Lane[16] = {
- 0, 3, 12, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-CARD8 fb32Lane[16] = {
- 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-};
-#endif
-
-CARD8 *fbLaneTable[33] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- fb8Lane, 0, 0, 0, 0, 0, 0, 0,
- fb16Lane, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- fb32Lane
-};
-
void
fbBltOne(FbStip * src, FbStride srcStride, /* FbStip units per scanline */
int srcX, /* bit position of source */
@@ -169,7 +185,6 @@ fbBltOne(FbStip * src, FbStride srcStride, /* FbStip units per scanline */
Bool transparent; /* accelerate 0 nop */
int srcinc; /* source units consumed */
Bool endNeedsLoad = FALSE; /* need load for endmask */
- CARD8 *fbLane;
int startbyte, endbyte;
if (dstBpp == 24) {
@@ -191,7 +206,7 @@ fbBltOne(FbStip * src, FbStride srcStride, /* FbStip units per scanline */
pixelsPerDst = FB_UNIT / dstBpp;
/*
- * Number of source stipple patterns in FbStip
+ * Number of source stipple patterns in FbStip
*/
unitsPerSrc = FB_STIP_UNIT / pixelsPerDst;
@@ -233,15 +248,26 @@ fbBltOne(FbStip * src, FbStride srcStride, /* FbStip units per scanline */
* Get pointer to stipple mask array for this depth
*/
fbBits = 0; /* unused */
- if (pixelsPerDst <= 8)
- fbBits = fbStippleTable[pixelsPerDst];
- fbLane = 0;
- if (transparent && fgand == 0 && dstBpp >= 8)
- fbLane = fbLaneTable[dstBpp];
+ switch (pixelsPerDst) {
+ case 8:
+ fbBits = fbStipple8Bits;
+ break;
+ case 4:
+ fbBits = fbStipple4Bits;
+ break;
+ case 2:
+ fbBits = fbStipple2Bits;
+ break;
+ case 1:
+ fbBits = fbStipple1Bits;
+ break;
+ default:
+ return;
+ }
/*
- * Compute total number of destination words written, but
- * don't count endmask
+ * Compute total number of destination words written, but
+ * don't count endmask
*/
nDst = nmiddle;
if (startmask)
@@ -287,21 +313,11 @@ fbBltOne(FbStip * src, FbStride srcStride, /* FbStip units per scanline */
* Consume stipple bits for startmask
*/
if (startmask) {
-#if FB_UNIT > 32
- if (pixelsPerDst == 16)
- mask = FbStipple16Bits(FbLeftStipBits(bits, 16));
- else
-#endif
- mask = fbBits[FbLeftStipBits(bits, pixelsPerDst)];
- if (fbLane) {
- fbTransparentSpan(dst, mask & startmask, fgxor, 1);
- }
- else {
- if (mask || !transparent)
- FbDoLeftMaskByteStippleRRop(dst, mask,
- fgand, fgxor, bgand, bgxor,
- startbyte, startmask);
- }
+ mask = fbBits[FbLeftStipBits(bits, pixelsPerDst)];
+ if (mask || !transparent)
+ FbDoLeftMaskByteStippleRRop(dst, mask,
+ fgand, fgxor, bgand, bgxor,
+ startbyte, startmask);
bits = FbStipLeft(bits, pixelsPerDst);
dst++;
n--;
@@ -314,41 +330,22 @@ fbBltOne(FbStip * src, FbStride srcStride, /* FbStip units per scanline */
w -= n;
if (copy) {
while (n--) {
-#if FB_UNIT > 32
- if (pixelsPerDst == 16)
- mask = FbStipple16Bits(FbLeftStipBits(bits, 16));
- else
-#endif
- mask = fbBits[FbLeftStipBits(bits, pixelsPerDst)];
+ mask = fbBits[FbLeftStipBits(bits, pixelsPerDst)];
WRITE(dst, FbOpaqueStipple(mask, fgxor, bgxor));
dst++;
bits = FbStipLeft(bits, pixelsPerDst);
}
}
else {
- if (fbLane) {
- while (bits && n) {
- switch (fbLane[FbLeftStipBits(bits, pixelsPerDst)]) {
- LaneCases((CARD8 *) dst);
- }
- bits = FbStipLeft(bits, pixelsPerDst);
- dst++;
- n--;
- }
- dst += n;
- }
- else {
- while (n--) {
- left = FbLeftStipBits(bits, pixelsPerDst);
- if (left || !transparent) {
- mask = fbBits[left];
- WRITE(dst, FbStippleRRop(READ(dst), mask,
- fgand, fgxor, bgand,
- bgxor));
- }
- dst++;
- bits = FbStipLeft(bits, pixelsPerDst);
+ while (n--) {
+ left = FbLeftStipBits(bits, pixelsPerDst);
+ if (left || !transparent) {
+ mask = fbBits[left];
+ WRITE(dst, FbStippleRRop(READ(dst), mask, fgand,
+ fgxor, bgand, bgxor));
}
+ dst++;
+ bits = FbStipLeft(bits, pixelsPerDst);
}
}
if (!w)
@@ -369,21 +366,10 @@ fbBltOne(FbStip * src, FbStride srcStride, /* FbStip units per scanline */
if (endNeedsLoad) {
LoadBits;
}
-#if FB_UNIT > 32
- if (pixelsPerDst == 16)
- mask = FbStipple16Bits(FbLeftStipBits(bits, 16));
- else
-#endif
- mask = fbBits[FbLeftStipBits(bits, pixelsPerDst)];
- if (fbLane) {
- fbTransparentSpan(dst, mask & endmask, fgxor, 1);
- }
- else {
- if (mask || !transparent)
- FbDoRightMaskByteStippleRRop(dst, mask,
- fgand, fgxor, bgand, bgxor,
- endbyte, endmask);
- }
+ mask = fbBits[FbLeftStipBits(bits, pixelsPerDst)];
+ if (mask || !transparent)
+ FbDoRightMaskByteStippleRRop(dst, mask, fgand, fgxor,
+ bgand, bgxor, endbyte, endmask);
}
dst += dstStride;
src += srcStride;
@@ -412,47 +398,6 @@ fbBltOne(FbStip * src, FbStride srcStride, /* FbStip units per scanline */
#define SelMask24(b,n,r) ((((b) >> n) & 1) * Mask24(n,r))
-/*
- * Untested for MSBFirst or FB_UNIT == 32
- */
-
-#if FB_UNIT == 64
-#define C4_24(b,r) \
- (SelMask24(b,0,r) | \
- SelMask24(b,1,r) | \
- SelMask24(b,2,r) | \
- SelMask24(b,3,r))
-
-#define FbStip24New(rot) (2 + (rot != 0))
-#define FbStip24Len 4
-
-const FbBits fbStipple24Bits[3][1 << FbStip24Len] = {
- /* rotate 0 */
- {
- C4_24(0, 0), C4_24(1, 0), C4_24(2, 0), C4_24(3, 0),
- C4_24(4, 0), C4_24(5, 0), C4_24(6, 0), C4_24(7, 0),
- C4_24(8, 0), C4_24(9, 0), C4_24(10, 0), C4_24(11, 0),
- C4_24(12, 0), C4_24(13, 0), C4_24(14, 0), C4_24(15, 0),
- },
- /* rotate 8 */
- {
- C4_24(0, 8), C4_24(1, 8), C4_24(2, 8), C4_24(3, 8),
- C4_24(4, 8), C4_24(5, 8), C4_24(6, 8), C4_24(7, 8),
- C4_24(8, 8), C4_24(9, 8), C4_24(10, 8), C4_24(11, 8),
- C4_24(12, 8), C4_24(13, 8), C4_24(14, 8), C4_24(15, 8),
- },
- /* rotate 16 */
- {
- C4_24(0, 16), C4_24(1, 16), C4_24(2, 16), C4_24(3, 16),
- C4_24(4, 16), C4_24(5, 16), C4_24(6, 16), C4_24(7, 16),
- C4_24(8, 16), C4_24(9, 16), C4_24(10, 16), C4_24(11, 16),
- C4_24(12, 16), C4_24(13, 16), C4_24(14, 16), C4_24(15, 16),
- }
-};
-
-#endif
-
-#if FB_UNIT == 32
#define C2_24(b,r) \
(SelMask24(b,0,r) | \
SelMask24(b,1,r))
@@ -478,7 +423,6 @@ const FbBits fbStipple24Bits[3][1 << FbStip24Len] = {
C2_24(0, 16), C2_24(1, 16), C2_24(2, 16), C2_24(3, 16),
}
};
-#endif
#if BITMAP_BIT_ORDER == LSBFirst
diff --git a/xserver/fb/fbcopy.c b/xserver/fb/fbcopy.c
index 541ef713b..5bbabc39f 100644
--- a/xserver/fb/fbcopy.c
+++ b/xserver/fb/fbcopy.c
@@ -271,5 +271,5 @@ fbCopyPlane(DrawablePtr pSrcDrawable,
else
return miHandleExposures(pSrcDrawable, pDstDrawable, pGC,
xIn, yIn,
- widthSrc, heightSrc, xOut, yOut, bitplane);
+ widthSrc, heightSrc, xOut, yOut);
}
diff --git a/xserver/fb/fbfill.c b/xserver/fb/fbfill.c
index de9d6b313..05d81ab77 100644
--- a/xserver/fb/fbfill.c
+++ b/xserver/fb/fbfill.c
@@ -26,6 +26,88 @@
#include "fb.h"
+static void
+fbTile(FbBits * dst, FbStride dstStride, int dstX, int width, int height,
+ FbBits * tile, FbStride tileStride, int tileWidth, int tileHeight,
+ int alu, FbBits pm, int bpp, int xRot, int yRot)
+{
+ int tileX, tileY;
+ int widthTmp;
+ int h, w;
+ int x, y;
+
+ modulus(-yRot, tileHeight, tileY);
+ y = 0;
+ while (height) {
+ h = tileHeight - tileY;
+ if (h > height)
+ h = height;
+ height -= h;
+ widthTmp = width;
+ x = dstX;
+ modulus(dstX - xRot, tileWidth, tileX);
+ while (widthTmp) {
+ w = tileWidth - tileX;
+ if (w > widthTmp)
+ w = widthTmp;
+ widthTmp -= w;
+ fbBlt(tile + tileY * tileStride,
+ tileStride,
+ tileX,
+ dst + y * dstStride,
+ dstStride, x, w, h, alu, pm, bpp, FALSE, FALSE);
+ x += w;
+ tileX = 0;
+ }
+ y += h;
+ tileY = 0;
+ }
+}
+
+static void
+fbStipple(FbBits * dst, FbStride dstStride,
+ int dstX, int dstBpp,
+ int width, int height,
+ FbStip * stip, FbStride stipStride,
+ int stipWidth, int stipHeight,
+ FbBits fgand, FbBits fgxor,
+ FbBits bgand, FbBits bgxor,
+ int xRot, int yRot)
+{
+ int stipX, stipY, sx;
+ int widthTmp;
+ int h, w;
+ int x, y;
+
+ modulus(-yRot, stipHeight, stipY);
+ modulus(dstX / dstBpp - xRot, stipWidth, stipX);
+ y = 0;
+ while (height) {
+ h = stipHeight - stipY;
+ if (h > height)
+ h = height;
+ height -= h;
+ widthTmp = width;
+ x = dstX;
+ sx = stipX;
+ while (widthTmp) {
+ w = (stipWidth - sx) * dstBpp;
+ if (w > widthTmp)
+ w = widthTmp;
+ widthTmp -= w;
+ fbBltOne(stip + stipY * stipStride,
+ stipStride,
+ sx,
+ dst + y * dstStride,
+ dstStride, x, dstBpp, w, h, fgand, fgxor, bgand, bgxor);
+ x += w;
+ sx = 0;
+ }
+ y += h;
+ stipY = 0;
+ }
+}
+
void
fbFill(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int width, int height)
{
@@ -97,7 +179,7 @@ fbFill(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int width, int height)
fbStipple(dst + (y + dstYoff) * dstStride, dstStride,
(x + dstXoff) * dstBpp, dstBpp, width * dstBpp, height,
stip, stipStride, stipWidth, stipHeight,
- pPriv->evenStipple, fgand, fgxor, bgand, bgxor,
+ fgand, fgxor, bgand, bgxor,
pGC->patOrg.x + pDrawable->x + dstXoff,
pGC->patOrg.y + pDrawable->y - y);
fbFinishAccess(&pStip->drawable);
diff --git a/xserver/fb/fbfillrect.c b/xserver/fb/fbfillrect.c
index 64ba2b493..0075b2cdb 100644
--- a/xserver/fb/fbfillrect.c
+++ b/xserver/fb/fbfillrect.c
@@ -74,7 +74,7 @@ fbPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrect, xRectangle *prect)
}
else {
pbox = RegionRects(pClip);
- /*
+ /*
* clip the rectangle to each box in the clip region
* this is logically equivalent to calling Intersect()
*/
diff --git a/xserver/fb/fbgc.c b/xserver/fb/fbgc.c
index f4d7f3a99..19c613158 100644
--- a/xserver/fb/fbgc.c
+++ b/xserver/fb/fbgc.c
@@ -110,80 +110,6 @@ fbPadPixmap(PixmapPtr pPixmap)
fbFinishAccess(&pPixmap->drawable);
}
-/*
- * Verify that 'bits' repeats every 'len' bits
- */
-static Bool
-fbBitsRepeat(FbBits bits, int len, int width)
-{
- FbBits mask = FbBitsMask(0, len);
- FbBits orig = bits & mask;
- int i;
-
- if (width > FB_UNIT)
- width = FB_UNIT;
- for (i = 0; i < width / len; i++) {
- if ((bits & mask) != orig)
- return FALSE;
- bits = FbScrLeft(bits, len);
- }
- return TRUE;
-}
-
-/*
- * Check whether an entire bitmap line is a repetition of
- * the first 'len' bits
- */
-static Bool
-fbLineRepeat(FbBits * bits, int len, int width)
-{
- FbBits first = bits[0];
-
- if (!fbBitsRepeat(first, len, width))
- return FALSE;
- width = (width + FB_UNIT - 1) >> FB_SHIFT;
- bits++;
- while (--width)
- if (READ(bits) != first)
- return FALSE;
- return TRUE;
-}
-
-/*
- * The even stipple code wants the first FB_UNIT/bpp bits on
- * each scanline to represent the entire stipple
- */
-static Bool
-fbCanEvenStipple(PixmapPtr pStipple, int bpp)
-{
- int len = FB_UNIT / bpp;
- FbBits *bits;
- int stride;
- int stip_bpp;
- _X_UNUSED int stipXoff, stipYoff;
- int h;
-
- /* can't even stipple 24bpp drawables */
- if ((bpp & (bpp - 1)) != 0)
- return FALSE;
- /* make sure the stipple width is a multiple of the even stipple width */
- if (pStipple->drawable.width % len != 0)
- return FALSE;
- fbGetDrawable(&pStipple->drawable, bits, stride, stip_bpp, stipXoff,
- stipYoff);
- h = pStipple->drawable.height;
- /* check to see that the stipple repeats horizontally */
- while (h--) {
- if (!fbLineRepeat(bits, len, pStipple->drawable.width)) {
- fbFinishAccess(&pStipple->drawable);
- return FALSE;
- }
- bits += stride;
- }
- fbFinishAccess(&pStipple->drawable);
- return TRUE;
-}
-
void
fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
{
@@ -193,7 +119,7 @@ fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
/*
* 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
+ * we need to recompute the composite clip
*/
if ((changes &
@@ -239,16 +165,7 @@ fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
fbPadPixmap(pGC->tile.pixmap);
}
if (changes & GCStipple) {
- pPriv->evenStipple = FALSE;
-
if (pGC->stipple) {
-
- /* can we do an even stipple ?? */
- if (FbEvenStip(pGC->stipple->drawable.width,
- pDrawable->bitsPerPixel) &&
- (fbCanEvenStipple(pGC->stipple, pDrawable->bitsPerPixel)))
- pPriv->evenStipple = TRUE;
-
if (pGC->stipple->drawable.width * pDrawable->bitsPerPixel <
FB_UNIT)
fbPadPixmap(pGC->stipple);
diff --git a/xserver/fb/fbglyph.c b/xserver/fb/fbglyph.c
index 4f2904c31..61cb8de33 100644
--- a/xserver/fb/fbglyph.c
+++ b/xserver/fb/fbglyph.c
@@ -29,7 +29,7 @@
#include <X11/fonts/fontstruct.h>
#include "dixfontstr.h"
-Bool
+static Bool
fbGlyphIn(RegionPtr pRegion, int x, int y, int width, int height)
{
BoxRec box;
@@ -56,11 +56,7 @@ fbGlyphIn(RegionPtr pRegion, int x, int y, int width, int height)
#define WRITE1(d,n,fg) WRITE((d) + (n), (CARD8) fg)
#define WRITE2(d,n,fg) WRITE((CARD16 *) &(d[n]), (CARD16) fg)
#define WRITE4(d,n,fg) WRITE((CARD32 *) &(d[n]), (CARD32) fg)
-#if FB_UNIT == 6 && IMAGE_BYTE_ORDER == LSBFirst
-#define WRITE8(d) WRITE((FbBits *) &(d[0]), fg)
-#else
#define WRITE8(d) WRITE4(d,0,_ABCA), WRITE4(d,4,_BCAB)
-#endif
/*
* This is a bit tricky, but it's brief. Write 12 bytes worth
@@ -69,7 +65,7 @@ fbGlyphIn(RegionPtr pRegion, int x, int y, int width, int height)
*
* a b c d a b c d a b c d bytes
* A B C A B C A B C A B C pixels
- *
+ *
* f0 f1 f2
* A B C A B C A B C A B C pixels LSB
* C A B C A B C A B C A B pixels MSB
@@ -120,7 +116,7 @@ fbGlyphIn(RegionPtr pRegion, int x, int y, int width, int height)
#define CASE(a,b,c,d) (a | (b << 1) | (c << 2) | (d << 3))
#endif
-void
+static void
fbGlyph24(FbBits * dstBits,
FbStride dstStride,
int dstBpp, FbStip * stipple, FbBits fg, int x, int height)
diff --git a/xserver/fb/fbline.c b/xserver/fb/fbline.c
index 80dc89dde..3e582e6fd 100644
--- a/xserver/fb/fbline.c
+++ b/xserver/fb/fbline.c
@@ -26,7 +26,7 @@
#include "fb.h"
-void
+static void
fbZeroLine(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ppt)
{
int x1, y1, x2, y2;
@@ -54,7 +54,7 @@ fbZeroLine(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ppt)
}
}
-void
+static void
fbZeroSegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pSegs)
{
int dashOffset;
diff --git a/xserver/fb/fboverlay.c b/xserver/fb/fboverlay.c
index 935bf1b50..1e5e6b3be 100644
--- a/xserver/fb/fboverlay.c
+++ b/xserver/fb/fboverlay.c
@@ -16,7 +16,7 @@
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
* 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
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Keith Packard, SuSE, Inc.
@@ -240,12 +240,11 @@ fbOverlayCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
}
void
-fbOverlayWindowExposures(WindowPtr pWin,
- RegionPtr prgn, RegionPtr other_exposed)
+fbOverlayWindowExposures(WindowPtr pWin, RegionPtr prgn)
{
fbOverlayUpdateLayerRegion(pWin->drawable.pScreen,
fbOverlayWindowLayer(pWin), prgn);
- miWindowExposures(pWin, prgn, other_exposed);
+ miWindowExposures(pWin, prgn);
}
Bool
diff --git a/xserver/fb/fboverlay.h b/xserver/fb/fboverlay.h
index 57c9873c2..3312145bf 100644
--- a/xserver/fb/fboverlay.h
+++ b/xserver/fb/fboverlay.h
@@ -16,7 +16,7 @@
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
* 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
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Keith Packard, SuSE, Inc.
@@ -82,9 +82,7 @@ extern _X_EXPORT void
fbOverlayCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
extern _X_EXPORT void
-
-fbOverlayWindowExposures(WindowPtr pWin,
- RegionPtr prgn, RegionPtr other_exposed);
+fbOverlayWindowExposures(WindowPtr pWin, RegionPtr prgn);
extern _X_EXPORT Bool
diff --git a/xserver/fb/fbpict.c b/xserver/fb/fbpict.c
index 21baf8950..c8378ad90 100644
--- a/xserver/fb/fbpict.c
+++ b/xserver/fb/fbpict.c
@@ -82,7 +82,7 @@ fbDestroyGlyphCache(void)
}
}
-void
+static void
fbUnrealizeGlyph(ScreenPtr pScreen,
GlyphPtr pGlyph)
{
@@ -113,7 +113,7 @@ fbGlyphs(CARD8 op,
int xDst = list->xOff, yDst = list->yOff;
miCompositeSourceValidate(pSrc);
-
+
n_glyphs = 0;
for (i = 0; i < nlist; ++i)
n_glyphs += list[i].len;
@@ -122,12 +122,12 @@ fbGlyphs(CARD8 op,
glyphCache = pixman_glyph_cache_create();
pixman_glyph_cache_freeze (glyphCache);
-
+
if (n_glyphs > N_STACK_GLYPHS) {
if (!(pglyphs = malloc (n_glyphs * sizeof (pixman_glyph_t))))
goto out;
}
-
+
i = 0;
x = y = 0;
while (nlist--) {
@@ -309,24 +309,16 @@ create_bits_picture(PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
return NULL;
#ifdef FB_ACCESS_WRAPPER
-#if FB_SHIFT==5
-
pixman_image_set_accessors(image,
(pixman_read_memory_func_t) wfbReadMemory,
(pixman_write_memory_func_t) wfbWriteMemory);
-
-#else
-
-#error The pixman library only works when FbBits is 32 bits wide
-
-#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)
+ if (pict->clientClip)
pixman_image_set_has_client_clip(image, TRUE);
if (*xoff || *yoff)
diff --git a/xserver/fb/fbpict.h b/xserver/fb/fbpict.h
index 8b0f59f7a..5cb866368 100644
--- a/xserver/fb/fbpict.h
+++ b/xserver/fb/fbpict.h
@@ -72,10 +72,6 @@ fbTriangles(CARD8 op,
INT16 xSrc, INT16 ySrc, int ntris, xTriangle * tris);
extern _X_EXPORT void
-fbUnrealizeGlyph(ScreenPtr pScreen,
- GlyphPtr pGlyph);
-
-extern _X_EXPORT void
fbGlyphs(CARD8 op,
PicturePtr pSrc,
PicturePtr pDst,
diff --git a/xserver/fb/fbpixmap.c b/xserver/fb/fbpixmap.c
index 677f28af0..951a92574 100644
--- a/xserver/fb/fbpixmap.c
+++ b/xserver/fb/fbpixmap.c
@@ -132,7 +132,7 @@ if (((rx1) < (rx2)) && ((ry1) < (ry2)) && \
r++; \
}
-/* Convert bitmap clip mask into clipping region.
+/* Convert bitmap clip mask into clipping region.
* First, goes through each line and makes boxes by noting the transitions
* from 0 to 1 and 1 to 0.
* Then it coalesces the current line with the previous if they have boxes
@@ -246,8 +246,8 @@ fbPixmapToRegion(PixmapPtr pPix)
rx1, h, base + (width & FB_MASK), h + 1);
}
/* if all rectangles on this line have the same x-coords as
- * those on the previous line, then add 1 to all the previous y2s and
- * throw away all the rectangles from this line
+ * those on the previous line, then add 1 to all the previous y2s and
+ * throw away all the rectangles from this line
*/
fSame = FALSE;
if (irectPrevStart != -1) {
diff --git a/xserver/fb/fbpoint.c b/xserver/fb/fbpoint.c
index d5129d796..be7c801d5 100644
--- a/xserver/fb/fbpoint.c
+++ b/xserver/fb/fbpoint.c
@@ -35,7 +35,7 @@ typedef void (*FbDots) (FbBits * dst,
int xorg,
int yorg, int xoff, int yoff, FbBits and, FbBits xor);
-void
+static void
fbDots(FbBits * dstOrig,
FbStride dstStride,
int dstBpp,
diff --git a/xserver/fb/fbpush.c b/xserver/fb/fbpush.c
index f0a861cbe..1d1bcfd08 100644
--- a/xserver/fb/fbpush.c
+++ b/xserver/fb/fbpush.c
@@ -26,7 +26,7 @@
#include "fb.h"
-void
+static void
fbPushPattern(DrawablePtr pDrawable,
GCPtr pGC,
FbStip * src,
@@ -84,7 +84,7 @@ fbPushPattern(DrawablePtr pDrawable,
}
}
-void
+static void
fbPushFill(DrawablePtr pDrawable,
GCPtr pGC,
FbStip * src,
diff --git a/xserver/fb/fbrop.h b/xserver/fb/fbrop.h
index 4362adb37..bc12b144e 100644
--- a/xserver/fb/fbrop.h
+++ b/xserver/fb/fbrop.h
@@ -92,19 +92,9 @@ extern _X_EXPORT const FbMergeRopRec FbMergeRopBits[16];
#define fbAndStip(rop,fg,pm) fbAndT(rop,fg,pm,FbStip)
/*
- * Stippling operations;
+ * Stippling operations;
*/
-extern _X_EXPORT const FbBits fbStipple16Bits[256]; /* half of table */
-
-#define FbStipple16Bits(b) \
- (fbStipple16Bits[(b)&0xff] | fbStipple16Bits[(b) >> 8] << FB_HALFUNIT)
-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/xserver/fb/fbscreen.c b/xserver/fb/fbscreen.c
index 0d4d87f8b..71bcc5d30 100644
--- a/xserver/fb/fbscreen.c
+++ b/xserver/fb/fbscreen.c
@@ -110,8 +110,8 @@ fbSetupScreen(ScreenPtr pScreen, void *pbits, /* pointer to screen bitmap */
pScreen->DestroyWindow = fbDestroyWindow;
pScreen->PositionWindow = fbPositionWindow;
pScreen->ChangeWindowAttributes = fbChangeWindowAttributes;
- pScreen->RealizeWindow = fbMapWindow;
- pScreen->UnrealizeWindow = fbUnmapWindow;
+ pScreen->RealizeWindow = fbRealizeWindow;
+ pScreen->UnrealizeWindow = fbUnrealizeWindow;
pScreen->CopyWindow = fbCopyWindow;
pScreen->CreatePixmap = fbCreatePixmap;
pScreen->DestroyPixmap = fbDestroyPixmap;
diff --git a/xserver/fb/fbseg.c b/xserver/fb/fbseg.c
index 16e0426e5..c3c196ab4 100644
--- a/xserver/fb/fbseg.c
+++ b/xserver/fb/fbseg.c
@@ -33,7 +33,7 @@
((dir < 0) ? FbStipLeft(mask,bpp) : \
FbStipRight(mask,bpp)))
-void
+static void
fbBresSolid(DrawablePtr pDrawable,
GCPtr pGC,
int dashOffset,
@@ -105,7 +105,7 @@ fbBresSolid(DrawablePtr pDrawable,
fbFinishAccess(pDrawable);
}
-void
+static void
fbBresDash(DrawablePtr pDrawable,
GCPtr pGC,
int dashOffset,
@@ -178,7 +178,7 @@ fbBresDash(DrawablePtr pDrawable,
fbFinishAccess(pDrawable);
}
-void
+static void
fbBresFill(DrawablePtr pDrawable,
GCPtr pGC,
int dashOffset,
@@ -218,7 +218,7 @@ fbSetFg(DrawablePtr pDrawable, GCPtr pGC, Pixel fg)
}
}
-void
+static void
fbBresFillDash(DrawablePtr pDrawable,
GCPtr pGC,
int dashOffset,
@@ -436,7 +436,7 @@ fbBresDash24RRop(DrawablePtr pDrawable,
* based on the contents of the specified GC.
*/
-FbBres *
+static FbBres *
fbSelectBres(DrawablePtr pDrawable, GCPtr pGC)
{
FbGCPrivPtr pPriv = fbGetGCPrivate(pGC);
@@ -496,18 +496,6 @@ fbSelectBres(DrawablePtr pDrawable, GCPtr pGC)
}
void
-fbBres(DrawablePtr pDrawable,
- GCPtr pGC,
- int dashOffset,
- int signdx,
- int signdy, int axis, int x1, int y1, int e, int e1, int e3, int len)
-{
- (*fbSelectBres(pDrawable, pGC)) (pDrawable, pGC, dashOffset,
- signdx, signdy, axis, x1, y1,
- e, e1, e3, len);
-}
-
-void
fbSegment(DrawablePtr pDrawable,
GCPtr pGC,
int x1, int y1, int x2, int y2, Bool drawLast, int *dashOffset)
diff --git a/xserver/fb/fbstipple.c b/xserver/fb/fbstipple.c
deleted file mode 100644
index f6c84a212..000000000
--- a/xserver/fb/fbstipple.c
+++ /dev/null
@@ -1,264 +0,0 @@
-/*
- * Copyright © 1998 Keith Packard
- *
- * 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, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Keith Packard makes no
- * representations about the suitability of this software for any purpose. It
- * is provided "as is" without express or implied warranty.
- *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "fb.h"
-
-/*
- * This is a slight abuse of the preprocessor to generate repetitive
- * code, the idea is to generate code for each case of a copy-mode
- * transparent stipple
- */
-#define LaneCases1(c,a) case c: \
- while (n--) { FbLaneCase(c,a); a++; } \
- break
-#define LaneCases2(c,a) LaneCases1(c,a); LaneCases1(c+1,a)
-#define LaneCases4(c,a) LaneCases2(c,a); LaneCases2(c+2,a)
-#define LaneCases8(c,a) LaneCases4(c,a); LaneCases4(c+4,a)
-#define LaneCases16(c,a) LaneCases8(c,a); LaneCases8(c+8,a)
-#define LaneCases32(c,a) LaneCases16(c,a); LaneCases16(c+16,a)
-#define LaneCases64(c,a) LaneCases32(c,a); LaneCases32(c+32,a)
-#define LaneCases128(c,a) LaneCases64(c,a); LaneCases64(c+64,a)
-#define LaneCases256(c,a) LaneCases128(c,a); LaneCases128(c+128,a)
-
-#if FB_SHIFT == 6
-#define LaneCases(a) LaneCases256(0,a)
-#endif
-
-#if FB_SHIFT == 5
-#define LaneCases(a) LaneCases16(0,a)
-#endif
-
-/*
- * Repeat a transparent stipple across a scanline n times
- */
-
-void
-fbTransparentSpan(FbBits * dst, FbBits stip, FbBits fgxor, int n)
-{
- FbStip s;
-
- s = ((FbStip) (stip) & 0x01);
- s |= ((FbStip) (stip >> 8) & 0x02);
- s |= ((FbStip) (stip >> 16) & 0x04);
- s |= ((FbStip) (stip >> 24) & 0x08);
-#if FB_SHIFT > 5
- s |= ((FbStip) (stip >> 32) & 0x10);
- s |= ((FbStip) (stip >> 40) & 0x20);
- s |= ((FbStip) (stip >> 48) & 0x40);
- s |= ((FbStip) (stip >> 56) & 0x80);
-#endif
- switch (s) {
- LaneCases(dst);
- }
-}
-
-void
-fbEvenStipple(FbBits * dst,
- FbStride dstStride,
- int dstX,
- int dstBpp,
- int width,
- int height,
- FbStip * stip,
- FbStride stipStride,
- int stipHeight,
- FbBits fgand,
- FbBits fgxor, FbBits bgand, FbBits bgxor, int xRot, int yRot)
-{
- FbBits startmask, endmask;
- FbBits mask, and, xor;
- int nmiddle, n;
- FbStip *s, *stipEnd, bits;
- int rot, stipX, stipY;
- int pixelsPerDst;
- const FbBits *fbBits;
- Bool transparent;
- int startbyte, endbyte;
-
- /*
- * Check for a transparent stipple (stencil)
- */
- transparent = FALSE;
- if (dstBpp >= 8 && fgand == 0 && bgand == FB_ALLONES && bgxor == 0)
- transparent = TRUE;
-
- pixelsPerDst = FB_UNIT / dstBpp;
- /*
- * Adjust dest pointers
- */
- dst += dstX >> FB_SHIFT;
- dstX &= FB_MASK;
- FbMaskBitsBytes(dstX, width, fgand == 0 && bgand == 0,
- startmask, startbyte, nmiddle, endmask, endbyte);
-
- if (startmask)
- dstStride--;
- dstStride -= nmiddle;
-
- xRot *= dstBpp;
- /*
- * Compute stip start scanline and rotation parameters
- */
- stipEnd = stip + stipStride * stipHeight;
- modulus(-yRot, stipHeight, stipY);
- s = stip + stipStride * stipY;
- modulus(-xRot, FB_UNIT, stipX);
- rot = stipX;
-
- /*
- * Get pointer to stipple mask array for this depth
- */
- /* fbStippleTable covers all valid bpp (4,8,16,32) */
- fbBits = fbStippleTable[pixelsPerDst];
-
- while (height--) {
- /*
- * Extract stipple bits for this scanline;
- */
- bits = READ(s);
- s += stipStride;
- if (s == stipEnd)
- s = stip;
-#if FB_UNIT > 32
- if (pixelsPerDst == 16)
- mask = FbStipple16Bits(FbLeftStipBits(bits, 16));
- else
-#endif
- mask = fbBits[FbLeftStipBits(bits, pixelsPerDst)];
- /*
- * Rotate into position and compute reduced rop values
- */
- mask = FbRotLeft(mask, rot);
- and = (fgand & mask) | (bgand & ~mask);
- xor = (fgxor & mask) | (bgxor & ~mask);
-
- if (transparent) {
- if (startmask) {
- fbTransparentSpan(dst, mask & startmask, fgxor, 1);
- dst++;
- }
- fbTransparentSpan(dst, mask, fgxor, nmiddle);
- dst += nmiddle;
- if (endmask)
- fbTransparentSpan(dst, mask & endmask, fgxor, 1);
- }
- else {
- /*
- * Fill scanline
- */
- if (startmask) {
- FbDoLeftMaskByteRRop(dst, startbyte, startmask, and, xor);
- dst++;
- }
- n = nmiddle;
- if (!and)
- while (n--)
- WRITE(dst++, xor);
- else {
- while (n--) {
- WRITE(dst, FbDoRRop(READ(dst), and, xor));
- dst++;
- }
- }
- if (endmask)
- FbDoRightMaskByteRRop(dst, endbyte, endmask, and, xor);
- }
- dst += dstStride;
- }
-}
-
-void
-fbOddStipple(FbBits * dst,
- FbStride dstStride,
- int dstX,
- int dstBpp,
- int width,
- int height,
- FbStip * stip,
- FbStride stipStride,
- int stipWidth,
- int stipHeight,
- FbBits fgand,
- FbBits fgxor, FbBits bgand, FbBits bgxor, int xRot, int yRot)
-{
- int stipX, stipY, sx;
- int widthTmp;
- int h, w;
- int x, y;
-
- modulus(-yRot, stipHeight, stipY);
- modulus(dstX / dstBpp - xRot, stipWidth, stipX);
- y = 0;
- while (height) {
- h = stipHeight - stipY;
- if (h > height)
- h = height;
- height -= h;
- widthTmp = width;
- x = dstX;
- sx = stipX;
- while (widthTmp) {
- w = (stipWidth - sx) * dstBpp;
- if (w > widthTmp)
- w = widthTmp;
- widthTmp -= w;
- fbBltOne(stip + stipY * stipStride,
- stipStride,
- sx,
- dst + y * dstStride,
- dstStride, x, dstBpp, w, h, fgand, fgxor, bgand, bgxor);
- x += w;
- sx = 0;
- }
- y += h;
- stipY = 0;
- }
-}
-
-void
-fbStipple(FbBits * dst,
- FbStride dstStride,
- int dstX,
- int dstBpp,
- int width,
- int height,
- FbStip * stip,
- FbStride stipStride,
- int stipWidth,
- int stipHeight,
- Bool even,
- FbBits fgand,
- FbBits fgxor, FbBits bgand, FbBits bgxor, int xRot, int yRot)
-{
- if (even)
- fbEvenStipple(dst, dstStride, dstX, dstBpp, width, height,
- stip, stipStride, stipHeight,
- fgand, fgxor, bgand, bgxor, xRot, yRot);
- else
- fbOddStipple(dst, dstStride, dstX, dstBpp, width, height,
- stip, stipStride, stipWidth, stipHeight,
- fgand, fgxor, bgand, bgxor, xRot, yRot);
-}
diff --git a/xserver/fb/fbtile.c b/xserver/fb/fbtile.c
deleted file mode 100644
index 785c5f0e4..000000000
--- a/xserver/fb/fbtile.c
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Copyright © 1998 Keith Packard
- *
- * 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, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Keith Packard makes no
- * representations about the suitability of this software for any purpose. It
- * is provided "as is" without express or implied warranty.
- *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "fb.h"
-
-/*
- * Accelerated tile fill -- tile width is a power of two not greater
- * than FB_UNIT
- */
-
-void
-fbEvenTile(FbBits * dst,
- FbStride dstStride,
- int dstX,
- int width,
- int height,
- FbBits * tile,
- FbStride tileStride,
- int tileHeight, int alu, FbBits pm, int xRot, int yRot)
-{
- FbBits *t, *tileEnd, bits;
- FbBits startmask, endmask;
- FbBits and, xor;
- int n, nmiddle;
- int tileX, tileY;
- int rot;
- int startbyte, endbyte;
-
- dst += dstX >> FB_SHIFT;
- dstX &= FB_MASK;
- FbMaskBitsBytes(dstX, width, FbDestInvarientRop(alu, pm),
- startmask, startbyte, nmiddle, endmask, endbyte);
- if (startmask)
- dstStride--;
- dstStride -= nmiddle;
-
- /*
- * Compute tile start scanline and rotation parameters
- */
- tileEnd = tile + tileHeight * tileStride;
- modulus(-yRot, tileHeight, tileY);
- t = tile + tileY * tileStride;
- modulus(-xRot, FB_UNIT, tileX);
- rot = tileX;
-
- while (height--) {
-
- /*
- * Pick up bits for this scanline
- */
- bits = READ(t);
- t += tileStride;
- if (t >= tileEnd)
- t = tile;
- bits = FbRotLeft(bits, rot);
- and = fbAnd(alu, bits, pm);
- xor = fbXor(alu, bits, pm);
-
- if (startmask) {
- FbDoLeftMaskByteRRop(dst, startbyte, startmask, and, xor);
- dst++;
- }
- n = nmiddle;
- if (!and)
- while (n--)
- WRITE(dst++, xor);
- else
- while (n--) {
- WRITE(dst, FbDoRRop(READ(dst), and, xor));
- dst++;
- }
- if (endmask)
- FbDoRightMaskByteRRop(dst, endbyte, endmask, and, xor);
- dst += dstStride;
- }
-}
-
-void
-fbOddTile(FbBits * dst,
- FbStride dstStride,
- int dstX,
- int width,
- int height,
- FbBits * tile,
- FbStride tileStride,
- int tileWidth,
- int tileHeight, int alu, FbBits pm, int bpp, int xRot, int yRot)
-{
- int tileX, tileY;
- int widthTmp;
- int h, w;
- int x, y;
-
- modulus(-yRot, tileHeight, tileY);
- y = 0;
- while (height) {
- h = tileHeight - tileY;
- if (h > height)
- h = height;
- height -= h;
- widthTmp = width;
- x = dstX;
- modulus(dstX - xRot, tileWidth, tileX);
- while (widthTmp) {
- w = tileWidth - tileX;
- if (w > widthTmp)
- w = widthTmp;
- widthTmp -= w;
- fbBlt(tile + tileY * tileStride,
- tileStride,
- tileX,
- dst + y * dstStride,
- dstStride, x, w, h, alu, pm, bpp, FALSE, FALSE);
- x += w;
- tileX = 0;
- }
- y += h;
- tileY = 0;
- }
-}
-
-void
-fbTile(FbBits * dst,
- FbStride dstStride,
- int dstX,
- int width,
- int height,
- FbBits * tile,
- FbStride tileStride,
- int tileWidth,
- int tileHeight, int alu, FbBits pm, int bpp, int xRot, int yRot)
-{
- if (FbEvenTile(tileWidth))
- fbEvenTile(dst, dstStride, dstX, width, height,
- tile, tileStride, tileHeight, alu, pm, xRot, yRot);
- else
- fbOddTile(dst, dstStride, dstX, width, height,
- tile, tileStride, tileWidth, tileHeight,
- alu, pm, bpp, xRot, yRot);
-}
diff --git a/xserver/fb/fbutil.c b/xserver/fb/fbutil.c
index 2ca80d1c9..c1d5923c4 100644
--- a/xserver/fb/fbutil.c
+++ b/xserver/fb/fbutil.c
@@ -39,84 +39,6 @@ fbReplicatePixel(Pixel p, int bpp)
return b;
}
-void
-fbReduceRasterOp(int rop, FbBits fg, FbBits pm, FbBits * andp, FbBits * xorp)
-{
- FbBits and, xor;
-
- switch (rop) {
- default:
- case GXclear: /* 0 0 0 0 */
- and = 0;
- xor = 0;
- break;
- case GXand: /* 0 0 0 1 */
- and = fg;
- xor = 0;
- break;
- case GXandReverse: /* 0 0 1 0 */
- and = fg;
- xor = fg;
- break;
- case GXcopy: /* 0 0 1 1 */
- and = 0;
- xor = fg;
- break;
- case GXandInverted: /* 0 1 0 0 */
- and = ~fg;
- xor = 0;
- break;
- case GXnoop: /* 0 1 0 1 */
- and = FB_ALLONES;
- xor = 0;
- break;
- case GXxor: /* 0 1 1 0 */
- and = FB_ALLONES;
- xor = fg;
- break;
- case GXor: /* 0 1 1 1 */
- and = ~fg;
- xor = fg;
- break;
- case GXnor: /* 1 0 0 0 */
- and = ~fg;
- xor = ~fg;
- break;
- case GXequiv: /* 1 0 0 1 */
- and = FB_ALLONES;
- xor = ~fg;
- break;
- case GXinvert: /* 1 0 1 0 */
- and = FB_ALLONES;
- xor = FB_ALLONES;
- break;
- case GXorReverse: /* 1 0 1 1 */
- and = ~fg;
- xor = FB_ALLONES;
- break;
- case GXcopyInverted: /* 1 1 0 0 */
- and = 0;
- xor = ~fg;
- break;
- case GXorInverted: /* 1 1 0 1 */
- and = fg;
- xor = ~fg;
- break;
- case GXnand: /* 1 1 1 0 */
- and = fg;
- xor = FB_ALLONES;
- break;
- case GXset: /* 1 1 1 1 */
- and = 0;
- xor = FB_ALLONES;
- break;
- }
- and |= ~pm;
- xor &= pm;
- *andp = and;
- *xorp = xor;
-}
-
#define O 0
#define I FB_ALLONES
@@ -139,233 +61,3 @@ const FbMergeRopRec FbMergeRopBits[16] = {
{O, O, O, I}, /* set 0xf 1 */
};
-/*
- * Stipple masks are independent of bit/byte order as long
- * as bitorder == byteorder. FB doesn't handle the case
- * where these differ
- */
-#define BitsMask(x,w) ((FB_ALLONES << ((x) & FB_MASK)) & \
- (FB_ALLONES >> ((FB_UNIT - ((x) + (w))) & FB_MASK)))
-
-#define Mask(x,w) BitsMask((x)*(w),(w))
-
-#define SelMask(b,n,w) ((((b) >> n) & 1) * Mask(n,w))
-
-#define C1(b,w) \
- (SelMask(b,0,w))
-
-#define C2(b,w) \
- (SelMask(b,0,w) | \
- SelMask(b,1,w))
-
-#define C4(b,w) \
- (SelMask(b,0,w) | \
- SelMask(b,1,w) | \
- SelMask(b,2,w) | \
- SelMask(b,3,w))
-
-#define C8(b,w) \
- (SelMask(b,0,w) | \
- SelMask(b,1,w) | \
- SelMask(b,2,w) | \
- SelMask(b,3,w) | \
- SelMask(b,4,w) | \
- SelMask(b,5,w) | \
- SelMask(b,6,w) | \
- SelMask(b,7,w))
-
-#if FB_UNIT == 16
-#define fbStipple16Bits 0
-#define fbStipple8Bits 0
-const FbBits fbStipple4Bits[16] = {
- C4(0, 4), C4(1, 4), C4(2, 4), C4(3, 4), C4(4, 4), C4(5, 4),
- C4(6, 4), C4(7, 4), C4(8, 4), C4(9, 4), C4(10, 4), C4(11, 4),
- C4(12, 4), C4(13, 4), C4(14, 4), C4(15, 4),
-};
-
-const FbBits fbStipple2Bits[4] = {
- C2(0, 8), C2(1, 8), C2(2, 8), C2(3, 8),
-};
-
-const FbBits fbStipple1Bits[2] = {
- C1(0, 16), C1(1, 16),
-};
-#endif
-#if FB_UNIT == 32
-#define fbStipple16Bits 0
-const FbBits fbStipple8Bits[256] = {
- C8(0, 4), C8(1, 4), C8(2, 4), C8(3, 4), C8(4, 4), C8(5, 4),
- C8(6, 4), C8(7, 4), C8(8, 4), C8(9, 4), C8(10, 4), C8(11, 4),
- C8(12, 4), C8(13, 4), C8(14, 4), C8(15, 4), C8(16, 4), C8(17, 4),
- C8(18, 4), C8(19, 4), C8(20, 4), C8(21, 4), C8(22, 4), C8(23, 4),
- C8(24, 4), C8(25, 4), C8(26, 4), C8(27, 4), C8(28, 4), C8(29, 4),
- C8(30, 4), C8(31, 4), C8(32, 4), C8(33, 4), C8(34, 4), C8(35, 4),
- C8(36, 4), C8(37, 4), C8(38, 4), C8(39, 4), C8(40, 4), C8(41, 4),
- C8(42, 4), C8(43, 4), C8(44, 4), C8(45, 4), C8(46, 4), C8(47, 4),
- C8(48, 4), C8(49, 4), C8(50, 4), C8(51, 4), C8(52, 4), C8(53, 4),
- C8(54, 4), C8(55, 4), C8(56, 4), C8(57, 4), C8(58, 4), C8(59, 4),
- C8(60, 4), C8(61, 4), C8(62, 4), C8(63, 4), C8(64, 4), C8(65, 4),
- C8(66, 4), C8(67, 4), C8(68, 4), C8(69, 4), C8(70, 4), C8(71, 4),
- C8(72, 4), C8(73, 4), C8(74, 4), C8(75, 4), C8(76, 4), C8(77, 4),
- C8(78, 4), C8(79, 4), C8(80, 4), C8(81, 4), C8(82, 4), C8(83, 4),
- C8(84, 4), C8(85, 4), C8(86, 4), C8(87, 4), C8(88, 4), C8(89, 4),
- C8(90, 4), C8(91, 4), C8(92, 4), C8(93, 4), C8(94, 4), C8(95, 4),
- C8(96, 4), C8(97, 4), C8(98, 4), C8(99, 4), C8(100, 4), C8(101, 4),
- C8(102, 4), C8(103, 4), C8(104, 4), C8(105, 4), C8(106, 4), C8(107, 4),
- C8(108, 4), C8(109, 4), C8(110, 4), C8(111, 4), C8(112, 4), C8(113, 4),
- C8(114, 4), C8(115, 4), C8(116, 4), C8(117, 4), C8(118, 4), C8(119, 4),
- C8(120, 4), C8(121, 4), C8(122, 4), C8(123, 4), C8(124, 4), C8(125, 4),
- C8(126, 4), C8(127, 4), C8(128, 4), C8(129, 4), C8(130, 4), C8(131, 4),
- C8(132, 4), C8(133, 4), C8(134, 4), C8(135, 4), C8(136, 4), C8(137, 4),
- C8(138, 4), C8(139, 4), C8(140, 4), C8(141, 4), C8(142, 4), C8(143, 4),
- C8(144, 4), C8(145, 4), C8(146, 4), C8(147, 4), C8(148, 4), C8(149, 4),
- C8(150, 4), C8(151, 4), C8(152, 4), C8(153, 4), C8(154, 4), C8(155, 4),
- C8(156, 4), C8(157, 4), C8(158, 4), C8(159, 4), C8(160, 4), C8(161, 4),
- C8(162, 4), C8(163, 4), C8(164, 4), C8(165, 4), C8(166, 4), C8(167, 4),
- C8(168, 4), C8(169, 4), C8(170, 4), C8(171, 4), C8(172, 4), C8(173, 4),
- C8(174, 4), C8(175, 4), C8(176, 4), C8(177, 4), C8(178, 4), C8(179, 4),
- C8(180, 4), C8(181, 4), C8(182, 4), C8(183, 4), C8(184, 4), C8(185, 4),
- C8(186, 4), C8(187, 4), C8(188, 4), C8(189, 4), C8(190, 4), C8(191, 4),
- C8(192, 4), C8(193, 4), C8(194, 4), C8(195, 4), C8(196, 4), C8(197, 4),
- C8(198, 4), C8(199, 4), C8(200, 4), C8(201, 4), C8(202, 4), C8(203, 4),
- C8(204, 4), C8(205, 4), C8(206, 4), C8(207, 4), C8(208, 4), C8(209, 4),
- C8(210, 4), C8(211, 4), C8(212, 4), C8(213, 4), C8(214, 4), C8(215, 4),
- C8(216, 4), C8(217, 4), C8(218, 4), C8(219, 4), C8(220, 4), C8(221, 4),
- C8(222, 4), C8(223, 4), C8(224, 4), C8(225, 4), C8(226, 4), C8(227, 4),
- C8(228, 4), C8(229, 4), C8(230, 4), C8(231, 4), C8(232, 4), C8(233, 4),
- C8(234, 4), C8(235, 4), C8(236, 4), C8(237, 4), C8(238, 4), C8(239, 4),
- C8(240, 4), C8(241, 4), C8(242, 4), C8(243, 4), C8(244, 4), C8(245, 4),
- C8(246, 4), C8(247, 4), C8(248, 4), C8(249, 4), C8(250, 4), C8(251, 4),
- C8(252, 4), C8(253, 4), C8(254, 4), C8(255, 4),
-};
-
-const FbBits fbStipple4Bits[16] = {
- C4(0, 8), C4(1, 8), C4(2, 8), C4(3, 8), C4(4, 8), C4(5, 8),
- C4(6, 8), C4(7, 8), C4(8, 8), C4(9, 8), C4(10, 8), C4(11, 8),
- C4(12, 8), C4(13, 8), C4(14, 8), C4(15, 8),
-};
-
-const FbBits fbStipple2Bits[4] = {
- C2(0, 16), C2(1, 16), C2(2, 16), C2(3, 16),
-};
-
-const FbBits fbStipple1Bits[2] = {
- C1(0, 32), C1(1, 32),
-};
-#endif
-#if FB_UNIT == 64
-const FbBits fbStipple16Bits[256] = {
- C8(0, 4), C8(1, 4), C8(2, 4), C8(3, 4), C8(4, 4), C8(5, 4),
- C8(6, 4), C8(7, 4), C8(8, 4), C8(9, 4), C8(10, 4), C8(11, 4),
- C8(12, 4), C8(13, 4), C8(14, 4), C8(15, 4), C8(16, 4), C8(17, 4),
- C8(18, 4), C8(19, 4), C8(20, 4), C8(21, 4), C8(22, 4), C8(23, 4),
- C8(24, 4), C8(25, 4), C8(26, 4), C8(27, 4), C8(28, 4), C8(29, 4),
- C8(30, 4), C8(31, 4), C8(32, 4), C8(33, 4), C8(34, 4), C8(35, 4),
- C8(36, 4), C8(37, 4), C8(38, 4), C8(39, 4), C8(40, 4), C8(41, 4),
- C8(42, 4), C8(43, 4), C8(44, 4), C8(45, 4), C8(46, 4), C8(47, 4),
- C8(48, 4), C8(49, 4), C8(50, 4), C8(51, 4), C8(52, 4), C8(53, 4),
- C8(54, 4), C8(55, 4), C8(56, 4), C8(57, 4), C8(58, 4), C8(59, 4),
- C8(60, 4), C8(61, 4), C8(62, 4), C8(63, 4), C8(64, 4), C8(65, 4),
- C8(66, 4), C8(67, 4), C8(68, 4), C8(69, 4), C8(70, 4), C8(71, 4),
- C8(72, 4), C8(73, 4), C8(74, 4), C8(75, 4), C8(76, 4), C8(77, 4),
- C8(78, 4), C8(79, 4), C8(80, 4), C8(81, 4), C8(82, 4), C8(83, 4),
- C8(84, 4), C8(85, 4), C8(86, 4), C8(87, 4), C8(88, 4), C8(89, 4),
- C8(90, 4), C8(91, 4), C8(92, 4), C8(93, 4), C8(94, 4), C8(95, 4),
- C8(96, 4), C8(97, 4), C8(98, 4), C8(99, 4), C8(100, 4), C8(101, 4),
- C8(102, 4), C8(103, 4), C8(104, 4), C8(105, 4), C8(106, 4), C8(107, 4),
- C8(108, 4), C8(109, 4), C8(110, 4), C8(111, 4), C8(112, 4), C8(113, 4),
- C8(114, 4), C8(115, 4), C8(116, 4), C8(117, 4), C8(118, 4), C8(119, 4),
- C8(120, 4), C8(121, 4), C8(122, 4), C8(123, 4), C8(124, 4), C8(125, 4),
- C8(126, 4), C8(127, 4), C8(128, 4), C8(129, 4), C8(130, 4), C8(131, 4),
- C8(132, 4), C8(133, 4), C8(134, 4), C8(135, 4), C8(136, 4), C8(137, 4),
- C8(138, 4), C8(139, 4), C8(140, 4), C8(141, 4), C8(142, 4), C8(143, 4),
- C8(144, 4), C8(145, 4), C8(146, 4), C8(147, 4), C8(148, 4), C8(149, 4),
- C8(150, 4), C8(151, 4), C8(152, 4), C8(153, 4), C8(154, 4), C8(155, 4),
- C8(156, 4), C8(157, 4), C8(158, 4), C8(159, 4), C8(160, 4), C8(161, 4),
- C8(162, 4), C8(163, 4), C8(164, 4), C8(165, 4), C8(166, 4), C8(167, 4),
- C8(168, 4), C8(169, 4), C8(170, 4), C8(171, 4), C8(172, 4), C8(173, 4),
- C8(174, 4), C8(175, 4), C8(176, 4), C8(177, 4), C8(178, 4), C8(179, 4),
- C8(180, 4), C8(181, 4), C8(182, 4), C8(183, 4), C8(184, 4), C8(185, 4),
- C8(186, 4), C8(187, 4), C8(188, 4), C8(189, 4), C8(190, 4), C8(191, 4),
- C8(192, 4), C8(193, 4), C8(194, 4), C8(195, 4), C8(196, 4), C8(197, 4),
- C8(198, 4), C8(199, 4), C8(200, 4), C8(201, 4), C8(202, 4), C8(203, 4),
- C8(204, 4), C8(205, 4), C8(206, 4), C8(207, 4), C8(208, 4), C8(209, 4),
- C8(210, 4), C8(211, 4), C8(212, 4), C8(213, 4), C8(214, 4), C8(215, 4),
- C8(216, 4), C8(217, 4), C8(218, 4), C8(219, 4), C8(220, 4), C8(221, 4),
- C8(222, 4), C8(223, 4), C8(224, 4), C8(225, 4), C8(226, 4), C8(227, 4),
- C8(228, 4), C8(229, 4), C8(230, 4), C8(231, 4), C8(232, 4), C8(233, 4),
- C8(234, 4), C8(235, 4), C8(236, 4), C8(237, 4), C8(238, 4), C8(239, 4),
- C8(240, 4), C8(241, 4), C8(242, 4), C8(243, 4), C8(244, 4), C8(245, 4),
- C8(246, 4), C8(247, 4), C8(248, 4), C8(249, 4), C8(250, 4), C8(251, 4),
- C8(252, 4), C8(253, 4), C8(254, 4), C8(255, 4),
-};
-
-const FbBits fbStipple8Bits[256] = {
- C8(0, 8), C8(1, 8), C8(2, 8), C8(3, 8), C8(4, 8), C8(5, 8),
- C8(6, 8), C8(7, 8), C8(8, 8), C8(9, 8), C8(10, 8), C8(11, 8),
- C8(12, 8), C8(13, 8), C8(14, 8), C8(15, 8), C8(16, 8), C8(17, 8),
- C8(18, 8), C8(19, 8), C8(20, 8), C8(21, 8), C8(22, 8), C8(23, 8),
- C8(24, 8), C8(25, 8), C8(26, 8), C8(27, 8), C8(28, 8), C8(29, 8),
- C8(30, 8), C8(31, 8), C8(32, 8), C8(33, 8), C8(34, 8), C8(35, 8),
- C8(36, 8), C8(37, 8), C8(38, 8), C8(39, 8), C8(40, 8), C8(41, 8),
- C8(42, 8), C8(43, 8), C8(44, 8), C8(45, 8), C8(46, 8), C8(47, 8),
- C8(48, 8), C8(49, 8), C8(50, 8), C8(51, 8), C8(52, 8), C8(53, 8),
- C8(54, 8), C8(55, 8), C8(56, 8), C8(57, 8), C8(58, 8), C8(59, 8),
- C8(60, 8), C8(61, 8), C8(62, 8), C8(63, 8), C8(64, 8), C8(65, 8),
- C8(66, 8), C8(67, 8), C8(68, 8), C8(69, 8), C8(70, 8), C8(71, 8),
- C8(72, 8), C8(73, 8), C8(74, 8), C8(75, 8), C8(76, 8), C8(77, 8),
- C8(78, 8), C8(79, 8), C8(80, 8), C8(81, 8), C8(82, 8), C8(83, 8),
- C8(84, 8), C8(85, 8), C8(86, 8), C8(87, 8), C8(88, 8), C8(89, 8),
- C8(90, 8), C8(91, 8), C8(92, 8), C8(93, 8), C8(94, 8), C8(95, 8),
- C8(96, 8), C8(97, 8), C8(98, 8), C8(99, 8), C8(100, 8), C8(101, 8),
- C8(102, 8), C8(103, 8), C8(104, 8), C8(105, 8), C8(106, 8), C8(107, 8),
- C8(108, 8), C8(109, 8), C8(110, 8), C8(111, 8), C8(112, 8), C8(113, 8),
- C8(114, 8), C8(115, 8), C8(116, 8), C8(117, 8), C8(118, 8), C8(119, 8),
- C8(120, 8), C8(121, 8), C8(122, 8), C8(123, 8), C8(124, 8), C8(125, 8),
- C8(126, 8), C8(127, 8), C8(128, 8), C8(129, 8), C8(130, 8), C8(131, 8),
- C8(132, 8), C8(133, 8), C8(134, 8), C8(135, 8), C8(136, 8), C8(137, 8),
- C8(138, 8), C8(139, 8), C8(140, 8), C8(141, 8), C8(142, 8), C8(143, 8),
- C8(144, 8), C8(145, 8), C8(146, 8), C8(147, 8), C8(148, 8), C8(149, 8),
- C8(150, 8), C8(151, 8), C8(152, 8), C8(153, 8), C8(154, 8), C8(155, 8),
- C8(156, 8), C8(157, 8), C8(158, 8), C8(159, 8), C8(160, 8), C8(161, 8),
- C8(162, 8), C8(163, 8), C8(164, 8), C8(165, 8), C8(166, 8), C8(167, 8),
- C8(168, 8), C8(169, 8), C8(170, 8), C8(171, 8), C8(172, 8), C8(173, 8),
- C8(174, 8), C8(175, 8), C8(176, 8), C8(177, 8), C8(178, 8), C8(179, 8),
- C8(180, 8), C8(181, 8), C8(182, 8), C8(183, 8), C8(184, 8), C8(185, 8),
- C8(186, 8), C8(187, 8), C8(188, 8), C8(189, 8), C8(190, 8), C8(191, 8),
- C8(192, 8), C8(193, 8), C8(194, 8), C8(195, 8), C8(196, 8), C8(197, 8),
- C8(198, 8), C8(199, 8), C8(200, 8), C8(201, 8), C8(202, 8), C8(203, 8),
- C8(204, 8), C8(205, 8), C8(206, 8), C8(207, 8), C8(208, 8), C8(209, 8),
- C8(210, 8), C8(211, 8), C8(212, 8), C8(213, 8), C8(214, 8), C8(215, 8),
- C8(216, 8), C8(217, 8), C8(218, 8), C8(219, 8), C8(220, 8), C8(221, 8),
- C8(222, 8), C8(223, 8), C8(224, 8), C8(225, 8), C8(226, 8), C8(227, 8),
- C8(228, 8), C8(229, 8), C8(230, 8), C8(231, 8), C8(232, 8), C8(233, 8),
- C8(234, 8), C8(235, 8), C8(236, 8), C8(237, 8), C8(238, 8), C8(239, 8),
- C8(240, 8), C8(241, 8), C8(242, 8), C8(243, 8), C8(244, 8), C8(245, 8),
- C8(246, 8), C8(247, 8), C8(248, 8), C8(249, 8), C8(250, 8), C8(251, 8),
- C8(252, 8), C8(253, 8), C8(254, 8), C8(255, 8),
-};
-
-const FbBits fbStipple4Bits[16] = {
- C4(0, 16), C4(1, 16), C4(2, 16), C4(3, 16), C4(4, 16), C4(5, 16),
- C4(6, 16), C4(7, 16), C4(8, 16), C4(9, 16), C4(10, 16), C4(11, 16),
- C4(12, 16), C4(13, 16), C4(14, 16), C4(15, 16),
-};
-
-const FbBits fbStipple2Bits[4] = {
- C2(0, 32), C2(1, 32), C2(2, 32), C2(3, 32),
-};
-
-#define fbStipple1Bits 0
-#endif
-const FbBits *const fbStippleTable[] = {
- 0,
- fbStipple1Bits,
- fbStipple2Bits,
- 0,
- fbStipple4Bits,
- 0,
- 0,
- 0,
- fbStipple8Bits,
-};
diff --git a/xserver/fb/fbwindow.c b/xserver/fb/fbwindow.c
index c90175faa..7a5fac869 100644
--- a/xserver/fb/fbwindow.c
+++ b/xserver/fb/fbwindow.c
@@ -46,7 +46,7 @@ fbDestroyWindow(WindowPtr pWin)
}
Bool
-fbMapWindow(WindowPtr pWindow)
+fbRealizeWindow(WindowPtr pWindow)
{
return TRUE;
}
@@ -58,7 +58,7 @@ fbPositionWindow(WindowPtr pWin, int x, int y)
}
Bool
-fbUnmapWindow(WindowPtr pWindow)
+fbUnrealizeWindow(WindowPtr pWindow)
{
return TRUE;
}
diff --git a/xserver/fb/wfbrename.h b/xserver/fb/wfbrename.h
index 54d00d003..baa80f8bb 100644
--- a/xserver/fb/wfbrename.h
+++ b/xserver/fb/wfbrename.h
@@ -1,4 +1,3 @@
-#define fb16Lane wfb16Lane
#define fb24_32CopyMtoN wfb24_32CopyMtoN
#define fb24_32CreateScreenResources wfb24_32CreateScreenResources
#define fb24_32GetImage wfb24_32GetImage
@@ -7,8 +6,6 @@
#define fb24_32PutZImage wfb24_32PutZImage
#define fb24_32ReformatTile wfb24_32ReformatTile
#define fb24_32SetSpans wfb24_32SetSpans
-#define fb32Lane wfb32Lane
-#define fb8Lane wfb8Lane
#define fbAddTraps wfbAddTraps
#define fbAddTriangles wfbAddTriangles
#define fbAllocatePrivates wfbAllocatePrivates
@@ -61,8 +58,6 @@
#define fbDots24 wfbDots24
#define fbDots32 wfbDots32
#define fbDots8 wfbDots8
-#define fbEvenStipple wfbEvenStipple
-#define fbEvenTile wfbEvenTile
#define fbExpandDirectColors wfbExpandDirectColors
#define fbFill wfbFill
#define fbFillRegionSolid wfbFillRegionSolid
@@ -79,19 +74,13 @@
#define fbGlyph24 wfbGlyph24
#define fbGlyph32 wfbGlyph32
#define fbGlyph8 wfbGlyph8
-#define fbGlyphIn wfbGlyphIn
#define fbHasVisualTypes wfbHasVisualTypes
#define fbImageGlyphBlt wfbImageGlyphBlt
#define fbIn wfbIn
#define fbInitializeColormap wfbInitializeColormap
#define fbInitVisuals wfbInitVisuals
-#define fbInstallColormap wfbInstallColormap
-#define fbLaneTable wfbLaneTable
#define fbListInstalledColormaps wfbListInstalledColormaps
-#define fbMapWindow wfbMapWindow
#define FbMergeRopBits wFbMergeRopBits
-#define fbOddStipple wfbOddStipple
-#define fbOddTile wfbOddTile
#define fbOver wfbOver
#define fbOver24 wfbOver24
#define fbOverlayCloseScreen wfbOverlayCloseScreen
@@ -134,7 +123,6 @@
#define fbQueryBestSize wfbQueryBestSize
#define fbRasterizeTrapezoid wfbRasterizeTrapezoid
#define fbRealizeFont wfbRealizeFont
-#define fbReduceRasterOp wfbReduceRasterOp
#define fbReplicatePixel wfbReplicatePixel
#define fbResolveColor wfbResolveColor
#define fbScreenPrivateKeyRec wfbScreenPrivateKeyRec
@@ -148,23 +136,12 @@
#define fbSolid wfbSolid
#define fbSolid24 wfbSolid24
#define fbSolidBoxClipped wfbSolidBoxClipped
-#define fbStipple wfbStipple
-#define fbStipple1Bits wfbStipple1Bits
-#define fbStipple24Bits wfbStipple24Bits
-#define fbStipple2Bits wfbStipple2Bits
-#define fbStipple4Bits wfbStipple4Bits
-#define fbStipple8Bits wfbStipple8Bits
-#define fbStippleTable wfbStippleTable
-#define fbTile wfbTile
-#define fbTransparentSpan wfbTransparentSpan
#define fbTrapezoids wfbTrapezoids
#define fbTriangles wfbTriangles
#define fbUninstallColormap wfbUninstallColormap
-#define fbUnmapWindow wfbUnmapWindow
+#define fbUnrealizeWindow wfbUnrealizeWindow
#define fbUnrealizeFont wfbUnrealizeFont
#define fbValidateGC wfbValidateGC
#define fbWinPrivateKeyRec wfbWinPrivateKeyRec
-#define fbZeroLine wfbZeroLine
-#define fbZeroSegment wfbZeroSegment
#define free_pixman_pict wfb_free_pixman_pict
#define image_from_pict wfb_image_from_pict