Commit 6d2bd75c authored by Alexandros Frantzis's avatar Alexandros Frantzis Committed by Alexandre Julliard

win32u: Reset draw_start_ticks for new window_surface.

Normally, a new window_surface has no damage so its draw_start_ticks value is reset at the time of the first lock_surface. However, if contents from the old window_surface are copied to the new one when the window_surface for a window is updated, the new window_surface will be initially damaged. We want to reset the draw_start_ticks value in this case too, to avoid flushes occuring soon after such updates, during the initial redraw of the window_surface. Signed-off-by: 's avatarAlexandros Frantzis <alexandros.frantzis@collabora.com>
parent aa72d7d4
...@@ -744,7 +744,8 @@ static inline void lock_surface( struct windrv_physdev *dev ) ...@@ -744,7 +744,8 @@ static inline void lock_surface( struct windrv_physdev *dev )
{ {
/* gdi_lock should not be locked */ /* gdi_lock should not be locked */
dev->surface->funcs->lock( dev->surface ); dev->surface->funcs->lock( dev->surface );
if (IsRectEmpty( dev->dibdrv->bounds )) dev->surface->draw_start_ticks = NtGetTickCount(); if (IsRectEmpty( dev->dibdrv->bounds ) || dev->surface->draw_start_ticks == 0)
dev->surface->draw_start_ticks = NtGetTickCount();
} }
static inline void unlock_surface( struct windrv_physdev *dev ) static inline void unlock_surface( struct windrv_physdev *dev )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment