Author: greatlrd
Date: Thu Aug 23 19:36:20 2007
New Revision: 28476
URL:
http://svn.reactos.org/svn/reactos?rev=28476&view=rev
Log:
fast implementions of NtGdiCreatePaletteInternal
it is base on NtGdiCreatePalette
Modified:
trunk/reactos/subsystems/win32/win32k/objects/color.c
trunk/reactos/subsystems/win32/win32k/w32ksvc.db
Modified: trunk/reactos/subsystems/win32/win32k/objects/color.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/color.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/color.c Thu Aug 23 19:36:20 2007
@@ -269,6 +269,42 @@
return NewPalette;
}
+/*
+ * @implemented
+ */
+HPALETTE STDCALL
+NtGdiCreatePaletteInternal ( IN LPLOGPALETTE pLogPal, IN UINT cEntries )
+{
+ PPALGDI PalGDI;
+ HPALETTE NewPalette;
+
+ pLogPal->palNumEntries = cEntries;
+ NewPalette = PALETTE_AllocPalette( PAL_INDEXED,
+ cEntries,
+ (PULONG)pLogPal->palPalEntry,
+ 0, 0, 0);
+
+ if (NewPalette == NULL)
+ {
+ return NULL;
+ }
+
+ PalGDI = (PPALGDI) PALETTE_LockPalette(NewPalette);
+ if (PalGDI != NULL)
+ {
+ PALETTE_ValidateFlags(PalGDI->IndexedColors, PalGDI->NumColors);
+ PalGDI->logicalToSystem = NULL;
+ PALETTE_UnlockPalette(PalGDI);
+ }
+ else
+ {
+ /* FIXME - Handle PalGDI == NULL!!!! */
+ DPRINT1("waring PalGDI is NULL \n");
+ }
+ return NewPalette;
+}
+
+
BOOL STDCALL NtGdiGetColorAdjustment(HDC hDC,
LPCOLORADJUSTMENT ca)
{
Modified: trunk/reactos/subsystems/win32/win32k/w32ksvc.db
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/w3…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/w32ksvc.db (original)
+++ trunk/reactos/subsystems/win32/win32k/w32ksvc.db Thu Aug 23 19:36:20 2007
@@ -44,7 +44,7 @@
NtGdiCreateHalftonePalette 1
NtGdiCreateHatchBrushInternal 3
# NtGdiCreateMetafileDC 1
-# NtGdiCreatePaletteInternal 2
+NtGdiCreatePaletteInternal 2
NtGdiCreatePatternBrushInternal 3
NtGdiCreatePen 4
NtGdiCreateRectRgn 4