On Mon, 16 Jun 2003, Alessandro Camela wrote:

> Hi all ,
> can anyone explain me because in this code ( /* $XFree86: 
> xc/programs/Xserver/hw/xfree86/xaa/xaaFillRect.c,v 1.15 2001/12/13 18:01:51 eich Exp 
> $ */) the pGC->fgPixel variable is passed as unsigned long int , instead the 
> function pointer to FillSolidRects accepts the variabile int fg???

This might be an inconsistency, but on 32 bit hardware they are both 4
byte integers.

Also, AFAIK, the pixel type is fixed to be 32 bits in X11 protocol. Thus,
nowadays, unsigned or int is more correct than long int, as the latter
should be 64 bits on 64 bit hardware. (And it used to be that int was 16
bits on 16 bit hardware and long int was 32 bits on both 16 bit and 32 bit
cpus).

                      best

                         Vladimir Dergachev

>
> thanks...
> Alecam
>
> 00113         /*********************\
> 00114         |     Solid Rects     |
> 00115         \*********************/
> 00116
> 00117 static void
> 00118 XAARenderSolidRects(
> 00119    GCPtr pGC,
> 00120    int nboxes,
> 00121    BoxPtr pClipBoxes,
> 00122    int xorg, int yorg
> 00123 ){
> 00124    XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC);
> 00125
> 00126    (*infoRec->FillSolidRects) (infoRec->pScrn,
> 00127                pGC->fgPixel, pGC->alu, pGC->planemask, nboxes, pClipBoxes);
> 00128 }
>
> example of int fg...
>
>
>
> int  WriteBitmapFlags
> void(*  FillSolidRects )(ScrnInfoPtr pScrn, int fg, int rop, unsigned int planemask, 
> int nBox, BoxPtr pBox)
> int  FillSolidRectsFlags
>
>
> thanks alecam
>
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to