Author: jimtabor
Date: Mon Jun 2 22:41:54 2008
New Revision: 33832
URL:
http://svn.reactos.org/svn/reactos?rev=33832&view=rev
Log:
Move from fixed PrimarySurface to pointer based pPrimarySurface. Misc changes..
Modified:
trunk/reactos/subsystems/win32/win32k/eng/xlate.c
trunk/reactos/subsystems/win32/win32k/include/dc.h
trunk/reactos/subsystems/win32/win32k/include/palette.h
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/dc.c
trunk/reactos/subsystems/win32/win32k/objects/fillshap.c
trunk/reactos/subsystems/win32/win32k/objects/text.c
Modified: trunk/reactos/subsystems/win32/win32k/eng/xlate.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/eng/xlate.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/eng/xlate.c [iso-8859-1] Mon Jun 2 22:41:54
2008
@@ -459,10 +459,10 @@
}
DestPalette = pDestSurf->hDIBPalette;
- if (!DestPalette) DestPalette = PrimarySurface.DevInfo.hpalDefault;
+ if (!DestPalette) DestPalette = pPrimarySurface->DevInfo.hpalDefault;
SourcePalette = pSrcSurf->hDIBPalette;
- if (!SourcePalette) SourcePalette = PrimarySurface.DevInfo.hpalDefault;
+ if (!SourcePalette) SourcePalette = pPrimarySurface->DevInfo.hpalDefault;
DPRINT("DestPalette = %p, SourcePalette = %p, DefaultPatelle = %p\n",
DestPalette, SourcePalette, NtGdiGetStockObject((INT)DEFAULT_PALETTE));
Modified: trunk/reactos/subsystems/win32/win32k/include/dc.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] Mon Jun 2 22:41:54
2008
@@ -140,7 +140,7 @@
INT DC_Type;
INT DC_Flags;
PVOID pPDev; // PGDIDEVICE aka PDEVOBJ
- PVOID hSem; // PERESOURCE
+ PVOID hSem; // PERESOURCE aka HSEMAPHORE
FLONG flGraphics;
FLONG flGraphics2;
PDC_ATTR pDc_Attr;
@@ -254,14 +254,6 @@
struct _EDD_DIRECTDRAW_GLOBAL * pEDDgpl;
} GDIDEVICE, *PGDIDEVICE;
-/* For Metafile and MetaEnhFile not in windows this struct taken from wine cvs
15/9-2006*/
-typedef struct
-{
- LPENHMETAHEADER emh;
- BOOL on_disk; /* true if metafile is on disk */
-} DD_ENHMETAFILEOBJ, *PDD_ENHMETAFILEOBJ;
-
-
/* Internal functions *********************************************************/
#define DC_LockDc(hDC) \
@@ -313,6 +305,6 @@
HDC FASTCALL IntGdiCreateDisplayDC(HDEV hDev, ULONG DcType, BOOL EmptyDC);
BOOL FASTCALL IntGdiCleanDC(HDC hDC);
-extern GDIDEVICE PrimarySurface;
+extern PGDIDEVICE pPrimarySurface;
#endif /* not __WIN32K_DC_H */
Modified: trunk/reactos/subsystems/win32/win32k/include/palette.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/palette.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/palette.h [iso-8859-1] Mon Jun 2
22:41:54 2008
@@ -82,5 +82,7 @@
INT FASTCALL PALETTE_GetObject(PPALGDI pGdiObject, INT cbCount, LPLOGBRUSH lpBuffer);
PPALETTEENTRY FASTCALL ReturnSystemPalette (VOID);
+HPALETTE FASTCALL GdiSelectPalette(HDC, HPALETTE, BOOL);
+
#endif /* not _WIN32K_PALETTE_H */
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] Mon Jun 2
22:41:54 2008
@@ -410,10 +410,10 @@
}
DestPalette = BitmapDest->hDIBPalette;
- if (!DestPalette) DestPalette = PrimarySurface.DevInfo.hpalDefault;
+ if (!DestPalette) DestPalette = pPrimarySurface->DevInfo.hpalDefault;
SourcePalette = BitmapSrc->hDIBPalette;
- if (!SourcePalette) SourcePalette = PrimarySurface.DevInfo.hpalDefault;
+ if (!SourcePalette) SourcePalette = pPrimarySurface->DevInfo.hpalDefault;
if(!(PalSourceGDI = PALETTE_LockPalette(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] Mon Jun 2
22:41:54 2008
@@ -266,7 +266,7 @@
if ( BitmapObject )
{
Pal = BitmapObject->hDIBPalette;
- if (!Pal) Pal = PrimarySurface.DevInfo.hpalDefault;
+ if (!Pal) Pal = pPrimarySurface->DevInfo.hpalDefault;
/* FIXME: Verify if it shouldn't be PAL_BGR! */
XlateObj = (XLATEOBJ*)IntEngCreateXlate ( PAL_RGB, 0, NULL, Pal );
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] Mon Jun 2 22:41:54
2008
@@ -128,7 +128,7 @@
hPalette = pSurface->hDIBPalette;
BITMAPOBJ_UnlockBitmap(pSurface);
}
- if (!hPalette) hPalette = PrimarySurface.DevInfo.hpalDefault;
+ if (!hPalette) hPalette = pPrimarySurface->DevInfo.hpalDefault;
if (BrushObj->flAttrs & GDIBRUSH_IS_NULL)
{
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] Mon Jun 2 22:41:54
2008
@@ -29,8 +29,8 @@
// --------------------------------------------------------- File Statics
-GDIDEVICE PrimarySurface;
-static PGDIDEVICE pPrimarySurface = NULL;
+static GDIDEVICE PrimarySurface;
+PGDIDEVICE pPrimarySurface = &PrimarySurface;
static KEVENT VideoDriverNeedsPreparation;
static KEVENT VideoDriverPrepared;
static PDC defaultDCstate = NULL;
@@ -347,7 +347,7 @@
RtlZeroMemory(&PrimarySurface, sizeof(PrimarySurface));
- if (!pPrimarySurface) pPrimarySurface = ExAllocatePoolWithTag(PagedPool,
sizeof(GDIDEVICE), TAG_GDIPDEV);
+// if (!pPrimarySurface) pPrimarySurface = ExAllocatePoolWithTag(PagedPool,
sizeof(GDIDEVICE), TAG_GDIPDEV);
PrimarySurface.VideoFileObject = DRIVER_FindMPDriver(DisplayNumber);
@@ -3394,7 +3394,7 @@
PGDIDEVICE pPDev, pGdiDevice = (PGDIDEVICE) hdev;
if (!pGdiDevice) return NULL;
if ( pGdiDevice < (PGDIDEVICE)MmSystemRangeStart) return NULL;
- pPDev = &PrimarySurface;
+ pPDev = pPrimarySurface;
IntGdiAcquireSemaphore(hsemDriverMgmt);
do
{
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] Mon Jun 2
22:41:54 2008
@@ -1552,7 +1552,7 @@
ASSERT(BitmapObj);
hDestPalette = BitmapObj->hDIBPalette;
- if (!hDestPalette) hDestPalette = PrimarySurface.DevInfo.hpalDefault;
+ if (!hDestPalette) hDestPalette = pPrimarySurface->DevInfo.hpalDefault;
PalDestGDI = PALETTE_LockPalette(hDestPalette);
if (PalDestGDI)
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] Mon Jun 2 22:41:54
2008
@@ -1631,7 +1631,7 @@
/* Create the brushes */
hDestPalette = BitmapObj->hDIBPalette;
- if (!hDestPalette) hDestPalette = PrimarySurface.DevInfo.hpalDefault;
+ if (!hDestPalette) hDestPalette = pPrimarySurface->DevInfo.hpalDefault;
PalDestGDI = PALETTE_LockPalette(hDestPalette);
if ( !PalDestGDI )
Mode = PAL_RGB;