winex11.drv: SetDIBits fails when startscan != 0
Massimo Del Fedele
max at veneto.com
Thu Mar 26 08:36:10 CDT 2009
Alexandre Julliard ha scritto:
>> - descr.bits = bits;
>> + descr.bits = (BYTE *)bits + widthBytes * (tmpheight > 0 ? (height - startscan - lines) : startscan);
> You shouldn't need to change the bits address.
After a deeper look at it, I think there's no other (simple) way to do it.
Using ySrc parameter and changing the behaviour inside X11DRV_DIB_SetImageBits()
will work for SetDIBits() BUT will break SetDIBitsToDevice() on which ySrc has
a completely different meaning, as:
- in SetDIBits, ySrc is not needed and it should be 0; startscan and lines specify
the start line and number of lines to copy from dib
- in SetDIBitsToDevice ySrc IS needed and represent the start line of DIB that must be
transfered, and startscan and lines are useful just for banding the transfer in
So, as both use X11DRV_SetImageBits(), we can't fix one without breaking the other if
we do using ySrc and working from inside X11DRV_DIB_SetImageBits().
A cleaner way would mean extend the X11DRV_DIB_IMAGEBITS_DESCR descriptor adding
startscan and scanlines parameters, and fiddle with about ALL X11DRV_DIB_SetImageBits_xxx
functions and others.... not worth the effort, IMHO.
More information about the wine-devel