Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs
fbpict.h File Reference
#include "pixman-xserver-compat.h"
#include "renderedge.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _FbComposeData
struct  _FbComposeFunctions

Defines

#define FbIntMult(a, b, t)   ( (t) = (a) * (b) + 0x80, ( ( ( (t)>>8 ) + (t) )>>8 ) )
#define FbIntDiv(a, b)   (((CARD16) (a) * 255) / (b))
#define FbGet8(v, i)   ((CARD16) (CARD8) ((v) >> i))
#define FbOverU(x, y, i, a, t)
#define FbOverC(x, y, i, a, t)
#define FbInU(x, i, a, t)   ((CARD32) FbIntMult(FbGet8(x,i),(a),(t)) << (i))
#define FbInC(x, i, a, t)   ((CARD32) FbIntMult(FbGet8(x,i),FbGet8(a,i),(t)) << (i))
#define FbGen(x, y, i, ax, ay, t, u, v)
#define FbAdd(x, y, i, t)
#define Alpha(x)   ((x) >> 24)
#define Red(x)   (((x) >> 16) & 0xff)
#define Green(x)   (((x) >> 8) & 0xff)
#define Blue(x)   ((x) & 0xff)
#define IsRGB(pict)   ((pict)->image_format.red > (pict)->image_format.blue)
#define fbComposeGetSolid(pict, dest, bits)
#define fbComposeGetStart(pict, x, y, type, stride, line, mul)
#define cvt8888to0565(s)
#define cvt0565to0888(s)
#define Fetch24(a)
#define Store24(a, v)
#define FbByteMul(x, a)
#define FbByteMulAdd(x, a, y)
#define FbByteAddMul(x, a, y, b)
#define FbByteAddMul_256(x, a, y, b)
#define FbByteMulC(x, a)
#define FbByteMulAddC(x, a, y)
#define FbByteAddMulC(x, a, y, b)
#define FbByteAdd(x, y)
#define div_255(x)   (((x) + 0x80 + (((x) + 0x80) >> 8)) >> 8)
#define FASTCALL
#define INLINE

Typedefs

typedef struct _FbComposeData FbComposeData
typedef FASTCALL void(* CombineMaskU )(CARD32 *src, const CARD32 *mask, int width)
typedef FASTCALL void(* CombineFuncU )(CARD32 *dest, const CARD32 *src, int width)
typedef FASTCALL void(* CombineFuncC )(CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
typedef struct _FbComposeFunctions FbComposeFunctions

Class Documentation

struct _FbComposeData

Definition at line 339 of file fbpict.h.

Class Members
PicturePtr dest
CARD16 height
PicturePtr mask
CARD8 op
PicturePtr src
CARD16 width
INT16 xDest
INT16 xMask
INT16 xSrc
INT16 yDest
INT16 yMask
INT16 ySrc
struct _FbComposeFunctions

Definition at line 358 of file fbpict.h.

Class Members
CombineFuncC * combineC
CombineMaskU combineMaskU
CombineFuncU * combineU

Define Documentation

#define Alpha (   x)    ((x) >> 24)

Definition at line 65 of file fbpict.h.

#define Blue (   x)    ((x) & 0xff)

Definition at line 68 of file fbpict.h.

Value:
(((((s) << 3) & 0xf8) | (((s) >> 2) & 0x7)) | \
                          ((((s) << 5) & 0xfc00) | (((s) >> 1) & 0x300)) | \
                          ((((s) << 8) & 0xf80000) | (((s) << 3) & 0x70000)))

Definition at line 126 of file fbpict.h.

Value:
((((s) >> 3) & 0x001f) | \
                          (((s) >> 5) & 0x07e0) | \
                          (((s) >> 8) & 0xf800))

Definition at line 123 of file fbpict.h.

#define div_255 (   x)    (((x) + 0x80 + (((x) + 0x80) >> 8)) >> 8)

Definition at line 325 of file fbpict.h.

Definition at line 330 of file fbpict.h.

#define FbAdd (   x,
  y,
  i,
  t 
)
Value:
((t) = FbGet8(x,i) + FbGet8(y,i), \
                      (CARD32) ((CARD8) ((t) | (0 - ((t) >> 8)))) << (i))

