Properly synchronize with GPU

svn path=/trunk/; revision=13444
This commit is contained in:
Gé van Geldorp 2005-02-06 18:24:31 +00:00
parent 90b5ddc462
commit 78a54aa150
3 changed files with 18 additions and 0 deletions

View file

@ -97,6 +97,8 @@ typedef LONG (STDCALL *PGD_QUERYSPOOLTYPE)(DHPDEV, LPWSTR);
typedef BOOL (STDCALL *PGD_GRADIENTFILL)(SURFOBJ*, CLIPOBJ*, XLATEOBJ*, TRIVERTEX*, ULONG, PVOID, ULONG, RECTL*, POINTL*, ULONG);
typedef VOID (STDCALL *PGD_SYNCHRONIZESURFACE)(SURFOBJ*, RECTL *, FLONG);
typedef struct _DRIVER_FUNCTIONS
{
PGD_ENABLEDRIVER EnableDriver;
@ -158,6 +160,7 @@ typedef struct _DRIVER_FUNCTIONS
PGD_DISABLEDIRECTDRAW DisableDirectDraw;
PGD_QUERYSPOOLTYPE QuerySpoolType;
PGD_GRADIENTFILL GradientFill;
PGD_SYNCHRONIZESURFACE SynchronizeSurface;
} DRIVER_FUNCTIONS, *PDRIVER_FUNCTIONS;
BOOL DRIVER_RegisterDriver(LPCWSTR Name, PGD_ENABLEDRIVER EnableDriver);

View file

@ -123,6 +123,20 @@ IntEngEnter(PINTENG_ENTER_LEAVE EnterLeave,
*OutputObj = DestObj;
}
if (NULL != *OutputObj
&& 0 != (((BITMAPOBJ*) *OutputObj)->flHooks & HOOK_SYNCHRONIZE))
{
if (NULL != GDIDEVFUNCS(*OutputObj).SynchronizeSurface)
{
GDIDEVFUNCS(*OutputObj).SynchronizeSurface(*OutputObj, DestRect, 0);
}
else if (STYPE_BITMAP == (*OutputObj)->iType
&& NULL != GDIDEVFUNCS(*OutputObj).Synchronize)
{
GDIDEVFUNCS(*OutputObj).Synchronize((*OutputObj)->dhpdev, DestRect);
}
}
EnterLeave->DestObj = DestObj;
EnterLeave->OutputObj = *OutputObj;
EnterLeave->ReadOnly = ReadOnly;

View file

@ -239,6 +239,7 @@ BOOL DRIVER_BuildDDIFunctions(PDRVENABLEDATA DED,
DRIVER_FUNCTION(DisableDirectDraw);
DRIVER_FUNCTION(QuerySpoolType);
DRIVER_FUNCTION(GradientFill);
DRIVER_FUNCTION(SynchronizeSurface);
END_FUNCTION_MAP();