Author: fireball
Date: Mon Oct 12 16:23:25 2009
New Revision: 43402
URL:
http://svn.reactos.org/svn/reactos?rev=43402&view=rev
Log:
[arwinss]
- Sync up to Wine-1.1.31.
Modified:
branches/arwinss/reactos/dll/win32/gdi32/ (props changed)
branches/arwinss/reactos/dll/win32/gdi32/bitblt.c
branches/arwinss/reactos/dll/win32/gdi32/bitmap.c
branches/arwinss/reactos/dll/win32/gdi32/brush.c
branches/arwinss/reactos/dll/win32/gdi32/dc.c
branches/arwinss/reactos/dll/win32/gdi32/enhmfdrv/objects.c
branches/arwinss/reactos/dll/win32/gdi32/freetype.c
branches/arwinss/reactos/dll/win32/gdi32/gdi_private.h
branches/arwinss/reactos/dll/win32/gdi32/metafile16.c
branches/arwinss/reactos/dll/win32/gdi32/mfdrv/bitblt.c
branches/arwinss/reactos/dll/win32/gdi32/mfdrv/init.c
branches/arwinss/reactos/dll/win32/gdi32/mfdrv/metafiledrv.h
branches/arwinss/reactos/dll/win32/gdi32/mfdrv/objects.c
Propchange: branches/arwinss/reactos/dll/win32/gdi32/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Oct 12 16:23:25 2009
@@ -1,3 +1,3 @@
/branches/ros-amd64-bringup/reactos/dll/win32/gdi32:35746,35789,36614,36930,38148,38151,38265,38268,39333,39345,40991,41000,41027-41028,41050,41052,41082-41086,41549,43080
/trunk/reactos/dll/win32/gdi32:42000-43126
-/vendor/wine/dlls/gdi32/current:43136,43149
+/vendor/wine/dlls/gdi32/current:43136,43149,43398
Modified: branches/arwinss/reactos/dll/win32/gdi32/bitblt.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/gdi32…
==============================================================================
--- branches/arwinss/reactos/dll/win32/gdi32/bitblt.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/gdi32/bitblt.c [iso-8859-1] Mon Oct 12 16:23:25
2009
@@ -47,11 +47,17 @@
if (!dc) return FALSE;
+ TRACE("%p %d,%d %dx%d %06x\n", hdc, left, top, width, height, rop );
+
if (dc->funcs->pPatBlt)
{
- TRACE("%p %d,%d %dx%d %06x\n", hdc, left, top, width, height, rop );
update_dc( dc );
bRet = dc->funcs->pPatBlt( dc->physDev, left, top, width, height, rop
);
+ }
+ else if (dc->funcs->pStretchBlt)
+ {
+ update_dc( dc );
+ bRet = dc->funcs->pStretchBlt( dc->physDev, left, top, width, height,
NULL, 0, 0, 0, 0, rop );
}
release_dc_ptr( dc );
return bRet;
@@ -72,14 +78,19 @@
if (!(dcDst = get_dc_ptr( hdcDst ))) return FALSE;
- if (dcDst->funcs->pBitBlt)
+ if (dcDst->funcs->pBitBlt || dcDst->funcs->pStretchBlt)
{
update_dc( dcDst );
dcSrc = get_dc_ptr( hdcSrc );
if (dcSrc) update_dc( dcSrc );
- ret = dcDst->funcs->pBitBlt( dcDst->physDev, xDst, yDst, width, height,
- dcSrc ? dcSrc->physDev : NULL, xSrc, ySrc, rop
);
+ if (dcDst->funcs->pBitBlt)
+ ret = dcDst->funcs->pBitBlt( dcDst->physDev, xDst, yDst, width,
height,
+ dcSrc ? dcSrc->physDev : NULL, xSrc, ySrc,
rop );
+ else
+ ret = dcDst->funcs->pStretchBlt( dcDst->physDev, xDst, yDst, width,
height,
+ dcSrc ? dcSrc->physDev : NULL, xSrc,
ySrc,
+ width, height, rop );
release_dc_ptr( dcDst );
if (dcSrc) release_dc_ptr( dcSrc );
Modified: branches/arwinss/reactos/dll/win32/gdi32/bitmap.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/gdi32…
==============================================================================
--- branches/arwinss/reactos/dll/win32/gdi32/bitmap.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/gdi32/bitmap.c [iso-8859-1] Mon Oct 12 16:23:25
2009
@@ -292,7 +292,6 @@
bmpobj->bitmap.bmBits = NULL;
bmpobj->funcs = NULL;
bmpobj->dib = NULL;
- bmpobj->segptr_bits = 0;
bmpobj->color_table = NULL;
bmpobj->nb_colors = 0;
@@ -657,17 +656,6 @@
VirtualFree(dib->dsBm.bmBits, 0L, MEM_RELEASE );
}
HeapFree(GetProcessHeap(), 0, dib);
- bmp->dib = NULL;
-#ifndef __REACTOS__
- if (bmp->segptr_bits)
- { /* free its selector array */
- WORD sel = SELECTOROF(bmp->segptr_bits);
- WORD count = (GetSelectorLimit16(sel) / 0x10000) + 1;
- int i;
-
- for (i = 0; i < count; i++) FreeSelector16(sel + (i << __AHSHIFT));
- }
-#endif
HeapFree(GetProcessHeap(), 0, bmp->color_table);
}
return HeapFree( GetProcessHeap(), 0, bmp );
Modified: branches/arwinss/reactos/dll/win32/gdi32/brush.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/gdi32…
==============================================================================
--- branches/arwinss/reactos/dll/win32/gdi32/brush.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/gdi32/brush.c [iso-8859-1] Mon Oct 12 16:23:25
2009
@@ -53,11 +53,10 @@
BRUSH_DeleteObject /* pDeleteObject */
};
-#ifndef __REACTOS__
-static HGLOBAL16 dib_copy(const BITMAPINFO *info, UINT coloruse)
+static HGLOBAL dib_copy(const BITMAPINFO *info, UINT coloruse)
{
BITMAPINFO *newInfo;
- HGLOBAL16 hmem;
+ HGLOBAL hmem;
INT size;
if (info->bmiHeader.biCompression != BI_RGB &&
info->bmiHeader.biCompression != BI_BITFIELDS)
@@ -68,16 +67,15 @@
info->bmiHeader.biBitCount);
size += bitmap_info_size( info, coloruse );
- if (!(hmem = GlobalAlloc16( GMEM_MOVEABLE, size )))
+ if (!(hmem = GlobalAlloc( GMEM_MOVEABLE, size )))
{
return 0;
}
- newInfo = GlobalLock16( hmem );
+ newInfo = GlobalLock( hmem );
memcpy( newInfo, info, size );
- GlobalUnlock16( hmem );
+ GlobalUnlock( hmem );
return hmem;
}
-#endif
/***********************************************************************
@@ -119,7 +117,6 @@
ptr->logbrush.lbHatch = (ULONG_PTR)BITMAP_CopyBitmap( (HBITMAP)
ptr->logbrush.lbHatch );
if (!ptr->logbrush.lbHatch) goto error;
break;
-#ifndef __REACTOS__
case BS_DIBPATTERNPT:
ptr->logbrush.lbStyle = BS_DIBPATTERN;
ptr->logbrush.lbHatch = (ULONG_PTR)dib_copy( (BITMAPINFO *)
ptr->logbrush.lbHatch,
@@ -135,12 +132,11 @@
ptr->logbrush.lbStyle = BS_DIBPATTERN;
if (!(bmi = GlobalLock( h ))) goto error;
- ptr->logbrush.lbHatch = dib_copy( bmi, ptr->logbrush.lbColor);
+ ptr->logbrush.lbHatch = (ULONG_PTR)dib_copy( bmi,
ptr->logbrush.lbColor);
GlobalUnlock( h );
if (!ptr->logbrush.lbHatch) goto error;
break;
}
-#endif
default:
if(ptr->logbrush.lbStyle > BS_MONOPATTERN) goto error;
break;
@@ -159,7 +155,7 @@
DeleteObject( (HGDIOBJ)ptr->logbrush.lbHatch );
#ifndef __REACTOS__
else if (ptr->logbrush.lbStyle == BS_DIBPATTERN)
- GlobalFree16( (HGLOBAL16)ptr->logbrush.lbHatch );
+ GlobalFree( (HGLOBAL)ptr->logbrush.lbHatch );
#endif
}
HeapFree( GetProcessHeap(), 0, ptr );
@@ -427,9 +423,7 @@
DeleteObject( (HGDIOBJ)brush->logbrush.lbHatch );
break;
case BS_DIBPATTERN:
-#ifndef __REACTOS__
- GlobalFree16( (HGLOBAL16)brush->logbrush.lbHatch );
-#endif
+ GlobalFree( (HGLOBAL)brush->logbrush.lbHatch );
break;
}
return HeapFree( GetProcessHeap(), 0, brush );
Modified: branches/arwinss/reactos/dll/win32/gdi32/dc.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/gdi32…
==============================================================================
--- branches/arwinss/reactos/dll/win32/gdi32/dc.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/gdi32/dc.c [iso-8859-1] Mon Oct 12 16:23:25 2009
@@ -87,7 +87,6 @@
dc->saved_dc = 0;
dc->dwHookData = 0;
dc->hookProc = NULL;
- dc->hookThunk = NULL;
dc->wndOrgX = 0;
dc->wndOrgY = 0;
dc->wndExtX = 1;
@@ -224,8 +223,8 @@
*/
void update_dc( DC *dc )
{
- if (InterlockedExchange( &dc->dirty, 0 ) && dc->hookThunk)
- dc->hookThunk( dc->hSelf, DCHC_INVALIDVISRGN, dc->dwHookData, 0 );
+ if (InterlockedExchange( &dc->dirty, 0 ) && dc->hookProc)
+ dc->hookProc( dc->hSelf, DCHC_INVALIDVISRGN, dc->dwHookData, 0 );
}
@@ -403,8 +402,7 @@
PATH_InitGdiPath( &newdc->path );
newdc->pAbortProc = NULL;
- newdc->hookThunk = NULL;
- newdc->hookProc = 0;
+ newdc->hookProc = NULL;
newdc->saved_visrgn = NULL;
if (!(newdc->hSelf = alloc_gdi_handle( &newdc->header, dc->header.type,
&dc_funcs )))
@@ -820,7 +818,7 @@
}
/* Call hook procedure to check whether is it OK to delete this DC */
- if (dc->hookThunk && !dc->hookThunk( hdc, DCHC_DELETEDC,
dc->dwHookData, 0 ))
+ if (dc->hookProc && !dc->hookProc( hdc, DCHC_DELETEDC,
dc->dwHookData, 0 ))
{
release_dc_ptr( dc );
return FALSE;
@@ -1389,7 +1387,7 @@
if (!(dc->flags & DC_SAVED))
{
dc->dwHookData = dwHookData;
- dc->hookThunk = hookProc;
+ dc->hookProc = hookProc;
}
release_dc_ptr( dc );
return TRUE;
@@ -1407,71 +1405,11 @@
DWORD_PTR ret;
if (!dc) return 0;
- if (proc) *proc = dc->hookThunk;
+ if (proc) *proc = dc->hookProc;
ret = dc->dwHookData;
release_dc_ptr( dc );
return ret;
}
-
-
-/* relay function to call the 16-bit DC hook proc */
-#ifndef __REACTOS__
-static BOOL WINAPI call_dc_hook16( HDC hdc, WORD code, DWORD_PTR data, LPARAM lParam )
-{
- WORD args[6];
- DWORD ret = 0;
- DC *dc = get_dc_ptr( hdc );
-
- if (!dc) return FALSE;
- if (dc->hookProc)
- {
- args[5] = HDC_16(hdc);
- args[4] = code;
- args[3] = HIWORD(data);
- args[2] = LOWORD(data);
- args[1] = HIWORD(lParam);
- args[0] = LOWORD(lParam);
- WOWCallback16Ex( (DWORD)dc->hookProc, WCB16_PASCAL, sizeof(args), args,
&ret );
- }
- release_dc_ptr( dc );
- return LOWORD(ret);
-}
-
-/***********************************************************************
- * SetDCHook (GDI.190)
- */
-BOOL16 WINAPI SetDCHook16( HDC16 hdc16, FARPROC16 hookProc, DWORD dwHookData )
-{
- DC *dc = get_dc_ptr( HDC_32(hdc16) );
-
- if (!dc) return FALSE;
- if (!(dc->flags & DC_SAVED))
- {
- dc->dwHookData = dwHookData;
- dc->hookThunk = call_dc_hook16;
- dc->hookProc = hookProc;
- }
- release_dc_ptr( dc );
- return TRUE;
-}
-
-
-/***********************************************************************
- * GetDCHook (GDI.191)
- */
-DWORD WINAPI GetDCHook16( HDC16 hdc16, FARPROC16 *phookProc )
-{
- HDC hdc = HDC_32( hdc16 );
- DC *dc = get_dc_ptr( hdc );
- DWORD ret;
-
- if (!dc) return 0;
- *phookProc = dc->hookProc;
- ret = dc->dwHookData;
- release_dc_ptr( dc );
- return ret;
-}
-#endif
/***********************************************************************
Modified: branches/arwinss/reactos/dll/win32/gdi32/enhmfdrv/objects.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/gdi32…
==============================================================================
--- branches/arwinss/reactos/dll/win32/gdi32/enhmfdrv/objects.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/gdi32/enhmfdrv/objects.c [iso-8859-1] Mon Oct 12
16:23:25 2009
@@ -166,7 +166,7 @@
{
EMRCREATEDIBPATTERNBRUSHPT *emr;
DWORD bmSize, biSize, size;
- BITMAPINFO *info = GlobalLock16(logbrush.lbHatch);
+ BITMAPINFO *info = GlobalLock( (HGLOBAL)logbrush.lbHatch );
if (info->bmiHeader.biCompression)
bmSize = info->bmiHeader.biSizeImage;
@@ -192,7 +192,7 @@
if(!EMFDRV_WriteRecord( dev, &emr->emr ))
index = 0;
HeapFree( GetProcessHeap(), 0, emr );
- GlobalUnlock16(logbrush.lbHatch);
+ GlobalUnlock( (HGLOBAL)logbrush.lbHatch );
}
break;
Modified: branches/arwinss/reactos/dll/win32/gdi32/freetype.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/gdi32…
==============================================================================
--- branches/arwinss/reactos/dll/win32/gdi32/freetype.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/gdi32/freetype.c [iso-8859-1] Mon Oct 12 16:23:25
2009
@@ -5507,12 +5507,18 @@
LeaveCriticalSection( &freetype_cs );
return FALSE;
}
- }
- if(!font->potm)
- {
- LeaveCriticalSection( &freetype_cs );
- return FALSE;
- }
+
+ /* Make sure that the font has sane width/height ratio */
+ if (font->aveWidth)
+ {
+ if ((font->aveWidth + font->potm->otmTextMetrics.tmHeight - 1) /
font->potm->otmTextMetrics.tmHeight > 100)
+ {
+ WARN("Ignoring too large font->aveWidth %d\n",
font->aveWidth);
+ font->aveWidth = 0;
+ }
+ }
+ }
+
*ptm = font->potm->otmTextMetrics;
scale_font_metrics(font, ptm);
LeaveCriticalSection( &freetype_cs );
Modified: branches/arwinss/reactos/dll/win32/gdi32/gdi_private.h
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/gdi32…
==============================================================================
--- branches/arwinss/reactos/dll/win32/gdi32/gdi_private.h [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/gdi32/gdi_private.h [iso-8859-1] Mon Oct 12
16:23:25 2009
@@ -252,8 +252,7 @@
INT saveLevel;
HDC saved_dc;
DWORD_PTR dwHookData;
- FARPROC16 hookProc; /* the original SEGPTR ... */
- DCHOOKPROC hookThunk; /* ... and the thunk to call it */
+ DCHOOKPROC hookProc; /* DC hook */
INT wndOrgX; /* Window origin */
INT wndOrgY;
@@ -346,7 +345,6 @@
const DC_FUNCTIONS *funcs; /* DC function table */
/* For device-independent bitmaps: */
DIBSECTION *dib;
- SEGPTR segptr_bits; /* segptr to DIB bits */
RGBQUAD *color_table; /* DIB color table if <= 8bpp */
UINT nb_colors; /* number of colors in table */
} BITMAPOBJ;
@@ -462,7 +460,6 @@
/* metafile.c */
extern HMETAFILE MF_Create_HMETAFILE(METAHEADER *mh) DECLSPEC_HIDDEN;
-extern HMETAFILE16 MF_Create_HMETAFILE16(METAHEADER *mh) DECLSPEC_HIDDEN;
extern METAHEADER *MF_CreateMetaHeaderDisk(METAHEADER *mr, LPCVOID filename, BOOL unicode
) DECLSPEC_HIDDEN;
extern METAHEADER *MF_ReadMetaFile(HANDLE hfile) DECLSPEC_HIDDEN;
extern METAHEADER *MF_LoadDiskBasedMetaFile(METAHEADER *mh) DECLSPEC_HIDDEN;
Modified: branches/arwinss/reactos/dll/win32/gdi32/metafile16.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/gdi32…
==============================================================================
--- branches/arwinss/reactos/dll/win32/gdi32/metafile16.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/gdi32/metafile16.c [iso-8859-1] Mon Oct 12 16:23:25
2009
@@ -55,6 +55,61 @@
static BOOL16 MF_ReleaseMetaHeader16( HMETAFILE16 hmf )
{
return GlobalUnlock16( hmf );
+}
+
+/******************************************************************
+ * MF_Create_HMETATFILE16
+ *
+ * Creates a HMETAFILE16 object from a METAHEADER
+ *
+ * HMETAFILE16s are Global memory handles.
+ */
+static HMETAFILE16 MF_Create_HMETAFILE16(METAHEADER *mh)
+{
+ HMETAFILE16 hmf;
+ DWORD size = mh->mtSize * sizeof(WORD);
+
+ hmf = GlobalAlloc16(GMEM_MOVEABLE, size);
+ if(hmf)
+ {
+ METAHEADER *mh_dest = GlobalLock16(hmf);
+ memcpy(mh_dest, mh, size);
+ GlobalUnlock16(hmf);
+ }
+ HeapFree(GetProcessHeap(), 0, mh);
+ return hmf;
+}
+
+/**********************************************************************
+ * CreateMetaFile (GDI.125)
+ */
+HDC16 WINAPI CreateMetaFile16( LPCSTR filename )
+{
+ return HDC_16( CreateMetaFileA( filename ) );
+}
+
+/******************************************************************
+ * CloseMetaFile (GDI.126)
+ */
+HMETAFILE16 WINAPI CloseMetaFile16(HDC16 hdc)
+{
+ HMETAFILE16 hmf16 = 0;
+ HMETAFILE hmf = CloseMetaFile( HDC_32(hdc) );
+
+ if (hmf)
+ {
+ UINT size = GetMetaFileBitsEx( hmf, 0, NULL );
+
+ hmf16 = GlobalAlloc16( GMEM_MOVEABLE, size );
+ if (hmf16)
+ {
+ void *buffer = GlobalLock16( hmf16 );
+ GetMetaFileBitsEx( hmf, size, buffer );
+ GlobalUnlock16( hmf16 );
+ }
+ DeleteMetaFile( hmf );
+ }
+ return hmf16;
}
/******************************************************************
Modified: branches/arwinss/reactos/dll/win32/gdi32/mfdrv/bitblt.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/gdi32…
==============================================================================
--- branches/arwinss/reactos/dll/win32/gdi32/mfdrv/bitblt.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/gdi32/mfdrv/bitblt.c [iso-8859-1] Mon Oct 12
16:23:25 2009
@@ -33,18 +33,6 @@
MFDRV_MetaParam6( dev, META_PATBLT, left, top, width, height, HIWORD(rop),
LOWORD(rop) );
return TRUE;
}
-
-
-/***********************************************************************
- * MFDRV_BitBlt
- */
-BOOL CDECL MFDRV_BitBlt( PHYSDEV devDst, INT xDst, INT yDst, INT width, INT height,
- PHYSDEV devSrc, INT xSrc, INT ySrc, DWORD rop )
-{
- return MFDRV_StretchBlt(devDst, xDst, yDst, width, height, devSrc,
- xSrc, ySrc, width, height, rop);
-}
-
/***********************************************************************
Modified: branches/arwinss/reactos/dll/win32/gdi32/mfdrv/init.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/gdi32…
==============================================================================
--- branches/arwinss/reactos/dll/win32/gdi32/mfdrv/init.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/gdi32/mfdrv/init.c [iso-8859-1] Mon Oct 12 16:23:25
2009
@@ -23,8 +23,6 @@
#include "windef.h"
#include "winbase.h"
-#include "wine/winbase16.h"
-#include "wownt32.h"
#include "gdi_private.h"
#include "mfdrv/metafiledrv.h"
#include "wine/debug.h"
@@ -40,7 +38,7 @@
MFDRV_Arc, /* pArc */
NULL, /* pArcTo */
MFDRV_BeginPath, /* pBeginPath */
- MFDRV_BitBlt, /* pBitBlt */
+ NULL, /* pBitBlt */
NULL, /* pChoosePixelFormat */
MFDRV_Chord, /* pChord */
MFDRV_CloseFigure, /* pCloseFigure */
@@ -354,52 +352,6 @@
}
/******************************************************************
- * MF_Create_HMETATFILE16
- *
- * Creates a HMETAFILE16 object from a METAHEADER
- *
- * HMETAFILE16s are Global memory handles.
- */
-HMETAFILE16 MF_Create_HMETAFILE16(METAHEADER *mh)
-{
- HMETAFILE16 hmf;
- DWORD size = mh->mtSize * sizeof(WORD);
-
- hmf = GlobalAlloc16(GMEM_MOVEABLE, size);
- if(hmf)
- {
- METAHEADER *mh_dest = GlobalLock16(hmf);
- memcpy(mh_dest, mh, size);
- GlobalUnlock16(hmf);
- }
- HeapFree(GetProcessHeap(), 0, mh);
- return hmf;
-}
-
-/******************************************************************
- * CloseMetaFile (GDI.126)
- *
- * PARAMS
- * hdc [I] Metafile DC to close
- */
-HMETAFILE16 WINAPI CloseMetaFile16(HDC16 hdc)
-{
- HMETAFILE16 hmf;
- METAFILEDRV_PDEVICE *physDev;
- DC *dc = MFDRV_CloseMetaFile(HDC_32(hdc));
- if (!dc) return 0;
- physDev = (METAFILEDRV_PDEVICE *)dc->physDev;
-
- /* Now allocate a global handle for the metafile */
-
- hmf = MF_Create_HMETAFILE16( physDev->mh );
-
- physDev->mh = NULL; /* So it won't be deleted */
- MFDRV_DeleteDC( dc );
- return hmf;
-}
-
-/******************************************************************
* CloseMetaFile (GDI32.@)
*
* Stop recording graphics operations in metafile associated with
Modified: branches/arwinss/reactos/dll/win32/gdi32/mfdrv/metafiledrv.h
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/gdi32…
==============================================================================
--- branches/arwinss/reactos/dll/win32/gdi32/mfdrv/metafiledrv.h [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/gdi32/mfdrv/metafiledrv.h [iso-8859-1] Mon Oct 12
16:23:25 2009
@@ -64,9 +64,6 @@
extern BOOL CDECL MFDRV_Arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
INT xstart, INT ystart, INT xend, INT yend )
DECLSPEC_HIDDEN;
extern BOOL CDECL MFDRV_BeginPath( PHYSDEV dev ) DECLSPEC_HIDDEN;
-extern BOOL CDECL MFDRV_BitBlt( PHYSDEV devDst, INT xDst, INT yDst, INT width,
- INT height, PHYSDEV devSrc, INT xSrc, INT ySrc,
- DWORD rop ) DECLSPEC_HIDDEN;
extern BOOL CDECL MFDRV_Chord( PHYSDEV dev, INT left, INT top, INT right,
INT bottom, INT xstart, INT ystart, INT xend,
INT yend ) DECLSPEC_HIDDEN;
Modified: branches/arwinss/reactos/dll/win32/gdi32/mfdrv/objects.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/gdi32…
==============================================================================
--- branches/arwinss/reactos/dll/win32/gdi32/mfdrv/objects.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/gdi32/mfdrv/objects.c [iso-8859-1] Mon Oct 12
16:23:25 2009
@@ -300,7 +300,7 @@
BITMAPINFO *info;
DWORD bmSize, biSize;
- info = GlobalLock16((HGLOBAL16)logbrush.lbHatch);
+ info = GlobalLock( (HGLOBAL)logbrush.lbHatch );
if (info->bmiHeader.biCompression)
bmSize = info->bmiHeader.biSizeImage;
else
@@ -310,12 +310,17 @@
biSize = bitmap_info_size(info, LOWORD(logbrush.lbColor));
size = sizeof(METARECORD) + biSize + bmSize + 2;
mr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
- if(!mr) goto done;
+ if (!mr)
+ {
+ GlobalUnlock( (HGLOBAL)logbrush.lbHatch );
+ goto done;
+ }
mr->rdFunction = META_DIBCREATEPATTERNBRUSH;
mr->rdSize = size / 2;
*(mr->rdParm) = logbrush.lbStyle;
*(mr->rdParm + 1) = LOWORD(logbrush.lbColor);
memcpy(mr->rdParm + 2, info, biSize + bmSize);
+ GlobalUnlock( (HGLOBAL)logbrush.lbHatch );
break;
}
default: