Properly synchronize with GPU Modified: trunk/reactos/include/win32k/driver.h Modified: trunk/reactos/subsys/win32k/eng/misc.c Modified: trunk/reactos/subsys/win32k/misc/driver.c _____
Modified: trunk/reactos/include/win32k/driver.h --- trunk/reactos/include/win32k/driver.h 2005-02-06 17:00:53 UTC (rev 13443) +++ trunk/reactos/include/win32k/driver.h 2005-02-06 18:24:31 UTC (rev 13444) @@ -97,6 +97,8 @@
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 @@ PGD_DISABLEDIRECTDRAW DisableDirectDraw; PGD_QUERYSPOOLTYPE QuerySpoolType; PGD_GRADIENTFILL GradientFill; + PGD_SYNCHRONIZESURFACE SynchronizeSurface; } DRIVER_FUNCTIONS, *PDRIVER_FUNCTIONS;
BOOL DRIVER_RegisterDriver(LPCWSTR Name, PGD_ENABLEDRIVER EnableDriver); _____
Modified: trunk/reactos/subsys/win32k/eng/misc.c --- trunk/reactos/subsys/win32k/eng/misc.c 2005-02-06 17:00:53 UTC (rev 13443) +++ trunk/reactos/subsys/win32k/eng/misc.c 2005-02-06 18:24:31 UTC (rev 13444) @@ -123,6 +123,20 @@
*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; _____
Modified: trunk/reactos/subsys/win32k/misc/driver.c --- trunk/reactos/subsys/win32k/misc/driver.c 2005-02-06 17:00:53 UTC (rev 13443) +++ trunk/reactos/subsys/win32k/misc/driver.c 2005-02-06 18:24:31 UTC (rev 13444) @@ -239,6 +239,7 @@
DRIVER_FUNCTION(DisableDirectDraw); DRIVER_FUNCTION(QuerySpoolType); DRIVER_FUNCTION(GradientFill); + DRIVER_FUNCTION(SynchronizeSurface);
END_FUNCTION_MAP();