Author: greatlrd
Date: Tue May 6 15:20:56 2008
New Revision: 33330
URL:
http://svn.reactos.org/svn/reactos?rev=33330&view=rev
Log:
started cleanup object/dc.c
1. remove the static global value edd_directdraw_global I intrudues for dx.
it is now for each driver.
Modified:
trunk/reactos/subsystems/win32/win32k/include/tags.h
trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c
trunk/reactos/subsystems/win32/win32k/objects/dc.c
Modified: trunk/reactos/subsystems/win32/win32k/include/tags.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/tags.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/tags.h [iso-8859-1] Tue May 6 15:20:56
2008
@@ -91,8 +91,9 @@
/* Dx internal tags rember I do not known if it right namees */
#define TAG_DXPVMLIST TAG('D', 'X', 'P', 'L') /*
pmvlist for the driver */
#define TAG_DXFOURCC TAG('D', 'X', 'F', 'O') /*
pdwFourCC for the driver */
-#define TAG_DDRAW TAG('D', 'h', ' ', '1')
+#define TAG_DDRAW TAG('D', 'h', ' ', '1')
#define TAG_DDSURF TAG('D', 'h', ' ', '2')
+#define TAG_EDDGBL TAG('E', 'D', 'D', 'G') /* ?
edd_directdraw_global ??*/
#endif /* _WIN32K_TAGS_H */
Modified: trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c [iso-8859-1] Tue May 6 15:20:56
2008
@@ -432,10 +432,6 @@
DWORD *puNumFourCC,
DWORD *puFourCC)
{
-#if DXDBG
- BOOL status = FALSE;
-#endif
-
PGD_DXDDQUERYDIRECTDRAWOBJECT pfnDdQueryDirectDrawObject =
(PGD_DXDDQUERYDIRECTDRAWOBJECT)gpDxFuncs[DXG_INDEX_DxDdQueryDirectDrawObject].pfn;
if (pfnDdQueryDirectDrawObject == NULL)
@@ -446,20 +442,9 @@
DPRINT1("Calling dxg.sys pfnDdQueryDirectDrawObject\n");
-#if DXDBG
- status = pfnDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags,
puD3dCallbacks, puD3dDriverData,
- puD3dBufferCallbacks, puD3dTextureFormats,
puNumHeaps, puvmList, puNumFourCC, puFourCC);
-
-
- dump_edd_directdraw_global(&edd_DdirectDraw_Global);
- dump_edd_directdraw_local(edd_DdirectDraw_Global.peDirectDrawLocalList);
-
- return status;
-#else
+
return pfnDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags,
puD3dCallbacks, puD3dDriverData,
puD3dBufferCallbacks, puD3dTextureFormats,
puNumHeaps, puvmList, puNumFourCC, puFourCC);
-
-#endif
}
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:20:56
2008
@@ -32,7 +32,7 @@
static KEVENT VideoDriverNeedsPreparation;
static KEVENT VideoDriverPrepared;
static PDC defaultDCstate = NULL;
-EDD_DIRECTDRAW_GLOBAL edd_DdirectDraw_Global;
+
NTSTATUS FASTCALL
InitDcImpl(VOID)
@@ -554,8 +554,11 @@
PrimarySurface.ppdevNext = NULL; // Fixme! We need to support more than display
drvs.
PrimarySurface.ppdevParent = NULL; // Always NULL if primary.
PrimarySurface.pGraphicsDev = NULL; // Fixme!
- PrimarySurface.pEDDgpl = (EDD_DIRECTDRAW_GLOBAL *)&edd_DdirectDraw_Global; //
FIXME! We need to support more than display drvs.
- RtlZeroMemory( &edd_DdirectDraw_Global ,sizeof(EDD_DIRECTDRAW_GLOBAL));
+ PrimarySurface.pEDDgpl = ExAllocatePoolWithTag(PagedPool,
sizeof(EDD_DIRECTDRAW_GLOBAL), TAG_EDDGBL);
+ if (PrimarySurface.pEDDgpl)
+ {
+ RtlZeroMemory( PrimarySurface.pEDDgpl ,sizeof(EDD_DIRECTDRAW_GLOBAL));
+ }
ret = TRUE;
goto cleanup;
}
@@ -625,6 +628,7 @@
return NT_SUCCESS(Status);
}
+
BOOL FASTCALL
IntCreatePrimarySurface()