Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs | Functions | Variables
icint.h File Reference
#include "pixman.h"
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include "slim_internal.h"
#include "prcpucfg.h"
#include "icimage.h"
#include "icrop.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _FbPoint
struct  pixman_format
struct  _FbPixels

Defines

#define __inline
#define INLINE
#define MIN(a, b)   ((a) < (b) ? (a) : (b))
#define MAX(a, b)   ((a) > (b) ? (a) : (b))
#define MOD(a, b)   ((b) == 1 ? 0 : (a) >= 0 ? (a) % (b) : (b) - (-(a) - 1) % (b) - 1)
#define GXcopy   0x3
#define GXor   0x7
#define ClipByChildren   0
#define PolyEdgeSharp   0
#define PolyModePrecise   0
#define CPClipMask   (1 << 6)
#define CPLastBit   11
#define FALSE   0
#define TRUE   1
#define BITMAP_SCANLINE_PAD   32
#define LOG2_BITMAP_PAD   5
#define LOG2_BYTES_PER_SCANLINE_PAD   2
#define LSBFirst   0
#define MSBFirst   1
#define IMAGE_BYTE_ORDER   LSBFirst
#define BITMAP_BIT_ORDER   LSBFirst
#define MAXSHORT   SHRT_MAX
#define MINSHORT   SHRT_MIN
#define FB_UNIT   (1 << FB_SHIFT)
#define FB_HALFUNIT   (1 << (FB_SHIFT-1))
#define FB_MASK   (FB_UNIT - 1)
#define FB_ALLONES   ((pixman_bits_t) -1)
#define FB_24BIT
#define FB_24_32BIT
#define FB_STIP_SHIFT   LOG2_BITMAP_PAD
#define FB_STIP_UNIT   (1 << FB_STIP_SHIFT)
#define FB_STIP_MASK   (FB_STIP_UNIT - 1)
#define FB_STIP_ALLONES   ((FbStip) -1)
#define FB_STIP_ODDSTRIDE(s)   (((s) & (FB_MASK >> FB_STIP_SHIFT)) != 0)
#define FB_STIP_ODDPTR(p)   ((((long) (p)) & (FB_MASK >> 3)) != 0)
#define FbStipStrideToBitsStride(s)   (((s) >> (FB_SHIFT - FB_STIP_SHIFT)))
#define FbBitsStrideToStipStride(s)   (((s) << (FB_SHIFT - FB_STIP_SHIFT)))
#define FbFullMask(n)   ((n) == FB_UNIT ? FB_ALLONES : ((((FbBits) 1) << n) - 1))
#define fbValidateDrawable(d)
#define fdInitializeDrawable(d)
#define FbScrLeft(x, n)   ((x) >> (n))
#define FbScrRight(x, n)   ((x) << (n))
#define FbLeftStipBits(x, n)   ((x) & ((((FbStip) 1) << (n)) - 1))
#define FbStipMoveLsb(x, s, n)   (FbStipRight (x,(s)-(n)))
#define FbPatternOffsetBits   0
#define FbStipLeft(x, n)   FbScrLeft(x,n)
#define FbStipRight(x, n)   FbScrRight(x,n)
#define FbRotLeft(x, n)   FbScrLeft(x,n) | (n ? FbScrRight(x,FB_UNIT-n) : 0)
#define FbRotRight(x, n)   FbScrRight(x,n) | (n ? FbScrLeft(x,FB_UNIT-n) : 0)
#define FbRotStipLeft(x, n)   FbStipLeft(x,n) | (n ? FbStipRight(x,FB_STIP_UNIT-n) : 0)
#define FbRotStipRight(x, n)   FbStipRight(x,n) | (n ? FbStipLeft(x,FB_STIP_UNIT-n) : 0)
#define FbLeftMask(x)
#define FbRightMask(x)
#define FbLeftStipMask(x)
#define FbRightStipMask(x)
#define FbBitsMask(x, w)
#define FbStipMask(x, w)
#define FbMaskBits(x, w, l, n, r)
#define FbByteMaskInvalid   0x10
#define FbPatternOffset(o, t)   ((o) ^ (FbPatternOffsetBits & ~(sizeof (t) - 1)))
#define FbPtrOffset(p, o, t)   ((t *) ((CARD8 *) (p) + (o)))
#define FbSelectPatternPart(xor, o, t)   ((xor) >> (FbPatternOffset (o,t) << 3))
#define FbStorePart(dst, off, t, xor)
#define FbSelectPart(x, o, t)   FbSelectPatternPart(x,o,t)
#define FbMaskBitsBytes(x, w, copy, l, lb, n, r, rb)
#define FbDoLeftMaskByteRRop6Cases(dst, xor)
#define FbDoRightMaskByteRRop6Cases(dst, xor)
#define FbDoLeftMaskByteRRop(dst, lb, l, and, xor)
#define FbDoRightMaskByteRRop(dst, rb, r, and, xor)
#define FbMaskStip(x, w, l, n, r)
#define FbLaneCase1(n, a, o)
#define FbLaneCase2(n, a, o)
#define FbLaneCase4(n, a, o)
#define FbLaneCase8(n, a, o)
#define FbLaneCase(n, a)   FbLaneCase4(n,(CARD8 *) (a),0)
#define FbRot24(p, b)   (FbScrRight(p,b) | FbScrLeft(p,24-(b)))
#define FbRot24Stip(p, b)   (FbStipRight(p,b) | FbStipLeft(p,24-(b)))
#define FbNext24Pix(p)   (FbRot24(p,(24-FB_UNIT%24)))
#define FbPrev24Pix(p)   (FbRot24(p,FB_UNIT%24))
#define FbNext24Stip(p)   (FbRot24(p,(24-FB_STIP_UNIT%24)))
#define FbPrev24Stip(p)   (FbRot24(p,FB_STIP_UNIT%24))
#define FbNext24Rot(r)   ((r) == 0 ? 16 : (r) - 8)
#define FbPrev24Rot(r)   ((r) == 16 ? 0 : (r) + 8)
#define FbFirst24Rot(x)   ((x) % 24)
#define FbNext24RotStip(r)   ((r) == 0 ? 16 : (r) - 8)
#define FbPrev24RotStip(r)   ((r) == 16 ? 0 : (r) + 8)
#define FbCheck24Pix(p)   ((p) == FbNext24Pix(p))
#define FbGetPixels(icpixels, pointer, _stride_, _bpp_, xoff, yoff)
#define FbGetStipPixels(icpixels, pointer, _stride_, _bpp_, xoff, yoff)
#define FbPowerOfTwo(w)   (((w) & ((w) - 1)) == 0)
#define FbEvenTile(w)   ((w) <= FB_UNIT && FbPowerOfTwo(w))
#define FbEvenStip(w, bpp)   ((w) * (bpp) <= FB_UNIT && FbPowerOfTwo(w) && FbPowerOfTwo(bpp))
#define CT_NONE   0
#define CT_PIXMAP   1
#define CT_REGION   2
#define CT_UNSORTED   6
#define CT_YSORTED   10
#define CT_YXSORTED   14
#define CT_YXBANDED   18
#define ICINT_NEED_IC_ONES
#define _PICTURE_H_
#define PICT_FORMAT(bpp, type, a, r, g, b)
#define PICT_VISFORMAT(bpp, type, vi)
#define PICT_FORMAT_BPP(f)   (((f) >> 24) )
#define PICT_FORMAT_TYPE(f)   (((f) >> 16) & 0xff)
#define PICT_FORMAT_A(f)   (((f) >> 12) & 0x0f)
#define PICT_FORMAT_R(f)   (((f) >> 8) & 0x0f)
#define PICT_FORMAT_G(f)   (((f) >> 4) & 0x0f)
#define PICT_FORMAT_B(f)   (((f) ) & 0x0f)
#define PICT_FORMAT_RGB(f)   (((f) ) & 0xfff)
#define PICT_FORMAT_VIS(f)   (((f) ) & 0xffff)
#define PICT_TYPE_OTHER   0
#define PICT_TYPE_A   1
#define PICT_TYPE_ARGB   2
#define PICT_TYPE_ABGR   3
#define PICT_TYPE_COLOR   4
#define PICT_TYPE_GRAY   5
#define PICT_FORMAT_COLOR(f)   (PICT_FORMAT_TYPE(f) & 2)
#define PICT_a8r8g8b8   PICT_FORMAT(32,PICT_TYPE_ARGB,8,8,8,8)
#define PICT_x8r8g8b8   PICT_FORMAT(32,PICT_TYPE_ARGB,0,8,8,8)
#define PICT_a8b8g8r8   PICT_FORMAT(32,PICT_TYPE_ABGR,8,8,8,8)
#define PICT_x8b8g8r8   PICT_FORMAT(32,PICT_TYPE_ABGR,0,8,8,8)
#define PICT_r8g8b8   PICT_FORMAT(24,PICT_TYPE_ARGB,0,8,8,8)
#define PICT_b8g8r8   PICT_FORMAT(24,PICT_TYPE_ABGR,0,8,8,8)
#define PICT_r5g6b5   PICT_FORMAT(16,PICT_TYPE_ARGB,0,5,6,5)
#define PICT_b5g6r5   PICT_FORMAT(16,PICT_TYPE_ABGR,0,5,6,5)
#define PICT_a1r5g5b5   PICT_FORMAT(16,PICT_TYPE_ARGB,1,5,5,5)
#define PICT_x1r5g5b5   PICT_FORMAT(16,PICT_TYPE_ARGB,0,5,5,5)
#define PICT_a1b5g5r5   PICT_FORMAT(16,PICT_TYPE_ABGR,1,5,5,5)
#define PICT_x1b5g5r5   PICT_FORMAT(16,PICT_TYPE_ABGR,0,5,5,5)
#define PICT_a4r4g4b4   PICT_FORMAT(16,PICT_TYPE_ARGB,4,4,4,4)
#define PICT_x4r4g4b4   PICT_FORMAT(16,PICT_TYPE_ARGB,0,4,4,4)
#define PICT_a4b4g4r4   PICT_FORMAT(16,PICT_TYPE_ABGR,4,4,4,4)
#define PICT_x4b4g4r4   PICT_FORMAT(16,PICT_TYPE_ABGR,0,4,4,4)
#define PICT_a8   PICT_FORMAT(8,PICT_TYPE_A,8,0,0,0)
#define PICT_r3g3b2   PICT_FORMAT(8,PICT_TYPE_ARGB,0,3,3,2)
#define PICT_b2g3r3   PICT_FORMAT(8,PICT_TYPE_ABGR,0,3,3,2)
#define PICT_a2r2g2b2   PICT_FORMAT(8,PICT_TYPE_ARGB,2,2,2,2)
#define PICT_a2b2g2r2   PICT_FORMAT(8,PICT_TYPE_ABGR,2,2,2,2)
#define PICT_c8   PICT_FORMAT(8,PICT_TYPE_COLOR,0,0,0,0)
#define PICT_g8   PICT_FORMAT(8,PICT_TYPE_GRAY,0,0,0,0)
#define PICT_a4   PICT_FORMAT(4,PICT_TYPE_A,4,0,0,0)
#define PICT_r1g2b1   PICT_FORMAT(4,PICT_TYPE_ARGB,0,1,2,1)
#define PICT_b1g2r1   PICT_FORMAT(4,PICT_TYPE_ABGR,0,1,2,1)
#define PICT_a1r1g1b1   PICT_FORMAT(4,PICT_TYPE_ARGB,1,1,1,1)
#define PICT_a1b1g1r1   PICT_FORMAT(4,PICT_TYPE_ABGR,1,1,1,1)
#define PICT_c4   PICT_FORMAT(4,PICT_TYPE_COLOR,0,0,0,0)
#define PICT_g4   PICT_FORMAT(4,PICT_TYPE_GRAY,0,0,0,0)
#define PICT_a1   PICT_FORMAT(1,PICT_TYPE_A,1,0,0,0)
#define PICT_g1   PICT_FORMAT(1,PICT_TYPE_GRAY,0,0,0,0)
#define PictureCmapPolicyInvalid   -1
#define PictureCmapPolicyDefault   0
#define PictureCmapPolicyMono   1
#define PictureCmapPolicyGray   2
#define PictureCmapPolicyColor   3
#define PictureCmapPolicyAll   4
#define XFIXED_BITS   16
#define xFixedToInt(f)   (int) ((f) >> XFIXED_BITS)
#define IntToxFixed(i)   ((xFixed) (i) << XFIXED_BITS)
#define xFixedE   ((xFixed) 1)
#define xFixed1   (IntToxFixed(1))
#define xFixed1MinusE   (xFixed1 - xFixedE)
#define xFixedFrac(f)   ((f) & xFixed1MinusE)
#define xFixedFloor(f)   ((f) & ~xFixed1MinusE)
#define xFixedCeil(f)   xFixedFloor((f) + xFixed1MinusE)
#define xFixedFraction(f)   ((f) & xFixed1MinusE)
#define xFixedMod2(f)   ((f) & (xFixed1 | xFixed1MinusE))
#define xTrapezoidValid(t)
#define CvtR8G8B8toY15(s)
#define cvt8888to0565(s)
#define cvt0565to0888(s)
#define Fetch24(a)
#define Store24(a, v)

