From 869e9cafd9b2aecabe911fc744070cfc268f5816 Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Fri, 13 Aug 2004 19:48:55 +0000 Subject: [PATCH] If a device doesn't support device bitmaps, then store the bits on the gdi side. --- dlls/gdi/bitmap.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/dlls/gdi/bitmap.c b/dlls/gdi/bitmap.c index ed6c82d4f7..957c9a6a95 100644 --- a/dlls/gdi/bitmap.c +++ b/dlls/gdi/bitmap.c @@ -265,16 +265,10 @@ LONG WINAPI GetBitmapBits( hbitmap, count, bits, bmp->bitmap.bmWidth, bmp->bitmap.bmHeight, 1 << bmp->bitmap.bmBitsPixel, height ); - if(bmp->funcs) + if(bmp->funcs && bmp->funcs->pGetBitmapBits) { TRACE("Calling device specific BitmapBits\n"); - if(bmp->funcs->pGetBitmapBits) - ret = bmp->funcs->pGetBitmapBits(hbitmap, bits, count); - else - { - memset( bits, 0, count ); - ret = count; - } + ret = bmp->funcs->pGetBitmapBits(hbitmap, bits, count); } else { if(!bmp->bitmap.bmBits) { @@ -326,13 +320,10 @@ LONG WINAPI SetBitmapBits( hbitmap, count, bits, bmp->bitmap.bmWidth, bmp->bitmap.bmHeight, 1 << bmp->bitmap.bmBitsPixel, height ); - if(bmp->funcs) { + if(bmp->funcs && bmp->funcs->pSetBitmapBits) { TRACE("Calling device specific BitmapBits\n"); - if(bmp->funcs->pSetBitmapBits) - ret = bmp->funcs->pSetBitmapBits(hbitmap, bits, count); - else - ret = 0; + ret = bmp->funcs->pSetBitmapBits(hbitmap, bits, count); } else { if(!bmp->bitmap.bmBits) /* Alloc enough for entire bitmap */