Author: gschneider Date: Sun Jun 6 21:11:52 2010 New Revision: 47635
URL: http://svn.reactos.org/svn/reactos?rev=47635&view=rev Log: [WIN32K] - Use TAG_PALETTE for palette entries - Remove mapping codes, the functions from pre r9000 don't even exist anymore
Modified: trunk/reactos/subsystems/win32/win32k/include/palette.h trunk/reactos/subsystems/win32/win32k/objects/palette.c
Modified: trunk/reactos/subsystems/win32/win32k/include/palette.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/inc... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/palette.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/palette.h [iso-8859-1] Sun Jun 6 21:11:52 2010 @@ -1,8 +1,6 @@ #pragma once
#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 @@
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);
Modified: trunk/reactos/subsystems/win32/win32k/objects/palette.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/obj... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/palette.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/palette.c [iso-8859-1] Sun Jun 6 21:11:52 2010 @@ -61,9 +61,6 @@ int i; HPALETTE hpalette; PLOGPALETTE palPtr; -#ifndef NO_MAPPING - PALOBJ *palObj; -#endif
// create default palette (20 system colors) palPtr = ExAllocatePoolWithTag(PagedPool, @@ -84,19 +81,6 @@
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; */
@@ -232,7 +216,7 @@ PPALETTE pPal = (PPALETTE)ObjectBody; if (NULL != pPal->IndexedColors) { - ExFreePool(pPal->IndexedColors); + ExFreePoolWithTag(pPal->IndexedColors, TAG_PALETTE); }
return TRUE; @@ -453,7 +437,7 @@ else { /* FIXME - Handle PalGDI == NULL!!!! */ - DPRINT1("waring PalGDI is NULL \n"); + DPRINT1("PalGDI is NULL\n"); } return NewPalette; } @@ -981,7 +965,7 @@
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 @@ } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { - ExFreePool(pEntries); + ExFreePoolWithTag(pEntries, TAG_PALETTE); _SEH2_YIELD(return 0); } _SEH2_END @@ -1047,7 +1031,7 @@ } _SEH2_END } - ExFreePool(pEntries); + ExFreePoolWithTag(pEntries, TAG_PALETTE); }
return ret;