Typedefs

typedef struct _FbPoint FbPoint
typedef unsigned int Mask
typedef uint8_t CARD8
typedef uint16_t CARD16
typedef uint32_t CARD32
typedef int16_t INT16
typedef int Bool
typedef pixman_bits_t FbBits
typedef pixman_image_t * PicturePtr
typedef pixman_box16_t BoxRec
typedef pixman_box16_tBoxPtr
typedef pixman_point_fixed_t xPointFixed
typedef pixman_line_fixed_t xLineFixed
typedef pixman_trapezoid_t xTrapezoid
typedef pixman_triangle_t xTriangle
typedef uint32_t FbStip
typedef int FbStride
typedef struct _FbPixels FbPixels
typedef uint32_t Pixel
typedef struct _PictFormat * PictFormatPtr
typedef long long int xFixed_32_32
typedef xFixed_32_32 xFixed_48_16
typedef uint32_t xFixed_1_31
typedef uint32_t xFixed_1_16
typedef int32_t xFixed_16_16
typedef xFixed_16_16 xFixed

Functions

pixman_private void fbBlt (pixman_bits_t *src, FbStride srcStride, int srcX, FbBits *dst, FbStride dstStride, int dstX, int width, int height, int alu, FbBits pm, int bpp, Bool reverse, Bool upsidedown)
pixman_private void fbBlt24 (pixman_bits_t *srcLine, FbStride srcStride, int srcX, FbBits *dstLine, FbStride dstStride, int dstX, int width, int height, int alu, FbBits pm, Bool reverse, Bool upsidedown)
pixman_private void fbBltStip (FbStip *src, FbStride srcStride, int srcX, FbStip *dst, FbStride dstStride, int dstX, int width, int height, int alu, FbBits pm, int bpp)
pixman_private void fbBltOne (FbStip *src, FbStride srcStride, int srcX, FbBits *dst, FbStride dstStride, int dstX, int dstBpp, int width, int height, FbBits fgand, FbBits fbxor, FbBits bgand, FbBits bgxor)
pixman_private void fbBltOne24 (FbStip *src, FbStride srcStride, int srcX, FbBits *dst, FbStride dstStride, int dstX, int dstBpp, int width, int height, FbBits fgand, FbBits fgxor, FbBits bgand, FbBits bgxor)
pixman_private void fbTransparentSpan (pixman_bits_t *dst, pixman_bits_t stip, pixman_bits_t fgxor, int n)
pixman_private void fbEvenStipple (pixman_bits_t *dst, FbStride dstStride, int dstX, int dstBpp, int width, int height, FbStip *stip, FbStride stipStride, int stipHeight, FbBits fgand, FbBits fgxor, FbBits bgand, FbBits bgxor, int xRot, int yRot)
pixman_private void fbOddStipple (pixman_bits_t *dst, FbStride dstStride, int dstX, int dstBpp, int width, int height, FbStip *stip, FbStride stipStride, int stipWidth, int stipHeight, FbBits fgand, FbBits fgxor, FbBits bgand, FbBits bgxor, int xRot, int yRot)
pixman_private void fbStipple (pixman_bits_t *dst, FbStride dstStride, int dstX, int dstBpp, int width, int height, FbStip *stip, FbStride stipStride, int stipWidth, int stipHeight, Bool even, FbBits fgand, FbBits fgxor, FbBits bgand, FbBits bgxor, int xRot, int yRot)
pixman_private pixman_bits_t fbReplicatePixel (Pixel p, int bpp)
pixman_private void fbRasterizeTrapezoid (pixman_image_t *pMask, const pixman_trapezoid_t *pTrap, int x_off, int y_off)
int _FbOnes (unsigned long mask)
pixman_private void pixman_format_init (pixman_format_t *format, int format_code)
pixman_private pixman_image_t * pixman_image_createForPixels (FbPixels *pixels, pixman_format_t *format)
pixman_private FbPixelsFbPixelsCreate (int width, int height, int depth)
pixman_private FbPixelsFbPixelsCreateForData (pixman_bits_t *data, int width, int height, int depth, int bpp, int stride)
pixman_private void FbPixelsDestroy (FbPixels *pixels)
pixman_private int pixman_transform_point (pixman_transform_t *transform, pixman_vector_t *vector)
 slim_hidden_proto (pixman_image_create) slim_hidden_proto(pixman_color_to_pixel) slim_hidden_proto(pixman_format_init) slim_hidden_proto(pixman_image_destroy) slim_hidden_proto(pixman_fill_rectangles) slim_hidden_proto(pixman_image_set_component_alpha) slim_hidden_proto(pixman_image_set_repeat) slim_hidden_proto(pixman_composite) typedef struct _DirectFormat *DirectFormatPtr
int PictureParseCmapPolicy (const char *name)

Variables

int PictureCmapPolicy pixman_private

Class Documentation

struct _FbPoint

Definition at line 66 of file icint.h.

Class Members
int16_t x
int16_t y
struct pixman_format

Definition at line 764 of file icint.h.

Collaboration diagram for pixman_format:
Class Members
int alpha
int alphaMask
int blue
int blueMask
int depth
int format_code
int green
int greenMask
int red
int redMask
struct _FbPixels

