On Sat, 09 Apr 2005 07:15:43 +0200, you wrote:
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),
That is what I was wondering about.
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)
I see.
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.
Are you suggesting more checks then that the pixels are within the dimensions of the drawable?
So the fixes are either:
- check the boundaries
- rewrite the RLE expander to behave properly pixels not defined in RLE
Thanks for the clarification.
Rein.