Definition at line 61 of file fbpict.h.

#define FbByteAdd (   x,
  y 
)
Value:
do {                                            \
        CARD32 t;                                                       \
        CARD32 r = (x & 0xff00ff) + (y & 0xff00ff);                     \
        r |= 0x1000100 - ((r >> 8) & 0xff00ff);                         \
        r &= 0xff00ff;                                                  \
                                                                        \
        t = ((x >> 8) & 0xff00ff) + ((y >> 8) & 0xff00ff);              \
        t |= 0x1000100 - ((t >> 8) & 0xff00ff);                         \
        r |= (t & 0xff00ff) << 8;                                       \
        x = r;                                                          \
    } while (0)

Definition at line 313 of file fbpict.h.

#define FbByteAddMul (   x,
  a,
  y,
  b 
)
Value:
do {                                   \
        CARD32 t;                                                       \
        CARD32 r = (x >> 24) * a + (y >> 24) * b + 0x80;                \
        r += (r >> 8);                                                  \
        r >>= 8;                                                        \
                                                                        \
        t = (x & 0xff00) * a + (y & 0xff00) * b + 0x8000;               \
        t += (t >> 8);                                                  \
        t >>= 16;                                                       \
                                                                        \
        t |= r << 16;                                                   \
        t |= 0x1000100 - ((t >> 8) & 0xff00ff);                         \
        t &= 0xff00ff;                                                  \
        t <<= 8;                                                        \
                                                                        \
        r = ((x >> 16) & 0xff) * a + ((y >> 16) & 0xff) * b + 0x80;     \
        r += (r >> 8);                                                  \
        r >>= 8;                                                        \
                                                                        \
        x = (x & 0xff) * a + (y & 0xff) * b + 0x80;                     \
        x += (x >> 8);                                                  \
        x >>= 8;                                                        \
        x |= r << 16;                                                   \
        x |= 0x1000100 - ((x >> 8) & 0xff00ff);                         \
        x &= 0xff00ff;                                                  \
        x |= t;                                                         \
} while (0)

Definition at line 193 of file fbpict.h.

#define FbByteAddMul_256 (   x,
  a,
  y,
  b 
)
Value:
do {                               \
        CARD32 t = (x & 0xff00ff) * a + (y & 0xff00ff) * b;             \
        t >>= 8;                                                        \
        t &= 0xff00ff;                                                  \
                                                                        \
        x = ((x >> 8) & 0xff00ff) * a + ((y >> 8) & 0xff00ff) * b;      \
        x &= 0xff00ff00;                                                \
        x += t;                                                         \
} while (0)

Definition at line 224 of file fbpict.h.

#define FbByteAddMulC (   x,
  a,
  y,
  b 
)
Value:
do {                                  \
        CARD32 t;                                                       \
        CARD32 r = (x >> 24) * (a >> 24) + (y >> 24) * b + 0x80;        \
        r += (r >> 8);                                                  \
        r >>= 8;                                                        \
                                                                        \
        t = (x & 0xff00) * ((a >> 8) & 0xff) + (y & 0xff00) * b + 0x8000; \
        t += (t >> 8);                                                  \
        t >>= 16;                                                       \
                                                                        \
        t |= r << 16;                                                   \
        t |= 0x1000100 - ((t >> 8) & 0xff00ff);                         \
        t &= 0xff00ff;                                                  \
        t <<= 8;                                                        \
                                                                        \
        r = ((x >> 16) & 0xff) * ((a >> 16) & 0xff) + ((y >> 16) & 0xff) * b + 0x80; \
        r += (r >> 8);                                                  \
        r >>= 8;                                                        \
                                                                        \
        x = (x & 0xff) * (a & 0xff) + (y & 0xff) * b + 0x80;            \
        x += (x >> 8);                                                  \
        x >>= 8;                                                        \
        x |= r << 16;                                                   \
        x |= 0x1000100 - ((x >> 8) & 0xff00ff);                         \
        x &= 0xff00ff;                                                  \
        x |= t;                                                         \
} while (0)