Definition at line 773 of file icint.h.

Collaboration diagram for _FbPixels:
Class Members
unsigned int bpp
pixman_bits_t * data
unsigned int depth
unsigned int height
unsigned int refcnt
unsigned int stride
unsigned int width
int x
int y

Define Documentation

Definition at line 42 of file icint.h.

Definition at line 119 of file icint.h.

Definition at line 106 of file icint.h.

Definition at line 75 of file icint.h.

#define CPClipMask   (1 << 6)

Definition at line 78 of file icint.h.

#define CPLastBit   11

Definition at line 79 of file icint.h.

#define CT_NONE   0

Definition at line 802 of file icint.h.

#define CT_PIXMAP   1

Definition at line 803 of file icint.h.

#define CT_REGION   2

Definition at line 804 of file icint.h.

Definition at line 805 of file icint.h.

#define CT_YSORTED   10

Definition at line 806 of file icint.h.

#define CT_YXBANDED   18

Definition at line 808 of file icint.h.

#define CT_YXSORTED   14

Definition at line 807 of file icint.h.

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

Definition at line 1083 of file icint.h.

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

Definition at line 1080 of file icint.h.

Value:
(((((s) >> 16) & 0xff) * 153 + \
                              (((s) >>  8) & 0xff) * 301 + \
                              (((s)      ) & 0xff) * 58) >> 2)

Definition at line 1071 of file icint.h.

#define FALSE   0

Definition at line 91 of file icint.h.

Definition at line 155 of file icint.h.

Definition at line 145 of file icint.h.

Definition at line 141 of file icint.h.

#define FB_HALFUNIT   (1 << (FB_SHIFT-1))

Definition at line 139 of file icint.h.

#define FB_MASK   (FB_UNIT - 1)

Definition at line 140 of file icint.h.

Definition at line 162 of file icint.h.

Definition at line 161 of file icint.h.

#define FB_STIP_ODDPTR (   p)    ((((long) (p)) & (FB_MASK >> 3)) != 0)

Definition at line 165 of file icint.h.

#define FB_STIP_ODDSTRIDE (   s)    (((s) & (FB_MASK >> FB_STIP_SHIFT)) != 0)

Definition at line 164 of file icint.h.

Definition at line 159 of file icint.h.

Definition at line 160 of file icint.h.

#define FB_UNIT   (1 << FB_SHIFT)

Definition at line 138 of file icint.h.

#define FbBitsMask (   x,
 
)
Value:
(FbScrRight(FB_ALLONES,(x) & FB_MASK) & \
                      FbScrLeft(FB_ALLONES,(FB_UNIT - ((x) + (w))) & FB_MASK))

Definition at line 223 of file icint.h.

Definition at line 168 of file icint.h.

Definition at line 255 of file icint.h.

#define FbCheck24Pix (   p)    ((p) == FbNext24Pix(p))

Definition at line 557 of file icint.h.

#define FbDoLeftMaskByteRRop (   dst,
  lb,
  l,
  and,
  xor 
)
Value:
{ \
    switch (lb) { \
    FbDoLeftMaskByteRRop6Cases(dst,xor) \
    case (sizeof (FbBits) - 3) | (1 << (FB_SHIFT - 3)): \
       FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
       break; \
    case (sizeof (FbBits) - 3) | (2 << (FB_SHIFT - 3)): \
       FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
       FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
       break; \
    case (sizeof (FbBits) - 2) | (1 << (FB_SHIFT - 3)): \
       FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
       break; \
    case sizeof (FbBits) - 3: \
       FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
    case sizeof (FbBits) - 2: \
       FbStorePart(dst,sizeof (FbBits) - 2,CARD16,xor); \
       break; \
    case sizeof (FbBits) - 1: \
       FbStorePart(dst,sizeof (FbBits) - 1,CARD8,xor); \
       break; \
    default: \
       *dst = FbDoMaskRRop(*dst, and, xor, l); \
       break; \
    } \
}

Definition at line 420 of file icint.h.

#define FbDoLeftMaskByteRRop6Cases (   dst,
  xor 
)

Definition at line 416 of file icint.h.

#define FbDoRightMaskByteRRop (   dst,
  rb,
  r,
  and,
  xor 
)
Value:
{ \
    switch (rb) { \
    case 1: \
       FbStorePart(dst,0,CARD8,xor); \
       break; \
    case 2: \
       FbStorePart(dst,0,CARD16,xor); \
       break; \
    case 3: \
       FbStorePart(dst,0,CARD16,xor); \
       FbStorePart(dst,2,CARD8,xor); \
       break; \
    FbDoRightMaskByteRRop6Cases(dst,xor) \
    default: \
       *dst = FbDoMaskRRop (*dst, and, xor, r); \
    } \
}

Definition at line 448 of file icint.h.

#define FbDoRightMaskByteRRop6Cases (   dst,
  xor 
)

Definition at line 417 of file icint.h.

#define FbEvenStip (   w,
  bpp 
)    ((w) * (bpp) <= FB_UNIT && FbPowerOfTwo(w) && FbPowerOfTwo(bpp))

Definition at line 590 of file icint.h.

#define FbEvenTile (   w)    ((w) <= FB_UNIT && FbPowerOfTwo(w))

Definition at line 585 of file icint.h.

#define FbFirst24Rot (   x)    ((x) % 24)

Definition at line 549 of file icint.h.

#define FbFullMask (   n)    ((n) == FB_UNIT ? FB_ALLONES : ((((FbBits) 1) << n) - 1))

Definition at line 170 of file icint.h.

#define FbGetPixels (   icpixels,
  pointer,
  _stride_,
  _bpp_,
  xoff,
  yoff 
)
Value:
{ \
    (pointer) = icpixels->data; \
    (_stride_) = icpixels->stride / sizeof(pixman_bits_t); \
    (_bpp_) = icpixels->bpp; \
    (xoff) = icpixels->x; /* XXX: fb.h had this ifdef'd to constant 0. Why? */ \
    (yoff) = icpixels->y; /* XXX: fb.h had this ifdef'd to constant 0. Why? */ \
}

Definition at line 559 of file icint.h.

#define FbGetStipPixels (   icpixels,
  pointer,
  _stride_,
  _bpp_,
  xoff,
  yoff 
)
Value:
{ \
    (pointer) = (FbStip *) icpixels->data; \
    (_stride_) = icpixels->stride / sizeof(FbStip); \
    (_bpp_) = icpixels->bpp; \
    (xoff) = icpixels->x; \
    (yoff) = icpixels->y; \
}

Definition at line 567 of file icint.h.

#define FbLaneCase (   n,
  a 
)    FbLaneCase4(n,(CARD8 *) (a),0)

Definition at line 516 of file icint.h.

#define FbLaneCase1 (   n,
  a,
  o 
)
Value:
((n) == 0x01 ? \
                          (*(CARD8 *) ((a)+FbPatternOffset(o,CARD8)) = \
                           fgxor) : 0)

Definition at line 494 of file icint.h.

#define FbLaneCase2 (   n,
  a,
  o 
)
Value:
((n) == 0x03 ? \
                          (*(CARD16 *) ((a)+FbPatternOffset(o,CARD16)) = \
                           fgxor) : \
                          ((void)FbLaneCase1((n)&1,a,o), \
                                FbLaneCase1((n)>>1,a,(o)+1)))

Definition at line 497 of file icint.h.

#define FbLaneCase4 (   n,
  a,
  o 
)
Value:
((n) == 0x0f ? \
                          (*(CARD32 *) ((a)+FbPatternOffset(o,CARD32)) = \
                           fgxor) : \
                          ((void)FbLaneCase2((n)&3,a,o), \
                                FbLaneCase2((n)>>2,a,(o)+2)))

Definition at line 502 of file icint.h.

#define FbLaneCase8 (   n,
  a,
  o 
)
Value:
((n) == 0x0ff ? (*(FbBits *) ((a)+(o)) = fgxor) : \
                          ((void)FbLaneCase4((n)&15,a,o), \
                                FbLaneCase4((n)>>4,a,(o)+4)))

Definition at line 507 of file icint.h.

Value:
( ((x) & FB_MASK) ? \
                          FbScrRight(FB_ALLONES,(x) & FB_MASK) : 0)

Definition at line 213 of file icint.h.

#define FbLeftStipBits (   x,
  n 
)    ((x) & ((((FbStip) 1) << (n)) - 1))

Definition at line 192 of file icint.h.

Value:
( ((x) & FB_STIP_MASK) ? \
                          FbStipRight(FB_STIP_ALLONES,(x) & FB_STIP_MASK) : 0)

Definition at line 218 of file icint.h.

#define FbMaskBits (   x,
  w,
  l,
  n,
  r 
)
Value:
{ \
    n = (w); \
    r = FbRightMask((x)+n); \
    l = FbLeftMask(x); \
    if (l) { \
       n -= FB_UNIT - ((x) & FB_MASK); \
       if (n < 0) { \
           n = 0; \
           l &= r; \
           r = 0; \
       } \
    } \
    n >>= FB_SHIFT; \
}

Definition at line 230 of file icint.h.

#define FbMaskBitsBytes (   x,
  w,
  copy,
  l,
  lb,
  n,
  r,
  rb 
)

