- Use TAG_PALETTE for palette entries
- Remove mapping codes, the functions from pre r9000 don't even exist anymore

svn path=/trunk/; revision=47635
This commit is contained in:
Gregor Schneider 2010-06-06 19:11:52 +00:00
parent 218cfae51d
commit a4aeb090df
2 changed files with 5 additions and 26 deletions

View file

@ -2,8 +2,6 @@
#include <include/dc.h>
#define NO_MAPPING
#define PALETTE_FIXED 0x0001 /* read-only colormap - have to use XAllocColor (if not virtual) */
#define PALETTE_VIRTUAL 0x0002 /* no mapping needed - pixel == pixel color */
@ -79,9 +77,6 @@ BOOL INTERNAL_CALL PALETTE_Cleanup(PVOID ObjectBody);
HPALETTE FASTCALL PALETTE_Init (VOID);
VOID FASTCALL PALETTE_ValidateFlags (PALETTEENTRY* lpPalE, INT size);
#ifndef NO_MAPPING
INT APIENTRY PALETTE_SetMapping(PALOBJ* palPtr, UINT uStart, UINT uNum, BOOL mapOnly);
#endif
INT FASTCALL PALETTE_ToPhysical (PDC dc, COLORREF color);
INT FASTCALL PALETTE_GetObject(PPALETTE pGdiObject, INT cbCount, LPLOGBRUSH lpBuffer);

View file

@ -61,9 +61,6 @@ HPALETTE FASTCALL PALETTE_Init(VOID)
int i;
HPALETTE hpalette;
PLOGPALETTE palPtr;
#ifndef NO_MAPPING
PALOBJ *palObj;
#endif
// create default palette (20 system colors)
palPtr = ExAllocatePoolWithTag(PagedPool,
@ -85,19 +82,6 @@ HPALETTE FASTCALL PALETTE_Init(VOID)
hpalette = NtGdiCreatePaletteInternal(palPtr,NB_RESERVED_COLORS);
ExFreePoolWithTag(palPtr, TAG_PALETTE);
#ifndef NO_MAPPING
palObj = (PALOBJ*)PALETTE_LockPalette(hpalette);
if (palObj)
{
if (!(palObj->mapping = ExAllocatePool(PagedPool, sizeof(int) * 20)))
{
DbgPrint("Win32k: Can not create palette mapping -- out of memory!");
return FALSE;
}
PALETTE_UnlockPalette(palObj);
}
#endif
/* palette_size = visual->map_entries; */
gpalRGB.Mode = PAL_RGB;
@ -232,7 +216,7 @@ PALETTE_Cleanup(PVOID ObjectBody)
PPALETTE pPal = (PPALETTE)ObjectBody;
if (NULL != pPal->IndexedColors)
{
ExFreePool(pPal->IndexedColors);
ExFreePoolWithTag(pPal->IndexedColors, TAG_PALETTE);
}
return TRUE;
@ -453,7 +437,7 @@ NtGdiCreatePaletteInternal ( IN LPLOGPALETTE pLogPal, IN UINT cEntries )
else
{
/* FIXME - Handle PalGDI == NULL!!!! */
DPRINT1("waring PalGDI is NULL \n");
DPRINT1("PalGDI is NULL\n");
}
return NewPalette;
}
@ -981,7 +965,7 @@ NtGdiDoPalette(
if (pUnsafeEntries)
{
pEntries = ExAllocatePool(PagedPool, cEntries * sizeof(PALETTEENTRY));
pEntries = ExAllocatePoolWithTag(PagedPool, cEntries * sizeof(PALETTEENTRY), TAG_PALETTE);
if (!pEntries)
return 0;
if (bInbound)
@ -993,7 +977,7 @@ NtGdiDoPalette(
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
ExFreePool(pEntries);
ExFreePoolWithTag(pEntries, TAG_PALETTE);
_SEH2_YIELD(return 0);
}
_SEH2_END
@ -1047,7 +1031,7 @@ NtGdiDoPalette(
}
_SEH2_END
}
ExFreePool(pEntries);
ExFreePoolWithTag(pEntries, TAG_PALETTE);
}
return ret;