Author: greatlrd
Date: Mon Dec 31 06:17:42 2007
New Revision: 31511
URL:
http://svn.reactos.org/svn/reactos?rev=31511&view=rev
Log:
remve EDD_SURFACE_LOCAL after reexaime it.
Use EDD_SURFACE instead
move _DD_BASEOBJECT struct to correct header file
make sure right unlock and lock using EDD_SURFACE
Modified:
trunk/reactos/drivers/directx/dxg/dxg_int.h
trunk/reactos/drivers/directx/dxg/eng.c
trunk/reactos/include/reactos/drivers/directx/directxint.h
Modified: trunk/reactos/drivers/directx/dxg/dxg_int.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/directx/dxg/dxg_in…
==============================================================================
--- trunk/reactos/drivers/directx/dxg/dxg_int.h (original)
+++ trunk/reactos/drivers/directx/dxg/dxg_int.h Mon Dec 31 06:17:42 2007
@@ -31,19 +31,13 @@
#include "tags.h"
-typedef struct _DD_BASEOBJECT
-{
- HANDLE hHmgr;
- ULONG ulShareCount;
- LONG cExclusiveLock;
- PVOID Tid;
-} DD_BASEOBJECT, *PDD_BASEOBJECT, *POBJ;
+
typedef struct _DD_ENTRY
{
union
{
- POBJ pobj;
+ PDD_BASEOBJECT pobj;
HANDLE hFree;
};
union
Modified: trunk/reactos/drivers/directx/dxg/eng.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/directx/dxg/eng.c?…
==============================================================================
--- trunk/reactos/drivers/directx/dxg/eng.c (original)
+++ trunk/reactos/drivers/directx/dxg/eng.c Mon Dec 31 06:17:42 2007
@@ -16,13 +16,13 @@
STDCALL
DxDdLockDirectDrawSurface(HANDLE hDdSurface)
{
- PEDD_SURFACE_LOCAL pEDDSurfacelcl = NULL;
+ PEDD_SURFACE pEDDSurface = NULL;
PDD_SURFACE_LOCAL pSurfacelcl = NULL;
- pSurfacelcl = DdHmgLock(hDdSurface, 2, FALSE);
- if (pSurfacelcl != NULL)
+ pEDDSurface = DdHmgLock(hDdSurface, 2, FALSE);
+ if (pEDDSurface != NULL)
{
- pSurfacelcl = &pEDDSurfacelcl->Surfacelcl;
+ pSurfacelcl = &pEDDSurface->ddsSurfaceLocal;
}
return pSurfacelcl;
@@ -33,12 +33,12 @@
DxDdUnlockDirectDrawSurface(PDD_SURFACE_LOCAL pSurface)
{
BOOL retVal = FALSE;
- PEDD_SURFACE_LOCAL pEDDSurfacelcl = NULL;
+ PEDD_SURFACE pEDDSurface = NULL;
if (pSurface)
{
- pEDDSurfacelcl = (PEDD_SURFACE_LOCAL)( ((PBYTE)pSurface) -
sizeof(DD_BASEOBJECT));
- InterlockedDecrement(&pEDDSurfacelcl->Object.cExclusiveLock);
+ pEDDSurface = (PEDD_SURFACE)( ((PBYTE)pSurface) - sizeof(DD_BASEOBJECT));
+ InterlockedDecrement(&pEDDSurface->pobj.cExclusiveLock);
retVal = TRUE;
}
Modified: trunk/reactos/include/reactos/drivers/directx/directxint.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/drivers/di…
==============================================================================
--- trunk/reactos/include/reactos/drivers/directx/directxint.h (original)
+++ trunk/reactos/include/reactos/drivers/directx/directxint.h Mon Dec 31 06:17:42 2007
@@ -1,16 +1,21 @@
#ifndef _DXINTERNEL_
#define _DXINTERNEL_
+
+typedef struct _DD_BASEOBJECT
+{
+ HANDLE hHmgr;
+ ULONG ulShareCount;
+ LONG cExclusiveLock;
+ PVOID Tid;
+} DD_BASEOBJECT, *PDD_BASEOBJECT;
typedef struct _EDD_DIRECTDRAW_LOCAL
{
//
// GDI Object Header
//
- HANDLE hHmgr;
- PVOID pEntry;
- INT cExcLock;
- HANDLE Tid;
+ DD_BASEOBJECT pobj;
struct _EDD_DIRECTDRAW_GLOBAL * peDirectDrawGlobal;
struct _EDD_DIRECTDRAW_GLOBAL * peDirectDrawGlobal2;
@@ -35,10 +40,7 @@
//
// GDI Object Header
//
- HANDLE hHmgr;
- PVOID pEntry;
- INT cExcLock;
- HANDLE Tid;
+ DD_BASEOBJECT pobj;
//
// Direct Draw Surface Data