Statur of DIB Engine

Octavian Voicu octavian.voicu at
Sun Jul 24 11:10:46 CDT 2011

On Sun, Jul 24, 2011 at 4:11 PM, Massimo Del Fedele <max at> wrote:
> Having seen many patches related to DIB engine lately, I built latest
> sources and tried it.... No speed enhancements on AutoCAD, my test app.
> So, I wonder if the engine is already working, at least partially, or not.
> If yes, there's some switch/environment variable to enable it ?


Disclaimer: these comments are based only on what I gather from
following commits and looking at the code, so can't guarantee it's
100% accurate; Huw or Alexandre would know better.

Most of the work so far was at an architectural level -- creating the
infrastructure to support the incremental development of the DIB
engine (see dlls/gdi32/dibdrv/). The new DIB engine is enabled by
default, and is activated automatically (pushed onto the driver stack)
if you pass a DIB to SelectObject. If the DIB engine doesn't implement
some functions, they are forwarded to the next driver on the stack. If
some features are not supported (eg. specific pixel formats; pen, or
brush styles), it again falls back to the next driver on the stack
each time those features need to be used (eg. drawing a line when
current pen is not supported).

Current status is:
- most pixel formats are supported, if not all (1bpp is a bit special
and still has some issues though);
- most pens are implemented (except geometric pens, or pens with width
greater than 1);
- brush support looks pretty much complete;
- most graphics primitives are NOT implemented yet.

In fact, the only primitives that are currently implemented are
LineTo, Rectangle, PaintRgn, and PatBlt (see [1]), the minimum to test
that pens and brushes are working properly; no blits; no polygons, nor
other weird shapes; no font rendering; not even get/set pixel. That's
probably why Autocad doesn't show any improvements yet. On the other
hand, the tricky architectural bits are mostly done, so I'm guessing
visible speed improvements are not too far off.



More information about the wine-devel mailing list