[GDI32|Metafile]

- Instead of debug breaking, use wine code anyway. Should fix CORE-12911.

svn path=/trunk/; revision=75016
This commit is contained in:
James Tabor 2017-06-12 22:42:45 +00:00
parent 07e4b2cd19
commit 4d11c54f65

View file

@ -402,13 +402,33 @@ GDI_hdc_not_using_object(
ASSERT(hdcLink == hdc);
}
/***********************************************************************
* bitmap_info_size
*
* Return the size of the bitmap info structure including color table.
*/
int
bitmap_info_size(
const BITMAPINFO * info,
WORD coloruse)
{
__debugbreak();
return 0;
unsigned int colors, size, masks = 0;
if (info->bmiHeader.biSize == sizeof(BITMAPCOREHEADER))
{
const BITMAPCOREHEADER *core = (const BITMAPCOREHEADER *)info;
colors = (core->bcBitCount <= 8) ? 1 << core->bcBitCount : 0;
return sizeof(BITMAPCOREHEADER) + colors *
((coloruse == DIB_RGB_COLORS) ? sizeof(RGBTRIPLE) : sizeof(WORD));
}
else /* assume BITMAPINFOHEADER */
{
if (info->bmiHeader.biClrUsed) colors = min( info->bmiHeader.biClrUsed, 256 );
else colors = info->bmiHeader.biBitCount > 8 ? 0 : 1 << info->bmiHeader.biBitCount;
if (info->bmiHeader.biCompression == BI_BITFIELDS) masks = 3;
size = max( info->bmiHeader.biSize, sizeof(BITMAPINFOHEADER) + masks * sizeof(DWORD) );
return size + colors * ((coloruse == DIB_RGB_COLORS) ? sizeof(RGBQUAD) : sizeof(WORD));
}
}
BOOL