Moved the 16-bit pointer to the DIB bits out of the driver-specific
structure and into the main bitmap structure. Removed CreateDIBSection16 from the driver interface.
This commit is contained in:
parent
ef06b4a694
commit
6bbc745dde
|
@ -6,10 +6,6 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#ifndef X_DISPLAY_MISSING
|
|
||||||
#include "x11drv.h"
|
|
||||||
#endif /* !defined(X_DISPLAY_MISSING) */
|
|
||||||
|
|
||||||
#include "wine/winuser16.h"
|
#include "wine/winuser16.h"
|
||||||
#include "bitmap.h"
|
#include "bitmap.h"
|
||||||
#include "debugtools.h"
|
#include "debugtools.h"
|
||||||
|
@ -89,19 +85,15 @@ HBITMAP16 WINAPI WinGCreateBitmap16(HDC16 hdc, BITMAPINFO *bmpi,
|
||||||
*/
|
*/
|
||||||
SEGPTR WINAPI WinGGetDIBPointer16(HBITMAP16 hWinGBitmap, BITMAPINFO* bmpi)
|
SEGPTR WINAPI WinGGetDIBPointer16(HBITMAP16 hWinGBitmap, BITMAPINFO* bmpi)
|
||||||
{
|
{
|
||||||
BITMAPOBJ* bmp = (BITMAPOBJ *) GDI_GetObjPtr( hWinGBitmap, BITMAP_MAGIC );
|
BITMAPOBJ* bmp = (BITMAPOBJ *) GDI_GetObjPtr( hWinGBitmap, BITMAP_MAGIC );
|
||||||
SEGPTR res = 0;
|
SEGPTR res = 0;
|
||||||
|
|
||||||
TRACE("(%d,%p)\n", hWinGBitmap, bmpi);
|
TRACE("(%d,%p)\n", hWinGBitmap, bmpi);
|
||||||
if (!bmp) return (SEGPTR)NULL;
|
if (!bmp) return 0;
|
||||||
|
|
||||||
if (bmpi)
|
if (bmpi) FIXME(": Todo - implement setting BITMAPINFO\n");
|
||||||
FIXME(": Todo - implement setting BITMAPINFO\n");
|
|
||||||
|
|
||||||
#ifndef X_DISPLAY_MISSING
|
|
||||||
res = MAKESEGPTR(((X11DRV_DIBSECTION *) bmp->dib)->selector, 0);
|
|
||||||
#endif /* !defined(X_DISPLAY_MISSING) */
|
|
||||||
|
|
||||||
|
res = bmp->segptr_bits;
|
||||||
GDI_ReleaseObj( hWinGBitmap );
|
GDI_ReleaseObj( hWinGBitmap );
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
|
@ -184,19 +184,6 @@ HBITMAP TTYDRV_BITMAP_CreateDIBSection(
|
||||||
return (HBITMAP) NULL;
|
return (HBITMAP) NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************
|
|
||||||
* TTYDRV_BITMAP_CreateDIBSection16
|
|
||||||
*/
|
|
||||||
HBITMAP16 TTYDRV_DIB_CreateDIBSection16(
|
|
||||||
DC *dc, BITMAPINFO *bmi, UINT16 usage,
|
|
||||||
SEGPTR *bits, HANDLE section, DWORD offset)
|
|
||||||
{
|
|
||||||
FIXME("(%p, %p, %u, %p, 0x%04x, %ld): stub\n",
|
|
||||||
dc, bmi, usage, bits, section, offset);
|
|
||||||
|
|
||||||
return (HBITMAP16) NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* TTYDRV_BITMAP_DeleteDIBSection
|
* TTYDRV_BITMAP_DeleteDIBSection
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -33,7 +33,6 @@ static const DC_FUNCTIONS TTYDRV_DC_Driver =
|
||||||
TTYDRV_DC_CreateBitmap, /* pCreateBitmap */
|
TTYDRV_DC_CreateBitmap, /* pCreateBitmap */
|
||||||
TTYDRV_DC_CreateDC, /* pCreateDC */
|
TTYDRV_DC_CreateDC, /* pCreateDC */
|
||||||
NULL, /* pCreateDIBSection */
|
NULL, /* pCreateDIBSection */
|
||||||
NULL, /* pCreateDIBSection16 */
|
|
||||||
TTYDRV_DC_DeleteDC, /* pDeleteDC */
|
TTYDRV_DC_DeleteDC, /* pDeleteDC */
|
||||||
TTYDRV_DC_DeleteObject, /* pDeleteObject */
|
TTYDRV_DC_DeleteObject, /* pDeleteObject */
|
||||||
NULL, /* pDescribePixelFormat */
|
NULL, /* pDescribePixelFormat */
|
||||||
|
|
|
@ -45,8 +45,6 @@ extern void TTYDRV_GDI_Finalize(void);
|
||||||
/* TTY GDI bitmap driver */
|
/* TTY GDI bitmap driver */
|
||||||
|
|
||||||
extern HBITMAP TTYDRV_BITMAP_CreateDIBSection(struct tagDC *dc, BITMAPINFO *bmi, UINT usage, LPVOID *bits, HANDLE section, DWORD offset);
|
extern HBITMAP TTYDRV_BITMAP_CreateDIBSection(struct tagDC *dc, BITMAPINFO *bmi, UINT usage, LPVOID *bits, HANDLE section, DWORD offset);
|
||||||
extern HBITMAP16 TTYDRV_BITMAP_CreateDIBSection16(struct tagDC *dc, BITMAPINFO *bmi, UINT16 usage, SEGPTR *bits, HANDLE section, DWORD offset);
|
|
||||||
|
|
||||||
extern INT TTYDRV_BITMAP_SetDIBits(struct tagBITMAPOBJ *bmp, struct tagDC *dc, UINT startscan, UINT lines, LPCVOID bits, const BITMAPINFO *info, UINT coloruse, HBITMAP hbitmap);
|
extern INT TTYDRV_BITMAP_SetDIBits(struct tagBITMAPOBJ *bmp, struct tagDC *dc, UINT startscan, UINT lines, LPCVOID bits, const BITMAPINFO *info, UINT coloruse, HBITMAP hbitmap);
|
||||||
extern INT TTYDRV_BITMAP_GetDIBits(struct tagBITMAPOBJ *bmp, struct tagDC *dc, UINT startscan, UINT lines, LPVOID bits, BITMAPINFO *info, UINT coloruse, HBITMAP hbitmap);
|
extern INT TTYDRV_BITMAP_GetDIBits(struct tagBITMAPOBJ *bmp, struct tagDC *dc, UINT startscan, UINT lines, LPVOID bits, BITMAPINFO *info, UINT coloruse, HBITMAP hbitmap);
|
||||||
extern void TTYDRV_BITMAP_DeleteDIBSection(struct tagBITMAPOBJ *bmp);
|
extern void TTYDRV_BITMAP_DeleteDIBSection(struct tagBITMAPOBJ *bmp);
|
||||||
|
|
|
@ -45,7 +45,6 @@ static const DC_FUNCTIONS PSDRV_Funcs =
|
||||||
NULL, /* pCreateBitmap */
|
NULL, /* pCreateBitmap */
|
||||||
PSDRV_CreateDC, /* pCreateDC */
|
PSDRV_CreateDC, /* pCreateDC */
|
||||||
NULL, /* pCreateDIBSection */
|
NULL, /* pCreateDIBSection */
|
||||||
NULL, /* pCreateDIBSection16 */
|
|
||||||
PSDRV_DeleteDC, /* pDeleteDC */
|
PSDRV_DeleteDC, /* pDeleteDC */
|
||||||
NULL, /* pDeleteObject */
|
NULL, /* pDeleteObject */
|
||||||
NULL, /* pDescribePixelFormat */
|
NULL, /* pDescribePixelFormat */
|
||||||
|
|
|
@ -32,7 +32,6 @@ static const DC_FUNCTIONS EMFDRV_Funcs =
|
||||||
NULL, /* pCreateBitmap */
|
NULL, /* pCreateBitmap */
|
||||||
NULL, /* no implementation */ /* pCreateDC */
|
NULL, /* no implementation */ /* pCreateDC */
|
||||||
NULL, /* pCreateDIBSection */
|
NULL, /* pCreateDIBSection */
|
||||||
NULL, /* pCreateDIBSection16 */
|
|
||||||
NULL, /* no implementation */ /* pDeleteDC */
|
NULL, /* no implementation */ /* pDeleteDC */
|
||||||
NULL, /* pDeleteObject */
|
NULL, /* pDeleteObject */
|
||||||
NULL, /* pDescribePixelFormat */
|
NULL, /* pDescribePixelFormat */
|
||||||
|
|
|
@ -32,7 +32,6 @@ static const DC_FUNCTIONS MFDRV_Funcs =
|
||||||
NULL, /* pCreateBitmap */
|
NULL, /* pCreateBitmap */
|
||||||
NULL, /* no implementation */ /* pCreateDC */
|
NULL, /* no implementation */ /* pCreateDC */
|
||||||
NULL, /* pCreateDIBSection */
|
NULL, /* pCreateDIBSection */
|
||||||
NULL, /* pCreateDIBSection16 */
|
|
||||||
NULL, /* no implementation */ /* pDeleteDC */
|
NULL, /* no implementation */ /* pDeleteDC */
|
||||||
NULL, /* pDeleteObject */
|
NULL, /* pDeleteObject */
|
||||||
NULL, /* pDescribePixelFormat */
|
NULL, /* pDescribePixelFormat */
|
||||||
|
|
|
@ -58,7 +58,6 @@ static const DC_FUNCTIONS WIN16DRV_Funcs =
|
||||||
NULL, /* pCreateBitmap */
|
NULL, /* pCreateBitmap */
|
||||||
WIN16DRV_CreateDC, /* pCreateDC */
|
WIN16DRV_CreateDC, /* pCreateDC */
|
||||||
NULL, /* pCreateDIBSection */
|
NULL, /* pCreateDIBSection */
|
||||||
NULL, /* pCreateDIBSection16 */
|
|
||||||
NULL, /* pDeleteDC */
|
NULL, /* pDeleteDC */
|
||||||
NULL, /* pDeleteObject */
|
NULL, /* pDeleteObject */
|
||||||
NULL, /* pDescribePixelFormat */
|
NULL, /* pDescribePixelFormat */
|
||||||
|
|
|
@ -25,8 +25,7 @@
|
||||||
#include "x11drv.h"
|
#include "x11drv.h"
|
||||||
#include "debugtools.h"
|
#include "debugtools.h"
|
||||||
#include "gdi.h"
|
#include "gdi.h"
|
||||||
#include "color.h"
|
#include "palette.h"
|
||||||
#include "selectors.h"
|
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
|
||||||
DEFAULT_DEBUG_CHANNEL(bitmap);
|
DEFAULT_DEBUG_CHANNEL(bitmap);
|
||||||
|
@ -3732,46 +3731,6 @@ void X11DRV_UnlockDIBSection(DC *dc, BOOL commit)
|
||||||
X11DRV_UnlockDIBSection2( dc->hBitmap, commit );
|
X11DRV_UnlockDIBSection2( dc->hBitmap, commit );
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* X11DRV_DIB_CreateDIBSection16
|
|
||||||
*/
|
|
||||||
HBITMAP16 X11DRV_DIB_CreateDIBSection16(
|
|
||||||
DC *dc, BITMAPINFO *bmi, UINT16 usage,
|
|
||||||
SEGPTR *bits, HANDLE section,
|
|
||||||
DWORD offset, DWORD ovr_pitch)
|
|
||||||
{
|
|
||||||
HBITMAP res = X11DRV_DIB_CreateDIBSection(dc, bmi, usage, NULL,
|
|
||||||
section, offset, ovr_pitch);
|
|
||||||
if ( res )
|
|
||||||
{
|
|
||||||
BITMAPOBJ *bmp = (BITMAPOBJ *) GDI_GetObjPtr(res, BITMAP_MAGIC);
|
|
||||||
if ( bmp && bmp->dib )
|
|
||||||
{
|
|
||||||
DIBSECTION *dib = bmp->dib;
|
|
||||||
INT height = dib->dsBm.bmHeight >= 0 ?
|
|
||||||
dib->dsBm.bmHeight : -dib->dsBm.bmHeight;
|
|
||||||
/* same as above - only use biSizeImage as the correct size if it a
|
|
||||||
compressed image and it's currently non-zero. In other cases, use
|
|
||||||
width * height as the value. */
|
|
||||||
INT size = dib->dsBmih.biSizeImage && dib->dsBmih.biCompression != BI_RGB
|
|
||||||
? dib->dsBmih.biSizeImage
|
|
||||||
: dib->dsBm.bmWidthBytes * height;
|
|
||||||
if ( dib->dsBm.bmBits )
|
|
||||||
{
|
|
||||||
((X11DRV_DIBSECTION *) bmp->dib)->selector =
|
|
||||||
SELECTOR_AllocBlock( dib->dsBm.bmBits, size, WINE_LDT_FLAGS_DATA );
|
|
||||||
}
|
|
||||||
TRACE("ptr = %p, size =%d, selector = %04x, segptr = %ld\n",
|
|
||||||
dib->dsBm.bmBits, size, ((X11DRV_DIBSECTION *) bmp->dib)->selector,
|
|
||||||
MAKESEGPTR(((X11DRV_DIBSECTION *) bmp->dib)->selector, 0));
|
|
||||||
if ( bits )
|
|
||||||
*bits = MAKESEGPTR( ((X11DRV_DIBSECTION *) bmp->dib)->selector, 0 );
|
|
||||||
}
|
|
||||||
if (bmp) GDI_ReleaseObj( res );
|
|
||||||
}
|
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HAVE_LIBXXSHM
|
#ifdef HAVE_LIBXXSHM
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -3945,8 +3904,6 @@ HBITMAP X11DRV_DIB_CreateDIBSection(
|
||||||
dib->dibSection.dsOffset = offset;
|
dib->dibSection.dsOffset = offset;
|
||||||
|
|
||||||
dib->status = DIB_Status_None;
|
dib->status = DIB_Status_None;
|
||||||
dib->selector = 0;
|
|
||||||
|
|
||||||
dib->nColorMap = nColorMap;
|
dib->nColorMap = nColorMap;
|
||||||
dib->colorMap = colorMap;
|
dib->colorMap = colorMap;
|
||||||
}
|
}
|
||||||
|
@ -4055,7 +4012,6 @@ void X11DRV_DIB_DeleteDIBSection(BITMAPOBJ *bmp)
|
||||||
if (dib->colorMap)
|
if (dib->colorMap)
|
||||||
HeapFree(GetProcessHeap(), 0, dib->colorMap);
|
HeapFree(GetProcessHeap(), 0, dib->colorMap);
|
||||||
|
|
||||||
if (dib->selector) SELECTOR_FreeBlock( dib->selector );
|
|
||||||
DeleteCriticalSection(&(dib->lock));
|
DeleteCriticalSection(&(dib->lock));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "bitmap.h"
|
#include "bitmap.h"
|
||||||
#include "color.h"
|
#include "palette.h"
|
||||||
#include "debugtools.h"
|
#include "debugtools.h"
|
||||||
#include "winnt.h"
|
#include "winnt.h"
|
||||||
#include "x11drv.h"
|
#include "x11drv.h"
|
||||||
|
@ -42,7 +42,6 @@ const DC_FUNCTIONS X11DRV_DC_Funcs =
|
||||||
X11DRV_CreateBitmap, /* pCreateBitmap */
|
X11DRV_CreateBitmap, /* pCreateBitmap */
|
||||||
X11DRV_CreateDC, /* pCreateDC */
|
X11DRV_CreateDC, /* pCreateDC */
|
||||||
X11DRV_DIB_CreateDIBSection, /* pCreateDIBSection */
|
X11DRV_DIB_CreateDIBSection, /* pCreateDIBSection */
|
||||||
X11DRV_DIB_CreateDIBSection16, /* pCreateDIBSection16 */
|
|
||||||
X11DRV_DeleteDC, /* pDeleteDC */
|
X11DRV_DeleteDC, /* pDeleteDC */
|
||||||
X11DRV_DeleteObject, /* pDeleteObject */
|
X11DRV_DeleteObject, /* pDeleteObject */
|
||||||
X11DRV_DescribePixelFormat, /* pDescribePixelFormat */
|
X11DRV_DescribePixelFormat, /* pDescribePixelFormat */
|
||||||
|
|
|
@ -31,6 +31,7 @@ typedef struct tagBITMAPOBJ
|
||||||
void *physBitmap; /* ptr to device specific data */
|
void *physBitmap; /* ptr to device specific data */
|
||||||
/* For device-independent bitmaps: */
|
/* For device-independent bitmaps: */
|
||||||
DIBSECTION *dib;
|
DIBSECTION *dib;
|
||||||
|
SEGPTR segptr_bits; /* segptr to DIB bits */
|
||||||
} BITMAPOBJ;
|
} BITMAPOBJ;
|
||||||
|
|
||||||
typedef struct tagBITMAP_DRIVER
|
typedef struct tagBITMAP_DRIVER
|
||||||
|
|
|
@ -175,8 +175,6 @@ typedef struct tagDC_FUNCS
|
||||||
BOOL (*pCreateDC)(DC*,LPCSTR,LPCSTR,LPCSTR,const DEVMODEA*);
|
BOOL (*pCreateDC)(DC*,LPCSTR,LPCSTR,LPCSTR,const DEVMODEA*);
|
||||||
HBITMAP (*pCreateDIBSection)(DC *,BITMAPINFO *,UINT,LPVOID *,HANDLE,
|
HBITMAP (*pCreateDIBSection)(DC *,BITMAPINFO *,UINT,LPVOID *,HANDLE,
|
||||||
DWORD,DWORD);
|
DWORD,DWORD);
|
||||||
HBITMAP16 (*pCreateDIBSection16)(DC *,BITMAPINFO *,UINT16,SEGPTR *,HANDLE,
|
|
||||||
DWORD,DWORD);
|
|
||||||
BOOL (*pDeleteDC)(DC*);
|
BOOL (*pDeleteDC)(DC*);
|
||||||
BOOL (*pDeleteObject)(HGDIOBJ);
|
BOOL (*pDeleteObject)(HGDIOBJ);
|
||||||
INT (*pDescribePixelFormat)(DC *,INT,UINT,PIXELFORMATDESCRIPTOR *);
|
INT (*pDescribePixelFormat)(DC *,INT,UINT,PIXELFORMATDESCRIPTOR *);
|
||||||
|
|
|
@ -214,9 +214,6 @@ typedef struct
|
||||||
/* Cached XImage */
|
/* Cached XImage */
|
||||||
XImage *image;
|
XImage *image;
|
||||||
|
|
||||||
/* Selector for 16-bit access to bits */
|
|
||||||
WORD selector;
|
|
||||||
|
|
||||||
#ifdef HAVE_LIBXXSHM
|
#ifdef HAVE_LIBXXSHM
|
||||||
/* Shared memory segment info */
|
/* Shared memory segment info */
|
||||||
XShmSegmentInfo shminfo;
|
XShmSegmentInfo shminfo;
|
||||||
|
@ -243,8 +240,6 @@ extern void X11DRV_UnlockDIBSection2(HBITMAP bmp,BOOL);
|
||||||
|
|
||||||
extern HBITMAP X11DRV_DIB_CreateDIBSection(struct tagDC *dc, BITMAPINFO *bmi, UINT usage,
|
extern HBITMAP X11DRV_DIB_CreateDIBSection(struct tagDC *dc, BITMAPINFO *bmi, UINT usage,
|
||||||
LPVOID *bits, HANDLE section, DWORD offset, DWORD ovr_pitch);
|
LPVOID *bits, HANDLE section, DWORD offset, DWORD ovr_pitch);
|
||||||
extern HBITMAP16 X11DRV_DIB_CreateDIBSection16(struct tagDC *dc, BITMAPINFO *bmi, UINT16 usage,
|
|
||||||
SEGPTR *bits, HANDLE section, DWORD offset, DWORD ovr_pitch);
|
|
||||||
|
|
||||||
extern struct tagBITMAP_DRIVER X11DRV_BITMAP_Driver;
|
extern struct tagBITMAP_DRIVER X11DRV_BITMAP_Driver;
|
||||||
|
|
||||||
|
|
|
@ -138,6 +138,7 @@ HBITMAP WINAPI CreateBitmap( INT width, INT height, UINT planes,
|
||||||
bmp->funcs = NULL;
|
bmp->funcs = NULL;
|
||||||
bmp->physBitmap = NULL;
|
bmp->physBitmap = NULL;
|
||||||
bmp->dib = NULL;
|
bmp->dib = NULL;
|
||||||
|
bmp->segptr_bits = 0;
|
||||||
|
|
||||||
if (bits) /* Set bitmap bits */
|
if (bits) /* Set bitmap bits */
|
||||||
SetBitmapBits( hbitmap, height * bmp->bitmap.bmWidthBytes,
|
SetBitmapBits( hbitmap, height * bmp->bitmap.bmWidthBytes,
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include "winbase.h"
|
#include "winbase.h"
|
||||||
#include "bitmap.h"
|
#include "bitmap.h"
|
||||||
#include "callback.h"
|
#include "callback.h"
|
||||||
|
#include "selectors.h"
|
||||||
#include "gdi.h"
|
#include "gdi.h"
|
||||||
#include "debugtools.h"
|
#include "debugtools.h"
|
||||||
#include "palette.h"
|
#include "palette.h"
|
||||||
|
@ -853,29 +854,29 @@ HBITMAP WINAPI CreateDIBitmap( HDC hdc, const BITMAPINFOHEADER *header,
|
||||||
* CreateDIBSection (GDI.489)
|
* CreateDIBSection (GDI.489)
|
||||||
*/
|
*/
|
||||||
HBITMAP16 WINAPI CreateDIBSection16 (HDC16 hdc, BITMAPINFO *bmi, UINT16 usage,
|
HBITMAP16 WINAPI CreateDIBSection16 (HDC16 hdc, BITMAPINFO *bmi, UINT16 usage,
|
||||||
SEGPTR *bits, HANDLE section,
|
SEGPTR *bits16, HANDLE section, DWORD offset)
|
||||||
DWORD offset)
|
|
||||||
{
|
{
|
||||||
HBITMAP16 hbitmap = 0;
|
LPVOID bits32;
|
||||||
DC *dc;
|
HBITMAP hbitmap;
|
||||||
BOOL bDesktopDC = FALSE;
|
|
||||||
|
|
||||||
/* If the reference hdc is null, take the desktop dc */
|
hbitmap = CreateDIBSection( hdc, bmi, usage, &bits32, section, offset );
|
||||||
if (hdc == 0)
|
if (hbitmap)
|
||||||
{
|
{
|
||||||
hdc = CreateCompatibleDC(0);
|
BITMAPOBJ *bmp = (BITMAPOBJ *) GDI_GetObjPtr(hbitmap, BITMAP_MAGIC);
|
||||||
bDesktopDC = TRUE;
|
if (bmp && bmp->dib && bits32)
|
||||||
|
{
|
||||||
|
BITMAPINFOHEADER *bi = &bmi->bmiHeader;
|
||||||
|
INT height = bi->biHeight >= 0 ? bi->biHeight : -bi->biHeight;
|
||||||
|
INT width_bytes = DIB_GetDIBWidthBytes(bi->biWidth, bi->biBitCount);
|
||||||
|
INT size = (bi->biSizeImage && bi->biCompression != BI_RGB) ?
|
||||||
|
bi->biSizeImage : width_bytes * height;
|
||||||
|
|
||||||
|
WORD sel = SELECTOR_AllocBlock( bits32, size, WINE_LDT_FLAGS_DATA );
|
||||||
|
bmp->segptr_bits = MAKESEGPTR( sel, 0 );
|
||||||
|
if (bits16) *bits16 = bmp->segptr_bits;
|
||||||
|
}
|
||||||
|
if (bmp) GDI_ReleaseObj( hbitmap );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((dc = DC_GetDCPtr( hdc )))
|
|
||||||
{
|
|
||||||
hbitmap = dc->funcs->pCreateDIBSection16(dc, bmi, usage, bits, section, offset, 0);
|
|
||||||
GDI_ReleaseObj(hdc);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bDesktopDC)
|
|
||||||
DeleteDC(hdc);
|
|
||||||
|
|
||||||
return hbitmap;
|
return hbitmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -945,6 +946,7 @@ void DIB_DeleteDIBSection( BITMAPOBJ *bmp )
|
||||||
|
|
||||||
HeapFree(GetProcessHeap(), 0, dib);
|
HeapFree(GetProcessHeap(), 0, dib);
|
||||||
bmp->dib = NULL;
|
bmp->dib = NULL;
|
||||||
|
if (bmp->segptr_bits) SELECTOR_FreeBlock( SELECTOROF(bmp->segptr_bits) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue