dib fixes
Eric Pouech
pouech-eric at wanadoo.fr
Sat Apr 9 00:15:43 CDT 2005
Rein Klazes a écrit :
> Hi Eric,
>
> I am looking into a couple of crashes in dlls/x11drv/dib.c caused by a
> patch from you. The patch (attached) is only 5 years old, I am sure you
> remember all the details ;)
sure... since RLE encoding can have holes (ie, it can jump a couple of pixels or
lines ahead), when you need to render a RLE image, you need to:
- paint the pixels from RLE (for the ones that are defined in RLE)
- and keep the previous pixels (from the underlying bitmap) for the ones not in RLE
The aim of the patch is to implement this by:
- first getting a whole copy of the old bitmap
- then paint the RLE pixels on it
This can be really suboptimal when the RLE contains all the pixels (they get
changed twice)
> To be precise, I get X-errors in the calls to XGetSubImage caused by out
> of range parameters. Fixing this by some parameter checking is not the
> big problem, but I wonder if it is still necessary to have those calls
> there.
>
> You call it a "quick hack", would it not be better to remove it now and
> properly fix any problems that may surface? The patch that I sent in
> yesterday ( "fix decoding compressed dibs") is an example of such
> problem..
IMO, what you're seeing is that getting the bitmap isn't cropped against all
possible dimensions & boundaries.
So the fixes are either:
- check the boundaries
- rewrite the RLE expander to behave properly pixels not defined in RLE
A+
--
Eric Pouech
More information about the wine-devel
mailing list