Definition at line 267 of file icint.h.

#define FbMaskStip (   x,
  w,
  l,
  n,
  r 
)
Value:
{ \
    n = (w); \
    r = FbRightStipMask((x)+n); \
    l = FbLeftStipMask(x); \
    if (l) { \
       n -= FB_STIP_UNIT - ((x) & FB_STIP_MASK); \
       if (n < 0) { \
           n = 0; \
           l &= r; \
           r = 0; \
       } \
    } \
    n >>= FB_STIP_SHIFT; \
}

Definition at line 467 of file icint.h.

#define FbNext24Pix (   p)    (FbRot24(p,(24-FB_UNIT%24)))

Definition at line 524 of file icint.h.

#define FbNext24Rot (   r)    ((r) == 0 ? 16 : (r) - 8)

Definition at line 543 of file icint.h.

#define FbNext24RotStip (   r)    ((r) == 0 ? 16 : (r) - 8)

Definition at line 553 of file icint.h.

#define FbNext24Stip (   p)    (FbRot24(p,(24-FB_STIP_UNIT%24)))

Definition at line 526 of file icint.h.

#define FbPatternOffset (   o,
  t 
)    ((o) ^ (FbPatternOffsetBits & ~(sizeof (t) - 1)))

Definition at line 257 of file icint.h.

Definition at line 194 of file icint.h.

#define FbPowerOfTwo (   w)    (((w) & ((w) - 1)) == 0)

Definition at line 581 of file icint.h.

#define FbPrev24Pix (   p)    (FbRot24(p,FB_UNIT%24))

Definition at line 525 of file icint.h.

#define FbPrev24Rot (   r)    ((r) == 16 ? 0 : (r) + 8)

Definition at line 544 of file icint.h.

#define FbPrev24RotStip (   r)    ((r) == 16 ? 0 : (r) + 8)

Definition at line 554 of file icint.h.

#define FbPrev24Stip (   p)    (FbRot24(p,FB_STIP_UNIT%24))

Definition at line 527 of file icint.h.

#define FbPtrOffset (   p,
  o,
  t 
)    ((t *) ((CARD8 *) (p) + (o)))

Definition at line 259 of file icint.h.

Value:
( ((FB_UNIT - (x)) & FB_MASK) ? \
                          FbScrLeft(FB_ALLONES,(FB_UNIT - (x)) & FB_MASK) : 0)

Definition at line 215 of file icint.h.

Value:

Definition at line 220 of file icint.h.

#define FbRot24 (   p,
  b 
)    (FbScrRight(p,b) | FbScrLeft(p,24-(b)))

Definition at line 520 of file icint.h.

#define FbRot24Stip (   p,
  b 
)    (FbStipRight(p,b) | FbStipLeft(p,24-(b)))

Definition at line 521 of file icint.h.

#define FbRotLeft (   x,
  n 
)    FbScrLeft(x,n) | (n ? FbScrRight(x,FB_UNIT-n) : 0)

Definition at line 207 of file icint.h.

#define FbRotRight (   x,
  n 
)    FbScrRight(x,n) | (n ? FbScrLeft(x,FB_UNIT-n) : 0)

Definition at line 208 of file icint.h.

#define FbRotStipLeft (   x,
  n 
)    FbStipLeft(x,n) | (n ? FbStipRight(x,FB_STIP_UNIT-n) : 0)

Definition at line 210 of file icint.h.

#define FbRotStipRight (   x,
  n 
)    FbStipRight(x,n) | (n ? FbStipLeft(x,FB_STIP_UNIT-n) : 0)

Definition at line 211 of file icint.h.

#define FbScrLeft (   x,
  n 
)    ((x) >> (n))

Definition at line 189 of file icint.h.

#define FbScrRight (   x,
  n 
)    ((x) << (n))

Definition at line 190 of file icint.h.

#define FbSelectPart (   x,
  o,
  t 
)    FbSelectPatternPart(x,o,t)

Definition at line 264 of file icint.h.

#define FbSelectPatternPart (   xor,
  o,
  t 
)    ((xor) >> (FbPatternOffset (o,t) << 3))

Definition at line 260 of file icint.h.

#define FbStipLeft (   x,
  n 
)    FbScrLeft(x,n)

Definition at line 204 of file icint.h.

#define FbStipMask (   x,
 
)
Value:

Definition at line 226 of file icint.h.

#define FbStipMoveLsb (   x,
  s,
  n 
)    (FbStipRight (x,(s)-(n)))

Definition at line 193 of file icint.h.

#define FbStipRight (   x,
  n 
)    FbScrRight(x,n)

Definition at line 205 of file icint.h.

Definition at line 167 of file icint.h.

#define FbStorePart (   dst,
  off,
  t,
  xor 
)
Value:
(*FbPtrOffset(dst,off,t) = \
                                    FbSelectPart(xor,off,t))

Definition at line 261 of file icint.h.

Definition at line 184 of file icint.h.

Definition at line 185 of file icint.h.

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

Definition at line 1097 of file icint.h.

#define GXcopy   0x3

Definition at line 73 of file icint.h.

#define GXor   0x7

Definition at line 74 of file icint.h.

Definition at line 825 of file icint.h.

Definition at line 118 of file icint.h.

Definition at line 48 of file icint.h.

#define IntToxFixed (   i)    ((xFixed) (i) << XFIXED_BITS)

Definition at line 1043 of file icint.h.

Definition at line 107 of file icint.h.

Definition at line 108 of file icint.h.

#define LSBFirst   0

Definition at line 111 of file icint.h.

#define MAX (   a,
  b 
)    ((a) > (b) ? (a) : (b))

Definition at line 52 of file icint.h.

#define MAXSHORT   SHRT_MAX

Definition at line 123 of file icint.h.

#define MIN (   a,
  b 
)    ((a) < (b) ? (a) : (b))

Definition at line 51 of file icint.h.

#define MINSHORT   SHRT_MIN

Definition at line 124 of file icint.h.

#define MOD (   a,
  b 
)    ((b) == 1 ? 0 : (a) >= 0 ? (a) % (b) : (b) - (-(a) - 1) % (b) - 1)

Definition at line 64 of file icint.h.

#define MSBFirst   1

Definition at line 112 of file icint.h.

Definition at line 960 of file icint.h.

Definition at line 954 of file icint.h.

Definition at line 932 of file icint.h.

Definition at line 953 of file icint.h.

Definition at line 930 of file icint.h.

Definition at line 944 of file icint.h.

Definition at line 943 of file icint.h.

Definition at line 950 of file icint.h.

Definition at line 936 of file icint.h.

Definition at line 934 of file icint.h.

Definition at line 940 of file icint.h.

Definition at line 919 of file icint.h.

Definition at line 917 of file icint.h.

Definition at line 952 of file icint.h.

Definition at line 942 of file icint.h.

Definition at line 928 of file icint.h.

Definition at line 924 of file icint.h.

Definition at line 956 of file icint.h.

Definition at line 946 of file icint.h.

#define PICT_FORMAT (   bpp,
  type,
  a,
  r,
  g,
  b 
)
Value:
(((bpp) << 24) |  \
                                    ((type) << 16) | \
                                    ((a) << 12) | \
                                    ((r) << 8) | \
                                    ((g) << 4) | \
                                    ((b)))

Definition at line 884 of file icint.h.

#define PICT_FORMAT_A (   f)    (((f) >> 12) & 0x0f)

Definition at line 900 of file icint.h.

#define PICT_FORMAT_B (   f)    (((f) ) & 0x0f)

Definition at line 903 of file icint.h.

#define PICT_FORMAT_BPP (   f)    (((f) >> 24) )

Definition at line 898 of file icint.h.

Definition at line 914 of file icint.h.

#define PICT_FORMAT_G (   f)    (((f) >> 4) & 0x0f)

Definition at line 902 of file icint.h.

#define PICT_FORMAT_R (   f)    (((f) >> 8) & 0x0f)

Definition at line 901 of file icint.h.

#define PICT_FORMAT_RGB (   f)    (((f) ) & 0xfff)

Definition at line 904 of file icint.h.

#define PICT_FORMAT_TYPE (   f)    (((f) >> 16) & 0xff)

Definition at line 899 of file icint.h.

#define PICT_FORMAT_VIS (   f)    (((f) ) & 0xffff)

Definition at line 905 of file icint.h.

Definition at line 962 of file icint.h.

Definition at line 957 of file icint.h.

Definition at line 947 of file icint.h.

Definition at line 951 of file icint.h.

Definition at line 941 of file icint.h.

Definition at line 927 of file icint.h.

Definition at line 923 of file icint.h.

Definition at line 908 of file icint.h.

Definition at line 910 of file icint.h.

Definition at line 909 of file icint.h.

Definition at line 911 of file icint.h.

Definition at line 912 of file icint.h.

Definition at line 907 of file icint.h.

#define PICT_VISFORMAT (   bpp,
  type,
  vi 
)
Value:
(((bpp) << 24) |  \
                                    ((type) << 16) | \
                                    ((vi)))

Definition at line 894 of file icint.h.

Definition at line 933 of file icint.h.

Definition at line 931 of file icint.h.

Definition at line 937 of file icint.h.

Definition at line 935 of file icint.h.

Definition at line 920 of file icint.h.

