65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync *
65fea56f17cd614bc8908264df980a62e1931468vboxsync * Copyright © 1998 Keith Packard
65fea56f17cd614bc8908264df980a62e1931468vboxsync *
65fea56f17cd614bc8908264df980a62e1931468vboxsync * Permission to use, copy, modify, distribute, and sell this software and its
65fea56f17cd614bc8908264df980a62e1931468vboxsync * documentation for any purpose is hereby granted without fee, provided that
65fea56f17cd614bc8908264df980a62e1931468vboxsync * the above copyright notice appear in all copies and that both that
65fea56f17cd614bc8908264df980a62e1931468vboxsync * copyright notice and this permission notice appear in supporting
65fea56f17cd614bc8908264df980a62e1931468vboxsync * documentation, and that the name of Keith Packard not be used in
65fea56f17cd614bc8908264df980a62e1931468vboxsync * advertising or publicity pertaining to distribution of the software without
65fea56f17cd614bc8908264df980a62e1931468vboxsync * specific, written prior permission. Keith Packard makes no
65fea56f17cd614bc8908264df980a62e1931468vboxsync * representations about the suitability of this software for any purpose. It
65fea56f17cd614bc8908264df980a62e1931468vboxsync * is provided "as is" without express or implied warranty.
65fea56f17cd614bc8908264df980a62e1931468vboxsync *
65fea56f17cd614bc8908264df980a62e1931468vboxsync * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
65fea56f17cd614bc8908264df980a62e1931468vboxsync * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
65fea56f17cd614bc8908264df980a62e1931468vboxsync * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
65fea56f17cd614bc8908264df980a62e1931468vboxsync * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
65fea56f17cd614bc8908264df980a62e1931468vboxsync * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
65fea56f17cd614bc8908264df980a62e1931468vboxsync * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
65fea56f17cd614bc8908264df980a62e1931468vboxsync * PERFORMANCE OF THIS SOFTWARE.
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#ifndef _FB_H_
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define _FB_H_
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include <X11/X.h>
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include <pixman.h>
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "scrnintstr.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "pixmap.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "pixmapstr.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "region.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "gcstruct.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "colormap.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "miscstruct.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "servermd.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "windowstr.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "privates.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "mi.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "migc.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "picturestr.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#ifdef FB_ACCESS_WRAPPER
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "wfbrename.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FBPREFIX(x) wfb##x
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define WRITE(ptr, val) ((*wfbWriteMemory)((ptr), (val), sizeof(*(ptr))))
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define READ(ptr) ((*wfbReadMemory)((ptr), sizeof(*(ptr))))
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define MEMCPY_WRAPPED(dst, src, size) do { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync size_t _i; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync CARD8 *_dst = (CARD8*)(dst), *_src = (CARD8*)(src); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync for(_i = 0; _i < size; _i++) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync WRITE(_dst +_i, READ(_src + _i)); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync } \
65fea56f17cd614bc8908264df980a62e1931468vboxsync} while(0)
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define MEMSET_WRAPPED(dst, val, size) do { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync size_t _i; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync CARD8 *_dst = (CARD8*)(dst); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync for(_i = 0; _i < size; _i++) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync WRITE(_dst +_i, (val)); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync } \
65fea56f17cd614bc8908264df980a62e1931468vboxsync} while(0)
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#else
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FBPREFIX(x) fb##x
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define WRITE(ptr, val) (*(ptr) = (val))
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define READ(ptr) (*(ptr))
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define MEMCPY_WRAPPED(dst, src, size) memcpy((dst), (src), (size))
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define MEMSET_WRAPPED(dst, val, size) memset((dst), (val), (size))
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * This single define controls the basic size of data manipulated
65fea56f17cd614bc8908264df980a62e1931468vboxsync * by this software; it must be log2(sizeof (FbBits) * 8)
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#ifndef FB_SHIFT
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FB_SHIFT LOG2_BITMAP_PAD
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#if FB_SHIFT < LOG2_BITMAP_PAD
65fea56f17cd614bc8908264df980a62e1931468vboxsyncerror FB_SHIFT must be >= LOG2_BITMAP_PAD
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FB_UNIT (1 << FB_SHIFT)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FB_HALFUNIT (1 << (FB_SHIFT-1))
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FB_MASK (FB_UNIT - 1)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FB_ALLONES ((FbBits) -1)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#if GLYPHPADBYTES != 4
65fea56f17cd614bc8908264df980a62e1931468vboxsync#error "GLYPHPADBYTES must be 4"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync/* for driver compat - intel UXA needs the second one at least */
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FB_24BIT
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FB_24_32BIT
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FB_STIP_SHIFT LOG2_BITMAP_PAD
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FB_STIP_UNIT (1 << FB_STIP_SHIFT)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FB_STIP_MASK (FB_STIP_UNIT - 1)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FB_STIP_ALLONES ((FbStip) -1)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FB_STIP_ODDSTRIDE(s) (((s) & (FB_MASK >> FB_STIP_SHIFT)) != 0)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FB_STIP_ODDPTR(p) ((((long) (p)) & (FB_MASK >> 3)) != 0)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbStipStrideToBitsStride(s) (((s) >> (FB_SHIFT - FB_STIP_SHIFT)))
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbBitsStrideToStipStride(s) (((s) << (FB_SHIFT - FB_STIP_SHIFT)))
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbFullMask(n) ((n) == FB_UNIT ? FB_ALLONES : ((((FbBits) 1) << n) - 1))
65fea56f17cd614bc8908264df980a62e1931468vboxsync#if FB_SHIFT == 6
65fea56f17cd614bc8908264df980a62e1931468vboxsync#ifdef WIN32
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef unsigned __int64 FbBits;
65fea56f17cd614bc8908264df980a62e1931468vboxsync#else
65fea56f17cd614bc8908264df980a62e1931468vboxsync#if defined(__alpha__) || defined(__alpha) || \
65fea56f17cd614bc8908264df980a62e1931468vboxsync defined(ia64) || defined(__ia64__) || \
65fea56f17cd614bc8908264df980a62e1931468vboxsync defined(__sparc64__) || defined(_LP64) || \
65fea56f17cd614bc8908264df980a62e1931468vboxsync defined(__s390x__) || \
65fea56f17cd614bc8908264df980a62e1931468vboxsync defined(amd64) || defined (__amd64__) || \
65fea56f17cd614bc8908264df980a62e1931468vboxsync defined (__powerpc64__)
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef unsigned long FbBits;
65fea56f17cd614bc8908264df980a62e1931468vboxsync#else
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef unsigned long long FbBits;
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#if FB_SHIFT == 5
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef CARD32 FbBits;
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#if FB_SHIFT == 4
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef CARD16 FbBits;
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#if LOG2_BITMAP_PAD == FB_SHIFT
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef FbBits FbStip;
65fea56f17cd614bc8908264df980a62e1931468vboxsync#else
65fea56f17cd614bc8908264df980a62e1931468vboxsync#if LOG2_BITMAP_PAD == 5
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef CARD32 FbStip;
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef int FbStride;
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#ifdef FB_DEBUG
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void fbValidateDrawable(DrawablePtr d);
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void fbInitializeDrawable(DrawablePtr d);
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void fbSetBits(FbStip * bits, int stride, FbStip data);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FB_HEAD_BITS (FbStip) (0xbaadf00d)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FB_TAIL_BITS (FbStip) (0xbaddf0ad)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#else
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define fbValidateDrawable(d)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define fdInitializeDrawable(d)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "fbrop.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#if BITMAP_BIT_ORDER == LSBFirst
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbScrLeft(x,n) ((x) >> (n))
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbScrRight(x,n) ((x) << (n))
65fea56f17cd614bc8908264df980a62e1931468vboxsync/* #define FbLeftBits(x,n) ((x) & ((((FbBits) 1) << (n)) - 1)) */
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbLeftStipBits(x,n) ((x) & ((((FbStip) 1) << (n)) - 1))
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbStipMoveLsb(x,s,n) (FbStipRight (x,(s)-(n)))
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbPatternOffsetBits 0
65fea56f17cd614bc8908264df980a62e1931468vboxsync#else
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbScrLeft(x,n) ((x) << (n))
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbScrRight(x,n) ((x) >> (n))
65fea56f17cd614bc8908264df980a62e1931468vboxsync/* #define FbLeftBits(x,n) ((x) >> (FB_UNIT - (n))) */
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbLeftStipBits(x,n) ((x) >> (FB_STIP_UNIT - (n)))
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbStipMoveLsb(x,s,n) (x)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbPatternOffsetBits (sizeof (FbBits) - 1)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "micoord.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbStipLeft(x,n) FbScrLeft(x,n)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbStipRight(x,n) FbScrRight(x,n)
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbRotLeft(x,n) FbScrLeft(x,n) | (n ? FbScrRight(x,FB_UNIT-n) : 0)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbRotRight(x,n) FbScrRight(x,n) | (n ? FbScrLeft(x,FB_UNIT-n) : 0)
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbRotStipLeft(x,n) FbStipLeft(x,n) | (n ? FbStipRight(x,FB_STIP_UNIT-n) : 0)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbRotStipRight(x,n) FbStipRight(x,n) | (n ? FbStipLeft(x,FB_STIP_UNIT-n) : 0)
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbLeftMask(x) ( ((x) & FB_MASK) ? \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbScrRight(FB_ALLONES,(x) & FB_MASK) : 0)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbRightMask(x) ( ((FB_UNIT - (x)) & FB_MASK) ? \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbScrLeft(FB_ALLONES,(FB_UNIT - (x)) & FB_MASK) : 0)
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbLeftStipMask(x) ( ((x) & FB_STIP_MASK) ? \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStipRight(FB_STIP_ALLONES,(x) & FB_STIP_MASK) : 0)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbRightStipMask(x) ( ((FB_STIP_UNIT - (x)) & FB_STIP_MASK) ? \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbScrLeft(FB_STIP_ALLONES,(FB_STIP_UNIT - (x)) & FB_STIP_MASK) : 0)
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbBitsMask(x,w) (FbScrRight(FB_ALLONES,(x) & FB_MASK) & \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbScrLeft(FB_ALLONES,(FB_UNIT - ((x) + (w))) & FB_MASK))
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbStipMask(x,w) (FbStipRight(FB_STIP_ALLONES,(x) & FB_STIP_MASK) & \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStipLeft(FB_STIP_ALLONES,(FB_STIP_UNIT - ((x)+(w))) & FB_STIP_MASK))
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbMaskBits(x,w,l,n,r) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync n = (w); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync r = FbRightMask((x)+n); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync l = FbLeftMask(x); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync if (l) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync n -= FB_UNIT - ((x) & FB_MASK); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync if (n < 0) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync n = 0; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync l &= r; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync r = 0; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync } \
65fea56f17cd614bc8908264df980a62e1931468vboxsync } \
65fea56f17cd614bc8908264df980a62e1931468vboxsync n >>= FB_SHIFT; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync}
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbByteMaskInvalid 0x10
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbPatternOffset(o,t) ((o) ^ (FbPatternOffsetBits & ~(sizeof (t) - 1)))
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbPtrOffset(p,o,t) ((t *) ((CARD8 *) (p) + (o)))
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbSelectPatternPart(xor,o,t) ((xor) >> (FbPatternOffset (o,t) << 3))
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbStorePart(dst,off,t,xor) (WRITE(FbPtrOffset(dst,off,t), \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbSelectPart(xor,off,t)))
65fea56f17cd614bc8908264df980a62e1931468vboxsync#ifndef FbSelectPart
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbSelectPart(x,o,t) FbSelectPatternPart(x,o,t)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbMaskBitsBytes(x,w,copy,l,lb,n,r,rb) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync n = (w); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync lb = 0; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync rb = 0; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync r = FbRightMask((x)+n); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync if (r) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync /* compute right byte length */ \
65fea56f17cd614bc8908264df980a62e1931468vboxsync if ((copy) && (((x) + n) & 7) == 0) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync rb = (((x) + n) & FB_MASK) >> 3; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync } else { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync rb = FbByteMaskInvalid; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync } \
65fea56f17cd614bc8908264df980a62e1931468vboxsync } \
65fea56f17cd614bc8908264df980a62e1931468vboxsync l = FbLeftMask(x); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync if (l) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync /* compute left byte length */ \
65fea56f17cd614bc8908264df980a62e1931468vboxsync if ((copy) && ((x) & 7) == 0) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync lb = ((x) & FB_MASK) >> 3; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync } else { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync lb = FbByteMaskInvalid; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync } \
65fea56f17cd614bc8908264df980a62e1931468vboxsync /* subtract out the portion painted by leftMask */ \
65fea56f17cd614bc8908264df980a62e1931468vboxsync n -= FB_UNIT - ((x) & FB_MASK); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync if (n < 0) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync if (lb != FbByteMaskInvalid) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync if (rb == FbByteMaskInvalid) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync lb = FbByteMaskInvalid; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync } else if (rb) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync lb |= (rb - lb) << (FB_SHIFT - 3); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync rb = 0; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync } \
65fea56f17cd614bc8908264df980a62e1931468vboxsync } \
65fea56f17cd614bc8908264df980a62e1931468vboxsync n = 0; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync l &= r; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync r = 0; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync }\
65fea56f17cd614bc8908264df980a62e1931468vboxsync } \
65fea56f17cd614bc8908264df980a62e1931468vboxsync n >>= FB_SHIFT; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync}
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#if FB_SHIFT == 6
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbDoLeftMaskByteRRop6Cases(dst,xor) \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case (sizeof (FbBits) - 7) | (1 << (FB_SHIFT - 3)): \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case (sizeof (FbBits) - 7) | (2 << (FB_SHIFT - 3)): \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 6,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case (sizeof (FbBits) - 7) | (3 << (FB_SHIFT - 3)): \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case (sizeof (FbBits) - 7) | (4 << (FB_SHIFT - 3)): \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case (sizeof (FbBits) - 7) | (5 << (FB_SHIFT - 3)): \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case (sizeof (FbBits) - 7) | (6 << (FB_SHIFT - 3)): \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case (sizeof (FbBits) - 7): \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case (sizeof (FbBits) - 6) | (1 << (FB_SHIFT - 3)): \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 6,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case (sizeof (FbBits) - 6) | (2 << (FB_SHIFT - 3)): \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case (sizeof (FbBits) - 6) | (3 << (FB_SHIFT - 3)): \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case (sizeof (FbBits) - 6) | (4 << (FB_SHIFT - 3)): \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case (sizeof (FbBits) - 6) | (5 << (FB_SHIFT - 3)): \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case (sizeof (FbBits) - 6): \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case (sizeof (FbBits) - 5) | (1 << (FB_SHIFT - 3)): \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case (sizeof (FbBits) - 5) | (2 << (FB_SHIFT - 3)): \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case (sizeof (FbBits) - 5) | (3 << (FB_SHIFT - 3)): \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case (sizeof (FbBits) - 5) | (4 << (FB_SHIFT - 3)): \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case (sizeof (FbBits) - 5): \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case (sizeof (FbBits) - 4) | (1 << (FB_SHIFT - 3)): \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case (sizeof (FbBits) - 4) | (2 << (FB_SHIFT - 3)): \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case (sizeof (FbBits) - 4) | (3 << (FB_SHIFT - 3)): \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case (sizeof (FbBits) - 4): \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break;
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbDoRightMaskByteRRop6Cases(dst,xor) \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case 4: \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,0,CARD32,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case 5: \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,0,CARD32,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,4,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case 6: \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,0,CARD32,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,4,CARD16,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case 7: \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,0,CARD32,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,4,CARD16,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,6,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break;
65fea56f17cd614bc8908264df980a62e1931468vboxsync#else
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbDoLeftMaskByteRRop6Cases(dst,xor)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbDoRightMaskByteRRop6Cases(dst,xor)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbDoLeftMaskByteRRop(dst,lb,l,and,xor) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync switch (lb) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbDoLeftMaskByteRRop6Cases(dst,xor) \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case (sizeof (FbBits) - 3) | (1 << (FB_SHIFT - 3)): \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case (sizeof (FbBits) - 3) | (2 << (FB_SHIFT - 3)): \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case (sizeof (FbBits) - 2) | (1 << (FB_SHIFT - 3)): \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case sizeof (FbBits) - 3: \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case sizeof (FbBits) - 2: \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 2,CARD16,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case sizeof (FbBits) - 1: \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,sizeof (FbBits) - 1,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync default: \
65fea56f17cd614bc8908264df980a62e1931468vboxsync WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, l)); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync } \
65fea56f17cd614bc8908264df980a62e1931468vboxsync}
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbDoRightMaskByteRRop(dst,rb,r,and,xor) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync switch (rb) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case 1: \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,0,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case 2: \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,0,CARD16,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync case 3: \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,0,CARD16,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStorePart(dst,2,CARD8,xor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync break; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbDoRightMaskByteRRop6Cases(dst,xor) \
65fea56f17cd614bc8908264df980a62e1931468vboxsync default: \
65fea56f17cd614bc8908264df980a62e1931468vboxsync WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, r)); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync } \
65fea56f17cd614bc8908264df980a62e1931468vboxsync}
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbMaskStip(x,w,l,n,r) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync n = (w); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync r = FbRightStipMask((x)+n); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync l = FbLeftStipMask(x); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync if (l) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync n -= FB_STIP_UNIT - ((x) & FB_STIP_MASK); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync if (n < 0) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync n = 0; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync l &= r; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync r = 0; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync } \
65fea56f17cd614bc8908264df980a62e1931468vboxsync } \
65fea56f17cd614bc8908264df980a62e1931468vboxsync n >>= FB_STIP_SHIFT; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync}
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * These macros are used to transparently stipple
65fea56f17cd614bc8908264df980a62e1931468vboxsync * in copy mode; the expected usage is with 'n' constant
65fea56f17cd614bc8908264df980a62e1931468vboxsync * so all of the conditional parts collapse into a minimal
65fea56f17cd614bc8908264df980a62e1931468vboxsync * sequence of partial word writes
65fea56f17cd614bc8908264df980a62e1931468vboxsync *
65fea56f17cd614bc8908264df980a62e1931468vboxsync * 'n' is the bytemask of which bytes to store, 'a' is the address
65fea56f17cd614bc8908264df980a62e1931468vboxsync * of the FbBits base unit, 'o' is the offset within that unit
65fea56f17cd614bc8908264df980a62e1931468vboxsync *
65fea56f17cd614bc8908264df980a62e1931468vboxsync * The term "lane" comes from the hardware term "byte-lane" which
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbLaneCase1(n,a,o) \
65fea56f17cd614bc8908264df980a62e1931468vboxsync if ((n) == 0x01) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync WRITE((CARD8 *) ((a)+FbPatternOffset(o,CARD8)), fgxor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync }
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbLaneCase2(n,a,o) \
65fea56f17cd614bc8908264df980a62e1931468vboxsync if ((n) == 0x03) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync WRITE((CARD16 *) ((a)+FbPatternOffset(o,CARD16)), fgxor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync } else { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbLaneCase1((n)&1,a,o) \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbLaneCase1((n)>>1,a,(o)+1) \
65fea56f17cd614bc8908264df980a62e1931468vboxsync }
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbLaneCase4(n,a,o) \
65fea56f17cd614bc8908264df980a62e1931468vboxsync if ((n) == 0x0f) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync WRITE((CARD32 *) ((a)+FbPatternOffset(o,CARD32)), fgxor); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync } else { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbLaneCase2((n)&3,a,o) \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbLaneCase2((n)>>2,a,(o)+2) \
65fea56f17cd614bc8908264df980a62e1931468vboxsync }
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbLaneCase8(n,a,o) \
65fea56f17cd614bc8908264df980a62e1931468vboxsync if ((n) == 0x0ff) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync *(FbBits *) ((a)+(o)) = fgxor; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync } else { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbLaneCase4((n)&15,a,o) \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbLaneCase4((n)>>4,a,(o)+4) \
65fea56f17cd614bc8908264df980a62e1931468vboxsync }
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#if FB_SHIFT == 6
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbLaneCase(n,a) FbLaneCase8(n,(CARD8 *) (a),0)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#if FB_SHIFT == 5
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbLaneCase(n,a) FbLaneCase4(n,(CARD8 *) (a),0)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/* Rotate a filled pixel value to the specified alignement */
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbRot24(p,b) (FbScrRight(p,b) | FbScrLeft(p,24-(b)))
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbRot24Stip(p,b) (FbStipRight(p,b) | FbStipLeft(p,24-(b)))
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/* step a filled pixel value to the next/previous FB_UNIT alignment */
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbNext24Pix(p) (FbRot24(p,(24-FB_UNIT%24)))
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbPrev24Pix(p) (FbRot24(p,FB_UNIT%24))
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbNext24Stip(p) (FbRot24(p,(24-FB_STIP_UNIT%24)))
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbPrev24Stip(p) (FbRot24(p,FB_STIP_UNIT%24))
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/* step a rotation value to the next/previous rotation value */
65fea56f17cd614bc8908264df980a62e1931468vboxsync#if FB_UNIT == 64
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbNext24Rot(r) ((r) == 16 ? 0 : (r) + 8)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbPrev24Rot(r) ((r) == 0 ? 16 : (r) - 8)
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#if IMAGE_BYTE_ORDER == MSBFirst
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbFirst24Rot(x) (((x) + 8) % 24)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#else
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbFirst24Rot(x) ((x) % 24)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#if FB_UNIT == 32
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbNext24Rot(r) ((r) == 0 ? 16 : (r) - 8)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbPrev24Rot(r) ((r) == 16 ? 0 : (r) + 8)
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#if IMAGE_BYTE_ORDER == MSBFirst
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbFirst24Rot(x) (((x) + 16) % 24)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#else
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbFirst24Rot(x) ((x) % 24)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbNext24RotStip(r) ((r) == 0 ? 16 : (r) - 8)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbPrev24RotStip(r) ((r) == 16 ? 0 : (r) + 8)
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/* Whether 24-bit specific code is needed for this filled pixel value */
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbCheck24Pix(p) ((p) == FbNext24Pix(p))
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/* Macros for dealing with dashing */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbDashDeclare \
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned char *__dash, *__firstDash, *__lastDash
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbDashInit(pGC,pPriv,dashOffset,dashlen,even) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync (even) = TRUE; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync __firstDash = (pGC)->dash; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync __lastDash = __firstDash + (pGC)->numInDashList; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync (dashOffset) %= (pPriv)->dashLength; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync \
65fea56f17cd614bc8908264df980a62e1931468vboxsync __dash = __firstDash; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync while ((dashOffset) >= ((dashlen) = *__dash)) \
65fea56f17cd614bc8908264df980a62e1931468vboxsync { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync (dashOffset) -= (dashlen); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync (even) = 1-(even); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync if (++__dash == __lastDash) \
65fea56f17cd614bc8908264df980a62e1931468vboxsync __dash = __firstDash; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync } \
65fea56f17cd614bc8908264df980a62e1931468vboxsync (dashlen) -= (dashOffset); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync}
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbDashNext(dashlen) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync if (++__dash == __lastDash) \
65fea56f17cd614bc8908264df980a62e1931468vboxsync __dash = __firstDash; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync (dashlen) = *__dash; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync}
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/* as numInDashList is always even, this case can skip a test */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbDashNextEven(dashlen) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync (dashlen) = *++__dash; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync}
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbDashNextOdd(dashlen) FbDashNext(dashlen)
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbDashStep(dashlen,even) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync if (!--(dashlen)) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbDashNext(dashlen); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync (even) = 1-(even); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync } \
65fea56f17cd614bc8908264df980a62e1931468vboxsync}
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT const GCOps fbGCOps;
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT const GCFuncs fbGCFuncs;
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/* Framebuffer access wrapper */
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef FbBits(*ReadMemoryProcPtr) (const void *src, int size);
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef void (*WriteMemoryProcPtr) (void *dst, FbBits value, int size);
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef void (*SetupWrapProcPtr) (ReadMemoryProcPtr * pRead,
65fea56f17cd614bc8908264df980a62e1931468vboxsync WriteMemoryProcPtr * pWrite,
65fea56f17cd614bc8908264df980a62e1931468vboxsync DrawablePtr pDraw);
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef void (*FinishWrapProcPtr) (DrawablePtr pDraw);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#ifdef FB_ACCESS_WRAPPER
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define fbPrepareAccess(pDraw) \
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbGetScreenPrivate((pDraw)->pScreen)->setupWrap( \
65fea56f17cd614bc8908264df980a62e1931468vboxsync &wfbReadMemory, \
65fea56f17cd614bc8908264df980a62e1931468vboxsync &wfbWriteMemory, \
65fea56f17cd614bc8908264df980a62e1931468vboxsync (pDraw))
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define fbFinishAccess(pDraw) \
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbGetScreenPrivate((pDraw)->pScreen)->finishWrap(pDraw)
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#else
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define fbPrepareAccess(pPix)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define fbFinishAccess(pDraw)
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT DevPrivateKey
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbGetScreenPrivateKey(void);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/* private field of a screen */
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef struct {
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned char win32bpp; /* window bpp for 32-bpp images */
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned char pix32bpp; /* pixmap bpp for 32-bpp images */
65fea56f17cd614bc8908264df980a62e1931468vboxsync#ifdef FB_ACCESS_WRAPPER
65fea56f17cd614bc8908264df980a62e1931468vboxsync SetupWrapProcPtr setupWrap; /* driver hook to set pixmap access wrapping */
65fea56f17cd614bc8908264df980a62e1931468vboxsync FinishWrapProcPtr finishWrap; /* driver hook to clean up pixmap access wrapping */
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync DevPrivateKeyRec gcPrivateKeyRec;
65fea56f17cd614bc8908264df980a62e1931468vboxsync DevPrivateKeyRec winPrivateKeyRec;
65fea56f17cd614bc8908264df980a62e1931468vboxsync} FbScreenPrivRec, *FbScreenPrivPtr;
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define fbGetScreenPrivate(pScreen) ((FbScreenPrivPtr) \
65fea56f17cd614bc8908264df980a62e1931468vboxsync dixLookupPrivate(&(pScreen)->devPrivates, fbGetScreenPrivateKey()))
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/* private field of GC */
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef struct {
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbBits and, xor; /* reduced rop values */
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbBits bgand, bgxor; /* for stipples */
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbBits fg, bg, pm; /* expanded and filled */
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned int dashLength; /* total of all dash elements */
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned char evenStipple; /* stipple is even */
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned char bpp; /* current drawable bpp */
65fea56f17cd614bc8908264df980a62e1931468vboxsync} FbGCPrivRec, *FbGCPrivPtr;
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define fbGetGCPrivateKey(pGC) (&fbGetScreenPrivate((pGC)->pScreen)->gcPrivateKeyRec)
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define fbGetGCPrivate(pGC) ((FbGCPrivPtr)\
65fea56f17cd614bc8908264df980a62e1931468vboxsync dixLookupPrivate(&(pGC)->devPrivates, fbGetGCPrivateKey(pGC)))
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define fbGetCompositeClip(pGC) ((pGC)->pCompositeClip)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define fbGetExpose(pGC) ((pGC)->fExpose)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define fbGetFreeCompClip(pGC) ((pGC)->freeCompClip)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define fbGetRotatedPixmap(pGC) ((pGC)->pRotatedPixmap)
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define fbGetScreenPixmap(s) ((PixmapPtr) (s)->devPrivate)
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define fbGetWinPrivateKey(pWin) (&fbGetScreenPrivate(((DrawablePtr) (pWin))->pScreen)->winPrivateKeyRec)
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define fbGetWindowPixmap(pWin) ((PixmapPtr)\
65fea56f17cd614bc8908264df980a62e1931468vboxsync dixLookupPrivate(&((WindowPtr)(pWin))->devPrivates, fbGetWinPrivateKey(pWin)))
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#ifdef ROOTLESS
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define __fbPixDrawableX(pPix) ((pPix)->drawable.x)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define __fbPixDrawableY(pPix) ((pPix)->drawable.y)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#else
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define __fbPixDrawableX(pPix) 0
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define __fbPixDrawableY(pPix) 0
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#ifdef COMPOSITE
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define __fbPixOffXWin(pPix) (__fbPixDrawableX(pPix) - (pPix)->screen_x)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define __fbPixOffYWin(pPix) (__fbPixDrawableY(pPix) - (pPix)->screen_y)
65fea56f17cd614bc8908264df980a62e1931468vboxsync#else
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define __fbPixOffXWin(pPix) (__fbPixDrawableX(pPix))
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define __fbPixOffYWin(pPix) (__fbPixDrawableY(pPix))
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define __fbPixOffXPix(pPix) (__fbPixDrawableX(pPix))
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define __fbPixOffYPix(pPix) (__fbPixDrawableY(pPix))
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define fbGetDrawablePixmap(pDrawable, pixmap, xoff, yoff) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync if ((pDrawable)->type != DRAWABLE_PIXMAP) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync (pixmap) = fbGetWindowPixmap(pDrawable); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync (xoff) = __fbPixOffXWin(pixmap); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync (yoff) = __fbPixOffYWin(pixmap); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync } else { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync (pixmap) = (PixmapPtr) (pDrawable); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync (xoff) = __fbPixOffXPix(pixmap); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync (yoff) = __fbPixOffYPix(pixmap); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync } \
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbPrepareAccess(pDrawable); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync}
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define fbGetPixmapBitsData(pixmap, pointer, stride, bpp) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync (pointer) = (FbBits *) (pixmap)->devPrivate.ptr; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync (stride) = ((int) (pixmap)->devKind) / sizeof (FbBits); (void)(stride); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync (bpp) = (pixmap)->drawable.bitsPerPixel; (void)(bpp); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync}
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define fbGetPixmapStipData(pixmap, pointer, stride, bpp) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync (pointer) = (FbStip *) (pixmap)->devPrivate.ptr; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync (stride) = ((int) (pixmap)->devKind) / sizeof (FbStip); (void)(stride); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync (bpp) = (pixmap)->drawable.bitsPerPixel; (void)(bpp); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync}
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define fbGetDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync PixmapPtr _pPix; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbGetDrawablePixmap(pDrawable, _pPix, xoff, yoff); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbGetPixmapBitsData(_pPix, pointer, stride, bpp); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync}
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define fbGetStipDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync PixmapPtr _pPix; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbGetDrawablePixmap(pDrawable, _pPix, xoff, yoff); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbGetPixmapStipData(_pPix, pointer, stride, bpp); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync}
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * XFree86 empties the root BorderClip when the VT is inactive,
65fea56f17cd614bc8908264df980a62e1931468vboxsync * here's a macro which uses that to disable GetImage and GetSpans
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define fbWindowEnabled(pWin) \
65fea56f17cd614bc8908264df980a62e1931468vboxsync RegionNotEmpty(&(pWin)->drawable.pScreen->root->borderClip)
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define fbDrawableEnabled(pDrawable) \
65fea56f17cd614bc8908264df980a62e1931468vboxsync ((pDrawable)->type == DRAWABLE_PIXMAP ? \
65fea56f17cd614bc8908264df980a62e1931468vboxsync TRUE : fbWindowEnabled((WindowPtr) pDrawable))
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbPowerOfTwo(w) (((w) & ((w) - 1)) == 0)
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * Accelerated tiles are power of 2 width <= FB_UNIT
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbEvenTile(w) ((w) <= FB_UNIT && FbPowerOfTwo(w))
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * Accelerated stipples are power of 2 width and <= FB_UNIT/dstBpp
65fea56f17cd614bc8908264df980a62e1931468vboxsync * with dstBpp a power of 2 as well
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define FbEvenStip(w,bpp) ((w) * (bpp) <= FB_UNIT && FbPowerOfTwo(w) && FbPowerOfTwo(bpp))
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * fb24_32.c
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfb24_32GetSpans(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int wMax,
65fea56f17cd614bc8908264df980a62e1931468vboxsync DDXPointPtr ppt, int *pwidth, int nspans, char *pchardstStart);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfb24_32SetSpans(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC,
65fea56f17cd614bc8908264df980a62e1931468vboxsync char *src,
65fea56f17cd614bc8908264df980a62e1931468vboxsync DDXPointPtr ppt, int *pwidth, int nspans, int fSorted);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfb24_32PutZImage(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync RegionPtr pClip,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int alu,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbBits pm,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int x,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int y, int width, int height, CARD8 *src, FbStride srcStride);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfb24_32GetImage(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int x,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int y,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int w,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int h, unsigned int format, unsigned long planeMask, char *d);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfb24_32CopyMtoN(DrawablePtr pSrcDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync DrawablePtr pDstDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC,
65fea56f17cd614bc8908264df980a62e1931468vboxsync BoxPtr pbox,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int nbox,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dx,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dy,
65fea56f17cd614bc8908264df980a62e1931468vboxsync Bool reverse, Bool upsidedown, Pixel bitplane, void *closure);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT PixmapPtr
65fea56f17cd614bc8908264df980a62e1931468vboxsync fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool
65fea56f17cd614bc8908264df980a62e1931468vboxsync fb24_32CreateScreenResources(ScreenPtr pScreen);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfb24_32ModifyPixmapHeader(PixmapPtr pPixmap,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int width,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int height,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int depth,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int bitsPerPixel, int devKind, pointer pPixData);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * fballpriv.c
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbAllocatePrivates(ScreenPtr pScreen);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * fbarc.c
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc * parcs);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * fbbits.c
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbBresSolid8(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dashOffset,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int signdx,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int signdy,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int axis, int x, int y, int e, int e1, int e3, int len);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbBresDash8(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dashOffset,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int signdx,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int signdy, int axis, int x, int y, int e, int e1, int e3, int len);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbDots8(FbBits * dst,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride dstStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstBpp,
65fea56f17cd614bc8908264df980a62e1931468vboxsync BoxPtr pBox,
65fea56f17cd614bc8908264df980a62e1931468vboxsync xPoint * pts,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int npt,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int xorg, int yorg, int xoff, int yoff, FbBits and, FbBits xor);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbArc8(FbBits * dst,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride dstStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstBpp, xArc * arc, int dx, int dy, FbBits and, FbBits xor);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbGlyph8(FbBits * dstLine,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride dstStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstBpp, FbStip * stipple, FbBits fg, int height, int shift);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbPolyline8(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC, int mode, int npt, DDXPointPtr ptsOrig);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbPolySegment8(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pseg);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbBresSolid16(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dashOffset,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int signdx,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int signdy,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int axis, int x, int y, int e, int e1, int e3, int len);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbBresDash16(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dashOffset,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int signdx,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int signdy,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int axis, int x, int y, int e, int e1, int e3, int len);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbDots16(FbBits * dst,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride dstStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstBpp,
65fea56f17cd614bc8908264df980a62e1931468vboxsync BoxPtr pBox,
65fea56f17cd614bc8908264df980a62e1931468vboxsync xPoint * pts,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int npt,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int xorg, int yorg, int xoff, int yoff, FbBits and, FbBits xor);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbArc16(FbBits * dst,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride dstStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstBpp, xArc * arc, int dx, int dy, FbBits and, FbBits xor);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbGlyph16(FbBits * dstLine,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride dstStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstBpp, FbStip * stipple, FbBits fg, int height, int shift);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbPolyline16(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC, int mode, int npt, DDXPointPtr ptsOrig);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbPolySegment16(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pseg);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbBresSolid24(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dashOffset,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int signdx,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int signdy,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int axis, int x, int y, int e, int e1, int e3, int len);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbBresDash24(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dashOffset,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int signdx,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int signdy,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int axis, int x, int y, int e, int e1, int e3, int len);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbDots24(FbBits * dst,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride dstStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstBpp,
65fea56f17cd614bc8908264df980a62e1931468vboxsync BoxPtr pBox,
65fea56f17cd614bc8908264df980a62e1931468vboxsync xPoint * pts,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int npt,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int xorg, int yorg, int xoff, int yoff, FbBits and, FbBits xor);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbArc24(FbBits * dst,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride dstStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstBpp, xArc * arc, int dx, int dy, FbBits and, FbBits xor);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbGlyph24(FbBits * dstLine,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride dstStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstBpp, FbStip * stipple, FbBits fg, int height, int shift);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbPolyline24(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC, int mode, int npt, DDXPointPtr ptsOrig);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbPolySegment24(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pseg);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbBresSolid32(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dashOffset,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int signdx,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int signdy,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int axis, int x, int y, int e, int e1, int e3, int len);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbBresDash32(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dashOffset,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int signdx,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int signdy,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int axis, int x, int y, int e, int e1, int e3, int len);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbDots32(FbBits * dst,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride dstStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstBpp,
65fea56f17cd614bc8908264df980a62e1931468vboxsync BoxPtr pBox,
65fea56f17cd614bc8908264df980a62e1931468vboxsync xPoint * pts,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int npt,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int xorg, int yorg, int xoff, int yoff, FbBits and, FbBits xor);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbArc32(FbBits * dst,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride dstStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstBpp, xArc * arc, int dx, int dy, FbBits and, FbBits xor);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbGlyph32(FbBits * dstLine,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride dstStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstBpp, FbStip * stipple, FbBits fg, int height, int shift);
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbPolyline32(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC, int mode, int npt, DDXPointPtr ptsOrig);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbPolySegment32(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pseg);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * fbblt.c
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbBlt(FbBits * src,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride srcStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int srcX,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbBits * dst,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride dstStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstX,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int width,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int height, int alu, FbBits pm, int bpp, Bool reverse, Bool upsidedown);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbBlt24(FbBits * srcLine,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride srcStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int srcX,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbBits * dstLine,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride dstStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstX,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int width,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int height, int alu, FbBits pm, Bool reverse, Bool upsidedown);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbBltStip(FbStip * src, FbStride srcStride, /* in FbStip units, not FbBits units */
65fea56f17cd614bc8908264df980a62e1931468vboxsync int srcX, FbStip * dst, FbStride dstStride, /* in FbStip units, not FbBits units */
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstX, int width, int height, int alu, FbBits pm, int bpp);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * fbbltone.c
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbBltOne(FbStip * src,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride srcStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int srcX,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbBits * dst,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride dstStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstX,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstBpp,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int width,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int height, FbBits fgand, FbBits fbxor, FbBits bgand, FbBits bgxor);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbBltOne24(FbStip * src, FbStride srcStride, /* FbStip units per scanline */
65fea56f17cd614bc8908264df980a62e1931468vboxsync int srcX, /* bit position of source */
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbBits * dst, FbStride dstStride, /* FbBits units per scanline */
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstX, /* bit position of dest */
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstBpp, /* bits per destination unit */
65fea56f17cd614bc8908264df980a62e1931468vboxsync int width, /* width in bits of destination */
65fea56f17cd614bc8908264df980a62e1931468vboxsync int height, /* height in scanlines */
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbBits fgand, /* rrop values */
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbBits fgxor, FbBits bgand, FbBits bgxor);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbBltPlane(FbBits * src,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride srcStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int srcX,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int srcBpp,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStip * dst,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride dstStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstX,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int width,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int height,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStip fgand,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStip fgxor, FbStip bgand, FbStip bgxor, Pixel planeMask);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * fbcmap_mi.c
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT int
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbListInstalledColormaps(ScreenPtr pScreen, Colormap * pmaps);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbInstallColormap(ColormapPtr pmap);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbUninstallColormap(ColormapPtr pmap);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbResolveColor(unsigned short *pred,
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned short *pgreen,
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned short *pblue, VisualPtr pVisual);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbInitializeColormap(ColormapPtr pmap);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT int
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbExpandDirectColors(ColormapPtr pmap,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int ndef, xColorItem * indefs, xColorItem * outdefs);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbCreateDefColormap(ScreenPtr pScreen);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbClearVisualTypes(void);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbHasVisualTypes(int depth);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbSetVisualTypes(int depth, int visuals, int bitsPerRGB);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbSetVisualTypesAndMasks(int depth, int visuals, int bitsPerRGB,
65fea56f17cd614bc8908264df980a62e1931468vboxsync Pixel redMask, Pixel greenMask, Pixel blueMask);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbInitVisuals(VisualPtr * visualp,
65fea56f17cd614bc8908264df980a62e1931468vboxsync DepthPtr * depthp,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int *nvisualp,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int *ndepthp,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int *rootDepthp,
65fea56f17cd614bc8908264df980a62e1931468vboxsync VisualID * defaultVisp, unsigned long sizes, int bitsPerRGB);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * fbcopy.c
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbCopyNtoN(DrawablePtr pSrcDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync DrawablePtr pDstDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC,
65fea56f17cd614bc8908264df980a62e1931468vboxsync BoxPtr pbox,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int nbox,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dx,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dy,
65fea56f17cd614bc8908264df980a62e1931468vboxsync Bool reverse, Bool upsidedown, Pixel bitplane, void *closure);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbCopy1toN(DrawablePtr pSrcDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync DrawablePtr pDstDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC,
65fea56f17cd614bc8908264df980a62e1931468vboxsync BoxPtr pbox,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int nbox,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dx,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dy,
65fea56f17cd614bc8908264df980a62e1931468vboxsync Bool reverse, Bool upsidedown, Pixel bitplane, void *closure);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbCopyNto1(DrawablePtr pSrcDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync DrawablePtr pDstDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC,
65fea56f17cd614bc8908264df980a62e1931468vboxsync BoxPtr pbox,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int nbox,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dx,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dy,
65fea56f17cd614bc8908264df980a62e1931468vboxsync Bool reverse, Bool upsidedown, Pixel bitplane, void *closure);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT RegionPtr
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbCopyArea(DrawablePtr pSrcDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync DrawablePtr pDstDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int xIn, int yIn, int widthSrc, int heightSrc, int xOut, int yOut);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT RegionPtr
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbCopyPlane(DrawablePtr pSrcDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync DrawablePtr pDstDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int xIn,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int yIn,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int widthSrc,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int heightSrc, int xOut, int yOut, unsigned long bitplane);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * fbfill.c
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbFill(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int width, int height);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbSolidBoxClipped(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync RegionPtr pClip,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int xa, int ya, int xb, int yb, FbBits and, FbBits xor);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * fbfillrect.c
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbPolyFillRect(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC, int nrectInit, xRectangle *prectInit);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define fbPolyFillArc miPolyFillArc
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define fbFillPolygon miFillPolygon
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * fbfillsp.c
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbFillSpans(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int nInit, DDXPointPtr pptInit, int *pwidthInit, int fSorted);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * fbgc.c
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbCreateGC(GCPtr pGC);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbPadPixmap(PixmapPtr pPixmap);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * fbgetsp.c
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbGetSpans(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int wMax,
65fea56f17cd614bc8908264df980a62e1931468vboxsync DDXPointPtr ppt, int *pwidth, int nspans, char *pchardstStart);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * fbglyph.c
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbGlyphIn(RegionPtr pRegion, int x, int y, int width, int height);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbPolyGlyphBlt(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int x,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int y,
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned int nglyph, CharInfoPtr * ppci, pointer pglyphBase);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbImageGlyphBlt(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int x,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int y,
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned int nglyph, CharInfoPtr * ppci, pointer pglyphBase);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * fbimage.c
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbPutImage(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int depth,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int x, int y, int w, int h, int leftPad, int format, char *pImage);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbPutZImage(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync RegionPtr pClip,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int alu,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbBits pm,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int x,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int y, int width, int height, FbStip * src, FbStride srcStride);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbPutXYImage(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync RegionPtr pClip,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbBits fg,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbBits bg,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbBits pm,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int alu,
65fea56f17cd614bc8908264df980a62e1931468vboxsync Bool opaque,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int x,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int y,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int width, int height, FbStip * src, FbStride srcStride, int srcX);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbGetImage(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int x,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int y,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int w, int h, unsigned int format, unsigned long planeMask, char *d);
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * fbline.c
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbZeroLine(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC, int mode, int npt, DDXPointPtr ppt);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbZeroSegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pSegs);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbPolyLine(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC, int mode, int npt, DDXPointPtr ppt);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbFixCoordModePrevious(int npt, DDXPointPtr ppt);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pseg);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define fbPolyRectangle miPolyRectangle
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * fbpict.c
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbPictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbDestroyGlyphCache(void);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * fbpixmap.c
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT PixmapPtr
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbCreatePixmapBpp(ScreenPtr pScreen, int width, int height, int depth, int bpp,
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned usage_hint);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT PixmapPtr
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned usage_hint);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbDestroyPixmap(PixmapPtr pPixmap);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT RegionPtr
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbPixmapToRegion(PixmapPtr pPix);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * fbpoint.c
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbDots(FbBits * dstOrig,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride dstStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstBpp,
65fea56f17cd614bc8908264df980a62e1931468vboxsync BoxPtr pBox,
65fea56f17cd614bc8908264df980a62e1931468vboxsync xPoint * pts,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int npt,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int xorg, int yorg, int xoff, int yoff, FbBits andOrig, FbBits xorOrig);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbPolyPoint(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC, int mode, int npt, xPoint * pptInit);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * fbpush.c
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbPushPattern(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStip * src,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride srcStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int srcX, int x, int y, int width, int height);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbPushFill(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStip * src,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride srcStride, int srcX, int x, int y, int width, int height);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbPushImage(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStip * src,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride srcStride, int srcX, int x, int y, int width, int height);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbPushPixels(GCPtr pGC,
65fea56f17cd614bc8908264df980a62e1931468vboxsync PixmapPtr pBitmap,
65fea56f17cd614bc8908264df980a62e1931468vboxsync DrawablePtr pDrawable, int dx, int dy, int xOrg, int yOrg);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * fbscreen.c
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbCloseScreen(ScreenPtr pScreen);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbRealizeFont(ScreenPtr pScreen, FontPtr pFont);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbUnrealizeFont(ScreenPtr pScreen, FontPtr pFont);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbQueryBestSize(int class,
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned short *width, unsigned short *height,
65fea56f17cd614bc8908264df980a62e1931468vboxsync ScreenPtr pScreen);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT PixmapPtr
65fea56f17cd614bc8908264df980a62e1931468vboxsync _fbGetWindowPixmap(WindowPtr pWindow);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync _fbSetWindowPixmap(WindowPtr pWindow, PixmapPtr pPixmap);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbSetupScreen(ScreenPtr pScreen, pointer pbits, /* pointer to screen bitmap */
65fea56f17cd614bc8908264df980a62e1931468vboxsync int xsize, /* in pixels */
65fea56f17cd614bc8908264df980a62e1931468vboxsync int ysize, int dpix, /* dots per inch */
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dpiy, int width, /* pixel width of frame buffer */
65fea56f17cd614bc8908264df980a62e1931468vboxsync int bpp); /* bits per pixel of frame buffer */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncwfbFinishScreenInit(ScreenPtr pScreen,
65fea56f17cd614bc8908264df980a62e1931468vboxsync pointer pbits,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int xsize,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int ysize,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dpix,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dpiy,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int width,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int bpp,
65fea56f17cd614bc8908264df980a62e1931468vboxsync SetupWrapProcPtr setupWrap, FinishWrapProcPtr finishWrap);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncwfbScreenInit(ScreenPtr pScreen,
65fea56f17cd614bc8908264df980a62e1931468vboxsync pointer pbits,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int xsize,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int ysize,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dpix,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dpiy,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int width,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int bpp,
65fea56f17cd614bc8908264df980a62e1931468vboxsync SetupWrapProcPtr setupWrap, FinishWrapProcPtr finishWrap);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbFinishScreenInit(ScreenPtr pScreen,
65fea56f17cd614bc8908264df980a62e1931468vboxsync pointer pbits,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int xsize,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int ysize, int dpix, int dpiy, int width, int bpp);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbScreenInit(ScreenPtr pScreen,
65fea56f17cd614bc8908264df980a62e1931468vboxsync pointer pbits,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int xsize, int ysize, int dpix, int dpiy, int width, int bpp);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * fbseg.c
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef void FbBres(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dashOffset,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int signdx,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int signdy,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int axis, int x, int y, int e, int e1, int e3, int len);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT FbBres fbBresSolid, fbBresDash, fbBresFill, fbBresFillDash;
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * fbsetsp.c
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbSetSpans(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC,
65fea56f17cd614bc8908264df980a62e1931468vboxsync char *src, DDXPointPtr ppt, int *pwidth, int nspans, int fSorted);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT FbBres *fbSelectBres(DrawablePtr pDrawable, GCPtr pGC);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbBres(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dashOffset,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int signdx,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int signdy, int axis, int x, int y, int e, int e1, int e3, int len);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbSegment(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int xa, int ya, int xb, int yb, Bool drawLast, int *dashOffset);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * fbsolid.c
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbSolid(FbBits * dst,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride dstStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstX, int bpp, int width, int height, FbBits and, FbBits xor);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbSolid24(FbBits * dst,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride dstStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstX, int width, int height, FbBits and, FbBits xor);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * fbstipple.c
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbTransparentSpan(FbBits * dst, FbBits stip, FbBits fgxor, int n);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbEvenStipple(FbBits * dst,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride dstStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstX,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstBpp,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int width,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int height,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStip * stip,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride stipStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int stipHeight,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbBits fgand,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbBits fgxor, FbBits bgand, FbBits bgxor, int xRot, int yRot);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbOddStipple(FbBits * dst,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride dstStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstX,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstBpp,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int width,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int height,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStip * stip,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride stipStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int stipWidth,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int stipHeight,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbBits fgand,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbBits fgxor, FbBits bgand, FbBits bgxor, int xRot, int yRot);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbStipple(FbBits * dst,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride dstStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstX,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstBpp,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int width,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int height,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStip * stip,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride stipStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int stipWidth,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int stipHeight,
65fea56f17cd614bc8908264df980a62e1931468vboxsync Bool even,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbBits fgand,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbBits fgxor, FbBits bgand, FbBits bgxor, int xRot, int yRot);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * fbtile.c
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbEvenTile(FbBits * dst,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride dstStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstX,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int width,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int height,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbBits * tile,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride tileStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int tileHeight, int alu, FbBits pm, int xRot, int yRot);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbOddTile(FbBits * dst,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride dstStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstX,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int width,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int height,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbBits * tile,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride tileStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int tileWidth,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int tileHeight, int alu, FbBits pm, int bpp, int xRot, int yRot);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbTile(FbBits * dst,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride dstStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dstX,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int width,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int height,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbBits * tile,
65fea56f17cd614bc8908264df980a62e1931468vboxsync FbStride tileStride,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int tileWidth,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int tileHeight, int alu, FbBits pm, int bpp, int xRot, int yRot);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * fbutil.c
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT FbBits fbReplicatePixel(Pixel p, int bpp);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbReduceRasterOp(int rop, FbBits fg, FbBits pm, FbBits * andp, FbBits * xorp);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#ifdef FB_ACCESS_WRAPPER
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT ReadMemoryProcPtr wfbReadMemory;
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT WriteMemoryProcPtr wfbWriteMemory;
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * fbwindow.c
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbCreateWindow(WindowPtr pWin);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbDestroyWindow(WindowPtr pWin);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbMapWindow(WindowPtr pWindow);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbPositionWindow(WindowPtr pWin, int x, int y);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbUnmapWindow(WindowPtr pWindow);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbCopyWindowProc(DrawablePtr pSrcDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync DrawablePtr pDstDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync GCPtr pGC,
65fea56f17cd614bc8908264df980a62e1931468vboxsync BoxPtr pbox,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int nbox,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dx,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int dy,
65fea56f17cd614bc8908264df980a62e1931468vboxsync Bool reverse, Bool upsidedown, Pixel bitplane, void *closure);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool
65fea56f17cd614bc8908264df980a62e1931468vboxsync fbChangeWindowAttributes(WindowPtr pWin, unsigned long mask);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfbFillRegionSolid(DrawablePtr pDrawable,
65fea56f17cd614bc8908264df980a62e1931468vboxsync RegionPtr pRegion, FbBits and, FbBits xor);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT pixman_image_t *image_from_pict(PicturePtr pict,
65fea56f17cd614bc8908264df980a62e1931468vboxsync Bool has_clip,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int *xoff, int *yoff);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void free_pixman_pict(PicturePtr, pixman_image_t *);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif /* _FB_H_ */