DIB engine

David Hammerton crazney at pacman.transgaming.com
Sat Mar 30 20:45:04 CST 2002

On Sat, Mar 30, 2002 at 04:57:09PM -0800, Francois Gouget wrote:

We make use of Shared Memory Pixmaps to reduce the copying (in WineX).. So we have
app memory which stores the image in the mode requested by the app,
this then gets copied into a SHMPixmap of the depth supported by X so X
can do whatever it wants to (render to it or whatever) and it then gets
copied back when needed, same method..

One of the big savers here is that the ShmPixmap means we dont have to
be sending stuff between X server/client, saves alot of time..

As for X supporting multiple depths - I investigated this and talked to
some of the X coders, its still not "wonderfully" supported.. ehm, it
lacks alot of the most common modes - eg 8bit paletted - its not really
worth it from what I can see..
The X developers suggested that if I wanted to go down this road to
first write an X extension, ShmPixmaps were nicer and almost as fast...

Maybe you would have been able to see this if AoE2 didn't crash on Gav


> > But, as far as I can remember, the other big problem comes from the
> > 'exception handler' that is needed to detect direct write from the Windows
> > program to the DIB (or maybe I am thinking about something completely else
> > :-) ) to be sure that the X pixmap and the Windows DIB are always in sync
> > one with the other. And that cannot be solved easily with X Pixmaps at all
> > (maybe hacking around with XShmPixmaps).
>    Yes this endless copying is a performance killer. But even if you are
> not concerned about performance there are issues as I mentioned above.
>    I think Transgaming did some work on optimizing this to limit the
> number of copies this but I don't remember the details. Some of it is
> already in Wine, I don't know if they have more stuff in WineX / coming
> to Wine.
> --
> Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
>            Demander si un ordinateur peut penser revient ? demander
>   si un sous-marin peut nager.

David Hammerton
Programmer, TransGaming Technologies

More information about the wine-devel mailing list