Definition at line 918 of file icint.h.

Definition at line 1003 of file icint.h.

Definition at line 1002 of file icint.h.

Definition at line 999 of file icint.h.

Definition at line 1001 of file icint.h.

Definition at line 998 of file icint.h.

Definition at line 1000 of file icint.h.

Definition at line 76 of file icint.h.

Definition at line 77 of file icint.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 1100 of file icint.h.

#define TRUE   1

Definition at line 92 of file icint.h.

Definition at line 1045 of file icint.h.

Definition at line 1046 of file icint.h.

#define XFIXED_BITS   16

Definition at line 1040 of file icint.h.

Definition at line 1049 of file icint.h.

#define xFixedE   ((xFixed) 1)

Definition at line 1044 of file icint.h.

#define xFixedFloor (   f)    ((f) & ~xFixed1MinusE)

Definition at line 1048 of file icint.h.

#define xFixedFrac (   f)    ((f) & xFixed1MinusE)

Definition at line 1047 of file icint.h.

#define xFixedFraction (   f)    ((f) & xFixed1MinusE)

Definition at line 1051 of file icint.h.

#define xFixedMod2 (   f)    ((f) & (xFixed1 | xFixed1MinusE))

Definition at line 1052 of file icint.h.

#define xFixedToInt (   f)    (int) ((f) >> XFIXED_BITS)

Definition at line 1042 of file icint.h.

Value:
((t)->left.p1.y != (t)->left.p2.y && \
                          (t)->right.p1.y != (t)->right.p2.y && \
                          (int) ((t)->bottom - (t)->top) > 0)

Definition at line 1055 of file icint.h.


Typedef Documentation

typedef int Bool

Definition at line 90 of file icint.h.

Definition at line 97 of file icint.h.

Definition at line 96 of file icint.h.

typedef uint16_t CARD16

Definition at line 86 of file icint.h.

typedef uint32_t CARD32

Definition at line 87 of file icint.h.

typedef uint8_t CARD8

Definition at line 85 of file icint.h.

Definition at line 94 of file icint.h.

typedef struct _FbPixels FbPixels
typedef struct _FbPoint FbPoint
typedef uint32_t FbStip

Definition at line 173 of file icint.h.

typedef int FbStride

Definition at line 174 of file icint.h.

typedef int16_t INT16

Definition at line 88 of file icint.h.

typedef unsigned int Mask

Definition at line 70 of file icint.h.

typedef struct _PictFormat* PictFormatPtr

Definition at line 877 of file icint.h.

typedef pixman_image_t* PicturePtr

Definition at line 95 of file icint.h.

typedef uint32_t Pixel

Definition at line 786 of file icint.h.

Definition at line 1039 of file icint.h.

Definition at line 1033 of file icint.h.

Definition at line 1032 of file icint.h.

Definition at line 1031 of file icint.h.

Definition at line 1026 of file icint.h.

Definition at line 1030 of file icint.h.

Definition at line 100 of file icint.h.

Definition at line 99 of file icint.h.

Definition at line 101 of file icint.h.

Definition at line 102 of file icint.h.


Function Documentation

int _FbOnes ( unsigned long  mask)

Definition at line 29 of file iccolor.c.

{
    register unsigned long y;

    y = (mask >> 1) &033333333333;
    y = mask - y - ((y >>1) & 033333333333);
    return (((y + (y >> 3)) & 030707070707) % 077);
}

Here is the caller graph for this function:

pixman_private void fbBlt ( pixman_bits_t src,
FbStride  srcStride,
int  srcX,
FbBits dst,
FbStride  dstStride,
int  dstX,
int  width,
int  height,
int  alu,
FbBits  pm,
int  bpp,
Bool  reverse,
Bool  upsidedown 
)

Definition at line 40 of file icblt.c.

