Author: jgardou
Date: Thu Jul 29 16:21:02 2010
New Revision: 48360
URL:
http://svn.reactos.org/svn/reactos?rev=48360&view=rev
Log:
[WIN32K]
- Get rid of GetBMIFromBitmapV5Info
Modified:
branches/reactos-yarotows/subsystems/win32/win32k/include/bitmaps.h
branches/reactos-yarotows/subsystems/win32/win32k/objects/dibobj.c
Modified: branches/reactos-yarotows/subsystems/win32/win32k/include/bitmaps.h
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
==============================================================================
--- branches/reactos-yarotows/subsystems/win32/win32k/include/bitmaps.h [iso-8859-1]
(original)
+++ branches/reactos-yarotows/subsystems/win32/win32k/include/bitmaps.h [iso-8859-1] Thu
Jul 29 16:21:02 2010
@@ -14,7 +14,6 @@
UINT FASTCALL BITMAP_GetRealBitsPixel(UINT nBitsPixel);
INT FASTCALL BITMAP_GetWidthBytes (INT bmWidth, INT bpp);
NTSTATUS FASTCALL ProbeAndConvertToBitmapV5Info( OUT PBITMAPV5INFO pbmiDst, IN CONST
BITMAPINFO* pbmiUnsafe, IN DWORD dwUse, UINT MaxSize);
-VOID FASTCALL GetBMIFromBitmapV5Info(IN PBITMAPV5INFO pbmiSrc, OUT PBITMAPINFO pbmiDst,
IN DWORD dwUse);
HBITMAP
APIENTRY
Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/dibobj.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
==============================================================================
--- branches/reactos-yarotows/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1]
(original)
+++ branches/reactos-yarotows/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1] Thu
Jul 29 16:21:02 2010
@@ -1907,23 +1907,6 @@
return dwRet;
}
-FORCEINLINE
-VOID
-SetBMIColor(CONST BITMAPINFO* pbmi, DWORD* color, INT i)
-{
- PVOID pvColors = ((PBYTE)pbmi + pbmi->bmiHeader.biSize);
- if(pbmi->bmiHeader.biSize == sizeof(BITMAPCOREHEADER))
- {
- RGBTRIPLE *pColor = pvColors;
- pColor[i] = *(RGBTRIPLE*)color;
- }
- else
- {
- RGBQUAD *pColor = pvColors;
- pColor[i] = *(RGBQUAD*)color;
- }
-}
-
NTSTATUS
FASTCALL
ProbeAndConvertToBitmapV5Info(
@@ -2094,59 +2077,4 @@
return STATUS_SUCCESS;
}
-VOID
-FASTCALL
-GetBMIFromBitmapV5Info(IN PBITMAPV5INFO pbmiSrc,
- OUT PBITMAPINFO pbmiDst,
- IN DWORD dwColorUse)
-{
- if(pbmiDst->bmiHeader.biSize == sizeof(BITMAPCOREHEADER))
- {
- /* Manually set value */
- BITMAPCOREHEADER* pbmhCore = (BITMAPCOREHEADER*)&pbmiDst->bmiHeader;
- pbmhCore->bcWidth = pbmiSrc->bmiHeader.bV5Width;
- pbmhCore->bcHeight = pbmiSrc->bmiHeader.bV5Height;
- pbmhCore->bcPlanes = pbmiSrc->bmiHeader.bV5Planes;
- pbmhCore->bcBitCount = pbmiSrc->bmiHeader.bV5BitCount;
- }
- else
- {
- /* Copy valid Fields, keep bmiHeader.biSize safe */
- RtlCopyMemory(&pbmiDst->bmiHeader.biWidth,
- &pbmiSrc->bmiHeader.bV5Width,
- pbmiDst->bmiHeader.biSize - sizeof(DWORD));
- }
- if((pbmiDst->bmiHeader.biSize < sizeof(BITMAPV4HEADER)) &&
- (pbmiSrc->bmiHeader.bV5Compression == BI_BITFIELDS))
- {
- /* Masks are already set in V4 and V5 headers */
- SetBMIColor(pbmiDst, &pbmiSrc->bmiHeader.bV5RedMask, 0);
- SetBMIColor(pbmiDst, &pbmiSrc->bmiHeader.bV5GreenMask, 1);
- SetBMIColor(pbmiDst, &pbmiSrc->bmiHeader.bV5BlueMask, 2);
- }
- else
- {
- INT i;
- ULONG cColorsUsed;
-
- cColorsUsed = pbmiSrc->bmiHeader.bV5ClrUsed;
- if (cColorsUsed == 0 && pbmiSrc->bmiHeader.bV5BitCount <= 8)
- cColorsUsed = (1 << pbmiSrc->bmiHeader.bV5BitCount);
-
- if(dwColorUse == DIB_PAL_COLORS)
- {
- RtlCopyMemory(pbmiDst->bmiColors,
- pbmiSrc->bmiColors,
- cColorsUsed * sizeof(WORD));
- }
- else
- {
- for(i = 0; i < cColorsUsed; i++)
- {
- SetBMIColor(pbmiDst, (DWORD*)pbmiSrc->bmiColors + i, i);
- }
- }
- }
-}
-
/* EOF */