gdi32: Avoid calling kernel32 from ntgdi functions.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9ca7966aed
commit
5b513cbb0e
|
@ -745,13 +745,13 @@ static inline void lock_surface( struct windrv_physdev *dev )
|
|||
{
|
||||
GDI_CheckNotLock();
|
||||
dev->surface->funcs->lock( dev->surface );
|
||||
if (is_rect_empty( dev->dibdrv->bounds )) dev->start_ticks = GetTickCount();
|
||||
if (is_rect_empty( dev->dibdrv->bounds )) dev->start_ticks = NtGetTickCount();
|
||||
}
|
||||
|
||||
static inline void unlock_surface( struct windrv_physdev *dev )
|
||||
{
|
||||
dev->surface->funcs->unlock( dev->surface );
|
||||
if (GetTickCount() - dev->start_ticks > FLUSH_PERIOD) dev->surface->funcs->flush( dev->surface );
|
||||
if (NtGetTickCount() - dev->start_ticks > FLUSH_PERIOD) dev->surface->funcs->flush( dev->surface );
|
||||
}
|
||||
|
||||
static void CDECL unlock_bits_surface( struct gdi_image_bits *bits )
|
||||
|
|
|
@ -235,7 +235,7 @@ void CDECL __wine_set_display_driver( HMODULE module )
|
|||
if (!(driver = create_driver( module )))
|
||||
{
|
||||
ERR( "Could not create graphics driver\n" );
|
||||
ExitProcess(1);
|
||||
NtTerminateProcess( GetCurrentThread(), 1 );
|
||||
}
|
||||
if (InterlockedCompareExchangePointer( (void **)&display_driver, driver, NULL ))
|
||||
HeapFree( GetProcessHeap(), 0, driver );
|
||||
|
|
|
@ -885,7 +885,7 @@ void GDI_CheckNotLock(void)
|
|||
if (RtlIsCriticalSectionLockedByThread(&gdi_section))
|
||||
{
|
||||
ERR( "BUG: holding GDI lock\n" );
|
||||
DebugBreak();
|
||||
assert( 0 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -39,10 +39,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(print);
|
|||
*/
|
||||
DWORD WINAPI NtGdiGetSpoolMessage( void *ptr1, DWORD data2, void *ptr3, DWORD data4 )
|
||||
{
|
||||
TRACE("(%p 0x%x %p 0x%x) stub\n", ptr1, data2, ptr3, data4);
|
||||
LARGE_INTEGER time;
|
||||
|
||||
TRACE( "(%p 0x%x %p 0x%x) stub\n", ptr1, data2, ptr3, data4 );
|
||||
|
||||
/* avoid 100% cpu usage with spoolsv.exe from w2k
|
||||
(spoolsv.exe from xp does Sleep 1000/1500/2000 in a loop) */
|
||||
Sleep(500);
|
||||
time.QuadPart = 500 * -10000;
|
||||
NtDelayExecution( FALSE, &time );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue