|
Wine Reviews
|
What is a DIB Engine? This is from the Wine wiki: DIBEngineWine requires a DIB engine (part of the display subsystem that, when pointed at screen memory, can serve as a flat-frame-buffer display driver) to properly handle Device Independent Bitmaps (DIB). In the Win32 API, an application can draw in a DIB via GDI calls or via direct memory access without any synchronization calls in between. This implies a rather tight coupling of the graphics subsystem with the system memory, which is simply not present in a network transparent design such as X. This is a leftover of the Win16 API, I guess it seemed like a good idea at the time. To emulate such behavior, we have to play memory tricks (by protecting the DIB memory) and switch between a 'GDI mode' and 'memory mode'. On each of these transitions, we have to copy the DIB to/from the X server. It works, but it is slow, especially over the network. To fix this problem, we have to be able to emulate the GDI calls in software. This is what the DIB Engine is -- software rendering for the GDI calls. Software rendering exists -- in fact, we are currently using the X server exactly for that: we copy the DIB to the server, translate the GDI call to an X request, and then we copy the result back. So the code exists, but it is in the X server. We need to copy it over to Wine, clean it up (the X code is not known for its neatness), and integrate it properly (from an architectural perspective) into Wine.
Hi folks, Here's an update on the DIB engine that I've been working on for the last few months. This work has been made possible by the generosity of Google - so thanks go to them and of course to Dan. You can find the code at http://repo.or.cz/w/wine/ What's supported ================ - All dib section depths (including BI_BITFIELD support). - Single pixel solid and dashed pens. - The 16 rop2s. - Solid and dib pattern brushes. - A brunch of primitives for drawing onto all dib section surfaces. - GDI32 apis: LineTo, Rectangle and PatBlt. - An extensive test suite for all of the above. What needs to be done ===================== - Blitting (eg BitBlt, StretchBlt and StretchDIBits) - I have some hacks for these in my tree. - ExtTextOut - Many more GDI32 apis - a lot of these should be easy given that we have a set of underlying dib drawing primitives. - Non-MM_TEXT mapping modes and world transforms. - The initial interaction with GDI32 in BITMAP_SelectObject is hacky and needs some work. - Lots more... Note that at the moment it's essentially useless because of the lack of blitting, so unless you fancy hacking on that yourself then you probably don't want to bother fetching the tree. I'm going to stop working on this for a while (lots of fun Outlook 2007 bugs for me to look at!), but will endeavour to keep the tree up to date with respect to WineHQ. If someone *does* want to hack on this then feel free to send me patches! Thanks, Huw.
Powered by !JoomlaComment 3.26
3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved." |