Definition at line 282 of file fbpict.h.

#define FbByteMul (   x,
  a 
)
Value:
do {                                      \
        CARD32 t = ((x & 0xff00ff) * a) + 0x800080;               \
        t = (t + ((t >> 8) & 0xff00ff)) >> 8;                     \
        t &= 0xff00ff;                                            \
                                                                  \
        x = (((x >> 8) & 0xff00ff) * a) + 0x800080;               \
        x = (x + ((x >> 8) & 0xff00ff));                          \
        x &= 0xff00ff00;                                          \
        x += t;                                                   \
    } while (0)

Definition at line 158 of file fbpict.h.

#define FbByteMulAdd (   x,
  a,
  y 
)
Value:
do {                                \
        CARD32 t = ((x & 0xff00ff) * a) + 0x800080;               \
        t = (t + ((t >> 8) & 0xff00ff)) >> 8;                     \
        t &= 0xff00ff;                                            \
        t += y & 0xff00ff;                                        \
        t |= 0x1000100 - ((t >> 8) & 0xff00ff);                   \
        t &= 0xff00ff;                                            \
                                                                  \
        x = (((x >> 8) & 0xff00ff) * a) + 0x800080;                 \
        x = (x + ((x >> 8) & 0xff00ff)) >> 8;                       \
        x &= 0xff00ff;                                              \
        x += (y >> 8) & 0xff00ff;                                   \
        x |= 0x1000100 - ((t >> 8) & 0xff00ff);                     \
        x &= 0xff00ff;                                              \
        x <<= 8;                                                    \
        x += t;                                                     \
    } while (0)

Definition at line 172 of file fbpict.h.

#define FbByteMulAddC (   x,
  a,
  y 
)
Value:
do {                                \
        CARD32 t;                                                  \
        CARD32 r = (x & 0xff) * (a & 0xff);                        \
        r |= (x & 0xff0000) * ((a >> 16) & 0xff);                  \
        r += 0x800080;                                             \
        r = (r + ((r >> 8) & 0xff00ff)) >> 8;                      \
        r &= 0xff00ff;                                             \
        r += y & 0xff00ff;                                         \
        r |= 0x1000100 - ((r >> 8) & 0xff00ff);                    \
        r &= 0xff00ff;                                             \
                                                                   \
        x >>= 8;                                                   \
        t = (x & 0xff) * ((a >> 8) & 0xff);                        \
        t |= (x & 0xff0000) * (a >> 24);                              \
        t += 0x800080;                                                \
        t = (t + ((t >> 8) & 0xff00ff)) >> 8;                         \
        t &= 0xff00ff;                                                \
        t += (y >> 8) & 0xff00ff;                                     \
        t |= 0x1000100 - ((t >> 8) & 0xff00ff);                       \
        t &= 0xff00ff;                                                \
        x = r | (t << 8);                                             \
    } while (0)

Definition at line 256 of file fbpict.h.

#define FbByteMulC (   x,
  a 
)
Value:
do {                                   \
        CARD32 t;                                               \
        CARD32 r = (x & 0xff) * (a & 0xff);                     \
        r |= (x & 0xff0000) * ((a >> 16) & 0xff);               \
        r += 0x800080;                                          \
        r = (r + ((r >> 8) & 0xff00ff)) >> 8;                   \
        r &= 0xff00ff;                                          \
                                                                \
        x >>= 8;                                                \
        t = (x & 0xff) * ((a >> 8) & 0xff);                     \
        t |= (x & 0xff0000) * (a >> 24);                        \
        t += 0x800080;                                          \
        t = t + ((t >> 8) & 0xff00ff);                          \
        x = r | (t & 0xff00ff00);                               \
                                                                \
    } while (0)

Definition at line 236 of file fbpict.h.

#define fbComposeGetSolid (   pict,
  dest,
  bits 
)

Definition at line 72 of file fbpict.h.

