mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 14:10:32 +00:00
gdi32: Add a helper to retrieve the bitmap functions.
This commit is contained in:
parent
cb82c45b3a
commit
e82f88d5ee
@ -583,8 +583,7 @@ INT WINAPI SetDIBits( HDC hdc, HBITMAP hbitmap, UINT startscan,
|
||||
physdev = GET_DC_PHYSDEV( dc, pCreateBitmap );
|
||||
if (!BITMAP_SetOwnerDC( hbitmap, physdev )) goto done;
|
||||
|
||||
funcs = bitmap->funcs;
|
||||
if (bitmap->dib) funcs = dc->dibdrv.dev.funcs;
|
||||
funcs = get_bitmap_funcs( bitmap );
|
||||
|
||||
result = lines;
|
||||
|
||||
@ -947,8 +946,7 @@ INT WINAPI GetDIBits(
|
||||
return 0;
|
||||
}
|
||||
|
||||
funcs = bmp->funcs;
|
||||
if (bmp->dib) funcs = dc->dibdrv.dev.funcs;
|
||||
funcs = get_bitmap_funcs( bmp );
|
||||
|
||||
if (dst_info->bmiHeader.biBitCount == 0) /* query bitmap info only */
|
||||
{
|
||||
|
@ -571,6 +571,12 @@ static inline int get_dib_num_of_colors( const BITMAPINFO *info )
|
||||
return info->bmiHeader.biBitCount > 8 ? 0 : 1 << info->bmiHeader.biBitCount;
|
||||
}
|
||||
|
||||
static inline const struct gdi_dc_funcs *get_bitmap_funcs( const BITMAPOBJ *bitmap )
|
||||
{
|
||||
if( bitmap->dib ) return &dib_driver;
|
||||
return bitmap->funcs;
|
||||
}
|
||||
|
||||
extern void free_heap_bits( struct gdi_image_bits *bits ) DECLSPEC_HIDDEN;
|
||||
|
||||
#endif /* __WINE_GDI_PRIVATE_H */
|
||||
|
Loading…
Reference in New Issue
Block a user