{
    FbBits  *src, *dst;
    int           leftShift, rightShift;
    FbBits  startmask, endmask;
    FbBits  bits, bits1;
    int           n, nmiddle;
    Bool    destInvarient;
    int           startbyte, endbyte;
    FbDeclareMergeRop ();
 
    /* are we just copying multiples of 8 bits?  if so, run, forrest, run!
       the memcpy()'s should be pluggable ala mplayer|xine - perhaps we can get
       one of the above to give up their code for us.
     */
    if((pm==FB_ALLONES) && (alu==GXcopy) && !reverse && (srcX&7)==0 && (dstX&7)==0 && (width&7)==0)
    {
              CARD8 *isrc=(CARD8 *)srcLine;
              CARD8 *idst=(CARD8 *)dstLine;
              int sstride=srcStride*sizeof(FbBits);
              int dstride=dstStride*sizeof(FbBits);
              int j;
              width>>=3;
              isrc+=(srcX>>3);
              idst+=(dstX>>3);
              if(!upsidedown)
                     for(j=0;j<height;j++)
                            memcpy(idst+j*dstride, isrc+j*sstride, width);
              else
                     for(j=(height-1);j>=0;j--)
                            memcpy(idst+j*dstride, isrc+j*sstride, width);
       
              return;
    }
    
#ifdef FB_24BIT
    if (bpp == 24 && !FbCheck24Pix (pm))
    {
       fbBlt24 (srcLine, srcStride, srcX, dstLine, dstStride, dstX,
               width, height, alu, pm, reverse, upsidedown);
       return;
    }
#endif
    FbInitializeMergeRop(alu, pm);
    destInvarient = FbDestInvarientMergeRop();
    if (upsidedown)
    {
       srcLine += (height - 1) * (srcStride);
       dstLine += (height - 1) * (dstStride);
       srcStride = -srcStride;
       dstStride = -dstStride;
    }
    FbMaskBitsBytes (dstX, width, destInvarient, startmask, startbyte,
                   nmiddle, endmask, endbyte);
    if (reverse)
    {
       srcLine += ((srcX + width - 1) >> FB_SHIFT) + 1;
       dstLine += ((dstX + width - 1) >> FB_SHIFT) + 1;
       srcX = (srcX + width - 1) & FB_MASK;
       dstX = (dstX + width - 1) & FB_MASK;
    }
    else
    {
       srcLine += srcX >> FB_SHIFT;
       dstLine += dstX >> FB_SHIFT;
       srcX &= FB_MASK;
       dstX &= FB_MASK;
    }
    if (srcX == dstX)
    {
       while (height--)
       {
           src = srcLine;
           srcLine += srcStride;
           dst = dstLine;
           dstLine += dstStride;
           if (reverse)
           {
              if (endmask)
              {
                  bits = *--src;
                  --dst;
                  FbDoRightMaskByteMergeRop(dst, bits, endbyte, endmask);
              }
              n = nmiddle;
              if (destInvarient)
              {
                  while (n--)
                     *--dst = FbDoDestInvarientMergeRop(*--src);
              }
              else
              {
                  while (n--)
                  {
                     bits = *--src;
                     --dst;
                     *dst = FbDoMergeRop (bits, *dst);
                  }
              }
              if (startmask)
              {
                  bits = *--src;
                  --dst;
                  FbDoLeftMaskByteMergeRop(dst, bits, startbyte, startmask);
              }
           }
           else
           {
              if (startmask)
              {
                  bits = *src++;
                  FbDoLeftMaskByteMergeRop(dst, bits, startbyte, startmask);
                  dst++;
              }
              n = nmiddle;
              if (destInvarient)
              {
#if 0
                  /*
                   * This provides some speedup on screen->screen blts
                   * over the PCI bus, usually about 10%.  But fb
                   * isn't usually used for this operation...
                   */
                  if (_ca2 + 1 == 0 && _cx2 == 0)
                  {
                     FbBits t1, t2, t3, t4;
                     while (n >= 4)
                     {
                         t1 = *src++;
                         t2 = *src++;
                         t3 = *src++;
                         t4 = *src++;
                         *dst++ = t1;
                         *dst++ = t2;
                         *dst++ = t3;
                         *dst++ = t4;
                         n -= 4;
                     }
                  }
#endif
                  while (n--)
                     *dst++ = FbDoDestInvarientMergeRop(*src++);
              }
              else
              {
                  while (n--)
                  {
                     bits = *src++;
                     *dst = FbDoMergeRop (bits, *dst);
                     dst++;
                  }
              }
              if (endmask)
              {
                  bits = *src;
                  FbDoRightMaskByteMergeRop(dst, bits, endbyte, endmask);
              }
           }
       }
    }
    else
    {
       if (srcX > dstX)
       {
           leftShift = srcX - dstX;
           rightShift = FB_UNIT - leftShift;
       }
       else
       {
           rightShift = dstX - srcX;
           leftShift = FB_UNIT - rightShift;
       }
       while (height--)
       {
           src = srcLine;
           srcLine += srcStride;
           dst = dstLine;
           dstLine += dstStride;
           
           bits1 = 0;
           if (reverse)
           {
              if (srcX < dstX)
                  bits1 = *--src;
              if (endmask)
              {
                  bits = FbScrRight(bits1, rightShift); 
                  if (FbScrRight(endmask, leftShift))
                  {
                     bits1 = *--src;
                     bits |= FbScrLeft(bits1, leftShift);
                  }
                  --dst;
                  FbDoRightMaskByteMergeRop(dst, bits, endbyte, endmask);
              }
              n = nmiddle;
              if (destInvarient)
              {
                  while (n--)
                  {
                     bits = FbScrRight(bits1, rightShift); 
                     bits1 = *--src;
                     bits |= FbScrLeft(bits1, leftShift);
                     --dst;
                     *dst = FbDoDestInvarientMergeRop(bits);
                  }
              }
              else
              {
                  while (n--)
                  {
                     bits = FbScrRight(bits1, rightShift); 
                     bits1 = *--src;
                     bits |= FbScrLeft(bits1, leftShift);
                     --dst;
                     *dst = FbDoMergeRop(bits, *dst);
                  }
              }
              if (startmask)
              {
                  bits = FbScrRight(bits1, rightShift); 
                  if (FbScrRight(startmask, leftShift))
                  {
                     bits1 = *--src;
                     bits |= FbScrLeft(bits1, leftShift);
                  }
                  --dst;
                  FbDoLeftMaskByteMergeRop (dst, bits, startbyte, startmask);
              }
           }
           else
           {
              if (srcX > dstX)
                  bits1 = *src++;
              if (startmask)
              {
                  bits = FbScrLeft(bits1, leftShift); 
                  bits1 = *src++;
                  bits |= FbScrRight(bits1, rightShift);
                  FbDoLeftMaskByteMergeRop (dst, bits, startbyte, startmask);
                  dst++;
              }
              n = nmiddle;
              if (destInvarient)
              {
                  while (n--)
                  {
                     bits = FbScrLeft(bits1, leftShift); 
                     bits1 = *src++;
                     bits |= FbScrRight(bits1, rightShift);
                     *dst = FbDoDestInvarientMergeRop(bits);
                     dst++;
                  }
              }
              else
              {
                  while (n--)
                  {
                     bits = FbScrLeft(bits1, leftShift); 
                     bits1 = *src++;
                     bits |= FbScrRight(bits1, rightShift);
                     *dst = FbDoMergeRop(bits, *dst);
                     dst++;
                  }
              }
              if (endmask)
              {
                  bits = FbScrLeft(bits1, leftShift); 
                  if (FbScrLeft(endmask, rightShift))
                  {
                     bits1 = *src;
                     bits |= FbScrRight(bits1, rightShift);
                  }
                  FbDoRightMaskByteMergeRop (dst, bits, endbyte, endmask);
              }
           }
       }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

pixman_private void fbBlt24 ( pixman_bits_t srcLine,
FbStride  srcStride,
int  srcX,
FbBits dstLine,
FbStride  dstStride,
int  dstX,
int  width,
int  height,
int  alu,
FbBits  pm,
Bool  reverse,
Bool  upsidedown 
)

Definition at line 567 of file icblt.c.

{
    if (upsidedown)
    {
       srcLine += (height-1) * srcStride;
       dstLine += (height-1) * dstStride;
       srcStride = -srcStride;
       dstStride = -dstStride;
    }
    while (height--)
    {
       fbBlt24Line (srcLine, srcX, dstLine, dstX, width, alu, pm, reverse);
       srcLine += srcStride;
       dstLine += dstStride;
    }
#ifdef DEBUG_BLT24
    ErrorF ("\n");
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

pixman_private void fbBltOne ( FbStip src,
FbStride  srcStride,
int  srcX,
FbBits dst,
FbStride  dstStride,
int  dstX,
int  dstBpp,
int  width,
int  height,
FbBits  fgand,
FbBits  fbxor,
FbBits  bgand,
FbBits  bgxor 
)

Definition at line 138 of file icbltone.c.

{
    const FbBits    *fbBits;
    int                  pixelsPerDst;           /* dst pixels per FbBits */
    int                  unitsPerSrc;            /* src patterns per FbStip */
    int                  leftShift, rightShift;  /* align source with dest */
    FbBits        startmask, endmask;            /* dest scanline masks */
    FbStip        bits=0, bitsLeft, bitsRight;/* source bits */
    FbStip        left;
    FbBits        mask;
    int                  nDst;                   /* dest longwords (w.o. end) */
    int                  w;
    int                  n, nmiddle;
    int                  dstS;                   /* stipple-relative dst X coordinate */
    Bool          copy;                   /* accelerate dest-invariant */
    Bool          transparent;            /* accelerate 0 nop */
    int                  srcinc;                 /* source units consumed */
    Bool          endNeedsLoad = FALSE;   /* need load for endmask */
#ifndef FBNOPIXADDR
    const CARD8          *fbLane;
#endif
    int                  startbyte, endbyte;

#ifdef FB_24BIT
    if (dstBpp == 24)
    {
       fbBltOne24 (src, srcStride, srcX,
                  dst, dstStride, dstX, dstBpp,
                  width, height,
                  fgand, fgxor, bgand, bgxor);
       return;
    }
#endif
    
    /*
     * Number of destination units in FbBits == number of stipple pixels
     * used each time
     */
    pixelsPerDst = FB_UNIT / dstBpp;

    /*
     * Number of source stipple patterns in FbStip 
     */
    unitsPerSrc = FB_STIP_UNIT / pixelsPerDst;
    
    copy = FALSE;
    transparent = FALSE;
    if (bgand == 0 && fgand == 0)
       copy = TRUE;
    else if (bgand == FB_ALLONES && bgxor == 0)
       transparent = TRUE;

    /*
     * Adjust source and dest to nearest FbBits boundary
     */
    src += srcX >> FB_STIP_SHIFT;
    dst += dstX >> FB_SHIFT;
    srcX &= FB_STIP_MASK;
    dstX &= FB_MASK;

    FbMaskBitsBytes(dstX, width, copy, 
                  startmask, startbyte, nmiddle, endmask, endbyte);

    /*
     * Compute effective dest alignment requirement for
     * source -- must align source to dest unit boundary
     */
    dstS = dstX / dstBpp;
    /*
     * Compute shift constants for effective alignement
     */
    if (srcX >= dstS)
    {
       leftShift = srcX - dstS;
       rightShift = FB_STIP_UNIT - leftShift;
    }
    else
    {
       rightShift = dstS - srcX;
       leftShift = FB_STIP_UNIT - rightShift;
    }
    /*
     * Get pointer to stipple mask array for this depth
     */
    fbBits = NULL;   /* unused */
    if (pixelsPerDst <= 8)
       fbBits = fbStippleTable(pixelsPerDst);
#ifndef FBNOPIXADDR
    fbLane = NULL;
    if (transparent && fgand == 0 && dstBpp >= 8)
       fbLane = fbLaneTable(dstBpp);
#endif
    
    /*
     * Compute total number of destination words written, but 
     * don't count endmask 
     */
    nDst = nmiddle;
    if (startmask)
       nDst++;
    
    dstStride -= nDst;

    /*
     * Compute total number of source words consumed
     */
    
    srcinc = (nDst + unitsPerSrc - 1) / unitsPerSrc;
    
    if (srcX > dstS)
       srcinc++;
    if (endmask)
    {
       endNeedsLoad = nDst % unitsPerSrc == 0;
       if (endNeedsLoad)
           srcinc++;
    }

    srcStride -= srcinc;
    
    /*
     * Copy rectangle
     */
    while (height--)
    {
       w = nDst;         /* total units across scanline */
       n = unitsPerSrc;    /* units avail in single stipple */
       if (n > w)
           n = w;
       
       bitsLeft = 0;
       if (srcX > dstS)
           bitsLeft = *src++;
       if (n)
       {
           /*
            * Load first set of stipple bits
            */
           LoadBits;

           /*
            * Consume stipple bits for startmask
            */
           if (startmask)
           {
#if FB_UNIT > 32
              if (pixelsPerDst == 16)
                  mask = FbStipple16Bits(FbLeftStipBits(bits,16));
              else
#endif
                  mask = fbBits[FbLeftStipBits(bits,pixelsPerDst)];
#ifndef FBNOPIXADDR         
              if (fbLane)
              {
                  fbTransparentSpan (dst, mask & startmask, fgxor, 1);
              }
              else
#endif
              {
                  if (mask || !transparent)
                     FbDoLeftMaskByteStippleRRop (dst, mask,
                                               fgand, fgxor, bgand, bgxor,
                                               startbyte, startmask);
              }
              bits = FbStipLeft (bits, pixelsPerDst);
              dst++;
              n--;
              w--;
           }
           /*
            * Consume stipple bits across scanline
            */
           for (;;)
           {
              w -= n;
              if (copy)
              {
                  while (n--)
                  {
#if FB_UNIT > 32
                     if (pixelsPerDst == 16)
                         mask = FbStipple16Bits(FbLeftStipBits(bits,16));
                     else
#endif
                         mask = fbBits[FbLeftStipBits(bits,pixelsPerDst)];
                     *dst = FbOpaqueStipple (mask, fgxor, bgxor);
                     dst++;
                     bits = FbStipLeft(bits, pixelsPerDst);
                  }
              }
              else
              {
#ifndef FBNOPIXADDR
                  if (fbLane)
                  {
                     while (bits && n)
                     {
                         switch (fbLane[FbLeftStipBits(bits,pixelsPerDst)]) {
                            LaneCases((CARD8 *) dst);
                         }
                         bits = FbStipLeft(bits,pixelsPerDst);
                         dst++;
                         n--;
                     }
                     dst += n;
                  }
                  else
#endif
                  {
                     while (n--)
                     {
                         left = FbLeftStipBits(bits,pixelsPerDst);
                         if (left || !transparent)
                         {
                            mask = fbBits[left];
                            *dst = FbStippleRRop (*dst, mask,
                                                fgand, fgxor, bgand, bgxor);
                         }
                         dst++;
                         bits = FbStipLeft(bits, pixelsPerDst);
                     }
                  }
              }
              if (!w)
                  break;
              /*
               * Load another set and reset number of available units
               */
              LoadBits;
              n = unitsPerSrc;
              if (n > w)
                  n = w;
           }
       }
       /*
        * Consume stipple bits for endmask
        */
       if (endmask)
       {
           if (endNeedsLoad)
           {
              LoadBits;
           }
#if FB_UNIT > 32
           if (pixelsPerDst == 16)
              mask = FbStipple16Bits(FbLeftStipBits(bits,16));
           else
#endif
              mask = fbBits[FbLeftStipBits(bits,pixelsPerDst)];
#ifndef FBNOPIXADDR
           if (fbLane)
           {
              fbTransparentSpan (dst, mask & endmask, fgxor, 1);
           }
           else
#endif
           {
              if (mask || !transparent)
                  FbDoRightMaskByteStippleRRop (dst, mask, 
                                            fgand, fgxor, bgand, bgxor,
                                            endbyte, endmask);
           }
       }
       dst += dstStride;
       src += srcStride;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

pixman_private void fbBltOne24 ( FbStip src,
FbStride  srcStride,
int  srcX,
FbBits dst,
FbStride  dstStride,
int  dstX,
int  dstBpp,
int  width,
int  height,
FbBits  fgand,
FbBits  fgxor,
FbBits  bgand,
FbBits  bgxor 
)

Definition at line 571 of file icbltone.c.

{
    FbStip    *src;
    FbBits    leftMask, rightMask, mask;
    int              nlMiddle, nl;
    FbStip    stip, bits;
    int              remain;
    int              dstS;
    int              firstlen;
    int              rot0, rot;
    int              nDst;
    
    srcLine += srcX >> FB_STIP_SHIFT;
    dst += dstX >> FB_SHIFT;
    srcX &= FB_STIP_MASK;
    dstX &= FB_MASK;
    rot0 = FbFirst24Rot (dstX);
    
    FbMaskBits (dstX, width, leftMask, nlMiddle, rightMask);
    
    dstS = (dstX + 23) / 24;
    firstlen = FbStip24Len - dstS;
    
    nDst = nlMiddle;
    if (leftMask)
       nDst++;
    dstStride -= nDst;
    
    /* opaque copy */
    if (bgand == 0 && fgand == 0)
    {
       while (height--)
       {
           rot = rot0;
           src = srcLine;
           srcLine += srcStride;
           fbInitStipBits (srcX,firstlen, stip);
           if (leftMask)
           {
              mask = fbStipple24Bits[rot >> 3][stip];
              *dst = (*dst & ~leftMask) | (FbOpaqueStipple (mask,
                                                       FbRot24(fgxor, rot),
                                                       FbRot24(bgxor, rot))
                                        & leftMask);
              dst++;
              fbNextStipBits(rot,stip);
           }
           nl = nlMiddle;
           while (nl--)
           {
              mask = fbStipple24Bits[rot>>3][stip];
              *dst = FbOpaqueStipple (mask, 
                                   FbRot24(fgxor, rot),
                                   FbRot24(bgxor, rot));
              dst++;
              fbNextStipBits(rot,stip);
           }
           if (rightMask)
           {
              mask = fbStipple24Bits[rot >> 3][stip];
              *dst = (*dst & ~rightMask) | (FbOpaqueStipple (mask,
                                                        FbRot24(fgxor, rot),
                                                        FbRot24(bgxor, rot))
                                         & rightMask);
           }
           dst += dstStride;
           src += srcStride;
       }
    }
    /* transparent copy */
    else if (bgand == FB_ALLONES && bgxor == 0 && fgand == 0)
    {
       while (height--)
       {
           rot = rot0;
           src = srcLine;
           srcLine += srcStride;
           fbInitStipBits (srcX, firstlen, stip);
           if (leftMask)
           {
              if (stip)
              {
                  mask = fbStipple24Bits[rot >> 3][stip] & leftMask;
                  *dst = (*dst & ~mask) | (FbRot24(fgxor, rot) & mask);
              }
              dst++;
              fbNextStipBits (rot, stip);
           }
           nl = nlMiddle;
           while (nl--)
           {
              if (stip)
              {
                  mask = fbStipple24Bits[rot>>3][stip];
                  *dst = (*dst & ~mask) | (FbRot24(fgxor,rot) & mask);
              }
              dst++;
              fbNextStipBits (rot, stip);
           }
           if (rightMask)
           {
              if (stip)
              {
                  mask = fbStipple24Bits[rot >> 3][stip] & rightMask;
                  *dst = (*dst & ~mask) | (FbRot24(fgxor, rot) & mask);
              }
           }
           dst += dstStride;
       }
    }
    else
    {
       while (height--)
       {
           rot = rot0;
           src = srcLine;
           srcLine += srcStride;
           fbInitStipBits (srcX, firstlen, stip);
           if (leftMask)
           {
              mask = fbStipple24Bits[rot >> 3][stip];
              *dst = FbStippleRRopMask (*dst, mask,
                                     FbRot24(fgand, rot),
                                     FbRot24(fgxor, rot),
                                     FbRot24(bgand, rot),
                                     FbRot24(bgxor, rot),
                                     leftMask);
              dst++;
              fbNextStipBits(rot,stip);
           }
           nl = nlMiddle;
           while (nl--)
           {
              mask = fbStipple24Bits[rot >> 3][stip];
              *dst = FbStippleRRop (*dst, mask,
                                  FbRot24(fgand, rot),
                                  FbRot24(fgxor, rot),
                                  FbRot24(bgand, rot),
                                  FbRot24(bgxor, rot));
              dst++;
              fbNextStipBits(rot,stip);
           }
           if (rightMask)
           {
              mask = fbStipple24Bits[rot >> 3][stip];
              *dst = FbStippleRRopMask (*dst, mask,
                                     FbRot24(fgand, rot),
                                     FbRot24(fgxor, rot),
                                     FbRot24(bgand, rot),
                                     FbRot24(bgxor, rot),
                                     rightMask);
           }
           dst += dstStride;
       }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

pixman_private void fbBltStip ( FbStip src,
FbStride  srcStride,
int  srcX,
FbStip dst,
FbStride  dstStride,
int  dstX,
int  width,
int  height,
int  alu,
FbBits  pm,
int  bpp 
)

Definition at line 875 of file icblt.c.

{
#if FB_STIP_SHIFT != FB_SHIFT
    if (FB_STIP_ODDSTRIDE(srcStride) || FB_STIP_ODDPTR(src) ||
       FB_STIP_ODDSTRIDE(dstStride) || FB_STIP_ODDPTR(dst))
    {
       FbStride    srcStrideEven, srcStrideOdd;
       FbStride    dstStrideEven, dstStrideOdd;
       int        srcXEven, srcXOdd;
       int        dstXEven, dstXOdd;
       FbBits     *s, *d;
       int        sx, dx;
       
       src += srcX >> FB_STIP_SHIFT;
       srcX &= FB_STIP_MASK;
       dst += dstX >> FB_STIP_SHIFT;
       dstX &= FB_STIP_MASK;
       
       fbSetBltOdd (src, srcStride, srcX,
                   &s,
                   &srcStrideEven, &srcStrideOdd,
                   &srcXEven, &srcXOdd);
                   
       fbSetBltOdd (dst, dstStride, dstX,
                   &d,
                   &dstStrideEven, &dstStrideOdd,
                   &dstXEven, &dstXOdd);
                   
#ifdef FB_24BIT
       if (bpp == 24 && !FbCheck24Pix (pm))
       {
           fbBltOdd24  (s, srcStrideEven, srcStrideOdd,
                      srcXEven, srcXOdd,

                      d, dstStrideEven, dstStrideOdd,
                      dstXEven, dstXOdd,

                      width, height, alu, pm);
       }
       else
#endif
       {
           fbBltOdd (s, srcStrideEven, srcStrideOdd,
                    srcXEven, srcXOdd,
    
                    d, dstStrideEven, dstStrideOdd,
                    dstXEven, dstXOdd,
    
                    width, height, alu, pm, bpp);
       }
    }
    else
#endif
    {
       fbBlt ((FbBits *) src, FbStipStrideToBitsStride (srcStride), 
              srcX, 
              (FbBits *) dst, FbStipStrideToBitsStride (dstStride), 
              dstX, 
              width, height,
              alu, pm, bpp, FALSE, FALSE);
    }
}

Here is the call graph for this function:

pixman_private void fbEvenStipple ( pixman_bits_t dst,
FbStride  dstStride,
int  dstX,
int  dstBpp,
int  width,
int  height,
FbStip stip,
FbStride  stipStride,
int  stipHeight,
FbBits  fgand,
FbBits  fgxor,
FbBits  bgand,
FbBits  bgxor,
int  xRot,
int  yRot 
)
pixman_private void fbOddStipple ( pixman_bits_t dst,
FbStride  dstStride,
int  dstX,
int  dstBpp,
int  width,
int  height,
FbStip stip,
FbStride  stipStride,
int  stipWidth,
int  stipHeight,
FbBits  fgand,
FbBits  fgxor,
FbBits  bgand,
FbBits  bgxor,
int  xRot,
int  yRot 
)
pixman_private FbPixels* FbPixelsCreate ( int  width,
int  height,
int  depth 
)

Definition at line 51 of file icpixels.c.

{
    FbPixels         *pixels;
    pixman_bits_t           *buf;
    unsigned int     buf_size;
    unsigned int     bpp;
    unsigned int     stride;
    unsigned int     adjust;
    unsigned int     base;

    bpp = pixman_bits_per_pixel (depth);
    stride = ((width * bpp + FB_MASK) >> FB_SHIFT) * sizeof (pixman_bits_t);
    buf_size = height * stride;
    base = sizeof (FbPixels);
    adjust = 0;
    if (base & 7)
       adjust = 8 - (base & 7);
    buf_size += adjust;

    pixels = malloc(base + buf_size);
    if (!pixels)
       return NULL;

    buf = (pixman_bits_t *) ((char *)pixels + base + adjust);

    FbPixelsInit (pixels, buf, width, height, depth, bpp, stride);

    return pixels;
}

Here is the call graph for this function:

Here is the caller graph for this function:

pixman_private FbPixels* FbPixelsCreateForData ( pixman_bits_t data,
int  width,
int  height,
int  depth,
int  bpp,
int  stride 
)

Definition at line 82 of file icpixels.c.

{
    FbPixels *pixels;

    pixels = malloc (sizeof (FbPixels));
    if (pixels == NULL)
       return NULL;

    FbPixelsInit (pixels, data, width, height, depth, bpp, stride);

    return pixels;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 110 of file icpixels.c.

{
    if(--pixels->refcnt)
       return;

    free(pixels);
}

Here is the caller graph for this function:

pixman_private void fbRasterizeTrapezoid ( pixman_image_t *  pMask,
const pixman_trapezoid_t pTrap,
int  x_off,
int  y_off 
)

Definition at line 95 of file fbtrap.c.

{
    FbBits    *buf;
    int              bpp;
    int              width;
    int              stride;
    int              height;
    int              pxoff, pyoff;

    xFixed    x_off_fixed;
    xFixed    y_off_fixed;
    RenderEdge       l, r;
    xFixed    t, b;
    
    fbGetDrawable (pPicture->pDrawable, buf, stride, bpp, pxoff, pyoff);

    width = pPicture->pDrawable->width;
    height = pPicture->pDrawable->height;
    x_off += pxoff;
    y_off += pyoff;
    
    x_off_fixed = IntToxFixed(x_off);
    y_off_fixed = IntToxFixed(y_off);
    t = trap->top + y_off_fixed;
    if (t < 0)
       t = 0;
    t = RenderSampleCeilY (t, bpp);

    b = trap->bottom + y_off_fixed;
    if (xFixedToInt (b) >= height)
       b = IntToxFixed (height) - 1;
    b = RenderSampleFloorY (b, bpp);
    
    if (b >= t)
    {
       /* initialize edge walkers */
       RenderLineFixedEdgeInit (&l, bpp, t, &trap->left, x_off, y_off);
       RenderLineFixedEdgeInit (&r, bpp, t, &trap->right, x_off, y_off);
       
       fbRasterizeEdges (buf, bpp, width, stride, &l, &r, t, b);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 28 of file icutil.c.

{
    pixman_bits_t  b = p;
    
    b &= FbFullMask (bpp);
    while (bpp < FB_UNIT)
    {
       b |= b << bpp;
       bpp <<= 1;
    }
    return b;
}

Here is the caller graph for this function:

pixman_private void fbStipple ( pixman_bits_t dst,
FbStride  dstStride,
int  dstX,
int  dstBpp,
int  width,
int  height,
FbStip stip,
FbStride  stipStride,
int  stipWidth,
int  stipHeight,
Bool  even,
FbBits  fgand,
FbBits  fgxor,
FbBits  bgand,
FbBits  bgxor,
int  xRot,
int  yRot 
)

Definition at line 58 of file icstipple.c.

{
    FbStip  s;

    s  = ((FbStip) (stip      ) & 0x01);
    s |= ((FbStip) (stip >>  8) & 0x02);
    s |= ((FbStip) (stip >> 16) & 0x04);
    s |= ((FbStip) (stip >> 24) & 0x08);
#if FB_SHIFT > 5
    s |= ((FbStip) (stip >> 32) & 0x10);
    s |= ((FbStip) (stip >> 40) & 0x20);
    s |= ((FbStip) (stip >> 48) & 0x40);
    s |= ((FbStip) (stip >> 56) & 0x80);
#endif
    switch (s) {
       LaneCases(dst);
    }
}

Here is the caller graph for this function:

int PictureParseCmapPolicy ( const char *  name)
pixman_private void pixman_format_init ( pixman_format_t *  format,
int  format_code 
)

Definition at line 94 of file icformat.c.

{
    memset (format, 0, sizeof (pixman_format_t));
    
/* XXX: What do we want to lodge in here?
    format->id = FakeClientID (0);
*/
    format->format_code = format_code;

    switch (PICT_FORMAT_TYPE(format_code)) {
    case PICT_TYPE_ARGB:
       
       format->alphaMask = Mask(PICT_FORMAT_A(format_code));
       if (format->alphaMask)
           format->alpha = (PICT_FORMAT_R(format_code) +
                          PICT_FORMAT_G(format_code) +
                          PICT_FORMAT_B(format_code));
       
       format->redMask = Mask(PICT_FORMAT_R(format_code));
       format->red = (PICT_FORMAT_G(format_code) + 
                     PICT_FORMAT_B(format_code));
       
       format->greenMask = Mask(PICT_FORMAT_G(format_code));
       format->green = PICT_FORMAT_B(format_code);
       
       format->blueMask = Mask(PICT_FORMAT_B(format_code));
       format->blue = 0;
       break;
       
    case PICT_TYPE_ABGR:
       
       format->alphaMask = Mask(PICT_FORMAT_A(format_code));
       if (format->alphaMask)
           format->alpha = (PICT_FORMAT_B(format_code) +
                          PICT_FORMAT_G(format_code) +
                          PICT_FORMAT_R(format_code));
       
       format->blueMask = Mask(PICT_FORMAT_B(format_code));
       format->blue = (PICT_FORMAT_G(format_code) + 
                     PICT_FORMAT_R(format_code));
       
       format->greenMask = Mask(PICT_FORMAT_G(format_code));
       format->green = PICT_FORMAT_R(format_code);
       
       format->redMask = Mask(PICT_FORMAT_R(format_code));
       format->red = 0;
       break;
       
    case PICT_TYPE_A:
       
       format->alpha = 0;
       format->alphaMask = Mask(PICT_FORMAT_A(format_code));

       /* remaining fields already set to zero */
       break;
    }

    format->depth = _FbOnes ((format->alphaMask << format->alpha) |
                          (format->redMask << format->red) |
                          (format->blueMask << format->blue) |
                          (format->greenMask << format->green));
}

Here is the call graph for this function:

pixman_private pixman_image_t* pixman_image_createForPixels ( FbPixels pixels,
pixman_format_t *  format 
)

Definition at line 72 of file icimage.c.

{
    pixman_image_t          *image;

    image = malloc (sizeof (pixman_image_t));
    if (!image)
    {
       return NULL;
    }

    image->pixels = pixels;
    image->image_format = *format;
    image->format_code = format->format_code;
/* XXX: What's all this about?
    if (pDrawable->type == DRAWABLE_PIXMAP)
    {
       ++((PixmapPtr)pDrawable)->refcnt;
       image->pNext = 0;
    }
    else
    {
       image->pNext = GetPictureWindow(((WindowPtr) pDrawable));
       SetPictureWindow(((WindowPtr) pDrawable), image);
    }
*/

    pixman_image_init (image);

    return image;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 30 of file ictransform.c.

{
    pixman_vector_t      result;
    int                  i, j;
    xFixed_32_32    partial;
    xFixed_48_16    v;

    for (j = 0; j < 3; j++)
    {
       v = 0;
       for (i = 0; i < 3; i++)
       {
           partial = ((xFixed_48_16) transform->matrix[j][i] * 
                     (xFixed_48_16) vector->vector[i]);
           v += partial >> 16;
       }
       if (v > MAX_FIXED_48_16 || v < MIN_FIXED_48_16)
           return 0;
       result.vector[j] = (xFixed) v;
    }
    if (!result.vector[2])
       return 0;
    for (j = 0; j < 2; j++)
    {
       partial = (xFixed_48_16) result.vector[j] << 16;
       v = partial / result.vector[2];
       if (v > MAX_FIXED_48_16 || v < MIN_FIXED_48_16)
           return 0;
       vector->vector[j] = (xFixed) v;
    }
    vector->vector[2] = xFixed1;
    return 1;
}

Here is the call graph for this function:


Variable Documentation

int PictureCmapPolicy pixman_private