#define fbComposeGetStart (   pict,
  x,
  y,
  type,
  stride,
  line,
  mul 
)
Value:
{\
    FbBits    *__bits__; \
    FbStride  __stride__; \
    int              __bpp__; \
    int              __xoff__,__yoff__; \
\
    fbGetDrawable((pict)->pDrawable,__bits__,__stride__,__bpp__,__xoff__,__yoff__); \
    (stride) = __stride__ * sizeof (FbBits) / sizeof (type); \
    (line) = ((type *) __bits__) + (stride) * ((y) + __yoff__) + (mul) * ((x) + __xoff__); \
}

Definition at line 112 of file fbpict.h.

#define FbGen (   x,
  y,
  i,
  ax,
  ay,
  t,
  u,
  v 
)
Value:
((t) = (FbIntMult(FbGet8(y,i),ay,(u)) + \
                                    FbIntMult(FbGet8(x,i),ax,(v))),\
                              (CARD32) ((CARD8) ((t) | \
                                               (0 - ((t) >> 8)))) << (i))

Definition at line 56 of file fbpict.h.

#define FbGet8 (   v,
  i 
)    ((CARD16) (CARD8) ((v) >> i))

Definition at line 36 of file fbpict.h.

#define FbInC (   x,
  i,
  a,
  t 
)    ((CARD32) FbIntMult(FbGet8(x,i),FbGet8(a,i),(t)) << (i))

Definition at line 54 of file fbpict.h.

#define FbIntDiv (   a,
  b 
)    (((CARD16) (a) * 255) / (b))

Definition at line 34 of file fbpict.h.

#define FbIntMult (   a,
  b,
  t 
)    ( (t) = (a) * (b) + 0x80, ( ( ( (t)>>8 ) + (t) )>>8 ) )

Definition at line 33 of file fbpict.h.

#define FbInU (   x,
  i,
  a,
  t 
)    ((CARD32) FbIntMult(FbGet8(x,i),(a),(t)) << (i))

Definition at line 52 of file fbpict.h.

#define FbOverC (   x,
  y,
  i,
  a,
  t 
)
Value:
((t) = FbIntMult(FbGet8(y,i),FbGet8(a,i),(t)) + FbGet8(x,i),\
                         (CARD32) ((CARD8) ((t) | (0 - ((t) >> 8)))) << (i))

Definition at line 49 of file fbpict.h.

#define FbOverU (   x,
  y,
  i,
  a,
  t 
)
Value:
((t) = FbIntMult(FbGet8(y,i),(a),(t)) + FbGet8(x,i),\
                        (CARD32) ((CARD8) ((t) | (0 - ((t) >> 8)))) << (i))

Definition at line 46 of file fbpict.h.

#define Fetch24 (   a)
Value:
((unsigned long) (a) & 1 ? \
                   ((*(a)) | (*((CARD16 *) ((a)+1)) << 8)) : \
                   ((*((CARD16 *) (a))) | (*((a)+2) << 16)))

Definition at line 140 of file fbpict.h.

#define Green (   x)    (((x) >> 8) & 0xff)

Definition at line 67 of file fbpict.h.

Definition at line 336 of file fbpict.h.

#define IsRGB (   pict)    ((pict)->image_format.red > (pict)->image_format.blue)

Definition at line 70 of file fbpict.h.

#define Red (   x)    (((x) >> 16) & 0xff)

Definition at line 66 of file fbpict.h.

#define Store24 (   a,
  v 
)
Value:
((unsigned long) (a) & 1 ? \
                    ((*(a) = (CARD8) (v)), \
                     (*((CARD16 *) ((a)+1)) = (CARD16) ((v) >> 8))) : \
                    ((*((CARD16 *) (a)) = (CARD16) (v)),\
                     (*((a)+2) = (CARD8) ((v) >> 16))))

Definition at line 143 of file fbpict.h.


Typedef Documentation

Definition at line 356 of file fbpict.h.

Definition at line 355 of file fbpict.h.

Definition at line 354 of file fbpict.h.

typedef struct _FbComposeData FbComposeData