Alexandre Julliard : gdi32: Always use the DIB engine for monochrome bitmap rendering.
Alexandre Julliard
julliard at winehq.org
Fri May 25 10:52:48 CDT 2012
Module: wine
Branch: master
Commit: b81a7d976e3c3de36a01401d125871d3014e6c67
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b81a7d976e3c3de36a01401d125871d3014e6c67
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri May 25 11:47:46 2012 +0200
gdi32: Always use the DIB engine for monochrome bitmap rendering.
---
dlls/gdi32/bitmap.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/gdi32/bitmap.c b/dlls/gdi32/bitmap.c
index 1a0e6bb..cc6a409 100644
--- a/dlls/gdi32/bitmap.c
+++ b/dlls/gdi32/bitmap.c
@@ -518,8 +518,13 @@ static HGDIOBJ BITMAP_SelectObject( HGDIOBJ handle, HDC hdc )
if (dc->dibdrv) old_physdev = pop_dc_driver( dc, dc->dibdrv );
- physdev = GET_DC_PHYSDEV( dc, pSelectBitmap );
- createdev = GET_DC_PHYSDEV( dc, pCreateBitmap );
+ if (bitmap->dib.dsBm.bmBitsPixel > 1)
+ {
+ physdev = GET_DC_PHYSDEV( dc, pSelectBitmap );
+ createdev = GET_DC_PHYSDEV( dc, pCreateBitmap );
+ }
+ else physdev = createdev = &dc->nulldrv; /* force use of the DIB engine for 1-bpp */
+
if (physdev->funcs == &null_driver)
{
physdev = dc->dibdrv;
More information about the wine-cvs
mailing list