mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 21:38:03 +02:00
Rename exported Ic* and PixRegion* functions, types, enums to be prefixed pixman (or PIXMAN for enum values)
This commit is contained in:
parent
e39e756403
commit
94988dbe09
20 changed files with 1543 additions and 1543 deletions
190
pixman/src/ic.c
190
pixman/src/ic.c
|
|
@ -97,7 +97,7 @@ IcIn (uint32_t x, uint8_t y)
|
|||
}
|
||||
|
||||
#define IcComposeGetSolid(image, bits) { \
|
||||
IcBits *__bits__; \
|
||||
pixman_bits_t *__bits__; \
|
||||
IcStride __stride__; \
|
||||
int __bpp__; \
|
||||
int __xoff__,__yoff__; \
|
||||
|
|
@ -123,13 +123,13 @@ IcIn (uint32_t x, uint8_t y)
|
|||
}
|
||||
|
||||
#define IcComposeGetStart(image,x,y,type,stride,line,mul) {\
|
||||
IcBits *__bits__; \
|
||||
pixman_bits_t *__bits__; \
|
||||
IcStride __stride__; \
|
||||
int __bpp__; \
|
||||
int __xoff__,__yoff__; \
|
||||
\
|
||||
IcGetPixels((image)->pixels,__bits__,__stride__,__bpp__,__xoff__,__yoff__); \
|
||||
(stride) = __stride__ * sizeof (IcBits) / sizeof (type); \
|
||||
(stride) = __stride__ * sizeof (pixman_bits_t) / sizeof (type); \
|
||||
(line) = ((type *) __bits__) + (stride) * ((y) - __yoff__) + (mul) * ((x) - __xoff__); \
|
||||
}
|
||||
|
||||
|
|
@ -140,10 +140,10 @@ IcIn (uint32_t x, uint8_t y)
|
|||
*/
|
||||
|
||||
static void
|
||||
IcCompositeSolidMask_nx8x8888 (IcOperator op,
|
||||
IcImage *iSrc,
|
||||
IcImage *iMask,
|
||||
IcImage *iDst,
|
||||
pixman_compositeSolidMask_nx8x8888 (pixman_operator_t op,
|
||||
pixman_image_t *iSrc,
|
||||
pixman_image_t *iMask,
|
||||
pixman_image_t *iDst,
|
||||
int16_t xSrc,
|
||||
int16_t ySrc,
|
||||
int16_t xMask,
|
||||
|
|
@ -198,10 +198,10 @@ IcCompositeSolidMask_nx8x8888 (IcOperator op,
|
|||
}
|
||||
|
||||
static void
|
||||
IcCompositeSolidMask_nx8888x8888C (IcOperator op,
|
||||
IcImage *iSrc,
|
||||
IcImage *iMask,
|
||||
IcImage *iDst,
|
||||
pixman_compositeSolidMask_nx8888x8888C (pixman_operator_t op,
|
||||
pixman_image_t *iSrc,
|
||||
pixman_image_t *iMask,
|
||||
pixman_image_t *iDst,
|
||||
int16_t xSrc,
|
||||
int16_t ySrc,
|
||||
int16_t xMask,
|
||||
|
|
@ -271,10 +271,10 @@ IcCompositeSolidMask_nx8888x8888C (IcOperator op,
|
|||
}
|
||||
|
||||
static void
|
||||
IcCompositeSolidMask_nx8x0888 (IcOperator op,
|
||||
IcImage *iSrc,
|
||||
IcImage *iMask,
|
||||
IcImage *iDst,
|
||||
pixman_compositeSolidMask_nx8x0888 (pixman_operator_t op,
|
||||
pixman_image_t *iSrc,
|
||||
pixman_image_t *iMask,
|
||||
pixman_image_t *iDst,
|
||||
int16_t xSrc,
|
||||
int16_t ySrc,
|
||||
int16_t xMask,
|
||||
|
|
@ -333,10 +333,10 @@ IcCompositeSolidMask_nx8x0888 (IcOperator op,
|
|||
}
|
||||
|
||||
static void
|
||||
IcCompositeSolidMask_nx8x0565 (IcOperator op,
|
||||
IcImage *iSrc,
|
||||
IcImage *iMask,
|
||||
IcImage *iDst,
|
||||
pixman_compositeSolidMask_nx8x0565 (pixman_operator_t op,
|
||||
pixman_image_t *iSrc,
|
||||
pixman_image_t *iMask,
|
||||
pixman_image_t *iDst,
|
||||
int16_t xSrc,
|
||||
int16_t ySrc,
|
||||
int16_t xMask,
|
||||
|
|
@ -396,10 +396,10 @@ IcCompositeSolidMask_nx8x0565 (IcOperator op,
|
|||
}
|
||||
|
||||
static void
|
||||
IcCompositeSolidMask_nx8888x0565C (IcOperator op,
|
||||
IcImage *iSrc,
|
||||
IcImage *iMask,
|
||||
IcImage *iDst,
|
||||
pixman_compositeSolidMask_nx8888x0565C (pixman_operator_t op,
|
||||
pixman_image_t *iSrc,
|
||||
pixman_image_t *iMask,
|
||||
pixman_image_t *iDst,
|
||||
int16_t xSrc,
|
||||
int16_t ySrc,
|
||||
int16_t xMask,
|
||||
|
|
@ -469,10 +469,10 @@ IcCompositeSolidMask_nx8888x0565C (IcOperator op,
|
|||
}
|
||||
|
||||
static void
|
||||
IcCompositeSrc_8888x8888 (IcOperator op,
|
||||
IcImage *iSrc,
|
||||
IcImage *iMask,
|
||||
IcImage *iDst,
|
||||
pixman_compositeSrc_8888x8888 (pixman_operator_t op,
|
||||
pixman_image_t *iSrc,
|
||||
pixman_image_t *iMask,
|
||||
pixman_image_t *iDst,
|
||||
int16_t xSrc,
|
||||
int16_t ySrc,
|
||||
int16_t xMask,
|
||||
|
|
@ -515,10 +515,10 @@ IcCompositeSrc_8888x8888 (IcOperator op,
|
|||
}
|
||||
|
||||
static void
|
||||
IcCompositeSrc_8888x0888 (IcOperator op,
|
||||
IcImage *iSrc,
|
||||
IcImage *iMask,
|
||||
IcImage *iDst,
|
||||
pixman_compositeSrc_8888x0888 (pixman_operator_t op,
|
||||
pixman_image_t *iSrc,
|
||||
pixman_image_t *iMask,
|
||||
pixman_image_t *iDst,
|
||||
int16_t xSrc,
|
||||
int16_t ySrc,
|
||||
int16_t xMask,
|
||||
|
|
@ -564,10 +564,10 @@ IcCompositeSrc_8888x0888 (IcOperator op,
|
|||
}
|
||||
|
||||
static void
|
||||
IcCompositeSrc_8888x0565 (IcOperator op,
|
||||
IcImage *iSrc,
|
||||
IcImage *iMask,
|
||||
IcImage *iDst,
|
||||
pixman_compositeSrc_8888x0565 (pixman_operator_t op,
|
||||
pixman_image_t *iSrc,
|
||||
pixman_image_t *iMask,
|
||||
pixman_image_t *iDst,
|
||||
int16_t xSrc,
|
||||
int16_t ySrc,
|
||||
int16_t xMask,
|
||||
|
|
@ -616,10 +616,10 @@ IcCompositeSrc_8888x0565 (IcOperator op,
|
|||
}
|
||||
|
||||
static void
|
||||
IcCompositeSrc_0565x0565 (IcOperator op,
|
||||
IcImage *iSrc,
|
||||
IcImage *iMask,
|
||||
IcImage *iDst,
|
||||
pixman_compositeSrc_0565x0565 (pixman_operator_t op,
|
||||
pixman_image_t *iSrc,
|
||||
pixman_image_t *iMask,
|
||||
pixman_image_t *iDst,
|
||||
int16_t xSrc,
|
||||
int16_t ySrc,
|
||||
int16_t xMask,
|
||||
|
|
@ -652,10 +652,10 @@ IcCompositeSrc_0565x0565 (IcOperator op,
|
|||
}
|
||||
|
||||
static void
|
||||
IcCompositeSrcAdd_8000x8000 (IcOperator op,
|
||||
IcImage *iSrc,
|
||||
IcImage *iMask,
|
||||
IcImage *iDst,
|
||||
pixman_compositeSrcAdd_8000x8000 (pixman_operator_t op,
|
||||
pixman_image_t *iSrc,
|
||||
pixman_image_t *iMask,
|
||||
pixman_image_t *iDst,
|
||||
int16_t xSrc,
|
||||
int16_t ySrc,
|
||||
int16_t xMask,
|
||||
|
|
@ -698,10 +698,10 @@ IcCompositeSrcAdd_8000x8000 (IcOperator op,
|
|||
}
|
||||
|
||||
static void
|
||||
IcCompositeSrcAdd_8888x8888 (IcOperator op,
|
||||
IcImage *iSrc,
|
||||
IcImage *iMask,
|
||||
IcImage *iDst,
|
||||
pixman_compositeSrcAdd_8888x8888 (pixman_operator_t op,
|
||||
pixman_image_t *iSrc,
|
||||
pixman_image_t *iMask,
|
||||
pixman_image_t *iDst,
|
||||
int16_t xSrc,
|
||||
int16_t ySrc,
|
||||
int16_t xMask,
|
||||
|
|
@ -751,10 +751,10 @@ IcCompositeSrcAdd_8888x8888 (IcOperator op,
|
|||
}
|
||||
|
||||
static void
|
||||
IcCompositeSrcAdd_1000x1000 (IcOperator op,
|
||||
IcImage *iSrc,
|
||||
IcImage *iMask,
|
||||
IcImage *iDst,
|
||||
pixman_compositeSrcAdd_1000x1000 (pixman_operator_t op,
|
||||
pixman_image_t *iSrc,
|
||||
pixman_image_t *iMask,
|
||||
pixman_image_t *iDst,
|
||||
int16_t xSrc,
|
||||
int16_t ySrc,
|
||||
int16_t xMask,
|
||||
|
|
@ -764,7 +764,7 @@ IcCompositeSrcAdd_1000x1000 (IcOperator op,
|
|||
uint16_t width,
|
||||
uint16_t height)
|
||||
{
|
||||
IcBits *dstBits, *srcBits;
|
||||
pixman_bits_t *dstBits, *srcBits;
|
||||
IcStride dstStride, srcStride;
|
||||
int dstBpp, srcBpp;
|
||||
int dstXoff, dstYoff;
|
||||
|
|
@ -794,10 +794,10 @@ IcCompositeSrcAdd_1000x1000 (IcOperator op,
|
|||
}
|
||||
|
||||
static void
|
||||
IcCompositeSolidMask_nx1xn (IcOperator op,
|
||||
IcImage *iSrc,
|
||||
IcImage *iMask,
|
||||
IcImage *iDst,
|
||||
pixman_compositeSolidMask_nx1xn (pixman_operator_t op,
|
||||
pixman_image_t *iSrc,
|
||||
pixman_image_t *iMask,
|
||||
pixman_image_t *iDst,
|
||||
int16_t xSrc,
|
||||
int16_t ySrc,
|
||||
int16_t xMask,
|
||||
|
|
@ -807,19 +807,19 @@ IcCompositeSolidMask_nx1xn (IcOperator op,
|
|||
uint16_t width,
|
||||
uint16_t height)
|
||||
{
|
||||
IcBits *dstBits;
|
||||
pixman_bits_t *dstBits;
|
||||
IcStip *maskBits;
|
||||
IcStride dstStride, maskStride;
|
||||
int dstBpp, maskBpp;
|
||||
int dstXoff, dstYoff;
|
||||
int maskXoff, maskYoff;
|
||||
IcBits src;
|
||||
pixman_bits_t src;
|
||||
|
||||
IcComposeGetSolid(iSrc, src);
|
||||
|
||||
if ((src & 0xff000000) != 0xff000000)
|
||||
{
|
||||
IcCompositeGeneral (op, iSrc, iMask, iDst,
|
||||
pixman_compositeGeneral (op, iSrc, iMask, iDst,
|
||||
xSrc, ySrc, xMask, yMask, xDst, yDst,
|
||||
width, height);
|
||||
return;
|
||||
|
|
@ -860,10 +860,10 @@ IcCompositeSolidMask_nx1xn (IcOperator op,
|
|||
# define mod(a,b) ((b) == 1 ? 0 : (a) >= 0 ? (a) % (b) : (b) - (-a) % (b))
|
||||
|
||||
void
|
||||
IcComposite (IcOperator op,
|
||||
IcImage *iSrc,
|
||||
IcImage *iMask,
|
||||
IcImage *iDst,
|
||||
pixman_composite (pixman_operator_t op,
|
||||
pixman_image_t *iSrc,
|
||||
pixman_image_t *iMask,
|
||||
pixman_image_t *iDst,
|
||||
int xSrc,
|
||||
int ySrc,
|
||||
int xMask,
|
||||
|
|
@ -873,9 +873,9 @@ IcComposite (IcOperator op,
|
|||
int width,
|
||||
int height)
|
||||
{
|
||||
PixRegion *region;
|
||||
pixman_region16_t *region;
|
||||
int n;
|
||||
PixRegionBox *pbox;
|
||||
pixman_box16_t *pbox;
|
||||
CompositeFunc func;
|
||||
int srcRepeat = iSrc->repeat;
|
||||
int maskRepeat = 0;
|
||||
|
|
@ -897,8 +897,8 @@ IcComposite (IcOperator op,
|
|||
maskAlphaMap = iMask->alphaMap != 0;
|
||||
}
|
||||
|
||||
region = PixRegionCreate();
|
||||
PixRegionUnionRect (region, region, xDst, yDst, width, height);
|
||||
region = pixman_region_create();
|
||||
pixman_region_unionRect (region, region, xDst, yDst, width, height);
|
||||
|
||||
if (!IcComputeCompositeRegion (region,
|
||||
iSrc,
|
||||
|
|
@ -914,11 +914,11 @@ IcComposite (IcOperator op,
|
|||
height))
|
||||
return;
|
||||
|
||||
func = IcCompositeGeneral;
|
||||
func = pixman_compositeGeneral;
|
||||
if (!iSrc->transform && !(iMask && iMask->transform))
|
||||
if (!maskAlphaMap && !srcAlphaMap && !dstAlphaMap)
|
||||
switch (op) {
|
||||
case IcOperatorOver:
|
||||
case PIXMAN_OPERATOR_OVER:
|
||||
if (iMask)
|
||||
{
|
||||
if (srcRepeat &&
|
||||
|
|
@ -932,17 +932,17 @@ IcComposite (IcOperator op,
|
|||
switch (iDst->format_code) {
|
||||
case PICT_r5g6b5:
|
||||
case PICT_b5g6r5:
|
||||
func = IcCompositeSolidMask_nx8x0565;
|
||||
func = pixman_compositeSolidMask_nx8x0565;
|
||||
break;
|
||||
case PICT_r8g8b8:
|
||||
case PICT_b8g8r8:
|
||||
func = IcCompositeSolidMask_nx8x0888;
|
||||
func = pixman_compositeSolidMask_nx8x0888;
|
||||
break;
|
||||
case PICT_a8r8g8b8:
|
||||
case PICT_x8r8g8b8:
|
||||
case PICT_a8b8g8r8:
|
||||
case PICT_x8b8g8r8:
|
||||
func = IcCompositeSolidMask_nx8x8888;
|
||||
func = pixman_compositeSolidMask_nx8x8888;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
|
@ -951,10 +951,10 @@ IcComposite (IcOperator op,
|
|||
switch (iDst->format_code) {
|
||||
case PICT_a8r8g8b8:
|
||||
case PICT_x8r8g8b8:
|
||||
func = IcCompositeSolidMask_nx8888x8888C;
|
||||
func = pixman_compositeSolidMask_nx8888x8888C;
|
||||
break;
|
||||
case PICT_r5g6b5:
|
||||
func = IcCompositeSolidMask_nx8888x0565C;
|
||||
func = pixman_compositeSolidMask_nx8888x0565C;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -964,10 +964,10 @@ IcComposite (IcOperator op,
|
|||
switch (iDst->format_code) {
|
||||
case PICT_a8b8g8r8:
|
||||
case PICT_x8b8g8r8:
|
||||
func = IcCompositeSolidMask_nx8888x8888C;
|
||||
func = pixman_compositeSolidMask_nx8888x8888C;
|
||||
break;
|
||||
case PICT_b5g6r5:
|
||||
func = IcCompositeSolidMask_nx8888x0565C;
|
||||
func = pixman_compositeSolidMask_nx8888x0565C;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -982,7 +982,7 @@ IcComposite (IcOperator op,
|
|||
case PICT_x8r8g8b8:
|
||||
case PICT_a8b8g8r8:
|
||||
case PICT_x8b8g8r8:
|
||||
func = IcCompositeSolidMask_nx1xn;
|
||||
func = pixman_compositeSolidMask_nx1xn;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -997,13 +997,13 @@ IcComposite (IcOperator op,
|
|||
switch (iDst->format_code) {
|
||||
case PICT_a8r8g8b8:
|
||||
case PICT_x8r8g8b8:
|
||||
func = IcCompositeSrc_8888x8888;
|
||||
func = pixman_compositeSrc_8888x8888;
|
||||
break;
|
||||
case PICT_r8g8b8:
|
||||
func = IcCompositeSrc_8888x0888;
|
||||
func = pixman_compositeSrc_8888x0888;
|
||||
break;
|
||||
case PICT_r5g6b5:
|
||||
func = IcCompositeSrc_8888x0565;
|
||||
func = pixman_compositeSrc_8888x0565;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
|
@ -1012,62 +1012,62 @@ IcComposite (IcOperator op,
|
|||
switch (iDst->format_code) {
|
||||
case PICT_a8b8g8r8:
|
||||
case PICT_x8b8g8r8:
|
||||
func = IcCompositeSrc_8888x8888;
|
||||
func = pixman_compositeSrc_8888x8888;
|
||||
break;
|
||||
case PICT_b8g8r8:
|
||||
func = IcCompositeSrc_8888x0888;
|
||||
func = pixman_compositeSrc_8888x0888;
|
||||
break;
|
||||
case PICT_b5g6r5:
|
||||
func = IcCompositeSrc_8888x0565;
|
||||
func = pixman_compositeSrc_8888x0565;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case PICT_r5g6b5:
|
||||
switch (iDst->format_code) {
|
||||
case PICT_r5g6b5:
|
||||
func = IcCompositeSrc_0565x0565;
|
||||
func = pixman_compositeSrc_0565x0565;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case PICT_b5g6r5:
|
||||
switch (iDst->format_code) {
|
||||
case PICT_b5g6r5:
|
||||
func = IcCompositeSrc_0565x0565;
|
||||
func = pixman_compositeSrc_0565x0565;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case IcOperatorAdd:
|
||||
case PIXMAN_OPERATOR_ADD:
|
||||
if (iMask == 0)
|
||||
{
|
||||
switch (iSrc->format_code) {
|
||||
case PICT_a8r8g8b8:
|
||||
switch (iDst->format_code) {
|
||||
case PICT_a8r8g8b8:
|
||||
func = IcCompositeSrcAdd_8888x8888;
|
||||
func = pixman_compositeSrcAdd_8888x8888;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case PICT_a8b8g8r8:
|
||||
switch (iDst->format_code) {
|
||||
case PICT_a8b8g8r8:
|
||||
func = IcCompositeSrcAdd_8888x8888;
|
||||
func = pixman_compositeSrcAdd_8888x8888;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case PICT_a8:
|
||||
switch (iDst->format_code) {
|
||||
case PICT_a8:
|
||||
func = IcCompositeSrcAdd_8000x8000;
|
||||
func = pixman_compositeSrcAdd_8000x8000;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case PICT_a1:
|
||||
switch (iDst->format_code) {
|
||||
case PICT_a1:
|
||||
func = IcCompositeSrcAdd_1000x1000;
|
||||
func = pixman_compositeSrcAdd_1000x1000;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
|
@ -1075,11 +1075,11 @@ IcComposite (IcOperator op,
|
|||
}
|
||||
break;
|
||||
default:
|
||||
func = IcCompositeGeneral;
|
||||
func = pixman_compositeGeneral;
|
||||
break;
|
||||
}
|
||||
n = PixRegionNumRects (region);
|
||||
pbox = PixRegionRects (region);
|
||||
n = pixman_region_num_rects (region);
|
||||
pbox = pixman_region_rects (region);
|
||||
while (n--)
|
||||
{
|
||||
h = pbox->y2 - pbox->y1;
|
||||
|
|
@ -1135,6 +1135,6 @@ IcComposite (IcOperator op,
|
|||
}
|
||||
pbox++;
|
||||
}
|
||||
PixRegionDestroy (region);
|
||||
pixman_region_destroy (region);
|
||||
}
|
||||
slim_hidden_def(IcComposite);
|
||||
slim_hidden_def(pixman_composite);
|
||||
|
|
|
|||
|
|
@ -37,11 +37,11 @@
|
|||
}
|
||||
|
||||
void
|
||||
IcBlt (IcBits *srcLine,
|
||||
IcBlt (pixman_bits_t *srcLine,
|
||||
IcStride srcStride,
|
||||
int srcX,
|
||||
|
||||
IcBits *dstLine,
|
||||
pixman_bits_t *dstLine,
|
||||
IcStride dstStride,
|
||||
int dstX,
|
||||
|
||||
|
|
@ -49,16 +49,16 @@ IcBlt (IcBits *srcLine,
|
|||
int height,
|
||||
|
||||
int alu,
|
||||
IcBits pm,
|
||||
pixman_bits_t pm,
|
||||
int bpp,
|
||||
|
||||
int reverse,
|
||||
int upsidedown)
|
||||
{
|
||||
IcBits *src, *dst;
|
||||
pixman_bits_t *src, *dst;
|
||||
int leftShift, rightShift;
|
||||
IcBits startmask, endmask;
|
||||
IcBits bits, bits1;
|
||||
pixman_bits_t startmask, endmask;
|
||||
pixman_bits_t bits, bits1;
|
||||
int n, nmiddle;
|
||||
int destInvarient;
|
||||
int startbyte, endbyte;
|
||||
|
|
@ -154,7 +154,7 @@ IcBlt (IcBits *srcLine,
|
|||
*/
|
||||
if (_ca2 + 1 == 0 && _cx2 == 0)
|
||||
{
|
||||
IcBits t1, t2, t3, t4;
|
||||
pixman_bits_t t1, t2, t3, t4;
|
||||
while (n >= 4)
|
||||
{
|
||||
t1 = *src++;
|
||||
|
|
@ -326,32 +326,32 @@ getPixel (char *src, int x)
|
|||
#endif
|
||||
|
||||
static void
|
||||
IcBlt24Line (IcBits *src,
|
||||
IcBlt24Line (pixman_bits_t *src,
|
||||
int srcX,
|
||||
|
||||
IcBits *dst,
|
||||
pixman_bits_t *dst,
|
||||
int dstX,
|
||||
|
||||
int width,
|
||||
|
||||
int alu,
|
||||
IcBits pm,
|
||||
pixman_bits_t pm,
|
||||
|
||||
int reverse)
|
||||
{
|
||||
#ifdef DEBUG_BLT24
|
||||
char *origDst = (char *) dst;
|
||||
IcBits *origLine = dst + ((dstX >> IC_SHIFT) - 1);
|
||||
pixman_bits_t *origLine = dst + ((dstX >> IC_SHIFT) - 1);
|
||||
int origNlw = ((width + IC_MASK) >> IC_SHIFT) + 3;
|
||||
int origX = dstX / 24;
|
||||
#endif
|
||||
|
||||
int leftShift, rightShift;
|
||||
IcBits startmask, endmask;
|
||||
pixman_bits_t startmask, endmask;
|
||||
int n;
|
||||
|
||||
IcBits bits, bits1;
|
||||
IcBits mask;
|
||||
pixman_bits_t bits, bits1;
|
||||
pixman_bits_t mask;
|
||||
|
||||
int rot;
|
||||
IcDeclareMergeRop ();
|
||||
|
|
@ -540,11 +540,11 @@ IcBlt24Line (IcBits *src,
|
|||
}
|
||||
|
||||
void
|
||||
IcBlt24 (IcBits *srcLine,
|
||||
IcBlt24 (pixman_bits_t *srcLine,
|
||||
IcStride srcStride,
|
||||
int srcX,
|
||||
|
||||
IcBits *dstLine,
|
||||
pixman_bits_t *dstLine,
|
||||
IcStride dstStride,
|
||||
int dstX,
|
||||
|
||||
|
|
@ -552,7 +552,7 @@ IcBlt24 (IcBits *srcLine,
|
|||
int height,
|
||||
|
||||
int alu,
|
||||
IcBits pm,
|
||||
pixman_bits_t pm,
|
||||
|
||||
int reverse,
|
||||
int upsidedown)
|
||||
|
|
@ -584,13 +584,13 @@ IcBlt24 (IcBits *srcLine,
|
|||
*/
|
||||
|
||||
void
|
||||
IcBltOdd (IcBits *srcLine,
|
||||
IcBltOdd (pixman_bits_t *srcLine,
|
||||
IcStride srcStrideEven,
|
||||
IcStride srcStrideOdd,
|
||||
int srcXEven,
|
||||
int srcXOdd,
|
||||
|
||||
IcBits *dstLine,
|
||||
pixman_bits_t *dstLine,
|
||||
IcStride dstStrideEven,
|
||||
IcStride dstStrideOdd,
|
||||
int dstXEven,
|
||||
|
|
@ -600,26 +600,26 @@ IcBltOdd (IcBits *srcLine,
|
|||
int height,
|
||||
|
||||
int alu,
|
||||
IcBits pm,
|
||||
pixman_bits_t pm,
|
||||
int bpp)
|
||||
{
|
||||
IcBits *src;
|
||||
pixman_bits_t *src;
|
||||
int leftShiftEven, rightShiftEven;
|
||||
IcBits startmaskEven, endmaskEven;
|
||||
pixman_bits_t startmaskEven, endmaskEven;
|
||||
int nmiddleEven;
|
||||
|
||||
IcBits *dst;
|
||||
pixman_bits_t *dst;
|
||||
int leftShiftOdd, rightShiftOdd;
|
||||
IcBits startmaskOdd, endmaskOdd;
|
||||
pixman_bits_t startmaskOdd, endmaskOdd;
|
||||
int nmiddleOdd;
|
||||
|
||||
int leftShift, rightShift;
|
||||
IcBits startmask, endmask;
|
||||
pixman_bits_t startmask, endmask;
|
||||
int nmiddle;
|
||||
|
||||
int srcX, dstX;
|
||||
|
||||
IcBits bits, bits1;
|
||||
pixman_bits_t bits, bits1;
|
||||
int n;
|
||||
|
||||
int destInvarient;
|
||||
|
|
@ -757,13 +757,13 @@ IcBltOdd (IcBits *srcLine,
|
|||
|
||||
#ifdef IC_24BIT
|
||||
void
|
||||
IcBltOdd24 (IcBits *srcLine,
|
||||
IcBltOdd24 (pixman_bits_t *srcLine,
|
||||
IcStride srcStrideEven,
|
||||
IcStride srcStrideOdd,
|
||||
int srcXEven,
|
||||
int srcXOdd,
|
||||
|
||||
IcBits *dstLine,
|
||||
pixman_bits_t *dstLine,
|
||||
IcStride dstStrideEven,
|
||||
IcStride dstStrideOdd,
|
||||
int dstXEven,
|
||||
|
|
@ -773,7 +773,7 @@ IcBltOdd24 (IcBits *srcLine,
|
|||
int height,
|
||||
|
||||
int alu,
|
||||
IcBits pm)
|
||||
pixman_bits_t pm)
|
||||
{
|
||||
int even = 1;
|
||||
|
||||
|
|
@ -809,7 +809,7 @@ void
|
|||
IcSetBltOdd (IcStip *stip,
|
||||
IcStride stipStride,
|
||||
int srcX,
|
||||
IcBits **bits,
|
||||
pixman_bits_t **bits,
|
||||
IcStride *strideEven,
|
||||
IcStride *strideOdd,
|
||||
int *srcXEven,
|
||||
|
|
@ -827,7 +827,7 @@ IcSetBltOdd (IcStip *stip,
|
|||
*/
|
||||
strideAdjust = stipStride & (IC_MASK >> IC_STIP_SHIFT);
|
||||
|
||||
*bits = (IcBits *) ((char *) stip - srcAdjust);
|
||||
*bits = (pixman_bits_t *) ((char *) stip - srcAdjust);
|
||||
if (srcAdjust)
|
||||
{
|
||||
*strideEven = IcStipStrideToBitsStride (stipStride + 1);
|
||||
|
|
@ -849,18 +849,18 @@ IcSetBltOdd (IcStip *stip,
|
|||
|
||||
void
|
||||
IcBltStip (IcStip *src,
|
||||
IcStride srcStride, /* in IcStip units, not IcBits units */
|
||||
IcStride srcStride, /* in IcStip units, not pixman_bits_t units */
|
||||
int srcX,
|
||||
|
||||
IcStip *dst,
|
||||
IcStride dstStride, /* in IcStip units, not IcBits units */
|
||||
IcStride dstStride, /* in IcStip units, not pixman_bits_t units */
|
||||
int dstX,
|
||||
|
||||
int width,
|
||||
int height,
|
||||
|
||||
int alu,
|
||||
IcBits pm,
|
||||
pixman_bits_t pm,
|
||||
int bpp)
|
||||
{
|
||||
#if IC_STIP_SHIFT != IC_SHIFT
|
||||
|
|
@ -871,7 +871,7 @@ IcBltStip (IcStip *src,
|
|||
IcStride dstStrideEven, dstStrideOdd;
|
||||
int srcXEven, srcXOdd;
|
||||
int dstXEven, dstXOdd;
|
||||
IcBits *s, *d;
|
||||
pixman_bits_t *s, *d;
|
||||
int sx, dx;
|
||||
|
||||
src += srcX >> IC_STIP_SHIFT;
|
||||
|
|
@ -915,9 +915,9 @@ IcBltStip (IcStip *src,
|
|||
else
|
||||
#endif
|
||||
{
|
||||
IcBlt ((IcBits *) src, IcStipStrideToBitsStride (srcStride),
|
||||
IcBlt ((pixman_bits_t *) src, IcStipStrideToBitsStride (srcStride),
|
||||
srcX,
|
||||
(IcBits *) dst, IcStipStrideToBitsStride (dstStride),
|
||||
(pixman_bits_t *) dst, IcStipStrideToBitsStride (dstStride),
|
||||
dstX,
|
||||
width, height,
|
||||
alu, pm, bpp, 0, 0);
|
||||
|
|
|
|||
|
|
@ -138,27 +138,27 @@ void
|
|||
IcBltOne (IcStip *src,
|
||||
IcStride srcStride, /* IcStip units per scanline */
|
||||
int srcX, /* bit position of source */
|
||||
IcBits *dst,
|
||||
IcStride dstStride, /* IcBits units per scanline */
|
||||
pixman_bits_t *dst,
|
||||
IcStride dstStride, /* pixman_bits_t units per scanline */
|
||||
int dstX, /* bit position of dest */
|
||||
int dstBpp, /* bits per destination unit */
|
||||
|
||||
int width, /* width in bits of destination */
|
||||
int height, /* height in scanlines */
|
||||
|
||||
IcBits fgand, /* rrop values */
|
||||
IcBits fgxor,
|
||||
IcBits bgand,
|
||||
IcBits bgxor)
|
||||
pixman_bits_t fgand, /* rrop values */
|
||||
pixman_bits_t fgxor,
|
||||
pixman_bits_t bgand,
|
||||
pixman_bits_t bgxor)
|
||||
{
|
||||
const IcBits *icbits;
|
||||
int pixelsPerDst; /* dst pixels per IcBits */
|
||||
const pixman_bits_t *icbits;
|
||||
int pixelsPerDst; /* dst pixels per pixman_bits_t */
|
||||
int unitsPerSrc; /* src patterns per IcStip */
|
||||
int leftShift, rightShift; /* align source with dest */
|
||||
IcBits startmask, endmask; /* dest scanline masks */
|
||||
pixman_bits_t startmask, endmask; /* dest scanline masks */
|
||||
IcStip bits=0, bitsLeft, bitsRight;/* source bits */
|
||||
IcStip left;
|
||||
IcBits mask;
|
||||
pixman_bits_t mask;
|
||||
int nDst; /* dest longwords (w.o. end) */
|
||||
int w;
|
||||
int n, nmiddle;
|
||||
|
|
@ -184,7 +184,7 @@ IcBltOne (IcStip *src,
|
|||
#endif
|
||||
|
||||
/*
|
||||
* Number of destination units in IcBits == number of stipple pixels
|
||||
* Number of destination units in pixman_bits_t == number of stipple pixels
|
||||
* used each time
|
||||
*/
|
||||
pixelsPerDst = IC_UNIT / dstBpp;
|
||||
|
|
@ -202,7 +202,7 @@ IcBltOne (IcStip *src,
|
|||
transparent = 1;
|
||||
|
||||
/*
|
||||
* Adjust source and dest to nearest IcBits boundary
|
||||
* Adjust source and dest to nearest pixman_bits_t boundary
|
||||
*/
|
||||
src += srcX >> IC_STIP_SHIFT;
|
||||
dst += dstX >> IC_SHIFT;
|
||||
|
|
@ -455,7 +455,7 @@ IcBltOne (IcStip *src,
|
|||
#define IcStip24New(rot) (2 + (rot != 0))
|
||||
#define IcStip24Len 4
|
||||
|
||||
static const IcBits icStipple24Bits[3][1 << IcStip24Len] = {
|
||||
static const pixman_bits_t icStipple24Bits[3][1 << IcStip24Len] = {
|
||||
/* rotate 0 */
|
||||
{
|
||||
C4_24( 0, 0), C4_24( 1, 0), C4_24( 2, 0), C4_24( 3, 0),
|
||||
|
|
@ -493,7 +493,7 @@ static const IcBits icStipple24Bits[3][1 << IcStip24Len] = {
|
|||
#define IcStip24New(rot) (1 + (rot == 8))
|
||||
#endif
|
||||
|
||||
static const IcBits icStipple24Bits[3][1 << IcStip24Len] = {
|
||||
static const pixman_bits_t icStipple24Bits[3][1 << IcStip24Len] = {
|
||||
/* rotate 0 */
|
||||
{
|
||||
C2_24( 0, 0), C2_24 ( 1, 0), C2_24 ( 2, 0), C2_24 ( 3, 0),
|
||||
|
|
@ -571,21 +571,21 @@ void
|
|||
IcBltOne24 (IcStip *srcLine,
|
||||
IcStride srcStride, /* IcStip units per scanline */
|
||||
int srcX, /* bit position of source */
|
||||
IcBits *dst,
|
||||
IcStride dstStride, /* IcBits units per scanline */
|
||||
pixman_bits_t *dst,
|
||||
IcStride dstStride, /* pixman_bits_t units per scanline */
|
||||
int dstX, /* bit position of dest */
|
||||
int dstBpp, /* bits per destination unit */
|
||||
|
||||
int width, /* width in bits of destination */
|
||||
int height, /* height in scanlines */
|
||||
|
||||
IcBits fgand, /* rrop values */
|
||||
IcBits fgxor,
|
||||
IcBits bgand,
|
||||
IcBits bgxor)
|
||||
pixman_bits_t fgand, /* rrop values */
|
||||
pixman_bits_t fgxor,
|
||||
pixman_bits_t bgand,
|
||||
pixman_bits_t bgxor)
|
||||
{
|
||||
IcStip *src;
|
||||
IcBits leftMask, rightMask, mask;
|
||||
pixman_bits_t leftMask, rightMask, mask;
|
||||
int nlMiddle, nl;
|
||||
IcStip stip, bits;
|
||||
int remain;
|
||||
|
|
|
|||
|
|
@ -37,9 +37,9 @@ _IcOnes (unsigned long mask)
|
|||
#endif
|
||||
|
||||
void
|
||||
IcColorToPixel (const IcFormat *format,
|
||||
const IcColor *color,
|
||||
IcBits *pixel)
|
||||
pixman_color_tToPixel (const pixman_format_t *format,
|
||||
const pixman_color_t *color,
|
||||
pixman_bits_t *pixel)
|
||||
{
|
||||
uint32_t r, g, b, a;
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ IcColorToPixel (const IcFormat *format,
|
|||
a = a << format->alpha;
|
||||
*pixel = r|g|b|a;
|
||||
}
|
||||
slim_hidden_def(IcColorToPixel);
|
||||
slim_hidden_def(pixman_color_tToPixel);
|
||||
|
||||
static uint16_t
|
||||
IcFillColor (uint32_t pixel, int bits)
|
||||
|
|
@ -67,9 +67,9 @@ IcFillColor (uint32_t pixel, int bits)
|
|||
}
|
||||
|
||||
void
|
||||
IcPixelToColor (const IcFormat *format,
|
||||
const IcBits pixel,
|
||||
IcColor *color)
|
||||
pixman_pixel_to_color (const pixman_format_t *format,
|
||||
const pixman_bits_t pixel,
|
||||
pixman_color_t *color)
|
||||
{
|
||||
uint32_t r, g, b, a;
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -25,27 +25,27 @@
|
|||
|
||||
#define Mask(n) ((n) == 32 ? 0xffffffff : ((1 << (n))-1))
|
||||
|
||||
IcFormat *
|
||||
IcFormatCreate (IcFormatName name)
|
||||
pixman_format_t *
|
||||
pixman_format_tCreate (pixman_format_tName name)
|
||||
{
|
||||
switch (name) {
|
||||
case IcFormatNameARGB32:
|
||||
return IcFormatCreateMasks (32,
|
||||
case PIXMAN_FORMAT_NAME_AR_GB32:
|
||||
return pixman_format_tCreateMasks (32,
|
||||
0xff000000,
|
||||
0x00ff0000,
|
||||
0x0000ff00,
|
||||
0x000000ff);
|
||||
case IcFormatNameRGB24:
|
||||
return IcFormatCreateMasks (32,
|
||||
case PIXMAN_FORMAT_NAME_RG_B24:
|
||||
return pixman_format_tCreateMasks (32,
|
||||
0x0,
|
||||
0xff0000,
|
||||
0x00ff00,
|
||||
0x0000ff);
|
||||
case IcFormatNameA8:
|
||||
return IcFormatCreateMasks (8, 0xff,
|
||||
case PIXMAN_FORMAT_NAME_A8:
|
||||
return pixman_format_tCreateMasks (8, 0xff,
|
||||
0, 0, 0);
|
||||
case IcFormatNameA1:
|
||||
return IcFormatCreateMasks (1, 0x1,
|
||||
case PIXMAN_FORMAT_NAME_A1:
|
||||
return pixman_format_tCreateMasks (1, 0x1,
|
||||
0, 0, 0);
|
||||
}
|
||||
|
||||
|
|
@ -53,12 +53,12 @@ IcFormatCreate (IcFormatName name)
|
|||
}
|
||||
|
||||
/* XXX: There's some nonsense going on here. The macros above help
|
||||
IcFormatCreateMasks to encode a format into an int, while
|
||||
immediately afterwards IcFormatInit goes through the effort of
|
||||
pixman_format_tCreateMasks to encode a format into an int, while
|
||||
immediately afterwards pixman_format_tInit goes through the effort of
|
||||
decoding it. This should all be disentagled, (it's probably
|
||||
possible to just eliminate the encoding macros altogether). */
|
||||
IcFormat *
|
||||
IcFormatCreateMasks (int bpp,
|
||||
pixman_format_t *
|
||||
pixman_format_tCreateMasks (int bpp,
|
||||
int alpha_mask,
|
||||
int red_mask,
|
||||
int green_mask,
|
||||
|
|
@ -66,7 +66,7 @@ IcFormatCreateMasks (int bpp,
|
|||
{
|
||||
int type;
|
||||
int format_code;
|
||||
IcFormat *format;
|
||||
pixman_format_t *format;
|
||||
|
||||
if (red_mask == 0 && green_mask == 0 && blue_mask == 0)
|
||||
type = PICT_TYPE_A;
|
||||
|
|
@ -81,17 +81,17 @@ IcFormatCreateMasks (int bpp,
|
|||
_IcOnes (green_mask),
|
||||
_IcOnes (blue_mask));
|
||||
|
||||
format = malloc (sizeof (IcFormat));
|
||||
format = malloc (sizeof (pixman_format_t));
|
||||
if (format == NULL)
|
||||
return NULL;
|
||||
|
||||
IcFormatInit (format, format_code);
|
||||
pixman_format_tInit (format, format_code);
|
||||
|
||||
return format;
|
||||
}
|
||||
|
||||
void
|
||||
IcFormatInit (IcFormat *format, int format_code)
|
||||
pixman_format_tInit (pixman_format_t *format, int format_code)
|
||||
{
|
||||
/* XXX: What do we want to lodge in here?
|
||||
format->id = FakeClientID (0);
|
||||
|
|
@ -147,10 +147,10 @@ IcFormatInit (IcFormat *format, int format_code)
|
|||
break;
|
||||
}
|
||||
}
|
||||
slim_hidden_def(IcFormatInit);
|
||||
slim_hidden_def(pixman_format_tInit);
|
||||
|
||||
void
|
||||
IcFormatDestroy (IcFormat *format)
|
||||
pixman_format_tDestroy (pixman_format_t *format)
|
||||
{
|
||||
free (format);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,19 +23,19 @@
|
|||
|
||||
#include "icint.h"
|
||||
|
||||
IcImage *
|
||||
IcImageCreate (IcFormat *format,
|
||||
pixman_image_t *
|
||||
pixman_image_tCreate (pixman_format_t *format,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
IcImage *image;
|
||||
pixman_image_t *image;
|
||||
IcPixels *pixels;
|
||||
|
||||
pixels = IcPixelsCreate (width, height, format->depth);
|
||||
if (pixels == NULL)
|
||||
return NULL;
|
||||
|
||||
image = IcImageCreateForPixels (pixels, format);
|
||||
image = pixman_image_tCreateForPixels (pixels, format);
|
||||
if (image == NULL) {
|
||||
IcPixelsDestroy (pixels);
|
||||
return NULL;
|
||||
|
|
@ -45,19 +45,19 @@ IcImageCreate (IcFormat *format,
|
|||
|
||||
return image;
|
||||
}
|
||||
slim_hidden_def(IcImageCreate);
|
||||
slim_hidden_def(pixman_image_tCreate);
|
||||
|
||||
IcImage *
|
||||
IcImageCreateForData (IcBits *data, IcFormat *format, int width, int height, int bpp, int stride)
|
||||
pixman_image_t *
|
||||
pixman_image_tCreateForData (pixman_bits_t *data, pixman_format_t *format, int width, int height, int bpp, int stride)
|
||||
{
|
||||
IcImage *image;
|
||||
pixman_image_t *image;
|
||||
IcPixels *pixels;
|
||||
|
||||
pixels = IcPixelsCreateForData (data, width, height, format->depth, bpp, stride);
|
||||
if (pixels == NULL)
|
||||
return NULL;
|
||||
|
||||
image = IcImageCreateForPixels (pixels, format);
|
||||
image = pixman_image_tCreateForPixels (pixels, format);
|
||||
if (image == NULL) {
|
||||
IcPixelsDestroy (pixels);
|
||||
return NULL;
|
||||
|
|
@ -68,13 +68,13 @@ IcImageCreateForData (IcBits *data, IcFormat *format, int width, int height, int
|
|||
return image;
|
||||
}
|
||||
|
||||
IcImage *
|
||||
IcImageCreateForPixels (IcPixels *pixels,
|
||||
IcFormat *format)
|
||||
pixman_image_t *
|
||||
pixman_image_tCreateForPixels (IcPixels *pixels,
|
||||
pixman_format_t *format)
|
||||
{
|
||||
IcImage *image;
|
||||
pixman_image_t *image;
|
||||
|
||||
image = malloc (sizeof (IcImage));
|
||||
image = malloc (sizeof (pixman_image_t));
|
||||
if (!image)
|
||||
{
|
||||
return NULL;
|
||||
|
|
@ -96,13 +96,13 @@ IcImageCreateForPixels (IcPixels *pixels,
|
|||
}
|
||||
*/
|
||||
|
||||
IcImageInit (image);
|
||||
pixman_image_tInit (image);
|
||||
|
||||
return image;
|
||||
}
|
||||
|
||||
void
|
||||
IcImageInit (IcImage *image)
|
||||
pixman_image_tInit (pixman_image_t *image)
|
||||
{
|
||||
image->refcnt = 1;
|
||||
image->repeat = 0;
|
||||
|
|
@ -130,13 +130,13 @@ IcImageInit (IcImage *image)
|
|||
image->serialNumber = GC_CHANGE_SERIAL_BIT;
|
||||
*/
|
||||
|
||||
image->pCompositeClip = PixRegionCreate();
|
||||
PixRegionUnionRect (image->pCompositeClip, image->pCompositeClip,
|
||||
image->pCompositeClip = pixman_region_create();
|
||||
pixman_region_unionRect (image->pCompositeClip, image->pCompositeClip,
|
||||
0, 0, image->pixels->width, image->pixels->height);
|
||||
|
||||
image->transform = NULL;
|
||||
|
||||
image->filter = IcFilterNearest;
|
||||
image->filter = PIXMAN_FILTER_NEAREST;
|
||||
image->filter_params = 0;
|
||||
image->filter_nparams = 0;
|
||||
|
||||
|
|
@ -145,23 +145,23 @@ IcImageInit (IcImage *image)
|
|||
}
|
||||
|
||||
int
|
||||
IcImageSetTransform (IcImage *image,
|
||||
IcTransform *transform)
|
||||
pixman_image_tSetTransform (pixman_image_t *image,
|
||||
pixman_transform_t *transform)
|
||||
{
|
||||
static const IcTransform identity = { {
|
||||
static const pixman_transform_t identity = { {
|
||||
{ xFixed1, 0x00000, 0x00000 },
|
||||
{ 0x00000, xFixed1, 0x00000 },
|
||||
{ 0x00000, 0x00000, xFixed1 },
|
||||
} };
|
||||
|
||||
if (transform && memcmp (transform, &identity, sizeof (IcTransform)) == 0)
|
||||
if (transform && memcmp (transform, &identity, sizeof (pixman_transform_t)) == 0)
|
||||
transform = 0;
|
||||
|
||||
if (transform)
|
||||
{
|
||||
if (!image->transform)
|
||||
{
|
||||
image->transform = malloc (sizeof (IcTransform));
|
||||
image->transform = malloc (sizeof (pixman_transform_t));
|
||||
if (!image->transform)
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -179,57 +179,57 @@ IcImageSetTransform (IcImage *image,
|
|||
}
|
||||
|
||||
void
|
||||
IcImageSetRepeat (IcImage *image,
|
||||
pixman_image_tSetRepeat (pixman_image_t *image,
|
||||
int repeat)
|
||||
{
|
||||
if (image)
|
||||
image->repeat = repeat;
|
||||
}
|
||||
slim_hidden_def(IcImageSetRepeat);
|
||||
slim_hidden_def(pixman_image_tSetRepeat);
|
||||
|
||||
void
|
||||
IcImageSetFilter (IcImage *image,
|
||||
IcFilter filter)
|
||||
pixman_image_tSetFilter (pixman_image_t *image,
|
||||
pixman_filter_t filter)
|
||||
{
|
||||
if (image)
|
||||
image->filter = filter;
|
||||
}
|
||||
|
||||
int
|
||||
IcImageGetWidth (IcImage *image)
|
||||
pixman_image_tGetWidth (pixman_image_t *image)
|
||||
{
|
||||
return image->pixels->width;
|
||||
}
|
||||
|
||||
int
|
||||
IcImageGetHeight (IcImage *image)
|
||||
pixman_image_tGetHeight (pixman_image_t *image)
|
||||
{
|
||||
return image->pixels->height;
|
||||
}
|
||||
|
||||
int
|
||||
IcImageGetDepth (IcImage *image)
|
||||
pixman_image_tGetDepth (pixman_image_t *image)
|
||||
{
|
||||
return image->pixels->depth;
|
||||
}
|
||||
|
||||
int
|
||||
IcImageGetStride (IcImage *image)
|
||||
pixman_image_tGetStride (pixman_image_t *image)
|
||||
{
|
||||
return image->pixels->stride;
|
||||
}
|
||||
|
||||
IcBits *
|
||||
IcImageGetData (IcImage *image)
|
||||
pixman_bits_t *
|
||||
pixman_image_tGetData (pixman_image_t *image)
|
||||
{
|
||||
return image->pixels->data;
|
||||
}
|
||||
|
||||
void
|
||||
IcImageDestroy (IcImage *image)
|
||||
pixman_image_tDestroy (pixman_image_t *image)
|
||||
{
|
||||
if (image->freeCompClip)
|
||||
PixRegionDestroy (image->pCompositeClip);
|
||||
pixman_region_destroy (image->pCompositeClip);
|
||||
|
||||
if (image->owns_pixels)
|
||||
IcPixelsDestroy (image->pixels);
|
||||
|
|
@ -239,19 +239,19 @@ IcImageDestroy (IcImage *image)
|
|||
|
||||
free (image);
|
||||
}
|
||||
slim_hidden_def(IcImageDestroy);
|
||||
slim_hidden_def(pixman_image_tDestroy);
|
||||
|
||||
void
|
||||
IcImageDestroyClip (IcImage *image)
|
||||
pixman_image_tDestroyClip (pixman_image_t *image)
|
||||
{
|
||||
switch (image->clientClipType) {
|
||||
case CT_NONE:
|
||||
return;
|
||||
case CT_PIXMAP:
|
||||
IcImageDestroy (image->clientClip);
|
||||
pixman_image_tDestroy (image->clientClip);
|
||||
break;
|
||||
default:
|
||||
PixRegionDestroy (image->clientClip);
|
||||
pixman_region_destroy (image->clientClip);
|
||||
break;
|
||||
}
|
||||
image->clientClip = NULL;
|
||||
|
|
@ -259,10 +259,10 @@ IcImageDestroyClip (IcImage *image)
|
|||
}
|
||||
|
||||
int
|
||||
IcImageSetClipRegion (IcImage *image,
|
||||
PixRegion *region)
|
||||
pixman_image_tSetClipRegion (pixman_image_t *image,
|
||||
pixman_region16_t *region)
|
||||
{
|
||||
IcImageDestroyClip (image);
|
||||
pixman_image_tDestroyClip (image);
|
||||
image->clientClip = region;
|
||||
image->clientClipType = CT_REGION;
|
||||
image->stateChanges |= CPClipMask;
|
||||
|
|
@ -272,16 +272,16 @@ IcImageSetClipRegion (IcImage *image,
|
|||
#define BOUND(v) (int16_t) ((v) < MINSHORT ? MINSHORT : (v) > MAXSHORT ? MAXSHORT : (v))
|
||||
|
||||
static __inline int
|
||||
IcClipImageReg (PixRegion *region,
|
||||
PixRegion *clip,
|
||||
IcClipImageReg (pixman_region16_t *region,
|
||||
pixman_region16_t *clip,
|
||||
int dx,
|
||||
int dy)
|
||||
{
|
||||
if (PixRegionNumRects (region) == 1 &&
|
||||
PixRegionNumRects (clip) == 1)
|
||||
if (pixman_region_num_rects (region) == 1 &&
|
||||
pixman_region_num_rects (clip) == 1)
|
||||
{
|
||||
PixRegionBox *pRbox = PixRegionRects (region);
|
||||
PixRegionBox *pCbox = PixRegionRects (clip);
|
||||
pixman_box16_t *pRbox = pixman_region_rects (region);
|
||||
pixman_box16_t *pCbox = pixman_region_rects (clip);
|
||||
int v;
|
||||
|
||||
if (pRbox->x1 < (v = pCbox->x1 + dx))
|
||||
|
|
@ -295,21 +295,21 @@ IcClipImageReg (PixRegion *region,
|
|||
if (pRbox->x1 >= pRbox->x2 ||
|
||||
pRbox->y1 >= pRbox->y2)
|
||||
{
|
||||
PixRegionEmpty (region);
|
||||
pixman_region_empty (region);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PixRegionTranslate (region, dx, dy);
|
||||
PixRegionIntersect (region, clip, region);
|
||||
PixRegionTranslate (region, -dx, -dy);
|
||||
pixman_region_translate (region, dx, dy);
|
||||
pixman_region_intersect (region, clip, region);
|
||||
pixman_region_translate (region, -dx, -dy);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static __inline int
|
||||
IcClipImageSrc (PixRegion *region,
|
||||
IcImage *image,
|
||||
IcClipImageSrc (pixman_region16_t *region,
|
||||
pixman_image_t *image,
|
||||
int dx,
|
||||
int dy)
|
||||
{
|
||||
|
|
@ -320,11 +320,11 @@ IcClipImageSrc (PixRegion *region,
|
|||
{
|
||||
if (image->clientClipType != CT_NONE)
|
||||
{
|
||||
PixRegionTranslate (region,
|
||||
pixman_region_translate (region,
|
||||
dx - image->clipOrigin.x,
|
||||
dy - image->clipOrigin.y);
|
||||
PixRegionIntersect (region, image->clientClip, region);
|
||||
PixRegionTranslate (region,
|
||||
pixman_region_intersect (region, image->clientClip, region);
|
||||
pixman_region_translate (region,
|
||||
- (dx - image->clipOrigin.x),
|
||||
- (dy - image->clipOrigin.y));
|
||||
}
|
||||
|
|
@ -346,7 +346,7 @@ IcClipImageSrc (PixRegion *region,
|
|||
#define NEXT_PTR(_type) ((_type) ulist++->ptr)
|
||||
|
||||
int
|
||||
IcImageChange (IcImage *image,
|
||||
pixman_image_tChange (pixman_image_t *image,
|
||||
Mask vmask,
|
||||
unsigned int *vlist,
|
||||
DevUnion *ulist,
|
||||
|
|
@ -379,13 +379,13 @@ IcImageChange (IcImage *image,
|
|||
break;
|
||||
case CPAlphaMap:
|
||||
{
|
||||
IcImage *iAlpha;
|
||||
pixman_image_t *iAlpha;
|
||||
|
||||
iAlpha = NEXT_PTR(IcImage *);
|
||||
iAlpha = NEXT_PTR(pixman_image_t *);
|
||||
if (iAlpha)
|
||||
iAlpha->refcnt++;
|
||||
if (image->alphaMap)
|
||||
IcImageDestroy ((void *) image->alphaMap);
|
||||
pixman_image_tDestroy ((void *) image->alphaMap);
|
||||
image->alphaMap = iAlpha;
|
||||
}
|
||||
break;
|
||||
|
|
@ -403,17 +403,17 @@ IcImageChange (IcImage *image,
|
|||
break;
|
||||
case CPClipMask:
|
||||
{
|
||||
IcImage *mask;
|
||||
pixman_image_t *mask;
|
||||
int clipType;
|
||||
|
||||
mask = NEXT_PTR(IcImage *);
|
||||
mask = NEXT_PTR(pixman_image_t *);
|
||||
if (mask) {
|
||||
clipType = CT_PIXMAP;
|
||||
mask->refcnt++;
|
||||
} else {
|
||||
clipType = CT_NONE;
|
||||
}
|
||||
error = IcImageChangeClip (image, clipType,
|
||||
error = pixman_image_tChangeClip (image, clipType,
|
||||
(void *)mask, 0);
|
||||
break;
|
||||
}
|
||||
|
|
@ -506,7 +506,7 @@ SetPictureClipRects (PicturePtr pPicture,
|
|||
{
|
||||
ScreenPtr pScreen = pPicture->pDrawable->pScreen;
|
||||
PictureScreenPtr ps = GetPictureScreen(pScreen);
|
||||
PixRegion *clientClip;
|
||||
pixman_region16_t *clientClip;
|
||||
int result;
|
||||
|
||||
clientClip = RECTS_TO_REGION(pScreen,
|
||||
|
|
@ -527,10 +527,10 @@ SetPictureClipRects (PicturePtr pPicture,
|
|||
*/
|
||||
|
||||
int
|
||||
IcComputeCompositeRegion (PixRegion *region,
|
||||
IcImage *iSrc,
|
||||
IcImage *iMask,
|
||||
IcImage *iDst,
|
||||
IcComputeCompositeRegion (pixman_region16_t *region,
|
||||
pixman_image_t *iSrc,
|
||||
pixman_image_t *iMask,
|
||||
pixman_image_t *iDst,
|
||||
int16_t xSrc,
|
||||
int16_t ySrc,
|
||||
int16_t xMask,
|
||||
|
|
@ -545,7 +545,7 @@ IcComputeCompositeRegion (PixRegion *region,
|
|||
|
||||
/* XXX: This code previously directly set the extents of the
|
||||
region here. I need to decide whether removing that has broken
|
||||
this. Also, it might be necessary to just make the PixRegion
|
||||
this. Also, it might be necessary to just make the pixman_region16_t
|
||||
data structure transparent anyway in which case I can just put
|
||||
the code back. */
|
||||
x1 = xDst;
|
||||
|
|
@ -558,13 +558,13 @@ IcComputeCompositeRegion (PixRegion *region,
|
|||
if (x1 >= x2 ||
|
||||
y1 >= y2)
|
||||
{
|
||||
PixRegionEmpty (region);
|
||||
pixman_region_empty (region);
|
||||
return 1;
|
||||
}
|
||||
/* clip against src */
|
||||
if (!IcClipImageSrc (region, iSrc, xDst - xSrc, yDst - ySrc))
|
||||
{
|
||||
PixRegionDestroy (region);
|
||||
pixman_region_destroy (region);
|
||||
return 0;
|
||||
}
|
||||
if (iSrc->alphaMap)
|
||||
|
|
@ -573,7 +573,7 @@ IcComputeCompositeRegion (PixRegion *region,
|
|||
xDst - (xSrc + iSrc->alphaOrigin.x),
|
||||
yDst - (ySrc + iSrc->alphaOrigin.y)))
|
||||
{
|
||||
PixRegionDestroy (region);
|
||||
pixman_region_destroy (region);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -582,7 +582,7 @@ IcComputeCompositeRegion (PixRegion *region,
|
|||
{
|
||||
if (!IcClipImageSrc (region, iMask, xDst - xMask, yDst - yMask))
|
||||
{
|
||||
PixRegionDestroy (region);
|
||||
pixman_region_destroy (region);
|
||||
return 0;
|
||||
}
|
||||
if (iMask->alphaMap)
|
||||
|
|
@ -591,14 +591,14 @@ IcComputeCompositeRegion (PixRegion *region,
|
|||
xDst - (xMask + iMask->alphaOrigin.x),
|
||||
yDst - (yMask + iMask->alphaOrigin.y)))
|
||||
{
|
||||
PixRegionDestroy (region);
|
||||
pixman_region_destroy (region);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!IcClipImageReg (region, iDst->pCompositeClip, 0, 0))
|
||||
{
|
||||
PixRegionDestroy (region);
|
||||
pixman_region_destroy (region);
|
||||
return 0;
|
||||
}
|
||||
if (iDst->alphaMap)
|
||||
|
|
@ -607,7 +607,7 @@ IcComputeCompositeRegion (PixRegion *region,
|
|||
-iDst->alphaOrigin.x,
|
||||
-iDst->alphaOrigin.y))
|
||||
{
|
||||
PixRegionDestroy (region);
|
||||
pixman_region_destroy (region);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,19 +76,19 @@ typedef struct _IndexFormat {
|
|||
*/
|
||||
|
||||
/*
|
||||
typedef struct _IcFormat {
|
||||
typedef struct _pixman_format_t {
|
||||
uint32_t id;
|
||||
uint32_t format;
|
||||
unsigned char type;
|
||||
unsigned char depth;
|
||||
DirectFormatRec direct;
|
||||
IndexFormatRec index;
|
||||
} IcFormatRec;
|
||||
} pixman_format_tRec;
|
||||
*/
|
||||
|
||||
struct _IcImage {
|
||||
struct _pixman_image_t {
|
||||
IcPixels *pixels;
|
||||
IcFormat image_format;
|
||||
pixman_format_t image_format;
|
||||
int format_code;
|
||||
int refcnt;
|
||||
|
||||
|
|
@ -103,7 +103,7 @@ struct _IcImage {
|
|||
unsigned int componentAlpha : 1;
|
||||
unsigned int unused : 23;
|
||||
|
||||
struct _IcImage *alphaMap;
|
||||
struct _pixman_image_t *alphaMap;
|
||||
IcPoint alphaOrigin;
|
||||
|
||||
IcPoint clipOrigin;
|
||||
|
|
@ -114,12 +114,12 @@ struct _IcImage {
|
|||
unsigned long stateChanges;
|
||||
unsigned long serialNumber;
|
||||
|
||||
PixRegion *pCompositeClip;
|
||||
pixman_region16_t *pCompositeClip;
|
||||
|
||||
IcTransform *transform;
|
||||
pixman_transform_t *transform;
|
||||
|
||||
IcFilter filter;
|
||||
IcFixed16_16 *filter_params;
|
||||
pixman_filter_t filter;
|
||||
pixman_fixed16_16_t *filter_params;
|
||||
int filter_nparams;
|
||||
|
||||
int owns_pixels;
|
||||
|
|
@ -158,10 +158,10 @@ IcCreatePicture (PicturePtr pPicture);
|
|||
*/
|
||||
|
||||
extern void __internal_linkage
|
||||
IcImageInit (IcImage *image);
|
||||
pixman_image_tInit (pixman_image_t *image);
|
||||
|
||||
extern void __internal_linkage
|
||||
IcImageDestroyClip (IcImage *image);
|
||||
pixman_image_tDestroyClip (pixman_image_t *image);
|
||||
|
||||
/*
|
||||
extern void __internal_linkage
|
||||
|
|
@ -172,8 +172,8 @@ IcValidatePicture (PicturePtr pPicture,
|
|||
|
||||
/* XXX: What should this be?
|
||||
extern int __internal_linkage
|
||||
IcClipPicture (PixRegion *region,
|
||||
IcImage *image,
|
||||
IcClipPicture (pixman_region16_t *region,
|
||||
pixman_image_t *image,
|
||||
int16_t xReg,
|
||||
int16_t yReg,
|
||||
int16_t xPict,
|
||||
|
|
@ -181,10 +181,10 @@ IcClipPicture (PixRegion *region,
|
|||
*/
|
||||
|
||||
extern int __internal_linkage
|
||||
IcComputeCompositeRegion (PixRegion *region,
|
||||
IcImage *iSrc,
|
||||
IcImage *iMask,
|
||||
IcImage *iDst,
|
||||
IcComputeCompositeRegion (pixman_region16_t *region,
|
||||
pixman_image_t *iSrc,
|
||||
pixman_image_t *iMask,
|
||||
pixman_image_t *iDst,
|
||||
int16_t xSrc,
|
||||
int16_t ySrc,
|
||||
int16_t xMask,
|
||||
|
|
@ -201,7 +201,7 @@ IcPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats);
|
|||
|
||||
/*
|
||||
extern void __internal_linkage
|
||||
IcGlyphs (IcOperator op,
|
||||
IcGlyphs (pixman_operator_t op,
|
||||
PicturePtr pSrc,
|
||||
PicturePtr pDst,
|
||||
PictFormatPtr maskFormat,
|
||||
|
|
@ -214,23 +214,23 @@ IcGlyphs (IcOperator op,
|
|||
|
||||
/*
|
||||
extern void __internal_linkage
|
||||
IcCompositeRects (IcOperator op,
|
||||
pixman_compositeRects (pixman_operator_t op,
|
||||
PicturePtr pDst,
|
||||
xRenderColor *color,
|
||||
int nRect,
|
||||
xRectangle *rects);
|
||||
*/
|
||||
|
||||
extern IcImage * __internal_linkage
|
||||
IcCreateAlphaPicture (IcImage *dst,
|
||||
IcFormat *format,
|
||||
extern pixman_image_t * __internal_linkage
|
||||
IcCreateAlphaPicture (pixman_image_t *dst,
|
||||
pixman_format_t *format,
|
||||
uint16_t width,
|
||||
uint16_t height);
|
||||
|
||||
typedef void (*CompositeFunc) (IcOperator op,
|
||||
IcImage *iSrc,
|
||||
IcImage *iMask,
|
||||
IcImage *iDst,
|
||||
typedef void (*CompositeFunc) (pixman_operator_t op,
|
||||
pixman_image_t *iSrc,
|
||||
pixman_image_t *iMask,
|
||||
pixman_image_t *iDst,
|
||||
int16_t xSrc,
|
||||
int16_t ySrc,
|
||||
int16_t xMask,
|
||||
|
|
@ -240,22 +240,22 @@ typedef void (*CompositeFunc) (IcOperator op,
|
|||
uint16_t width,
|
||||
uint16_t height);
|
||||
|
||||
typedef struct _IcCompositeOperand IcCompositeOperand;
|
||||
typedef struct _pixman_compositeOperand pixman_compositeOperand;
|
||||
|
||||
typedef uint32_t (*IcCompositeFetch)(IcCompositeOperand *op);
|
||||
typedef void (*IcCompositeStore) (IcCompositeOperand *op, uint32_t value);
|
||||
typedef uint32_t (*pixman_compositeFetch)(pixman_compositeOperand *op);
|
||||
typedef void (*pixman_compositeStore) (pixman_compositeOperand *op, uint32_t value);
|
||||
|
||||
typedef void (*IcCompositeStep) (IcCompositeOperand *op);
|
||||
typedef void (*IcCompositeSet) (IcCompositeOperand *op, int x, int y);
|
||||
typedef void (*pixman_compositeStep) (pixman_compositeOperand *op);
|
||||
typedef void (*pixman_compositeSet) (pixman_compositeOperand *op, int x, int y);
|
||||
|
||||
struct _IcCompositeOperand {
|
||||
struct _pixman_compositeOperand {
|
||||
union {
|
||||
struct {
|
||||
IcBits *top_line;
|
||||
pixman_bits_t *top_line;
|
||||
int left_offset;
|
||||
|
||||
int start_offset;
|
||||
IcBits *line;
|
||||
pixman_bits_t *line;
|
||||
uint32_t offset;
|
||||
IcStride stride;
|
||||
int bpp;
|
||||
|
|
@ -270,31 +270,31 @@ struct _IcCompositeOperand {
|
|||
int start_x;
|
||||
int x;
|
||||
int y;
|
||||
IcTransform *transform;
|
||||
IcFilter filter;
|
||||
pixman_transform_t *transform;
|
||||
pixman_filter_t filter;
|
||||
} transform;
|
||||
} u;
|
||||
IcCompositeFetch fetch;
|
||||
IcCompositeFetch fetcha;
|
||||
IcCompositeStore store;
|
||||
IcCompositeStep over;
|
||||
IcCompositeStep down;
|
||||
IcCompositeSet set;
|
||||
pixman_compositeFetch fetch;
|
||||
pixman_compositeFetch fetcha;
|
||||
pixman_compositeStore store;
|
||||
pixman_compositeStep over;
|
||||
pixman_compositeStep down;
|
||||
pixman_compositeSet set;
|
||||
/* XXX: We're not supporting indexed operations, right?
|
||||
IcIndexedPtr indexed;
|
||||
*/
|
||||
PixRegion *clip;
|
||||
pixman_region16_t *clip;
|
||||
};
|
||||
|
||||
typedef void (*IcCombineFunc) (IcCompositeOperand *src,
|
||||
IcCompositeOperand *msk,
|
||||
IcCompositeOperand *dst);
|
||||
typedef void (*IcCombineFunc) (pixman_compositeOperand *src,
|
||||
pixman_compositeOperand *msk,
|
||||
pixman_compositeOperand *dst);
|
||||
|
||||
typedef struct _IcAccessMap {
|
||||
uint32_t format_code;
|
||||
IcCompositeFetch fetch;
|
||||
IcCompositeFetch fetcha;
|
||||
IcCompositeStore store;
|
||||
pixman_compositeFetch fetch;
|
||||
pixman_compositeFetch fetcha;
|
||||
pixman_compositeStore store;
|
||||
} IcAccessMap;
|
||||
|
||||
/* iccompose.c */
|
||||
|
|
@ -305,18 +305,18 @@ typedef struct _IcCompSrc {
|
|||
} IcCompSrc;
|
||||
|
||||
extern int __internal_linkage
|
||||
IcBuildCompositeOperand (IcImage *image,
|
||||
IcCompositeOperand op[4],
|
||||
IcBuildCompositeOperand (pixman_image_t *image,
|
||||
pixman_compositeOperand op[4],
|
||||
int16_t x,
|
||||
int16_t y,
|
||||
int transform,
|
||||
int alpha);
|
||||
|
||||
extern void __internal_linkage
|
||||
IcCompositeGeneral (IcOperator op,
|
||||
IcImage *iSrc,
|
||||
IcImage *iMask,
|
||||
IcImage *iDst,
|
||||
pixman_compositeGeneral (pixman_operator_t op,
|
||||
pixman_image_t *iSrc,
|
||||
pixman_image_t *iMask,
|
||||
pixman_image_t *iDst,
|
||||
int16_t xSrc,
|
||||
int16_t ySrc,
|
||||
int16_t xMask,
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ typedef unsigned int Mask;
|
|||
#define IC_UNIT (1 << IC_SHIFT)
|
||||
#define IC_HALFUNIT (1 << (IC_SHIFT-1))
|
||||
#define IC_MASK (IC_UNIT - 1)
|
||||
#define IC_ALLONES ((IcBits) -1)
|
||||
#define IC_ALLONES ((pixman_bits_t) -1)
|
||||
|
||||
/* whether to bother to include 24bpp support */
|
||||
#ifndef ICNO24BIT
|
||||
|
|
@ -109,9 +109,9 @@ typedef unsigned int Mask;
|
|||
#define IC_STIP_ODDPTR(p) ((((long) (p)) & (IC_MASK >> 3)) != 0)
|
||||
|
||||
#define IcStipStrideToBitsStride(s) (((s) >> (IC_SHIFT - IC_STIP_SHIFT)))
|
||||
#define IcBitsStrideToStipStride(s) (((s) << (IC_SHIFT - IC_STIP_SHIFT)))
|
||||
#define pixman_bits_tStrideToStipStride(s) (((s) << (IC_SHIFT - IC_STIP_SHIFT)))
|
||||
|
||||
#define IcFullMask(n) ((n) == IC_UNIT ? IC_ALLONES : ((((IcBits) 1) << n) - 1))
|
||||
#define IcFullMask(n) ((n) == IC_UNIT ? IC_ALLONES : ((((pixman_bits_t) 1) << n) - 1))
|
||||
|
||||
|
||||
typedef uint32_t IcStip;
|
||||
|
|
@ -132,7 +132,7 @@ extern void IcSetBits (IcStip *bits, int stride, IcStip data);
|
|||
#if BITMAP_BIT_ORDER == LSBFirst
|
||||
#define IcScrLeft(x,n) ((x) >> (n))
|
||||
#define IcScrRight(x,n) ((x) << (n))
|
||||
/* #define IcLeftBits(x,n) ((x) & ((((IcBits) 1) << (n)) - 1)) */
|
||||
/* #define IcLeftBits(x,n) ((x) & ((((pixman_bits_t) 1) << (n)) - 1)) */
|
||||
#define IcLeftStipBits(x,n) ((x) & ((((IcStip) 1) << (n)) - 1))
|
||||
#define IcStipMoveLsb(x,s,n) (IcStipRight (x,(s)-(n)))
|
||||
#define IcPatternOffsetBits 0
|
||||
|
|
@ -142,7 +142,7 @@ extern void IcSetBits (IcStip *bits, int stride, IcStip data);
|
|||
/* #define IcLeftBits(x,n) ((x) >> (IC_UNIT - (n))) */
|
||||
#define IcLeftStipBits(x,n) ((x) >> (IC_STIP_UNIT - (n)))
|
||||
#define IcStipMoveLsb(x,s,n) (x)
|
||||
#define IcPatternOffsetBits (sizeof (IcBits) - 1)
|
||||
#define IcPatternOffsetBits (sizeof (pixman_bits_t) - 1)
|
||||
#endif
|
||||
|
||||
#define IcStipLeft(x,n) IcScrLeft(x,n)
|
||||
|
|
@ -164,7 +164,7 @@ extern void IcSetBits (IcStip *bits, int stride, IcStip data);
|
|||
#define IcRightStipMask(x) ( ((IC_STIP_UNIT - (x)) & IC_STIP_MASK) ? \
|
||||
IcScrLeft(IC_STIP_ALLONES,(IC_STIP_UNIT - (x)) & IC_STIP_MASK) : 0)
|
||||
|
||||
#define IcBitsMask(x,w) (IcScrRight(IC_ALLONES,(x) & IC_MASK) & \
|
||||
#define pixman_bits_tMask(x,w) (IcScrRight(IC_ALLONES,(x) & IC_MASK) & \
|
||||
IcScrLeft(IC_ALLONES,(IC_UNIT - ((x) + (w))) & IC_MASK))
|
||||
|
||||
#define IcStipMask(x,w) (IcStipRight(IC_STIP_ALLONES,(x) & IC_STIP_MASK) & \
|
||||
|
|
@ -250,93 +250,93 @@ extern void IcSetBits (IcStip *bits, int stride, IcStip data);
|
|||
|
||||
#if IC_SHIFT == 6
|
||||
#define IcDoLeftMaskByteRRop6Cases(dst,xor) \
|
||||
case (sizeof (IcBits) - 7) | (1 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (IcBits) - 7,uint8_t,xor); \
|
||||
case (sizeof (pixman_bits_t) - 7) | (1 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 7,uint8_t,xor); \
|
||||
break; \
|
||||
case (sizeof (IcBits) - 7) | (2 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (IcBits) - 7,uint8_t,xor); \
|
||||
IcStorePart(dst,sizeof (IcBits) - 6,uint8_t,xor); \
|
||||
case (sizeof (pixman_bits_t) - 7) | (2 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 7,uint8_t,xor); \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 6,uint8_t,xor); \
|
||||
break; \
|
||||
case (sizeof (IcBits) - 7) | (3 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (IcBits) - 7,uint8_t,xor); \
|
||||
IcStorePart(dst,sizeof (IcBits) - 6,uint16_t,xor); \
|
||||
case (sizeof (pixman_bits_t) - 7) | (3 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 7,uint8_t,xor); \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 6,uint16_t,xor); \
|
||||
break; \
|
||||
case (sizeof (IcBits) - 7) | (4 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (IcBits) - 7,uint8_t,xor); \
|
||||
IcStorePart(dst,sizeof (IcBits) - 6,uint16_t,xor); \
|
||||
IcStorePart(dst,sizeof (IcBits) - 4,uint8_t,xor); \
|
||||
case (sizeof (pixman_bits_t) - 7) | (4 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 7,uint8_t,xor); \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 6,uint16_t,xor); \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 4,uint8_t,xor); \
|
||||
break; \
|
||||
case (sizeof (IcBits) - 7) | (5 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (IcBits) - 7,uint8_t,xor); \
|
||||
IcStorePart(dst,sizeof (IcBits) - 6,uint16_t,xor); \
|
||||
IcStorePart(dst,sizeof (IcBits) - 4,uint16_t,xor); \
|
||||
case (sizeof (pixman_bits_t) - 7) | (5 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 7,uint8_t,xor); \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 6,uint16_t,xor); \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 4,uint16_t,xor); \
|
||||
break; \
|
||||
case (sizeof (IcBits) - 7) | (6 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (IcBits) - 7,uint8_t,xor); \
|
||||
IcStorePart(dst,sizeof (IcBits) - 6,uint16_t,xor); \
|
||||
IcStorePart(dst,sizeof (IcBits) - 4,uint16_t,xor); \
|
||||
IcStorePart(dst,sizeof (IcBits) - 2,uint8_t,xor); \
|
||||
case (sizeof (pixman_bits_t) - 7) | (6 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 7,uint8_t,xor); \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 6,uint16_t,xor); \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 4,uint16_t,xor); \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 2,uint8_t,xor); \
|
||||
break; \
|
||||
case (sizeof (IcBits) - 7): \
|
||||
IcStorePart(dst,sizeof (IcBits) - 7,uint8_t,xor); \
|
||||
IcStorePart(dst,sizeof (IcBits) - 6,uint16_t,xor); \
|
||||
IcStorePart(dst,sizeof (IcBits) - 4,uint32_t,xor); \
|
||||
case (sizeof (pixman_bits_t) - 7): \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 7,uint8_t,xor); \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 6,uint16_t,xor); \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 4,uint32_t,xor); \
|
||||
break; \
|
||||
case (sizeof (IcBits) - 6) | (1 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (IcBits) - 6,uint8_t,xor); \
|
||||
case (sizeof (pixman_bits_t) - 6) | (1 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 6,uint8_t,xor); \
|
||||
break; \
|
||||
case (sizeof (IcBits) - 6) | (2 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (IcBits) - 6,uint16_t,xor); \
|
||||
case (sizeof (pixman_bits_t) - 6) | (2 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 6,uint16_t,xor); \
|
||||
break; \
|
||||
case (sizeof (IcBits) - 6) | (3 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (IcBits) - 6,uint16_t,xor); \
|
||||
IcStorePart(dst,sizeof (IcBits) - 4,uint8_t,xor); \
|
||||
case (sizeof (pixman_bits_t) - 6) | (3 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 6,uint16_t,xor); \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 4,uint8_t,xor); \
|
||||
break; \
|
||||
case (sizeof (IcBits) - 6) | (4 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (IcBits) - 6,uint16_t,xor); \
|
||||
IcStorePart(dst,sizeof (IcBits) - 4,uint16_t,xor); \
|
||||
case (sizeof (pixman_bits_t) - 6) | (4 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 6,uint16_t,xor); \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 4,uint16_t,xor); \
|
||||
break; \
|
||||
case (sizeof (IcBits) - 6) | (5 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (IcBits) - 6,uint16_t,xor); \
|
||||
IcStorePart(dst,sizeof (IcBits) - 4,uint16_t,xor); \
|
||||
IcStorePart(dst,sizeof (IcBits) - 2,uint8_t,xor); \
|
||||
case (sizeof (pixman_bits_t) - 6) | (5 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 6,uint16_t,xor); \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 4,uint16_t,xor); \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 2,uint8_t,xor); \
|
||||
break; \
|
||||
case (sizeof (IcBits) - 6): \
|
||||
IcStorePart(dst,sizeof (IcBits) - 6,uint16_t,xor); \
|
||||
IcStorePart(dst,sizeof (IcBits) - 4,uint32_t,xor); \
|
||||
case (sizeof (pixman_bits_t) - 6): \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 6,uint16_t,xor); \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 4,uint32_t,xor); \
|
||||
break; \
|
||||
case (sizeof (IcBits) - 5) | (1 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (IcBits) - 5,uint8_t,xor); \
|
||||
case (sizeof (pixman_bits_t) - 5) | (1 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 5,uint8_t,xor); \
|
||||
break; \
|
||||
case (sizeof (IcBits) - 5) | (2 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (IcBits) - 5,uint8_t,xor); \
|
||||
IcStorePart(dst,sizeof (IcBits) - 4,uint8_t,xor); \
|
||||
case (sizeof (pixman_bits_t) - 5) | (2 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 5,uint8_t,xor); \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 4,uint8_t,xor); \
|
||||
break; \
|
||||
case (sizeof (IcBits) - 5) | (3 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (IcBits) - 5,uint8_t,xor); \
|
||||
IcStorePart(dst,sizeof (IcBits) - 4,uint16_t,xor); \
|
||||
case (sizeof (pixman_bits_t) - 5) | (3 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 5,uint8_t,xor); \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 4,uint16_t,xor); \
|
||||
break; \
|
||||
case (sizeof (IcBits) - 5) | (4 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (IcBits) - 5,uint8_t,xor); \
|
||||
IcStorePart(dst,sizeof (IcBits) - 4,uint16_t,xor); \
|
||||
IcStorePart(dst,sizeof (IcBits) - 2,uint8_t,xor); \
|
||||
case (sizeof (pixman_bits_t) - 5) | (4 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 5,uint8_t,xor); \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 4,uint16_t,xor); \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 2,uint8_t,xor); \
|
||||
break; \
|
||||
case (sizeof (IcBits) - 5): \
|
||||
IcStorePart(dst,sizeof (IcBits) - 5,uint8_t,xor); \
|
||||
IcStorePart(dst,sizeof (IcBits) - 4,uint32_t,xor); \
|
||||
case (sizeof (pixman_bits_t) - 5): \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 5,uint8_t,xor); \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 4,uint32_t,xor); \
|
||||
break; \
|
||||
case (sizeof (IcBits) - 4) | (1 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (IcBits) - 4,uint8_t,xor); \
|
||||
case (sizeof (pixman_bits_t) - 4) | (1 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 4,uint8_t,xor); \
|
||||
break; \
|
||||
case (sizeof (IcBits) - 4) | (2 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (IcBits) - 4,uint16_t,xor); \
|
||||
case (sizeof (pixman_bits_t) - 4) | (2 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 4,uint16_t,xor); \
|
||||
break; \
|
||||
case (sizeof (IcBits) - 4) | (3 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (IcBits) - 4,uint16_t,xor); \
|
||||
IcStorePart(dst,sizeof (IcBits) - 2,uint8_t,xor); \
|
||||
case (sizeof (pixman_bits_t) - 4) | (3 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 4,uint16_t,xor); \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 2,uint8_t,xor); \
|
||||
break; \
|
||||
case (sizeof (IcBits) - 4): \
|
||||
IcStorePart(dst,sizeof (IcBits) - 4,uint32_t,xor); \
|
||||
case (sizeof (pixman_bits_t) - 4): \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 4,uint32_t,xor); \
|
||||
break;
|
||||
|
||||
#define IcDoRightMaskByteRRop6Cases(dst,xor) \
|
||||
|
|
@ -364,23 +364,23 @@ extern void IcSetBits (IcStip *bits, int stride, IcStip data);
|
|||
#define IcDoLeftMaskByteRRop(dst,lb,l,and,xor) { \
|
||||
switch (lb) { \
|
||||
IcDoLeftMaskByteRRop6Cases(dst,xor) \
|
||||
case (sizeof (IcBits) - 3) | (1 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (IcBits) - 3,uint8_t,xor); \
|
||||
case (sizeof (pixman_bits_t) - 3) | (1 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 3,uint8_t,xor); \
|
||||
break; \
|
||||
case (sizeof (IcBits) - 3) | (2 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (IcBits) - 3,uint8_t,xor); \
|
||||
IcStorePart(dst,sizeof (IcBits) - 2,uint8_t,xor); \
|
||||
case (sizeof (pixman_bits_t) - 3) | (2 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 3,uint8_t,xor); \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 2,uint8_t,xor); \
|
||||
break; \
|
||||
case (sizeof (IcBits) - 2) | (1 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (IcBits) - 2,uint8_t,xor); \
|
||||
case (sizeof (pixman_bits_t) - 2) | (1 << (IC_SHIFT - 3)): \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 2,uint8_t,xor); \
|
||||
break; \
|
||||
case sizeof (IcBits) - 3: \
|
||||
IcStorePart(dst,sizeof (IcBits) - 3,uint8_t,xor); \
|
||||
case sizeof (IcBits) - 2: \
|
||||
IcStorePart(dst,sizeof (IcBits) - 2,uint16_t,xor); \
|
||||
case sizeof (pixman_bits_t) - 3: \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 3,uint8_t,xor); \
|
||||
case sizeof (pixman_bits_t) - 2: \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 2,uint16_t,xor); \
|
||||
break; \
|
||||
case sizeof (IcBits) - 1: \
|
||||
IcStorePart(dst,sizeof (IcBits) - 1,uint8_t,xor); \
|
||||
case sizeof (pixman_bits_t) - 1: \
|
||||
IcStorePart(dst,sizeof (pixman_bits_t) - 1,uint8_t,xor); \
|
||||
break; \
|
||||
default: \
|
||||
*dst = IcDoMaskRRop(*dst, and, xor, l); \
|
||||
|
|
@ -430,7 +430,7 @@ extern void IcSetBits (IcStip *bits, int stride, IcStip data);
|
|||
* sequence of partial word writes
|
||||
*
|
||||
* 'n' is the bytemask of which bytes to store, 'a' is the address
|
||||
* of the IcBits base unit, 'o' is the offset within that unit
|
||||
* of the pixman_bits_t base unit, 'o' is the offset within that unit
|
||||
*
|
||||
* The term "lane" comes from the hardware term "byte-lane" which
|
||||
*/
|
||||
|
|
@ -448,7 +448,7 @@ extern void IcSetBits (IcStip *bits, int stride, IcStip data);
|
|||
fgxor) : \
|
||||
((void)IcLaneCase2((n)&3,a,o), \
|
||||
IcLaneCase2((n)>>2,a,(o)+2)))
|
||||
#define IcLaneCase8(n,a,o) ((n) == 0x0ff ? (*(IcBits *) ((a)+(o)) = fgxor) : \
|
||||
#define IcLaneCase8(n,a,o) ((n) == 0x0ff ? (*(pixman_bits_t *) ((a)+(o)) = fgxor) : \
|
||||
((void)IcLaneCase4((n)&15,a,o), \
|
||||
IcLaneCase4((n)>>4,a,(o)+4)))
|
||||
|
||||
|
|
@ -502,7 +502,7 @@ extern void IcSetBits (IcStip *bits, int stride, IcStip data);
|
|||
|
||||
#define IcGetPixels(icpixels, pointer, _stride_, _bpp_, xoff, yoff) { \
|
||||
(pointer) = icpixels->data; \
|
||||
(_stride_) = icpixels->stride / sizeof(IcBits); \
|
||||
(_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? */ \
|
||||
|
|
@ -537,11 +537,11 @@ extern void IcSetBits (IcStip *bits, int stride, IcStip data);
|
|||
* icblt.c
|
||||
*/
|
||||
extern void __internal_linkage
|
||||
IcBlt (IcBits *src,
|
||||
IcBlt (pixman_bits_t *src,
|
||||
IcStride srcStride,
|
||||
int srcX,
|
||||
|
||||
IcBits *dst,
|
||||
pixman_bits_t *dst,
|
||||
IcStride dstStride,
|
||||
int dstX,
|
||||
|
||||
|
|
@ -549,18 +549,18 @@ IcBlt (IcBits *src,
|
|||
int height,
|
||||
|
||||
int alu,
|
||||
IcBits pm,
|
||||
pixman_bits_t pm,
|
||||
int bpp,
|
||||
|
||||
int reverse,
|
||||
int upsidedown);
|
||||
|
||||
extern void __internal_linkage
|
||||
IcBlt24 (IcBits *srcLine,
|
||||
IcBlt24 (pixman_bits_t *srcLine,
|
||||
IcStride srcStride,
|
||||
int srcX,
|
||||
|
||||
IcBits *dstLine,
|
||||
pixman_bits_t *dstLine,
|
||||
IcStride dstStride,
|
||||
int dstX,
|
||||
|
||||
|
|
@ -568,25 +568,25 @@ IcBlt24 (IcBits *srcLine,
|
|||
int height,
|
||||
|
||||
int alu,
|
||||
IcBits pm,
|
||||
pixman_bits_t pm,
|
||||
|
||||
int reverse,
|
||||
int upsidedown);
|
||||
|
||||
extern void __internal_linkage
|
||||
IcBltStip (IcStip *src,
|
||||
IcStride srcStride, /* in IcStip units, not IcBits units */
|
||||
IcStride srcStride, /* in IcStip units, not pixman_bits_t units */
|
||||
int srcX,
|
||||
|
||||
IcStip *dst,
|
||||
IcStride dstStride, /* in IcStip units, not IcBits units */
|
||||
IcStride dstStride, /* in IcStip units, not pixman_bits_t units */
|
||||
int dstX,
|
||||
|
||||
int width,
|
||||
int height,
|
||||
|
||||
int alu,
|
||||
IcBits pm,
|
||||
pixman_bits_t pm,
|
||||
int bpp);
|
||||
|
||||
/*
|
||||
|
|
@ -596,7 +596,7 @@ extern void __internal_linkage
|
|||
IcBltOne (IcStip *src,
|
||||
IcStride srcStride,
|
||||
int srcX,
|
||||
IcBits *dst,
|
||||
pixman_bits_t *dst,
|
||||
IcStride dstStride,
|
||||
int dstX,
|
||||
int dstBpp,
|
||||
|
|
@ -604,28 +604,28 @@ IcBltOne (IcStip *src,
|
|||
int width,
|
||||
int height,
|
||||
|
||||
IcBits fgand,
|
||||
IcBits icxor,
|
||||
IcBits bgand,
|
||||
IcBits bgxor);
|
||||
pixman_bits_t fgand,
|
||||
pixman_bits_t icxor,
|
||||
pixman_bits_t bgand,
|
||||
pixman_bits_t bgxor);
|
||||
|
||||
#ifdef IC_24BIT
|
||||
extern void __internal_linkage
|
||||
IcBltOne24 (IcStip *src,
|
||||
IcStride srcStride, /* IcStip units per scanline */
|
||||
int srcX, /* bit position of source */
|
||||
IcBits *dst,
|
||||
IcStride dstStride, /* IcBits units per scanline */
|
||||
pixman_bits_t *dst,
|
||||
IcStride dstStride, /* pixman_bits_t units per scanline */
|
||||
int dstX, /* bit position of dest */
|
||||
int dstBpp, /* bits per destination unit */
|
||||
|
||||
int width, /* width in bits of destination */
|
||||
int height, /* height in scanlines */
|
||||
|
||||
IcBits fgand, /* rrop values */
|
||||
IcBits fgxor,
|
||||
IcBits bgand,
|
||||
IcBits bgxor);
|
||||
pixman_bits_t fgand, /* rrop values */
|
||||
pixman_bits_t fgxor,
|
||||
pixman_bits_t bgand,
|
||||
pixman_bits_t bgxor);
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
@ -633,13 +633,13 @@ IcBltOne24 (IcStip *src,
|
|||
*/
|
||||
|
||||
extern void __internal_linkage
|
||||
IcTransparentSpan (IcBits *dst,
|
||||
IcBits stip,
|
||||
IcBits fgxor,
|
||||
IcTransparentSpan (pixman_bits_t *dst,
|
||||
pixman_bits_t stip,
|
||||
pixman_bits_t fgxor,
|
||||
int n);
|
||||
|
||||
extern void __internal_linkage
|
||||
IcEvenStipple (IcBits *dst,
|
||||
IcEvenStipple (pixman_bits_t *dst,
|
||||
IcStride dstStride,
|
||||
int dstX,
|
||||
int dstBpp,
|
||||
|
|
@ -651,16 +651,16 @@ IcEvenStipple (IcBits *dst,
|
|||
IcStride stipStride,
|
||||
int stipHeight,
|
||||
|
||||
IcBits fgand,
|
||||
IcBits fgxor,
|
||||
IcBits bgand,
|
||||
IcBits bgxor,
|
||||
pixman_bits_t fgand,
|
||||
pixman_bits_t fgxor,
|
||||
pixman_bits_t bgand,
|
||||
pixman_bits_t bgxor,
|
||||
|
||||
int xRot,
|
||||
int yRot);
|
||||
|
||||
extern void __internal_linkage
|
||||
IcOddStipple (IcBits *dst,
|
||||
IcOddStipple (pixman_bits_t *dst,
|
||||
IcStride dstStride,
|
||||
int dstX,
|
||||
int dstBpp,
|
||||
|
|
@ -673,16 +673,16 @@ IcOddStipple (IcBits *dst,
|
|||
int stipWidth,
|
||||
int stipHeight,
|
||||
|
||||
IcBits fgand,
|
||||
IcBits fgxor,
|
||||
IcBits bgand,
|
||||
IcBits bgxor,
|
||||
pixman_bits_t fgand,
|
||||
pixman_bits_t fgxor,
|
||||
pixman_bits_t bgand,
|
||||
pixman_bits_t bgxor,
|
||||
|
||||
int xRot,
|
||||
int yRot);
|
||||
|
||||
extern void __internal_linkage
|
||||
IcStipple (IcBits *dst,
|
||||
IcStipple (pixman_bits_t *dst,
|
||||
IcStride dstStride,
|
||||
int dstX,
|
||||
int dstBpp,
|
||||
|
|
@ -696,16 +696,16 @@ IcStipple (IcBits *dst,
|
|||
int stipHeight,
|
||||
int even,
|
||||
|
||||
IcBits fgand,
|
||||
IcBits fgxor,
|
||||
IcBits bgand,
|
||||
IcBits bgxor,
|
||||
pixman_bits_t fgand,
|
||||
pixman_bits_t fgxor,
|
||||
pixman_bits_t bgand,
|
||||
pixman_bits_t bgxor,
|
||||
|
||||
int xRot,
|
||||
int yRot);
|
||||
|
||||
/* XXX: Is depth redundant here? */
|
||||
struct _IcFormat {
|
||||
struct _pixman_format_t {
|
||||
int format_code;
|
||||
int depth;
|
||||
int red, redMask;
|
||||
|
|
@ -715,7 +715,7 @@ struct _IcFormat {
|
|||
};
|
||||
|
||||
typedef struct _IcPixels {
|
||||
IcBits *data;
|
||||
pixman_bits_t *data;
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
unsigned int depth;
|
||||
|
|
@ -730,7 +730,7 @@ typedef struct _IcPixels {
|
|||
typedef uint32_t Pixel;
|
||||
|
||||
/* icutil.c */
|
||||
extern IcBits __internal_linkage
|
||||
extern pixman_bits_t __internal_linkage
|
||||
IcReplicatePixel (Pixel p, int bpp);
|
||||
|
||||
/* XXX: This is to avoid including gc.h from the server includes */
|
||||
|
|
@ -766,13 +766,13 @@ _IcOnes(unsigned long mask);
|
|||
/* icformat.c */
|
||||
|
||||
extern void __internal_linkage
|
||||
IcFormatInit (IcFormat *format, int format_code);
|
||||
pixman_format_tInit (pixman_format_t *format, int format_code);
|
||||
|
||||
/* icimage.c */
|
||||
|
||||
extern IcImage * __internal_linkage
|
||||
IcImageCreateForPixels (IcPixels *pixels,
|
||||
IcFormat *format);
|
||||
extern pixman_image_t * __internal_linkage
|
||||
pixman_image_tCreateForPixels (IcPixels *pixels,
|
||||
pixman_format_t *format);
|
||||
|
||||
/* icpixels.c */
|
||||
|
||||
|
|
@ -780,7 +780,7 @@ extern IcPixels * __internal_linkage
|
|||
IcPixelsCreate (int width, int height, int depth);
|
||||
|
||||
extern IcPixels * __internal_linkage
|
||||
IcPixelsCreateForData (IcBits *data, int width, int height, int depth, int bpp, int stride);
|
||||
IcPixelsCreateForData (pixman_bits_t *data, int width, int height, int depth, int bpp, int stride);
|
||||
|
||||
extern void __internal_linkage
|
||||
IcPixelsDestroy (IcPixels *pixels);
|
||||
|
|
@ -788,26 +788,26 @@ IcPixelsDestroy (IcPixels *pixels);
|
|||
/* ictransform.c */
|
||||
|
||||
extern int __internal_linkage
|
||||
IcTransformPoint (IcTransform *transform,
|
||||
IcVector *vector);
|
||||
pixman_transform_tPoint (pixman_transform_t *transform,
|
||||
pixman_vector_t *vector);
|
||||
|
||||
/* ictrap.c */
|
||||
|
||||
extern void __internal_linkage
|
||||
IcRasterizeTrapezoid (IcImage *pMask,
|
||||
const IcTrapezoid *pTrap,
|
||||
IcRasterizeTrapezoid (pixman_image_t *pMask,
|
||||
const pixman_trapezoid_t *pTrap,
|
||||
int x_off,
|
||||
int y_off);
|
||||
|
||||
/* Avoid unnessecary PLT entries. */
|
||||
|
||||
slim_hidden_proto(IcImageCreate)
|
||||
slim_hidden_proto(IcColorToPixel)
|
||||
slim_hidden_proto(IcFormatInit)
|
||||
slim_hidden_proto(IcImageDestroy)
|
||||
slim_hidden_proto(IcFillRectangles)
|
||||
slim_hidden_proto(IcImageSetRepeat)
|
||||
slim_hidden_proto(IcComposite)
|
||||
slim_hidden_proto(pixman_image_tCreate)
|
||||
slim_hidden_proto(pixman_color_tToPixel)
|
||||
slim_hidden_proto(pixman_format_tInit)
|
||||
slim_hidden_proto(pixman_image_tDestroy)
|
||||
slim_hidden_proto(pixman_fill_rectangles)
|
||||
slim_hidden_proto(pixman_image_tSetRepeat)
|
||||
slim_hidden_proto(pixman_composite)
|
||||
|
||||
|
||||
#include "icrop.h"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: icpixels.c,v 1.4 2003-09-05 22:24:45 cworth Exp $
|
||||
* $Id: icpixels.c,v 1.5 2003-12-10 22:21:04 dajobe Exp $
|
||||
*
|
||||
* Copyright © 1998 Keith Packard
|
||||
*
|
||||
|
|
@ -25,13 +25,13 @@
|
|||
#include "icint.h"
|
||||
|
||||
static void
|
||||
IcPixelsInit (IcPixels *pixels, IcBits *buf, int width, int height, int depth, int bpp, int stride);
|
||||
IcPixelsInit (IcPixels *pixels, pixman_bits_t *buf, int width, int height, int depth, int bpp, int stride);
|
||||
|
||||
static unsigned int
|
||||
IcBitsPerPixel (unsigned int depth);
|
||||
pixman_bits_tPerPixel (unsigned int depth);
|
||||
|
||||
static unsigned int
|
||||
IcBitsPerPixel (unsigned int depth)
|
||||
pixman_bits_tPerPixel (unsigned int depth)
|
||||
{
|
||||
if (depth > 8)
|
||||
if (depth > 16)
|
||||
|
|
@ -51,15 +51,15 @@ IcPixels *
|
|||
IcPixelsCreate (int width, int height, int depth)
|
||||
{
|
||||
IcPixels *pixels;
|
||||
IcBits *buf;
|
||||
pixman_bits_t *buf;
|
||||
unsigned int buf_size;
|
||||
unsigned int bpp;
|
||||
unsigned int stride;
|
||||
unsigned int adjust;
|
||||
unsigned int base;
|
||||
|
||||
bpp = IcBitsPerPixel (depth);
|
||||
stride = ((width * bpp + IC_MASK) >> IC_SHIFT) * sizeof (IcBits);
|
||||
bpp = pixman_bits_tPerPixel (depth);
|
||||
stride = ((width * bpp + IC_MASK) >> IC_SHIFT) * sizeof (pixman_bits_t);
|
||||
buf_size = height * stride;
|
||||
base = sizeof (IcPixels);
|
||||
adjust = 0;
|
||||
|
|
@ -71,7 +71,7 @@ IcPixelsCreate (int width, int height, int depth)
|
|||
if (!pixels)
|
||||
return NULL;
|
||||
|
||||
buf = (IcBits *) ((char *)pixels + base + adjust);
|
||||
buf = (pixman_bits_t *) ((char *)pixels + base + adjust);
|
||||
|
||||
IcPixelsInit (pixels, buf, width, height, depth, bpp, stride);
|
||||
|
||||
|
|
@ -79,7 +79,7 @@ IcPixelsCreate (int width, int height, int depth)
|
|||
}
|
||||
|
||||
IcPixels *
|
||||
IcPixelsCreateForData (IcBits *data, int width, int height, int depth, int bpp, int stride)
|
||||
IcPixelsCreateForData (pixman_bits_t *data, int width, int height, int depth, int bpp, int stride)
|
||||
{
|
||||
IcPixels *pixels;
|
||||
|
||||
|
|
@ -93,7 +93,7 @@ IcPixelsCreateForData (IcBits *data, int width, int height, int depth, int bpp,
|
|||
}
|
||||
|
||||
static void
|
||||
IcPixelsInit (IcPixels *pixels, IcBits *buf, int width, int height, int depth, int bpp, int stride)
|
||||
IcPixelsInit (IcPixels *pixels, pixman_bits_t *buf, int width, int height, int depth, int bpp, int stride)
|
||||
{
|
||||
pixels->data = buf;
|
||||
pixels->width = width;
|
||||
|
|
|
|||
|
|
@ -24,11 +24,11 @@
|
|||
|
||||
/* XXX: I haven't ported this yet
|
||||
static void
|
||||
IcColorRects (IcImage *dst,
|
||||
IcImage *clipPict,
|
||||
IcColor *color,
|
||||
pixman_color_tRects (pixman_image_t *dst,
|
||||
pixman_image_t *clipPict,
|
||||
pixman_color_t *color,
|
||||
int nRect,
|
||||
IcRectangle *rects,
|
||||
pixman_rectangle_t *rects,
|
||||
int xoff,
|
||||
int yoff)
|
||||
{
|
||||
|
|
@ -45,8 +45,8 @@ IcColorRects (IcImage *dst,
|
|||
tmpval[3] = dst->clipOrigin.y - yoff;
|
||||
mask |= CPClipXOrigin|CPClipYOrigin;
|
||||
|
||||
clip = PixRegionCreate ();
|
||||
PixRegionCopy (clip, pClipPict->clientClip);
|
||||
clip = pixman_region_create ();
|
||||
pixman_region_copy (clip, pClipPict->clientClip);
|
||||
(*pGC->funcs->ChangeClip) (pGC, CT_REGION, pClip, 0);
|
||||
}
|
||||
|
||||
|
|
@ -72,47 +72,47 @@ IcColorRects (IcImage *dst,
|
|||
}
|
||||
*/
|
||||
|
||||
void IcFillRectangle (IcOperator op,
|
||||
IcImage *dst,
|
||||
const IcColor *color,
|
||||
void pixman_fill_rectangle (pixman_operator_t op,
|
||||
pixman_image_t *dst,
|
||||
const pixman_color_t *color,
|
||||
int x,
|
||||
int y,
|
||||
unsigned int width,
|
||||
unsigned int height)
|
||||
{
|
||||
IcRectangle rect;
|
||||
pixman_rectangle_t rect;
|
||||
|
||||
rect.x = x;
|
||||
rect.y = y;
|
||||
rect.width = width;
|
||||
rect.height = height;
|
||||
|
||||
IcFillRectangles (op, dst, color, &rect, 1);
|
||||
pixman_fill_rectangles (op, dst, color, &rect, 1);
|
||||
}
|
||||
|
||||
void
|
||||
IcFillRectangles (IcOperator op,
|
||||
IcImage *dst,
|
||||
const IcColor *color,
|
||||
const IcRectangle *rects,
|
||||
pixman_fill_rectangles (pixman_operator_t op,
|
||||
pixman_image_t *dst,
|
||||
const pixman_color_t *color,
|
||||
const pixman_rectangle_t *rects,
|
||||
int nRects)
|
||||
{
|
||||
IcColor color_s = *color;
|
||||
pixman_color_t color_s = *color;
|
||||
|
||||
if (color_s.alpha == 0xffff)
|
||||
{
|
||||
if (op == IcOperatorOver)
|
||||
op = IcOperatorSrc;
|
||||
if (op == PIXMAN_OPERATOR_OVER)
|
||||
op = PIXMAN_OPERATOR_SRC;
|
||||
}
|
||||
if (op == IcOperatorClear)
|
||||
if (op == PIXMAN_OPERATOR_CLEAR)
|
||||
color_s.red = color_s.green = color_s.blue = color_s.alpha = 0;
|
||||
|
||||
/* XXX: Really need this to optimize solid rectangles
|
||||
if (op == IcOperatorSource || op == IcOperatorClear)
|
||||
if (op == pixman_operator_tSource || op == PIXMAN_OPERATOR_CLEAR)
|
||||
{
|
||||
IcColorRects (dst, dst, &color_s, nRects, rects, 0, 0);
|
||||
pixman_color_tRects (dst, dst, &color_s, nRects, rects, 0, 0);
|
||||
if (dst->alphaMap)
|
||||
IcColorRects (dst->alphaMap, dst,
|
||||
pixman_color_tRects (dst->alphaMap, dst,
|
||||
&color_s, nRects, rects,
|
||||
dst->alphaOrigin.x,
|
||||
dst->alphaOrigin.y);
|
||||
|
|
@ -120,18 +120,18 @@ IcFillRectangles (IcOperator op,
|
|||
else
|
||||
*/
|
||||
{
|
||||
IcFormat rgbaFormat;
|
||||
pixman_format_t rgbaFormat;
|
||||
IcPixels *pixels;
|
||||
IcImage *src;
|
||||
IcBits pixel;
|
||||
pixman_image_t *src;
|
||||
pixman_bits_t pixel;
|
||||
|
||||
IcFormatInit (&rgbaFormat, PICT_a8r8g8b8);
|
||||
pixman_format_tInit (&rgbaFormat, PICT_a8r8g8b8);
|
||||
|
||||
pixels = IcPixelsCreate (1, 1, rgbaFormat.depth);
|
||||
if (!pixels)
|
||||
goto bail1;
|
||||
|
||||
IcColorToPixel (&rgbaFormat, &color_s, &pixel);
|
||||
pixman_color_tToPixel (&rgbaFormat, &color_s, &pixel);
|
||||
|
||||
/* XXX: Originally, fb had the following:
|
||||
|
||||
|
|
@ -142,15 +142,15 @@ IcFillRectangles (IcOperator op,
|
|||
*/
|
||||
pixels->data[0] = pixel;
|
||||
|
||||
src = IcImageCreateForPixels (pixels, &rgbaFormat);
|
||||
src = pixman_image_tCreateForPixels (pixels, &rgbaFormat);
|
||||
if (!src)
|
||||
goto bail2;
|
||||
|
||||
IcImageSetRepeat (src, 1);
|
||||
pixman_image_tSetRepeat (src, 1);
|
||||
|
||||
while (nRects--)
|
||||
{
|
||||
IcComposite (op, src, 0, dst, 0, 0, 0, 0,
|
||||
pixman_composite (op, src, 0, dst, 0, 0, 0, 0,
|
||||
rects->x,
|
||||
rects->y,
|
||||
rects->width,
|
||||
|
|
@ -158,11 +158,11 @@ IcFillRectangles (IcOperator op,
|
|||
rects++;
|
||||
}
|
||||
|
||||
IcImageDestroy (src);
|
||||
pixman_image_tDestroy (src);
|
||||
bail2:
|
||||
IcPixelsDestroy (pixels);
|
||||
bail1:
|
||||
;
|
||||
}
|
||||
}
|
||||
slim_hidden_def(IcFillRectangles);
|
||||
slim_hidden_def(pixman_fill_rectangles);
|
||||
|
|
|
|||
|
|
@ -26,13 +26,13 @@
|
|||
#define _ICROP_H_
|
||||
|
||||
typedef struct _mergeRopBits {
|
||||
IcBits ca1, cx1, ca2, cx2;
|
||||
pixman_bits_t ca1, cx1, ca2, cx2;
|
||||
} IcMergeRopRec, *IcMergeRopPtr;
|
||||
|
||||
extern const IcMergeRopRec IcMergeRopBits[16] __internal_linkage;
|
||||
|
||||
#define IcDeclareMergeRop() IcBits _ca1, _cx1, _ca2, _cx2;
|
||||
#define IcDeclarePrebuiltMergeRop() IcBits _cca, _ccx;
|
||||
#define IcDeclareMergeRop() pixman_bits_t _ca1, _cx1, _ca2, _cx2;
|
||||
#define IcDeclarePrebuiltMergeRop() pixman_bits_t _cca, _ccx;
|
||||
|
||||
#define IcInitializeMergeRop(alu,pm) {\
|
||||
const IcMergeRopRec *_bits; \
|
||||
|
|
@ -59,12 +59,12 @@ extern const IcMergeRopRec IcMergeRopBits[16] __internal_linkage;
|
|||
(((dst) & ((((src) & _ca1) ^ _cx1) | ~(mask))) ^ ((((src) & _ca2) ^ _cx2) & (mask)))
|
||||
|
||||
#define IcDoLeftMaskByteMergeRop(dst, src, lb, l) { \
|
||||
IcBits __xor = ((src) & _ca2) ^ _cx2; \
|
||||
pixman_bits_t __xor = ((src) & _ca2) ^ _cx2; \
|
||||
IcDoLeftMaskByteRRop(dst,lb,l,((src) & _ca1) ^ _cx1,__xor); \
|
||||
}
|
||||
|
||||
#define IcDoRightMaskByteMergeRop(dst, src, rb, r) { \
|
||||
IcBits __xor = ((src) & _ca2) ^ _cx2; \
|
||||
pixman_bits_t __xor = ((src) & _ca2) ^ _cx2; \
|
||||
IcDoRightMaskByteRRop(dst,rb,r,((src) & _ca1) ^ _cx1,__xor); \
|
||||
}
|
||||
|
||||
|
|
@ -85,9 +85,9 @@ extern const IcMergeRopRec IcMergeRopBits[16] __internal_linkage;
|
|||
(~(fg) & IcFillFromBit((rop>>2) ^ (rop>>3),t))) | \
|
||||
~(pm))
|
||||
|
||||
#define IcXor(rop,fg,pm) IcXorT(rop,fg,pm,IcBits)
|
||||
#define IcXor(rop,fg,pm) IcXorT(rop,fg,pm,pixman_bits_t)
|
||||
|
||||
#define IcAnd(rop,fg,pm) IcAndT(rop,fg,pm,IcBits)
|
||||
#define IcAnd(rop,fg,pm) IcAndT(rop,fg,pm,pixman_bits_t)
|
||||
|
||||
#define IcXorStip(rop,fg,pm) IcXorT(rop,fg,pm,IcStip)
|
||||
|
||||
|
|
@ -98,11 +98,11 @@ extern const IcMergeRopRec IcMergeRopBits[16] __internal_linkage;
|
|||
*/
|
||||
|
||||
/* half of table */
|
||||
extern const IcBits icStipple16Bits[256] __internal_linkage;
|
||||
extern const pixman_bits_t icStipple16Bits[256] __internal_linkage;
|
||||
#define IcStipple16Bits(b) \
|
||||
(icStipple16Bits[(b)&0xff] | icStipple16Bits[(b) >> 8] << IC_HALFUNIT)
|
||||
|
||||
extern const IcBits * __internal_linkage
|
||||
extern const pixman_bits_t * __internal_linkage
|
||||
IcStippleTable(int bits);
|
||||
|
||||
#define IcStippleRRop(dst, b, fa, fx, ba, bx) \
|
||||
|
|
@ -112,12 +112,12 @@ IcStippleTable(int bits);
|
|||
(IcDoMaskRRop(dst, fa, fx, m) & (b)) | (IcDoMaskRRop(dst, ba, bx, m) & ~(b))
|
||||
|
||||
#define IcDoLeftMaskByteStippleRRop(dst, b, fa, fx, ba, bx, lb, l) { \
|
||||
IcBits __xor = ((fx) & (b)) | ((bx) & ~(b)); \
|
||||
pixman_bits_t __xor = ((fx) & (b)) | ((bx) & ~(b)); \
|
||||
IcDoLeftMaskByteRRop(dst, lb, l, ((fa) & (b)) | ((ba) & ~(b)), __xor); \
|
||||
}
|
||||
|
||||
#define IcDoRightMaskByteStippleRRop(dst, b, fa, fx, ba, bx, rb, r) { \
|
||||
IcBits __xor = ((fx) & (b)) | ((bx) & ~(b)); \
|
||||
pixman_bits_t __xor = ((fx) & (b)) | ((bx) & ~(b)); \
|
||||
IcDoRightMaskByteRRop(dst, rb, r, ((fa) & (b)) | ((ba) & ~(b)), __xor); \
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -55,9 +55,9 @@
|
|||
*/
|
||||
|
||||
void
|
||||
IcTransparentSpan (IcBits *dst,
|
||||
IcBits stip,
|
||||
IcBits fgxor,
|
||||
IcTransparentSpan (pixman_bits_t *dst,
|
||||
pixman_bits_t stip,
|
||||
pixman_bits_t fgxor,
|
||||
int n)
|
||||
{
|
||||
IcStip s;
|
||||
|
|
|
|||
|
|
@ -29,10 +29,10 @@ typedef xFixed_32_32 xFixed_48_16;
|
|||
#define MIN_FIXED_48_16 (-((xFixed_48_16) 1 << 31))
|
||||
|
||||
int
|
||||
IcTransformPoint (IcTransform *transform,
|
||||
IcVector *vector)
|
||||
pixman_transform_tPoint (pixman_transform_t *transform,
|
||||
pixman_vector_t *vector)
|
||||
{
|
||||
IcVector result;
|
||||
pixman_vector_t result;
|
||||
int i, j;
|
||||
xFixed_32_32 partial;
|
||||
xFixed_48_16 v;
|
||||
|
|
|
|||
|
|
@ -29,13 +29,13 @@
|
|||
#define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||
#define MAX(a,b) ((a) > (b) ? (a) : (b))
|
||||
|
||||
IcImage *
|
||||
IcCreateAlphaPicture (IcImage *dst,
|
||||
IcFormat *format,
|
||||
pixman_image_t *
|
||||
IcCreateAlphaPicture (pixman_image_t *dst,
|
||||
pixman_format_t *format,
|
||||
uint16_t width,
|
||||
uint16_t height)
|
||||
{
|
||||
IcImage *image;
|
||||
pixman_image_t *image;
|
||||
int own_format = 0;
|
||||
|
||||
if (width > 32767 || height > 32767)
|
||||
|
|
@ -45,39 +45,39 @@ IcCreateAlphaPicture (IcImage *dst,
|
|||
{
|
||||
own_format = 1;
|
||||
if (dst->polyEdge == PolyEdgeSharp)
|
||||
format = IcFormatCreate (IcFormatNameA1);
|
||||
format = pixman_format_tCreate (PIXMAN_FORMAT_NAME_A1);
|
||||
else
|
||||
format = IcFormatCreate (IcFormatNameA8);
|
||||
format = pixman_format_tCreate (PIXMAN_FORMAT_NAME_A8);
|
||||
if (!format)
|
||||
return 0;
|
||||
}
|
||||
|
||||
image = IcImageCreate (format, width, height);
|
||||
image = pixman_image_tCreate (format, width, height);
|
||||
|
||||
if (own_format)
|
||||
IcFormatDestroy (format);
|
||||
pixman_format_tDestroy (format);
|
||||
|
||||
/* XXX: Is this a reasonable way to clear the image? Would
|
||||
probably be preferable to use IcImageFillRectangle once such a
|
||||
probably be preferable to use pixman_image_tFillRectangle once such a
|
||||
beast exists. */
|
||||
memset (image->pixels->data, 0, height * image->pixels->stride);
|
||||
|
||||
return image;
|
||||
}
|
||||
|
||||
static IcFixed16_16
|
||||
IcLineFixedX (const IcLineFixed *l, IcFixed16_16 y, int ceil)
|
||||
static pixman_fixed16_16_t
|
||||
pixman_line_fixed_tX (const pixman_line_fixed_t *l, pixman_fixed16_16_t y, int ceil)
|
||||
{
|
||||
IcFixed16_16 dx = l->p2.x - l->p1.x;
|
||||
pixman_fixed16_16_t dx = l->p2.x - l->p1.x;
|
||||
xFixed_32_32 ex = (xFixed_32_32) (y - l->p1.y) * dx;
|
||||
IcFixed16_16 dy = l->p2.y - l->p1.y;
|
||||
pixman_fixed16_16_t dy = l->p2.y - l->p1.y;
|
||||
if (ceil)
|
||||
ex += (dy - 1);
|
||||
return l->p1.x + (IcFixed16_16) (ex / dy);
|
||||
return l->p1.x + (pixman_fixed16_16_t) (ex / dy);
|
||||
}
|
||||
|
||||
static void
|
||||
IcTrapezoidBounds (int ntrap, const IcTrapezoid *traps, PixRegionBox *box)
|
||||
pixman_trapezoid_tBounds (int ntrap, const pixman_trapezoid_t *traps, pixman_box16_t *box)
|
||||
{
|
||||
box->y1 = MAXSHORT;
|
||||
box->y2 = MINSHORT;
|
||||
|
|
@ -97,32 +97,32 @@ IcTrapezoidBounds (int ntrap, const IcTrapezoid *traps, PixRegionBox *box)
|
|||
if (y2 > box->y2)
|
||||
box->y2 = y2;
|
||||
|
||||
x1 = xFixedToInt (MIN (IcLineFixedX (&traps->left, traps->top, 0),
|
||||
IcLineFixedX (&traps->left, traps->bottom, 0)));
|
||||
x1 = xFixedToInt (MIN (pixman_line_fixed_tX (&traps->left, traps->top, 0),
|
||||
pixman_line_fixed_tX (&traps->left, traps->bottom, 0)));
|
||||
if (x1 < box->x1)
|
||||
box->x1 = x1;
|
||||
|
||||
x2 = xFixedToInt (xFixedCeil (MAX (IcLineFixedX (&traps->right, traps->top, 1),
|
||||
IcLineFixedX (&traps->right, traps->bottom, 1))));
|
||||
x2 = xFixedToInt (xFixedCeil (MAX (pixman_line_fixed_tX (&traps->right, traps->top, 1),
|
||||
pixman_line_fixed_tX (&traps->right, traps->bottom, 1))));
|
||||
if (x2 > box->x2)
|
||||
box->x2 = x2;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
IcCompositeTrapezoids (IcOperator op,
|
||||
IcImage *src,
|
||||
IcImage *dst,
|
||||
pixman_compositeTrapezoids (pixman_operator_t op,
|
||||
pixman_image_t *src,
|
||||
pixman_image_t *dst,
|
||||
int xSrc,
|
||||
int ySrc,
|
||||
const IcTrapezoid *traps,
|
||||
const pixman_trapezoid_t *traps,
|
||||
int ntraps)
|
||||
{
|
||||
IcImage *image = NULL;
|
||||
PixRegionBox bounds;
|
||||
pixman_image_t *image = NULL;
|
||||
pixman_box16_t bounds;
|
||||
int16_t xDst, yDst;
|
||||
int16_t xRel, yRel;
|
||||
IcFormat *format;
|
||||
pixman_format_t *format;
|
||||
|
||||
if (ntraps == 0)
|
||||
return;
|
||||
|
|
@ -130,11 +130,11 @@ IcCompositeTrapezoids (IcOperator op,
|
|||
xDst = traps[0].left.p1.x >> 16;
|
||||
yDst = traps[0].left.p1.y >> 16;
|
||||
|
||||
format = IcFormatCreate (IcFormatNameA8);
|
||||
format = pixman_format_tCreate (PIXMAN_FORMAT_NAME_A8);
|
||||
|
||||
if (format)
|
||||
{
|
||||
IcTrapezoidBounds (ntraps, traps, &bounds);
|
||||
pixman_trapezoid_tBounds (ntraps, traps, &bounds);
|
||||
if (bounds.y1 >= bounds.y2 || bounds.x1 >= bounds.x2)
|
||||
return;
|
||||
image = IcCreateAlphaPicture (dst, format,
|
||||
|
|
@ -149,7 +149,7 @@ IcCompositeTrapezoids (IcOperator op,
|
|||
continue;
|
||||
if (!format)
|
||||
{
|
||||
IcTrapezoidBounds (1, traps, &bounds);
|
||||
pixman_trapezoid_tBounds (1, traps, &bounds);
|
||||
if (bounds.y1 >= bounds.y2 || bounds.x1 >= bounds.x2)
|
||||
continue;
|
||||
image = IcCreateAlphaPicture (dst, format,
|
||||
|
|
@ -164,25 +164,25 @@ IcCompositeTrapezoids (IcOperator op,
|
|||
{
|
||||
xRel = bounds.x1 + xSrc - xDst;
|
||||
yRel = bounds.y1 + ySrc - yDst;
|
||||
IcComposite (op, src, image, dst,
|
||||
pixman_composite (op, src, image, dst,
|
||||
xRel, yRel, 0, 0, bounds.x1, bounds.y1,
|
||||
bounds.x2 - bounds.x1,
|
||||
bounds.y2 - bounds.y1);
|
||||
IcImageDestroy (image);
|
||||
pixman_image_tDestroy (image);
|
||||
}
|
||||
}
|
||||
if (format)
|
||||
{
|
||||
xRel = bounds.x1 + xSrc - xDst;
|
||||
yRel = bounds.y1 + ySrc - yDst;
|
||||
IcComposite (op, src, image, dst,
|
||||
pixman_composite (op, src, image, dst,
|
||||
xRel, yRel, 0, 0, bounds.x1, bounds.y1,
|
||||
bounds.x2 - bounds.x1,
|
||||
bounds.y2 - bounds.y1);
|
||||
IcImageDestroy (image);
|
||||
pixman_image_tDestroy (image);
|
||||
}
|
||||
|
||||
IcFormatDestroy (format);
|
||||
pixman_format_tDestroy (format);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
|
|
@ -808,11 +808,11 @@ pixelWalkFirstPixel (PixelWalk *pw)
|
|||
}
|
||||
|
||||
static void
|
||||
pixelWalkInit (PixelWalk *pw, IcLineFixed *line,
|
||||
IcFixed16_16 top_y, IcFixed16_16 bottom_y)
|
||||
pixelWalkInit (PixelWalk *pw, pixman_line_fixed_t *line,
|
||||
pixman_fixed16_16_t top_y, pixman_fixed16_16_t bottom_y)
|
||||
{
|
||||
xFixed_32_32 dy_inc, dx_inc;
|
||||
IcPointFixed *top, *bot;
|
||||
pixman_point_fixed_t *top, *bot;
|
||||
|
||||
/*
|
||||
* Orient lines top down
|
||||
|
|
@ -1143,15 +1143,15 @@ PixelAlpha(xFixed pixel_x,
|
|||
)
|
||||
|
||||
void
|
||||
IcRasterizeTrapezoid (IcImage *pMask,
|
||||
const IcTrapezoid *pTrap,
|
||||
IcRasterizeTrapezoid (pixman_image_t *pMask,
|
||||
const pixman_trapezoid_t *pTrap,
|
||||
int x_off,
|
||||
int y_off)
|
||||
{
|
||||
IcTrapezoid trap = *pTrap;
|
||||
pixman_trapezoid_t trap = *pTrap;
|
||||
int alpha, temp;
|
||||
|
||||
IcCompositeOperand mask;
|
||||
pixman_compositeOperand mask;
|
||||
|
||||
int depth = pMask->pixels->depth;
|
||||
int max_alpha = (1 << depth) - 1;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#include "icint.h"
|
||||
|
||||
static void
|
||||
IcPointFixedBounds (int npoint, const IcPointFixed *points, PixRegionBox *bounds)
|
||||
pixman_point_fixed_tBounds (int npoint, const pixman_point_fixed_t *points, pixman_box16_t *bounds)
|
||||
{
|
||||
bounds->x1 = xFixedToInt (points->x);
|
||||
bounds->x2 = xFixedToInt (xFixedCeil (points->x));
|
||||
|
|
@ -51,19 +51,19 @@ IcPointFixedBounds (int npoint, const IcPointFixed *points, PixRegionBox *bounds
|
|||
}
|
||||
|
||||
static void
|
||||
IcTriangleBounds (int ntri, const IcTriangle *tris, PixRegionBox *bounds)
|
||||
pixman_triangle_tBounds (int ntri, const pixman_triangle_t *tris, pixman_box16_t *bounds)
|
||||
{
|
||||
IcPointFixedBounds (ntri * 3, (IcPointFixed *) tris, bounds);
|
||||
pixman_point_fixed_tBounds (ntri * 3, (pixman_point_fixed_t *) tris, bounds);
|
||||
}
|
||||
|
||||
static void
|
||||
IcRasterizeTriangle (IcImage *image,
|
||||
const IcTriangle *tri,
|
||||
IcRasterizeTriangle (pixman_image_t *image,
|
||||
const pixman_triangle_t *tri,
|
||||
int x_off,
|
||||
int y_off)
|
||||
{
|
||||
const IcPointFixed *top, *left, *right, *t;
|
||||
IcTrapezoid trap[2];
|
||||
const pixman_point_fixed_t *top, *left, *right, *t;
|
||||
pixman_trapezoid_t trap[2];
|
||||
|
||||
top = &tri->p1;
|
||||
left = &tri->p2;
|
||||
|
|
@ -135,28 +135,28 @@ IcRasterizeTriangle (IcImage *image,
|
|||
}
|
||||
|
||||
void
|
||||
IcCompositeTriangles (IcOperator op,
|
||||
IcImage *src,
|
||||
IcImage *dst,
|
||||
pixman_compositeTriangles (pixman_operator_t op,
|
||||
pixman_image_t *src,
|
||||
pixman_image_t *dst,
|
||||
int xSrc,
|
||||
int ySrc,
|
||||
const IcTriangle *tris,
|
||||
const pixman_triangle_t *tris,
|
||||
int ntris)
|
||||
{
|
||||
PixRegionBox bounds;
|
||||
IcImage *image = NULL;
|
||||
pixman_box16_t bounds;
|
||||
pixman_image_t *image = NULL;
|
||||
int xDst, yDst;
|
||||
int xRel, yRel;
|
||||
IcFormat *format;
|
||||
pixman_format_t *format;
|
||||
|
||||
xDst = tris[0].p1.x >> 16;
|
||||
yDst = tris[0].p1.y >> 16;
|
||||
|
||||
format = IcFormatCreate (IcFormatNameA8);
|
||||
format = pixman_format_tCreate (PIXMAN_FORMAT_NAME_A8);
|
||||
|
||||
if (format)
|
||||
{
|
||||
IcTriangleBounds (ntris, tris, &bounds);
|
||||
pixman_triangle_tBounds (ntris, tris, &bounds);
|
||||
if (bounds.x2 <= bounds.x1 || bounds.y2 <= bounds.y1)
|
||||
return;
|
||||
image = IcCreateAlphaPicture (dst,
|
||||
|
|
@ -170,7 +170,7 @@ IcCompositeTriangles (IcOperator op,
|
|||
{
|
||||
if (!format)
|
||||
{
|
||||
IcTriangleBounds (1, tris, &bounds);
|
||||
pixman_triangle_tBounds (1, tris, &bounds);
|
||||
if (bounds.x2 <= bounds.x1 || bounds.y2 <= bounds.y1)
|
||||
continue;
|
||||
image = IcCreateAlphaPicture (dst,
|
||||
|
|
@ -185,10 +185,10 @@ IcCompositeTriangles (IcOperator op,
|
|||
{
|
||||
xRel = bounds.x1 + xSrc - xDst;
|
||||
yRel = bounds.y1 + ySrc - yDst;
|
||||
IcComposite (op, src, image, dst,
|
||||
pixman_composite (op, src, image, dst,
|
||||
xRel, yRel, 0, 0, bounds.x1, bounds.y1,
|
||||
bounds.x2 - bounds.x1, bounds.y2 - bounds.y1);
|
||||
IcImageDestroy (image);
|
||||
pixman_image_tDestroy (image);
|
||||
}
|
||||
/* XXX adjust xSrc and ySrc */
|
||||
}
|
||||
|
|
@ -196,41 +196,41 @@ IcCompositeTriangles (IcOperator op,
|
|||
{
|
||||
xRel = bounds.x1 + xSrc - xDst;
|
||||
yRel = bounds.y1 + ySrc - yDst;
|
||||
IcComposite (op, src, image, dst,
|
||||
pixman_composite (op, src, image, dst,
|
||||
xRel, yRel, 0, 0, bounds.x1, bounds.y1,
|
||||
bounds.x2 - bounds.x1, bounds.y2 - bounds.y1);
|
||||
IcImageDestroy (image);
|
||||
pixman_image_tDestroy (image);
|
||||
}
|
||||
|
||||
IcFormatDestroy (format);
|
||||
pixman_format_tDestroy (format);
|
||||
}
|
||||
|
||||
void
|
||||
IcCompositeTriStrip (IcOperator op,
|
||||
IcImage *src,
|
||||
IcImage *dst,
|
||||
pixman_compositeTriStrip (pixman_operator_t op,
|
||||
pixman_image_t *src,
|
||||
pixman_image_t *dst,
|
||||
int xSrc,
|
||||
int ySrc,
|
||||
const IcPointFixed *points,
|
||||
const pixman_point_fixed_t *points,
|
||||
int npoints)
|
||||
{
|
||||
IcTriangle tri;
|
||||
PixRegionBox bounds;
|
||||
IcImage *image = NULL;
|
||||
pixman_triangle_t tri;
|
||||
pixman_box16_t bounds;
|
||||
pixman_image_t *image = NULL;
|
||||
int xDst, yDst;
|
||||
int xRel, yRel;
|
||||
IcFormat *format;
|
||||
pixman_format_t *format;
|
||||
|
||||
xDst = points[0].x >> 16;
|
||||
yDst = points[0].y >> 16;
|
||||
|
||||
format = IcFormatCreate (IcFormatNameA8);
|
||||
format = pixman_format_tCreate (PIXMAN_FORMAT_NAME_A8);
|
||||
|
||||
if (npoints < 3)
|
||||
return;
|
||||
if (format)
|
||||
{
|
||||
IcPointFixedBounds (npoints, points, &bounds);
|
||||
pixman_point_fixed_tBounds (npoints, points, &bounds);
|
||||
if (bounds.x2 <= bounds.x1 || bounds.y2 <= bounds.y1)
|
||||
return;
|
||||
image = IcCreateAlphaPicture (dst,
|
||||
|
|
@ -247,7 +247,7 @@ IcCompositeTriStrip (IcOperator op,
|
|||
tri.p3 = points[2];
|
||||
if (!format)
|
||||
{
|
||||
IcTriangleBounds (1, &tri, &bounds);
|
||||
pixman_triangle_tBounds (1, &tri, &bounds);
|
||||
if (bounds.x2 <= bounds.x1 || bounds.y2 <= bounds.y1)
|
||||
continue;
|
||||
image = IcCreateAlphaPicture (dst,
|
||||
|
|
@ -262,52 +262,52 @@ IcCompositeTriStrip (IcOperator op,
|
|||
{
|
||||
xRel = bounds.x1 + xSrc - xDst;
|
||||
yRel = bounds.y1 + ySrc - yDst;
|
||||
IcComposite (op, src, image, dst,
|
||||
pixman_composite (op, src, image, dst,
|
||||
xRel, yRel, 0, 0, bounds.x1, bounds.y1,
|
||||
bounds.x2 - bounds.x1, bounds.y2 - bounds.y1);
|
||||
IcImageDestroy (image);
|
||||
pixman_image_tDestroy (image);
|
||||
}
|
||||
}
|
||||
if (format)
|
||||
{
|
||||
xRel = bounds.x1 + xSrc - xDst;
|
||||
yRel = bounds.y1 + ySrc - yDst;
|
||||
IcComposite (op, src, image, dst,
|
||||
pixman_composite (op, src, image, dst,
|
||||
xRel, yRel, 0, 0, bounds.x1, bounds.y1,
|
||||
bounds.x2 - bounds.x1, bounds.y2 - bounds.y1);
|
||||
IcImageDestroy (image);
|
||||
pixman_image_tDestroy (image);
|
||||
}
|
||||
|
||||
IcFormatDestroy (format);
|
||||
pixman_format_tDestroy (format);
|
||||
}
|
||||
|
||||
void
|
||||
IcCompositeTriFan (IcOperator op,
|
||||
IcImage *src,
|
||||
IcImage *dst,
|
||||
pixman_compositeTriFan (pixman_operator_t op,
|
||||
pixman_image_t *src,
|
||||
pixman_image_t *dst,
|
||||
int xSrc,
|
||||
int ySrc,
|
||||
const IcPointFixed *points,
|
||||
const pixman_point_fixed_t *points,
|
||||
int npoints)
|
||||
{
|
||||
IcTriangle tri;
|
||||
PixRegionBox bounds;
|
||||
IcImage *image = NULL;
|
||||
const IcPointFixed *first;
|
||||
pixman_triangle_t tri;
|
||||
pixman_box16_t bounds;
|
||||
pixman_image_t *image = NULL;
|
||||
const pixman_point_fixed_t *first;
|
||||
int xDst, yDst;
|
||||
int xRel, yRel;
|
||||
IcFormat *format;
|
||||
pixman_format_t *format;
|
||||
|
||||
xDst = points[0].x >> 16;
|
||||
yDst = points[0].y >> 16;
|
||||
|
||||
format = IcFormatCreate (IcFormatNameA8);
|
||||
format = pixman_format_tCreate (PIXMAN_FORMAT_NAME_A8);
|
||||
|
||||
if (npoints < 3)
|
||||
return;
|
||||
if (format)
|
||||
{
|
||||
IcPointFixedBounds (npoints, points, &bounds);
|
||||
pixman_point_fixed_tBounds (npoints, points, &bounds);
|
||||
if (bounds.x2 <= bounds.x1 || bounds.y2 <= bounds.y1)
|
||||
return;
|
||||
image = IcCreateAlphaPicture (dst,
|
||||
|
|
@ -326,7 +326,7 @@ IcCompositeTriFan (IcOperator op,
|
|||
tri.p3 = points[1];
|
||||
if (!format)
|
||||
{
|
||||
IcTriangleBounds (1, &tri, &bounds);
|
||||
pixman_triangle_tBounds (1, &tri, &bounds);
|
||||
if (bounds.x2 <= bounds.x1 || bounds.y2 <= bounds.y1)
|
||||
continue;
|
||||
image = IcCreateAlphaPicture (dst,
|
||||
|
|
@ -341,22 +341,22 @@ IcCompositeTriFan (IcOperator op,
|
|||
{
|
||||
xRel = bounds.x1 + xSrc - xDst;
|
||||
yRel = bounds.y1 + ySrc - yDst;
|
||||
IcComposite (op, src, image, dst,
|
||||
pixman_composite (op, src, image, dst,
|
||||
xRel, yRel, 0, 0, bounds.x1, bounds.y1,
|
||||
bounds.x2 - bounds.x1, bounds.y2 - bounds.y1);
|
||||
IcImageDestroy (image);
|
||||
pixman_image_tDestroy (image);
|
||||
}
|
||||
}
|
||||
if (format)
|
||||
{
|
||||
xRel = bounds.x1 + xSrc - xDst;
|
||||
yRel = bounds.y1 + ySrc - yDst;
|
||||
IcComposite (op, src, image, dst,
|
||||
pixman_composite (op, src, image, dst,
|
||||
xRel, yRel, 0, 0, bounds.x1, bounds.y1,
|
||||
bounds.x2 - bounds.x1, bounds.y2 - bounds.y1);
|
||||
IcImageDestroy (image);
|
||||
pixman_image_tDestroy (image);
|
||||
}
|
||||
|
||||
IcFormatDestroy (format);
|
||||
pixman_format_tDestroy (format);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@
|
|||
|
||||
#include "icint.h"
|
||||
|
||||
IcBits
|
||||
pixman_bits_t
|
||||
IcReplicatePixel (Pixel p, int bpp)
|
||||
{
|
||||
IcBits b = p;
|
||||
pixman_bits_t b = p;
|
||||
|
||||
b &= IcFullMask (bpp);
|
||||
while (bpp < IC_UNIT)
|
||||
|
|
@ -99,20 +99,20 @@ const IcMergeRopRec IcMergeRopBits[16] = {
|
|||
#if IC_UNIT == 16
|
||||
#define icStipple16Bits 0
|
||||
#define icStipple8Bits 0
|
||||
static const IcBits icStipple4Bits[16] = {
|
||||
static const pixman_bits_t icStipple4Bits[16] = {
|
||||
C4( 0,4), C4( 1,4), C4( 2,4), C4( 3,4), C4( 4,4), C4( 5,4),
|
||||
C4( 6,4), C4( 7,4), C4( 8,4), C4( 9,4), C4( 10,4), C4( 11,4),
|
||||
C4( 12,4), C4( 13,4), C4( 14,4), C4( 15,4),};
|
||||
static const IcBits icStipple2Bits[4] = {
|
||||
static const pixman_bits_t icStipple2Bits[4] = {
|
||||
C2( 0,8), C2( 1,8), C2( 2,8), C2( 3,8),
|
||||
};
|
||||
static const IcBits icStipple1Bits[2] = {
|
||||
static const pixman_bits_t icStipple1Bits[2] = {
|
||||
C1( 0,16), C1( 1,16),
|
||||
};
|
||||
#endif
|
||||
#if IC_UNIT == 32
|
||||
#define icStipple16Bits 0
|
||||
static const IcBits icStipple8Bits[256] = {
|
||||
static const pixman_bits_t icStipple8Bits[256] = {
|
||||
C8( 0,4), C8( 1,4), C8( 2,4), C8( 3,4), C8( 4,4), C8( 5,4),
|
||||
C8( 6,4), C8( 7,4), C8( 8,4), C8( 9,4), C8( 10,4), C8( 11,4),
|
||||
C8( 12,4), C8( 13,4), C8( 14,4), C8( 15,4), C8( 16,4), C8( 17,4),
|
||||
|
|
@ -157,19 +157,19 @@ static const IcBits icStipple8Bits[256] = {
|
|||
C8(246,4), C8(247,4), C8(248,4), C8(249,4), C8(250,4), C8(251,4),
|
||||
C8(252,4), C8(253,4), C8(254,4), C8(255,4),
|
||||
};
|
||||
static const IcBits icStipple4Bits[16] = {
|
||||
static const pixman_bits_t icStipple4Bits[16] = {
|
||||
C4( 0,8), C4( 1,8), C4( 2,8), C4( 3,8), C4( 4,8), C4( 5,8),
|
||||
C4( 6,8), C4( 7,8), C4( 8,8), C4( 9,8), C4( 10,8), C4( 11,8),
|
||||
C4( 12,8), C4( 13,8), C4( 14,8), C4( 15,8),};
|
||||
static const IcBits icStipple2Bits[4] = {
|
||||
static const pixman_bits_t icStipple2Bits[4] = {
|
||||
C2( 0,16), C2( 1,16), C2( 2,16), C2( 3,16),
|
||||
};
|
||||
static const IcBits icStipple1Bits[2] = {
|
||||
static const pixman_bits_t icStipple1Bits[2] = {
|
||||
C1( 0,32), C1( 1,32),
|
||||
};
|
||||
#endif
|
||||
#if IC_UNIT == 64
|
||||
const IcBits icStipple16Bits[256] = {
|
||||
const pixman_bits_t icStipple16Bits[256] = {
|
||||
C8( 0,4), C8( 1,4), C8( 2,4), C8( 3,4), C8( 4,4), C8( 5,4),
|
||||
C8( 6,4), C8( 7,4), C8( 8,4), C8( 9,4), C8( 10,4), C8( 11,4),
|
||||
C8( 12,4), C8( 13,4), C8( 14,4), C8( 15,4), C8( 16,4), C8( 17,4),
|
||||
|
|
@ -214,7 +214,7 @@ const IcBits icStipple16Bits[256] = {
|
|||
C8(246,4), C8(247,4), C8(248,4), C8(249,4), C8(250,4), C8(251,4),
|
||||
C8(252,4), C8(253,4), C8(254,4), C8(255,4),
|
||||
};
|
||||
static const IcBits icStipple8Bits[256] = {
|
||||
static const pixman_bits_t icStipple8Bits[256] = {
|
||||
C8( 0,8), C8( 1,8), C8( 2,8), C8( 3,8), C8( 4,8), C8( 5,8),
|
||||
C8( 6,8), C8( 7,8), C8( 8,8), C8( 9,8), C8( 10,8), C8( 11,8),
|
||||
C8( 12,8), C8( 13,8), C8( 14,8), C8( 15,8), C8( 16,8), C8( 17,8),
|
||||
|
|
@ -259,17 +259,17 @@ static const IcBits icStipple8Bits[256] = {
|
|||
C8(246,8), C8(247,8), C8(248,8), C8(249,8), C8(250,8), C8(251,8),
|
||||
C8(252,8), C8(253,8), C8(254,8), C8(255,8),
|
||||
};
|
||||
static const IcBits icStipple4Bits[16] = {
|
||||
static const pixman_bits_t icStipple4Bits[16] = {
|
||||
C4( 0,16), C4( 1,16), C4( 2,16), C4( 3,16), C4( 4,16), C4( 5,16),
|
||||
C4( 6,16), C4( 7,16), C4( 8,16), C4( 9,16), C4( 10,16), C4( 11,16),
|
||||
C4( 12,16), C4( 13,16), C4( 14,16), C4( 15,16),};
|
||||
static const IcBits icStipple2Bits[4] = {
|
||||
static const pixman_bits_t icStipple2Bits[4] = {
|
||||
C2( 0,32), C2( 1,32), C2( 2,32), C2( 3,32),
|
||||
};
|
||||
#define icStipple1Bits 0
|
||||
#endif
|
||||
|
||||
const IcBits *
|
||||
const pixman_bits_t *
|
||||
IcStippleTable(int bits)
|
||||
{
|
||||
switch (bits) {
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
|||
SOFTWARE.
|
||||
|
||||
******************************************************************/
|
||||
/* $Id: pixman.h,v 1.6 2003-12-10 00:08:16 dajobe Exp $ */
|
||||
/* $Id: pixman.h,v 1.7 2003-12-10 22:21:54 dajobe Exp $ */
|
||||
|
||||
/* libic.h */
|
||||
|
||||
|
|
@ -104,65 +104,65 @@ extern "C" {
|
|||
|
||||
/* pixregion.h */
|
||||
|
||||
typedef struct _PixRegion PixRegion;
|
||||
typedef struct _pixman_region16_t pixman_region16_t;
|
||||
|
||||
typedef struct _PixRegionBox {
|
||||
typedef struct _pixman_box16_t {
|
||||
short x1, y1, x2, y2;
|
||||
} PixRegionBox;
|
||||
} pixman_box16_t;
|
||||
|
||||
typedef enum {
|
||||
PixRegionStatusFailure,
|
||||
PixRegionStatusSuccess
|
||||
} PixRegionStatus;
|
||||
PIXMAN_REGION_STATUS_FAILURE,
|
||||
PIXMAN_REGION_STATUS_SUCCESS
|
||||
} pixman_region_status_t;
|
||||
|
||||
/* creation/destruction */
|
||||
|
||||
extern PixRegion * __external_linkage
|
||||
PixRegionCreate (void);
|
||||
extern pixman_region16_t * __external_linkage
|
||||
pixman_region_create (void);
|
||||
|
||||
extern PixRegion * __external_linkage
|
||||
PixRegionCreateSimple (PixRegionBox *extents);
|
||||
extern pixman_region16_t * __external_linkage
|
||||
pixman_region_createSimple (pixman_box16_t *extents);
|
||||
|
||||
extern void __external_linkage
|
||||
PixRegionDestroy (PixRegion *region);
|
||||
pixman_region_destroy (pixman_region16_t *region);
|
||||
|
||||
/* manipulation */
|
||||
|
||||
extern void __external_linkage
|
||||
PixRegionTranslate (PixRegion *region, int x, int y);
|
||||
pixman_region_translate (pixman_region16_t *region, int x, int y);
|
||||
|
||||
extern PixRegionStatus __external_linkage
|
||||
PixRegionCopy (PixRegion *dest, PixRegion *source);
|
||||
extern pixman_region_status_t __external_linkage
|
||||
pixman_region_copy (pixman_region16_t *dest, pixman_region16_t *source);
|
||||
|
||||
extern PixRegionStatus __external_linkage
|
||||
PixRegionIntersect (PixRegion *newReg, PixRegion *reg1, PixRegion *reg2);
|
||||
extern pixman_region_status_t __external_linkage
|
||||
pixman_region_intersect (pixman_region16_t *newReg, pixman_region16_t *reg1, pixman_region16_t *reg2);
|
||||
|
||||
extern PixRegionStatus __external_linkage
|
||||
PixRegionUnion (PixRegion *newReg, PixRegion *reg1, PixRegion *reg2);
|
||||
extern pixman_region_status_t __external_linkage
|
||||
pixman_region_union (pixman_region16_t *newReg, pixman_region16_t *reg1, pixman_region16_t *reg2);
|
||||
|
||||
extern PixRegionStatus __external_linkage
|
||||
PixRegionUnionRect(PixRegion *dest, PixRegion *source,
|
||||
extern pixman_region_status_t __external_linkage
|
||||
pixman_region_unionRect(pixman_region16_t *dest, pixman_region16_t *source,
|
||||
int x, int y, unsigned int width, unsigned int height);
|
||||
|
||||
extern PixRegionStatus __external_linkage
|
||||
PixRegionSubtract (PixRegion *regD, PixRegion *regM, PixRegion *regS);
|
||||
extern pixman_region_status_t __external_linkage
|
||||
pixman_region_subtract (pixman_region16_t *regD, pixman_region16_t *regM, pixman_region16_t *regS);
|
||||
|
||||
extern PixRegionStatus __external_linkage
|
||||
PixRegionInverse (PixRegion *newReg, PixRegion *reg1, PixRegionBox *invRect);
|
||||
extern pixman_region_status_t __external_linkage
|
||||
pixman_region_inverse (pixman_region16_t *newReg, pixman_region16_t *reg1, pixman_box16_t *invRect);
|
||||
|
||||
/* XXX: Need to fix this so it doesn't depend on an X data structure
|
||||
extern PixRegion * __external_linkage
|
||||
RectsToPixRegion (int nrects, xRectanglePtr prect, int ctype);
|
||||
extern pixman_region16_t * __external_linkage
|
||||
RectsTopixman_region16_t (int nrects, xRectanglePtr prect, int ctype);
|
||||
*/
|
||||
|
||||
/* querying */
|
||||
|
||||
/* XXX: These should proably be combined: PixRegionGetRects? */
|
||||
/* XXX: These should proably be combined: pixman_region16_tGetRects? */
|
||||
extern int __external_linkage
|
||||
PixRegionNumRects (PixRegion *region);
|
||||
pixman_region_num_rects (pixman_region16_t *region);
|
||||
|
||||
extern PixRegionBox * __external_linkage
|
||||
PixRegionRects (PixRegion *region);
|
||||
extern pixman_box16_t * __external_linkage
|
||||
pixman_region_rects (pixman_region16_t *region);
|
||||
|
||||
/* XXX: Change to an enum */
|
||||
#define rgnOUT 0
|
||||
|
|
@ -170,94 +170,94 @@ PixRegionRects (PixRegion *region);
|
|||
#define rgnPART 2
|
||||
|
||||
extern int __external_linkage
|
||||
PixRegionPointInRegion (PixRegion *region, int x, int y, PixRegionBox *box);
|
||||
pixman_region_contains_point (pixman_region16_t *region, int x, int y, pixman_box16_t *box);
|
||||
|
||||
extern int __external_linkage
|
||||
PixRegionRectIn (PixRegion *PixRegion, PixRegionBox *prect);
|
||||
pixman_region_contains_rectangle (pixman_region16_t *pixman_region16_t, pixman_box16_t *prect);
|
||||
|
||||
extern int __external_linkage
|
||||
PixRegionNotEmpty (PixRegion *region);
|
||||
pixman_region_not_empty (pixman_region16_t *region);
|
||||
|
||||
extern PixRegionBox * __external_linkage
|
||||
PixRegionExtents (PixRegion *region);
|
||||
extern pixman_box16_t * __external_linkage
|
||||
pixman_region_extents (pixman_region16_t *region);
|
||||
|
||||
/* mucking around */
|
||||
|
||||
/* WARNING: calling PixRegionAppend may leave dest as an invalid
|
||||
region. Follow-up with PixRegionValidate to fix it up. */
|
||||
extern PixRegionStatus __external_linkage
|
||||
PixRegionAppend (PixRegion *dest, PixRegion *region);
|
||||
/* WARNING: calling pixman_region_append may leave dest as an invalid
|
||||
region. Follow-up with pixman_region_validate to fix it up. */
|
||||
extern pixman_region_status_t __external_linkage
|
||||
pixman_region_append (pixman_region16_t *dest, pixman_region16_t *region);
|
||||
|
||||
extern PixRegionStatus __external_linkage
|
||||
PixRegionValidate (PixRegion *badreg, int *pOverlap);
|
||||
extern pixman_region_status_t __external_linkage
|
||||
pixman_region_validate (pixman_region16_t *badreg, int *pOverlap);
|
||||
|
||||
/* Unclassified functionality
|
||||
* XXX: Do all of these need to be exported?
|
||||
*/
|
||||
|
||||
extern void __external_linkage
|
||||
PixRegionReset (PixRegion *region, PixRegionBox *pBox);
|
||||
pixman_region_reset (pixman_region16_t *region, pixman_box16_t *pBox);
|
||||
|
||||
extern void __external_linkage
|
||||
PixRegionEmpty (PixRegion *region);
|
||||
pixman_region_empty (pixman_region16_t *region);
|
||||
|
||||
|
||||
/* ic.h */
|
||||
|
||||
|
||||
/* icformat.c */
|
||||
typedef enum _IcOperator {
|
||||
IcOperatorClear,
|
||||
IcOperatorSrc,
|
||||
IcOperatorDst,
|
||||
IcOperatorOver,
|
||||
IcOperatorOverReverse,
|
||||
IcOperatorIn,
|
||||
IcOperatorInReverse,
|
||||
IcOperatorOut,
|
||||
IcOperatorOutReverse,
|
||||
IcOperatorAtop,
|
||||
IcOperatorAtopReverse,
|
||||
IcOperatorXor,
|
||||
IcOperatorAdd,
|
||||
IcOperatorSaturate,
|
||||
} IcOperator;
|
||||
typedef enum _pixman_operator_t {
|
||||
PIXMAN_OPERATOR_CLEAR,
|
||||
PIXMAN_OPERATOR_SRC,
|
||||
PIXMAN_OPERATOR_DST,
|
||||
PIXMAN_OPERATOR_OVER,
|
||||
PIXMAN_OPERATOR_OVER_REVERSE,
|
||||
PIXMAN_OPERATOR_IN,
|
||||
PIXMAN_OPERATOR_IN_REVERSE,
|
||||
PIXMAN_OPERATOR_OUT,
|
||||
PIXMAN_OPERATOR_OUT_REVERSE,
|
||||
PIXMAN_OPERATOR_ATOP,
|
||||
PIXMAN_OPERATOR_ATOP_REVERSE,
|
||||
PIXMAN_OPERATOR_XOR,
|
||||
PIXMAN_OPERATOR_ADD,
|
||||
PIXMAN_OPERATOR_SATURATE,
|
||||
} pixman_operator_t;
|
||||
|
||||
|
||||
typedef enum _IcFormatName {
|
||||
IcFormatNameARGB32,
|
||||
IcFormatNameRGB24,
|
||||
IcFormatNameA8,
|
||||
IcFormatNameA1
|
||||
} IcFormatName;
|
||||
typedef enum _pixman_format_tName {
|
||||
PIXMAN_FORMAT_NAME_AR_GB32,
|
||||
PIXMAN_FORMAT_NAME_RG_B24,
|
||||
PIXMAN_FORMAT_NAME_A8,
|
||||
PIXMAN_FORMAT_NAME_A1
|
||||
} pixman_format_tName;
|
||||
|
||||
typedef struct _IcFormat IcFormat;
|
||||
typedef struct _pixman_format_t pixman_format_t;
|
||||
|
||||
extern IcFormat * __external_linkage
|
||||
IcFormatCreate (IcFormatName name);
|
||||
extern pixman_format_t * __external_linkage
|
||||
pixman_format_tCreate (pixman_format_tName name);
|
||||
|
||||
extern IcFormat * __external_linkage
|
||||
IcFormatCreateMasks (int bpp,
|
||||
extern pixman_format_t * __external_linkage
|
||||
pixman_format_tCreateMasks (int bpp,
|
||||
int alpha_mask,
|
||||
int red_mask,
|
||||
int green_mask,
|
||||
int blue_mask);
|
||||
|
||||
extern void __external_linkage
|
||||
IcFormatDestroy (IcFormat *format);
|
||||
pixman_format_tDestroy (pixman_format_t *format);
|
||||
|
||||
/* icimage.c */
|
||||
|
||||
typedef struct _IcImage IcImage;
|
||||
typedef struct _pixman_image_t pixman_image_t;
|
||||
|
||||
extern IcImage * __external_linkage
|
||||
IcImageCreate (IcFormat *format,
|
||||
extern pixman_image_t * __external_linkage
|
||||
pixman_image_tCreate (pixman_format_t *format,
|
||||
int width,
|
||||
int height);
|
||||
|
||||
/*
|
||||
* This single define controls the basic size of data manipulated
|
||||
* by this software; it must be log2(sizeof (IcBits) * 8)
|
||||
* by this software; it must be log2(sizeof (pixman_bits_t) * 8)
|
||||
*/
|
||||
|
||||
#ifndef IC_SHIFT
|
||||
|
|
@ -267,183 +267,183 @@ IcImageCreate (IcFormat *format,
|
|||
defined(__s390x__) || \
|
||||
defined(x86_64) || defined (__x86_64__)
|
||||
#define IC_SHIFT 6
|
||||
typedef uint64_t IcBits;
|
||||
typedef uint64_t pixman_bits_t;
|
||||
# else
|
||||
#define IC_SHIFT 5
|
||||
typedef uint32_t IcBits;
|
||||
typedef uint32_t pixman_bits_t;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
extern IcImage * __external_linkage
|
||||
IcImageCreateForData (IcBits *data, IcFormat *format, int width, int height, int bpp, int stride);
|
||||
extern pixman_image_t * __external_linkage
|
||||
pixman_image_tCreateForData (pixman_bits_t *data, pixman_format_t *format, int width, int height, int bpp, int stride);
|
||||
|
||||
extern void __external_linkage
|
||||
IcImageDestroy (IcImage *image);
|
||||
pixman_image_tDestroy (pixman_image_t *image);
|
||||
|
||||
extern int __external_linkage
|
||||
IcImageSetClipRegion (IcImage *image,
|
||||
PixRegion *region);
|
||||
pixman_image_tSetClipRegion (pixman_image_t *image,
|
||||
pixman_region16_t *region);
|
||||
|
||||
typedef int IcFixed16_16;
|
||||
typedef int pixman_fixed16_16_t;
|
||||
|
||||
typedef struct _IcPointFixed {
|
||||
IcFixed16_16 x, y;
|
||||
} IcPointFixed;
|
||||
typedef struct _pixman_point_fixed_t {
|
||||
pixman_fixed16_16_t x, y;
|
||||
} pixman_point_fixed_t;
|
||||
|
||||
typedef struct _IcLineFixed {
|
||||
IcPointFixed p1, p2;
|
||||
} IcLineFixed;
|
||||
typedef struct _pixman_line_fixed_t {
|
||||
pixman_point_fixed_t p1, p2;
|
||||
} pixman_line_fixed_t;
|
||||
|
||||
/* XXX: It's goofy that IcRectangle has integers while all the other
|
||||
/* XXX: It's goofy that pixman_rectangle_t has integers while all the other
|
||||
datatypes have fixed-point values. (Though by design,
|
||||
IcFillRectangles is designed to fill only whole pixels) */
|
||||
typedef struct _IcRectangle {
|
||||
pixman_fill_rectangles is designed to fill only whole pixels) */
|
||||
typedef struct _pixman_rectangle_t {
|
||||
short x, y;
|
||||
unsigned short width, height;
|
||||
} IcRectangle;
|
||||
} pixman_rectangle_t;
|
||||
|
||||
typedef struct _IcTriangle {
|
||||
IcPointFixed p1, p2, p3;
|
||||
} IcTriangle;
|
||||
typedef struct _pixman_triangle_t {
|
||||
pixman_point_fixed_t p1, p2, p3;
|
||||
} pixman_triangle_t;
|
||||
|
||||
typedef struct _IcTrapezoid {
|
||||
IcFixed16_16 top, bottom;
|
||||
IcLineFixed left, right;
|
||||
} IcTrapezoid;
|
||||
typedef struct _pixman_trapezoid_t {
|
||||
pixman_fixed16_16_t top, bottom;
|
||||
pixman_line_fixed_t left, right;
|
||||
} pixman_trapezoid_t;
|
||||
|
||||
typedef struct _IcVector {
|
||||
IcFixed16_16 vector[3];
|
||||
} IcVector;
|
||||
typedef struct _pixman_vector_t {
|
||||
pixman_fixed16_16_t vector[3];
|
||||
} pixman_vector_t;
|
||||
|
||||
typedef struct _IcTransform {
|
||||
IcFixed16_16 matrix[3][3];
|
||||
} IcTransform;
|
||||
typedef struct _pixman_transform_t {
|
||||
pixman_fixed16_16_t matrix[3][3];
|
||||
} pixman_transform_t;
|
||||
|
||||
typedef enum {
|
||||
IcFilterFast,
|
||||
IcFilterGood,
|
||||
IcFilterBest,
|
||||
IcFilterNearest,
|
||||
IcFilterBilinear
|
||||
} IcFilter;
|
||||
PIXMAN_FILTER_FAST,
|
||||
PIXMAN_FILTER_GOOD,
|
||||
PIXMAN_FILTER_BEST,
|
||||
PIXMAN_FILTER_NEAREST,
|
||||
PIXMAN_FILTER_BILINEAR
|
||||
} pixman_filter_t;
|
||||
|
||||
extern int __external_linkage
|
||||
IcImageSetTransform (IcImage *image,
|
||||
IcTransform *transform);
|
||||
pixman_image_tSetTransform (pixman_image_t *image,
|
||||
pixman_transform_t *transform);
|
||||
|
||||
extern void __external_linkage
|
||||
IcImageSetRepeat (IcImage *image,
|
||||
pixman_image_tSetRepeat (pixman_image_t *image,
|
||||
int repeat);
|
||||
|
||||
extern void __external_linkage
|
||||
IcImageSetFilter (IcImage *image,
|
||||
IcFilter filter);
|
||||
pixman_image_tSetFilter (pixman_image_t *image,
|
||||
pixman_filter_t filter);
|
||||
|
||||
extern int __external_linkage
|
||||
IcImageGetWidth (IcImage *image);
|
||||
pixman_image_tGetWidth (pixman_image_t *image);
|
||||
|
||||
extern int __external_linkage
|
||||
IcImageGetHeight (IcImage *image);
|
||||
pixman_image_tGetHeight (pixman_image_t *image);
|
||||
|
||||
extern int __external_linkage
|
||||
IcImageGetStride (IcImage *image);
|
||||
pixman_image_tGetStride (pixman_image_t *image);
|
||||
|
||||
extern int __external_linkage
|
||||
IcImageGetDepth (IcImage *image);
|
||||
pixman_image_tGetDepth (pixman_image_t *image);
|
||||
|
||||
extern IcFormat * __external_linkage
|
||||
IcImageGetFormat (IcImage *image);
|
||||
extern pixman_format_t * __external_linkage
|
||||
pixman_image_tGetFormat (pixman_image_t *image);
|
||||
|
||||
extern IcBits * __external_linkage
|
||||
IcImageGetData (IcImage *image);
|
||||
extern pixman_bits_t * __external_linkage
|
||||
pixman_image_tGetData (pixman_image_t *image);
|
||||
|
||||
/* iccolor.c */
|
||||
|
||||
/* XXX: Do we really need a struct here? Only IcRectangles uses this. */
|
||||
/* XXX: Do we really need a struct here? Only pixman_rectangle_ts uses this. */
|
||||
typedef struct {
|
||||
unsigned short red;
|
||||
unsigned short green;
|
||||
unsigned short blue;
|
||||
unsigned short alpha;
|
||||
} IcColor;
|
||||
} pixman_color_t;
|
||||
|
||||
extern void __external_linkage
|
||||
IcColorToPixel (const IcFormat *format,
|
||||
const IcColor *color,
|
||||
IcBits *pixel);
|
||||
pixman_color_tToPixel (const pixman_format_t *format,
|
||||
const pixman_color_t *color,
|
||||
pixman_bits_t *pixel);
|
||||
|
||||
extern void __external_linkage
|
||||
IcPixelToColor (const IcFormat *format,
|
||||
IcBits pixel,
|
||||
IcColor *color);
|
||||
pixman_pixel_to_color (const pixman_format_t *format,
|
||||
pixman_bits_t pixel,
|
||||
pixman_color_t *color);
|
||||
|
||||
/* icrect.c */
|
||||
|
||||
extern void __external_linkage
|
||||
IcFillRectangle (IcOperator op,
|
||||
IcImage *dst,
|
||||
const IcColor *color,
|
||||
pixman_fill_rectangle (pixman_operator_t op,
|
||||
pixman_image_t *dst,
|
||||
const pixman_color_t *color,
|
||||
int x,
|
||||
int y,
|
||||
unsigned int width,
|
||||
unsigned int height);
|
||||
|
||||
extern void __external_linkage
|
||||
IcFillRectangles (IcOperator op,
|
||||
IcImage *dst,
|
||||
const IcColor *color,
|
||||
const IcRectangle *rects,
|
||||
pixman_fill_rectangles (pixman_operator_t op,
|
||||
pixman_image_t *dst,
|
||||
const pixman_color_t *color,
|
||||
const pixman_rectangle_t *rects,
|
||||
int nRects);
|
||||
|
||||
/* ictrap.c */
|
||||
|
||||
/* XXX: Switch to enum for op */
|
||||
extern void __external_linkage
|
||||
IcCompositeTrapezoids (IcOperator op,
|
||||
IcImage *src,
|
||||
IcImage *dst,
|
||||
pixman_compositeTrapezoids (pixman_operator_t op,
|
||||
pixman_image_t *src,
|
||||
pixman_image_t *dst,
|
||||
int xSrc,
|
||||
int ySrc,
|
||||
const IcTrapezoid *traps,
|
||||
const pixman_trapezoid_t *traps,
|
||||
int ntrap);
|
||||
|
||||
/* ictri.c */
|
||||
|
||||
extern void __external_linkage
|
||||
IcCompositeTriangles (IcOperator op,
|
||||
IcImage *src,
|
||||
IcImage *dst,
|
||||
pixman_compositeTriangles (pixman_operator_t op,
|
||||
pixman_image_t *src,
|
||||
pixman_image_t *dst,
|
||||
int xSrc,
|
||||
int ySrc,
|
||||
const IcTriangle *tris,
|
||||
const pixman_triangle_t *tris,
|
||||
int ntris);
|
||||
|
||||
extern void __external_linkage
|
||||
IcCompositeTriStrip (IcOperator op,
|
||||
IcImage *src,
|
||||
IcImage *dst,
|
||||
pixman_compositeTriStrip (pixman_operator_t op,
|
||||
pixman_image_t *src,
|
||||
pixman_image_t *dst,
|
||||
int xSrc,
|
||||
int ySrc,
|
||||
const IcPointFixed *points,
|
||||
const pixman_point_fixed_t *points,
|
||||
int npoints);
|
||||
|
||||
|
||||
extern void __external_linkage
|
||||
IcCompositeTriFan (IcOperator op,
|
||||
IcImage *src,
|
||||
IcImage *dst,
|
||||
pixman_compositeTriFan (pixman_operator_t op,
|
||||
pixman_image_t *src,
|
||||
pixman_image_t *dst,
|
||||
int xSrc,
|
||||
int ySrc,
|
||||
const IcPointFixed *points,
|
||||
const pixman_point_fixed_t *points,
|
||||
int npoints);
|
||||
|
||||
/* ic.c */
|
||||
|
||||
extern void __external_linkage
|
||||
IcComposite (IcOperator op,
|
||||
IcImage *iSrc,
|
||||
IcImage *iMask,
|
||||
IcImage *iDst,
|
||||
pixman_composite (pixman_operator_t op,
|
||||
pixman_image_t *iSrc,
|
||||
pixman_image_t *iMask,
|
||||
pixman_image_t *iDst,
|
||||
int xSrc,
|
||||
int ySrc,
|
||||
int xMask,
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -44,40 +44,40 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
|||
SOFTWARE.
|
||||
|
||||
******************************************************************/
|
||||
/* $Id: pixregionint.h,v 1.4 2003-12-10 00:09:38 dajobe Exp $ */
|
||||
/* $Id: pixregionint.h,v 1.5 2003-12-10 22:22:09 dajobe Exp $ */
|
||||
|
||||
#ifndef _PIXREGIONINT_H_
|
||||
#define _PIXREGIONINT_H_
|
||||
|
||||
#include "pixman.h"
|
||||
|
||||
typedef struct _PixRegionData {
|
||||
typedef struct _pixman_region16_tData {
|
||||
long size;
|
||||
long numRects;
|
||||
/* XXX: And why, exactly, do we have this bogus struct definition? */
|
||||
/* PixRegionBox rects[size]; in memory but not explicitly declared */
|
||||
} PixRegionData;
|
||||
/* pixman_box16_t rects[size]; in memory but not explicitly declared */
|
||||
} pixman_region16_tData;
|
||||
|
||||
struct _PixRegion {
|
||||
PixRegionBox extents;
|
||||
PixRegionData *data;
|
||||
struct _pixman_region16_t {
|
||||
pixman_box16_t extents;
|
||||
pixman_region16_tData *data;
|
||||
};
|
||||
|
||||
typedef struct _PixRegionPoint {
|
||||
typedef struct _pixman_region16_tPoint {
|
||||
int x, y;
|
||||
} PixRegionPoint;
|
||||
} pixman_region16_tPoint;
|
||||
|
||||
#define PIXREGION_NIL(reg) ((reg)->data && !(reg)->data->numRects)
|
||||
/* not a region */
|
||||
#define PIXREGION_NAR(reg) ((reg)->data == &PixRegionBrokenData)
|
||||
#define PIXREGION_NAR(reg) ((reg)->data == &pixman_region16_tBrokenData)
|
||||
#define PIXREGION_NUM_RECTS(reg) ((reg)->data ? (reg)->data->numRects : 1)
|
||||
#define PIXREGION_SIZE(reg) ((reg)->data ? (reg)->data->size : 0)
|
||||
#define PIXREGION_RECTS(reg) ((reg)->data ? (PixRegionBox *)((reg)->data + 1) \
|
||||
#define PIXREGION_RECTS(reg) ((reg)->data ? (pixman_box16_t *)((reg)->data + 1) \
|
||||
: &(reg)->extents)
|
||||
#define PIXREGION_BOXPTR(reg) ((PixRegionBox *)((reg)->data + 1))
|
||||
#define PIXREGION_BOXPTR(reg) ((pixman_box16_t *)((reg)->data + 1))
|
||||
#define PIXREGION_BOX(reg,i) (&PIXREGION_BOXPTR(reg)[i])
|
||||
#define PIXREGION_TOP(reg) PIXREGION_BOX(reg, (reg)->data->numRects)
|
||||
#define PIXREGION_END(reg) PIXREGION_BOX(reg, (reg)->data->numRects - 1)
|
||||
#define PIXREGION_SZOF(n) (sizeof(PixRegionData) + ((n) * sizeof(PixRegionBox)))
|
||||
#define PIXREGION_SZOF(n) (sizeof(pixman_region16_tData) + ((n) * sizeof(pixman_box16_t)))
|
||||
|
||||
#endif /* _PIXREGIONINT_H_ */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue