BUG (3920) + sync between DIBs and X Server optimisation. (please help)

Robert Shearman rob at codeweavers.com
Mon Dec 12 11:07:20 CST 2005


Marinescu-Ghetau Iulian wrote:

> I came to the conclusion that the slowness in "Heroes IV" it has to do 
> with
> sync'ing lage bitmaps between application DIBs and X Server(see the 
> log: http://bugs.winehq.org/attachment.cgi?id=1470&action=view ).
>
> Also, a complete description of the bug is here: 
> http://bugs.winehq.org/show_bug.cgi?id=3902
>
> So i had this ideea that every GDI function could memorise the 
> rectangle that is modifying, so each time a sync between DIB and X 
> Server is needed, only a small part from the bitmap will get copied! I 
> also made some changes to dib.c, bitblt.c and x11drv.h in 
> "wine-0.9.2\dlls\x11drv" folder to implement my ideea, keeping 
> backwards compatibility (if a DIB function doesn't set a valid 
> rectangle for the bitmap that its modifying, the default values are 
> taken - which is the entire bitmap)
>
>

> - and finally, a GDI function calls it like this (for example bitblt):
>
>    X11DRV_SetBoundRect(physDevDst->bitmap,xDst,yDst,width,height);
>    X11DRV_CoerceDIBSection( physDevDst, DIB_Status_GdiMod, FALSE );
>    if (physDevDst != physDevSrc)
>    {
>      X11DRV_SetBoundRect(physDevSrc->bitmap,xSrc,ySrc,width,height);
>      X11DRV_CoerceDIBSection( physDevSrc, DIB_Status_GdiMod, FALSE );
>    }


I think it would be better to make X11DRV_CoerceDIBSection take the 
parameters for a bounding rect, otherwise it is possible to forget a 
call to SetBoundRect and cause the DIB to not be updated.

-- 
Rob Shearman




More information about the wine-devel mailing list