Author: tkreuzer
Date: Tue May 6 15:44:25 2008
New Revision: 33332
URL:
http://svn.reactos.org/svn/reactos?rev=33332&view=rev
Log:
DC: use dc.DcLevel.hPal for the palette instead of using dc.PalIndexed and dc.w.hPalette
NtUserSelectPalette: make code more readable
Modified:
trunk/reactos/include/reactos/win32k/ntgdihdl.h
trunk/reactos/subsystems/win32/win32k/ntuser/windc.c
trunk/reactos/subsystems/win32/win32k/objects/bitblt.c
trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c
trunk/reactos/subsystems/win32/win32k/objects/brush.c
trunk/reactos/subsystems/win32/win32k/objects/color.c
trunk/reactos/subsystems/win32/win32k/objects/dc.c
trunk/reactos/subsystems/win32/win32k/objects/dibobj.c
trunk/reactos/subsystems/win32/win32k/objects/fillshap.c
trunk/reactos/subsystems/win32/win32k/objects/text.c
Modified: trunk/reactos/include/reactos/win32k/ntgdihdl.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntg…
==============================================================================
--- trunk/reactos/include/reactos/win32k/ntgdihdl.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/win32k/ntgdihdl.h [iso-8859-1] Tue May 6 15:44:25 2008
@@ -344,8 +344,6 @@
HBITMAP hFirstBitmap; /* Bitmap selected at creation of the DC */
/* #if 0 */
- HPALETTE hPalette;
-
GdiPath path;
/* #endif */
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/windc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/windc.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/windc.c [iso-8859-1] Tue May 6 15:44:25
2008
@@ -1078,46 +1078,42 @@
HPALETTE hpal,
BOOL ForceBackground)
{
- PDC dc;
- HPALETTE oldPal = NULL;
- PPALGDI PalGDI;
-
- // FIXME: mark the palette as a [fore\back]ground pal
- dc = DC_LockDc(hDC);
- if (NULL != dc)
+ PDC dc;
+ HPALETTE oldPal = NULL;
+ PPALGDI PalGDI;
+
+ // FIXME: mark the palette as a [fore\back]ground pal
+ dc = DC_LockDc(hDC);
+ if (!dc)
{
- /* Check if this is a valid palette handle */
- PalGDI = PALETTE_LockPalette(hpal);
- if (NULL != PalGDI)
- {
- /* Is this a valid palette for this depth? */
- if ((dc->w.bitsPerPixel <= 8 && PAL_INDEXED == PalGDI->Mode)
- || (8 < dc->w.bitsPerPixel && PAL_INDEXED !=
PalGDI->Mode))
- {
- PALETTE_UnlockPalette(PalGDI);
- oldPal = dc->w.hPalette;
- dc->w.hPalette = hpal;
- }
- else if (8 < dc->w.bitsPerPixel && PAL_INDEXED ==
PalGDI->Mode)
- {
- PALETTE_UnlockPalette(PalGDI);
- oldPal = dc->PalIndexed;
- dc->PalIndexed = hpal;
- }
- else
- {
- PALETTE_UnlockPalette(PalGDI);
- oldPal = NULL;
- }
- }
- else
- {
- oldPal = NULL;
- }
- DC_UnlockDc(dc);
+ return NULL;
}
- return oldPal;
+ /* Check if this is a valid palette handle */
+ PalGDI = PALETTE_LockPalette(hpal);
+ if (!PalGDI)
+ {
+ DC_UnlockDc(dc);
+ return NULL;
+ }
+
+ /* Is this a valid palette for this depth? */
+ if ((dc->w.bitsPerPixel <= 8 && PalGDI->Mode == PAL_INDEXED) ||
+ (dc->w.bitsPerPixel > 8 && PalGDI->Mode != PAL_INDEXED))
+ {
+ oldPal = dc->DcLevel.hpal;
+ dc->DcLevel.hpal = hpal;
+ }
+ else if (8 < dc->w.bitsPerPixel && PAL_INDEXED == PalGDI->Mode)
+ {
+ oldPal = dc->DcLevel.hpal;
+ dc->DcLevel.hpal = hpal;
+ }
+
+ PALETTE_UnlockPalette(PalGDI);
+ DC_UnlockDc(dc);
+
+ return oldPal;
}
Modified: trunk/reactos/subsystems/win32/win32k/objects/bitblt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/bitblt.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/bitblt.c [iso-8859-1] Tue May 6
15:44:25 2008
@@ -115,10 +115,10 @@
BitmapSrc = BITMAPOBJ_LockBitmap(DCSrc->w.hBitmap);
/* Create the XLATEOBJ. */
- if (DCDest->w.hPalette != 0)
- DestPalette = DCDest->w.hPalette;
- if (DCSrc->w.hPalette != 0)
- SourcePalette = DCSrc->w.hPalette;
+ if (DCDest->DcLevel.hpal != 0)
+ DestPalette = DCDest->DcLevel.hpal;
+ if (DCSrc->DcLevel.hpal != 0)
+ SourcePalette = DCSrc->DcLevel.hpal;
/* KB41464 details how to convert between mono and color */
if (DCDest->w.bitsPerPixel == 1 && DCSrc->w.bitsPerPixel == 1)
@@ -311,11 +311,11 @@
/* Create the XLATEOBJ. */
if (UsesSource)
{
- if (DCDest->w.hPalette != 0)
- DestPalette = DCDest->w.hPalette;
-
- if (DCSrc->w.hPalette != 0)
- SourcePalette = DCSrc->w.hPalette;
+ if (DCDest->DcLevel.hpal != 0)
+ DestPalette = DCDest->DcLevel.hpal;
+
+ if (DCSrc->DcLevel.hpal != 0)
+ SourcePalette = DCSrc->DcLevel.hpal;
/* KB41464 details how to convert between mono and color */
if (DCDest->w.bitsPerPixel == 1 && DCSrc->w.bitsPerPixel == 1)
@@ -459,11 +459,11 @@
xSrc += DCSrc->w.DCOrgX;
ySrc += DCSrc->w.DCOrgY;
- if(DCDest->w.hPalette)
- DestPalette = DCDest->w.hPalette;
-
- if(DCSrc->w.hPalette)
- SourcePalette = DCSrc->w.hPalette;
+ if(DCDest->DcLevel.hpal)
+ DestPalette = DCDest->DcLevel.hpal;
+
+ if(DCSrc->DcLevel.hpal)
+ SourcePalette = DCSrc->DcLevel.hpal;
if(!(PalSourceGDI = PALETTE_LockPalette(SourcePalette)))
{
@@ -962,11 +962,11 @@
/* Create the XLATEOBJ. */
if (UsesSource)
{
- if (DCDest->w.hPalette != 0)
- DestPalette = DCDest->w.hPalette;
-
- if (DCSrc->w.hPalette != 0)
- SourcePalette = DCSrc->w.hPalette;
+ if (DCDest->DcLevel.hpal != 0)
+ DestPalette = DCDest->DcLevel.hpal;
+
+ if (DCSrc->DcLevel.hpal != 0)
+ SourcePalette = DCSrc->DcLevel.hpal;
/* FIXME: Use the same logic for create XLATEOBJ as in NtGdiBitBlt. */
XlateObj = (XLATEOBJ*)IntEngCreateXlate(0, 0, DestPalette, SourcePalette);
Modified: trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c [iso-8859-1] Tue May 6
15:44:25 2008
@@ -271,8 +271,8 @@
SurfaceObject = &BitmapObject->SurfObj;
if ( BitmapObject )
{
- if ( dc->w.hPalette != 0 )
- Pal = dc->w.hPalette;
+ if ( dc->DcLevel.hpal != 0 )
+ Pal = dc->DcLevel.hpal;
/* FIXME: Verify if it shouldn't be PAL_BGR! */
XlateObj = (XLATEOBJ*)IntEngCreateXlate ( PAL_RGB, 0, NULL, Pal );
if ( XlateObj )
Modified: trunk/reactos/subsystems/win32/win32k/objects/brush.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/brush.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/brush.c [iso-8859-1] Tue May 6 15:44:25
2008
@@ -127,7 +127,7 @@
}
else if (BrushObj->flAttrs & GDIBRUSH_IS_SOLID)
{
- Result = IntEngCreateXlate(0, PAL_RGB, Dc->w.hPalette, NULL);
+ Result = IntEngCreateXlate(0, PAL_RGB, Dc->DcLevel.hpal, NULL);
*Failed = FALSE;
}
else
@@ -143,11 +143,11 @@
if (!Dc_Attr) Dc_Attr = &Dc->Dc_Attr;
if (Dc->w.bitsPerPixel != 1)
- Result = IntEngCreateSrcMonoXlate(Dc->w.hPalette,
Dc_Attr->crForegroundClr, Dc_Attr->crBackgroundClr);
+ Result = IntEngCreateSrcMonoXlate(Dc->DcLevel.hpal,
Dc_Attr->crForegroundClr, Dc_Attr->crBackgroundClr);
}
else if (BrushObj->flAttrs & GDIBRUSH_IS_DIB)
{
- Result = IntEngCreateXlate(0, 0, Dc->w.hPalette, Pattern->hDIBPalette);
+ Result = IntEngCreateXlate(0, 0, Dc->DcLevel.hpal, Pattern->hDIBPalette);
}
BITMAPOBJ_UnlockBitmap(Pattern);
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 [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/color.c [iso-8859-1] Tue May 6 15:44:25
2008
@@ -122,7 +122,7 @@
dc = DC_LockDc(hDC);
if (NULL != dc)
{
- if (dc->w.hPalette == hPal)
+ if (dc->DcLevel.hpal == hPal)
{
DC_UnlockDc(dc);
IntGdiRealizePalette(hDC);
@@ -301,7 +301,7 @@
dc = DC_LockDc(hDC);
if (NULL != dc)
{
- HPALETTE hpal = dc->w.hPalette;
+ HPALETTE hpal = dc->DcLevel.hpal;
palGDI = (PPALGDI) PALETTE_LockPalette(hpal);
if (!palGDI)
{
@@ -431,7 +431,7 @@
return 0;
}
- palGDI = PALETTE_LockPalette(dc->w.hPalette);
+ palGDI = PALETTE_LockPalette(dc->DcLevel.hpal);
if (palGDI != NULL)
{
if (pe != NULL)
@@ -505,7 +505,7 @@
return 0;
systemPalette = NtGdiGetStockObject((INT)DEFAULT_PALETTE);
- palGDI = PALETTE_LockPalette(dc->w.hPalette);
+ palGDI = PALETTE_LockPalette(dc->DcLevel.hpal);
palPtr = (PALOBJ*) palGDI;
if (palGDI == NULL)
@@ -536,8 +536,8 @@
// Step 1: Create mapping of system palette\DC palette
#ifndef NO_MAPPING
realized = PALETTE_SetMapping(palPtr, 0, palGDI->NumColors,
- (dc->w.hPalette != hPrimaryPalette) ||
- (dc->w.hPalette == NtGdiGetStockObject(DEFAULT_PALETTE)));
+ (dc->DcLevel.hpal != hPrimaryPalette) ||
+ (dc->DcLevel.hpal == NtGdiGetStockObject(DEFAULT_PALETTE)));
#else
realized = 0;
#endif
@@ -574,7 +574,7 @@
if(dc->DC_Type != DC_TYPE_MEMORY)
{
// Device managed DC
- palGDI->logicalToSystem = IntEngCreateXlate(sysMode, palMode, systemPalette,
dc->w.hPalette);
+ palGDI->logicalToSystem = IntEngCreateXlate(sysMode, palMode, systemPalette,
dc->DcLevel.hpal);
}
DC_UnlockDc(dc);
Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dc.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dc.c [iso-8859-1] Tue May 6 15:44:25
2008
@@ -135,8 +135,7 @@
NewDC->w.hFirstBitmap = hBitmap;
NewDC->pPDev = OrigDC->pPDev;
- NewDC->PalIndexed = OrigDC->PalIndexed;
- NewDC->w.hPalette = OrigDC->w.hPalette;
+ NewDC->DcLevel.hpal = OrigDC->DcLevel.hpal;
nDc_Attr->lTextAlign = oDc_Attr->lTextAlign;
nDc_Attr->ulForegroundClr = oDc_Attr->ulForegroundClr;
nDc_Attr->ulBackgroundClr = oDc_Attr->ulBackgroundClr;
@@ -829,8 +828,7 @@
if (!CreateAsIC)
{
- NewDC->PalIndexed = NtGdiGetStockObject(DEFAULT_PALETTE);
- NewDC->w.hPalette = PrimarySurface.DevInfo.hpalDefault;
+ NewDC->DcLevel.hpal = PrimarySurface.DevInfo.hpalDefault;
nDc_Attr->jROP2 = R2_COPYPEN;
NewDC->erclWindow.top = NewDC->erclWindow.left = 0;
@@ -1130,7 +1128,7 @@
SelObject = Dc_Attr->hbrush;
break;
case GDI_OBJECT_TYPE_PALETTE:
- SelObject = dc->w.hPalette;
+ SelObject = dc->DcLevel.hpal;
break;
case GDI_OBJECT_TYPE_FONT:
SelObject = Dc_Attr->hlfntNew;
@@ -1140,6 +1138,7 @@
break;
case GDI_OBJECT_TYPE_COLORSPACE:
DPRINT1("FIXME: NtGdiGetCurrentObject() ObjectType OBJ_COLORSPACE not
supported yet!\n");
+ // SelObject = dc->DcLevel.pColorSpace.BaseObject.hHmgr; ?
SelObject = NULL;
break;
default:
@@ -1196,18 +1195,18 @@
*ppt = pDc->ptlDCOrig;
return TRUE;
}
-
+
BOOL STDCALL
GdiGetDCOrgEx(HDC hDC, PPOINTL ppt, PRECTL prc)
{
PDC pdc;
-
+
pdc = DC_LockDc(hDC);
if (!pdc) return FALSE;
-
+
*prc = pdc->erclWindow;
*ppt = pdc->ptlDCOrig;
-
+
DC_UnlockDc(pdc);
return TRUE;
}
@@ -1217,7 +1216,7 @@
LPSIZE AspectRatio)
{
PDC_ATTR pDc_Attr;
-
+
pDc_Attr = pDC->pDc_Attr;
if ( !pDc_Attr ) pDc_Attr = &pDC->Dc_Attr;
@@ -1337,8 +1336,7 @@
nDc_Attr->hlfntNew = Dc_Attr->hlfntNew;
newdc->w.hBitmap = dc->w.hBitmap;
newdc->w.hFirstBitmap = dc->w.hFirstBitmap;
- newdc->PalIndexed = dc->PalIndexed;
- newdc->w.hPalette = dc->w.hPalette;
+ newdc->DcLevel.hpal = dc->DcLevel.hpal;
newdc->w.totalExtent = dc->w.totalExtent;
newdc->w.bitsPerPixel = dc->w.bitsPerPixel;
nDc_Attr->jROP2 = Dc_Attr->jROP2;
@@ -1444,7 +1442,6 @@
Dc_Attr->szlWindowExt = sDc_Attr->szlWindowExt;
Dc_Attr->ptlViewportOrg = sDc_Attr->ptlViewportOrg;
Dc_Attr->szlViewportExt = sDc_Attr->szlViewportExt;
- dc->PalIndexed = dcs->PalIndexed;
if (dc->DC_Type != DC_TYPE_MEMORY)
{
@@ -1488,10 +1485,10 @@
IntGdiSetBkColor( hDC, sDc_Attr->crBackgroundClr);
IntGdiSetTextColor( hDC, sDc_Attr->crForegroundClr);
- NtUserSelectPalette( hDC, dcs->w.hPalette, FALSE );
+ NtUserSelectPalette( hDC, dcs->DcLevel.hpal, FALSE );
#if 0
- GDISelectPalette16( hDC, dcs->w.hPalette, FALSE );
+ GDISelectPalette16( hDC, dcs->DcLevel.hpal, FALSE );
#endif
}
@@ -1960,12 +1957,12 @@
if(pBmp->dib)
{
pDC->w.bitsPerPixel = pBmp->dib->dsBmih.biBitCount;
- pDC->w.hPalette = pBmp->hDIBPalette;
+ pDC->DcLevel.hpal = pBmp->hDIBPalette;
}
else
{
pDC->w.bitsPerPixel = BitsPerFormat(pBmp->SurfObj.iBitmapFormat);
- pDC->w.hPalette = ((GDIDEVICE *)pDC->pPDev)->DevInfo.hpalDefault;
+ pDC->DcLevel.hpal = ((GDIDEVICE *)pDC->pPDev)->DevInfo.hpalDefault;
}
/* Regenerate the XLATEOBJs. */
@@ -2333,7 +2330,7 @@
break;
}
SafeResult = Dc_Attr->flFontMapper;
- Dc_Attr->flFontMapper = dwIn;
+ Dc_Attr->flFontMapper = dwIn;
break;
case GdiGetSetMapMode:
SafeResult = IntGdiSetMapMode( dc, dwIn);
@@ -2479,7 +2476,7 @@
Dc_Attr->hlfntNew = NtGdiGetStockObject(SYSTEM_FONT);
TextIntRealizeFont(Dc_Attr->hlfntNew);
- NewDC->w.hPalette = NtGdiGetStockObject(DEFAULT_PALETTE);
+ NewDC->DcLevel.hpal = NtGdiGetStockObject(DEFAULT_PALETTE);
DC_UnlockDc(NewDC);
@@ -2757,7 +2754,7 @@
}
VOID FASTCALL
-IntGdiUnreferencePdev(PGDIDEVICE pPDev, DWORD CleanUpType)
+IntGdiUnreferencePdev(PGDIDEVICE pPDev, DWORD CleanUpType)
{
IntGdiAcquireSemaphore(hsemDriverMgmt);
pPDev->cPdevRefs--;
Modified: trunk/reactos/subsystems/win32/win32k/objects/dibobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1] Tue May 6
15:44:25 2008
@@ -1,4 +1,5 @@
/*
+ * $Id$
*
* ReactOS W32 Subsystem
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
@@ -382,7 +383,7 @@
SourceSize.cx = bmi->bmiHeader.biWidth;
SourceSize.cy = ScanLines;
DIBWidth = DIB_GetDIBWidthBytes(SourceSize.cx, bmi->bmiHeader.biBitCount);
-
+
ProbeForRead(Bits, DIBWidth * abs(bmi->bmiHeader.biHeight), 1);
hSourceBitmap = EngCreateBitmap(SourceSize,
DIBWidth,
@@ -403,7 +404,7 @@
_SEH_LEAVE;
}
-
+
/* Obtain destination palette from the DC */
pDCPalette = PALETTE_LockPalette(((GDIDEVICE
*)pDC->pPDev)->DevInfo.hpalDefault);
if (!pDCPalette)
@@ -415,7 +416,7 @@
DDBPaletteType = pDCPalette->Mode;
DDBPalette = ((GDIDEVICE *)pDC->pPDev)->DevInfo.hpalDefault;
PALETTE_UnlockPalette(pDCPalette);
-
+
DIBPalette = BuildDIBPalette(bmi, (PINT)&DIBPaletteType);
if (!DIBPalette)
{
@@ -504,7 +505,7 @@
return 0;
}
/* Source palette obtained from the windows hdc */
- hSourcePalette = Dc->w.hPalette;
+ hSourcePalette = Dc->DcLevel.hpal;
DC_UnlockDc(Dc);
/* don't do anything if we fail this */
@@ -909,7 +910,7 @@
1,
NULL);
}
-
+
if (height < 0)
height = -height;
@@ -1258,7 +1259,7 @@
USHORT *lpIndex;
PPALGDI palGDI;
- palGDI = PALETTE_LockPalette(dc->w.hPalette);
+ palGDI = PALETTE_LockPalette(dc->DcLevel.hpal);
if (NULL == palGDI)
{
@@ -1269,11 +1270,7 @@
if (palGDI->Mode != PAL_INDEXED)
{
PALETTE_UnlockPalette(palGDI);
- palGDI = PALETTE_LockPalette(dc->PalIndexed);
- if (palGDI->Mode != PAL_INDEXED)
- {
- return NULL;
- }
+ return NULL;
}
nNumColors = 1 << lpbmi->bmiHeader.biBitCount;
Modified: trunk/reactos/subsystems/win32/win32k/objects/fillshap.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/fillshap.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/fillshap.c [iso-8859-1] Tue May 6
15:44:25 2008
@@ -64,7 +64,7 @@
Dc_Attr = dc->pDc_Attr;
if (!Dc_Attr) Dc_Attr = &dc->Dc_Attr;
-
+
BitmapObj = BITMAPOBJ_LockBitmap(dc->w.hBitmap);
/* FIXME - BitmapObj can be NULL!!!! don't assert but handle this case
gracefully! */
ASSERT(BitmapObj);
@@ -1033,7 +1033,7 @@
RECTL DestRect;
MIX Mix;
PDC_ATTR Dc_Attr;
-
+
ASSERT ( dc ); // caller's responsibility to set this up
/* FIXME - BitmapObj can be NULL!!! Don't assert but handle this case gracefully!
*/
ASSERT ( BitmapObj );
@@ -1550,13 +1550,13 @@
/* FIXME - BitmapObj can be NULL!!! Don't assert but handle this case gracefully!
*/
ASSERT(BitmapObj);
- PalDestGDI = PALETTE_LockPalette(dc->w.hPalette);
+ PalDestGDI = PALETTE_LockPalette(dc->DcLevel.hpal);
/* FIXME - PalDestGDI can be NULL!!! Don't assert but handle this case
gracefully! */
ASSERT(PalDestGDI);
Mode = PalDestGDI->Mode;
PALETTE_UnlockPalette(PalDestGDI);
- XlateObj = (XLATEOBJ*)IntEngCreateXlate(Mode, PAL_RGB, dc->w.hPalette, NULL);
+ XlateObj = (XLATEOBJ*)IntEngCreateXlate(Mode, PAL_RGB, dc->DcLevel.hpal, NULL);
ASSERT(XlateObj);
Ret = IntEngGradientFill(&BitmapObj->SurfObj,
Modified: trunk/reactos/subsystems/win32/win32k/objects/text.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/text.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/text.c [iso-8859-1] Tue May 6 15:44:25
2008
@@ -1629,7 +1629,7 @@
YStart = Start.y + dc->w.DCOrgY;
/* Create the brushes */
- PalDestGDI = PALETTE_LockPalette(dc->w.hPalette);
+ PalDestGDI = PALETTE_LockPalette(dc->DcLevel.hpal);
if ( !PalDestGDI )
Mode = PAL_RGB;
else
@@ -1637,7 +1637,7 @@
Mode = PalDestGDI->Mode;
PALETTE_UnlockPalette(PalDestGDI);
}
- XlateObj = (XLATEOBJ*)IntEngCreateXlate(Mode, PAL_RGB, dc->w.hPalette, NULL);
+ XlateObj = (XLATEOBJ*)IntEngCreateXlate(Mode, PAL_RGB, dc->DcLevel.hpal, NULL);
if ( !XlateObj )
{
goto fail;
@@ -1667,7 +1667,7 @@
}
IntGdiInitBrushInstance(&BrushBgInst, BrushBg, NULL);
}
- XlateObj2 = (XLATEOBJ*)IntEngCreateXlate(PAL_RGB, Mode, NULL, dc->w.hPalette);
+ XlateObj2 = (XLATEOBJ*)IntEngCreateXlate(PAL_RGB, Mode, NULL, dc->DcLevel.hpal);
if ( !XlateObj2 )
{
goto fail;