GdkWin32: Incremental rendering fixes
I have tested the main branch on a system that actually supports PFD_SWAP_EXCHANGE
(mine only support PFD_SWAP_COPY
!). Turns out things didn't work as expected, in fact GPU usage didn't drop at all. There are two reasons for that:
-
_gdk_surface_update_size
is called repeatedly (once per frame), regardless if the surface changed size or not. That in turn callsGdkDrawContext::surface_resized()
, which makes us drop all the previous frames regions. Note that this has nothing to do with @fanc999's recent work in !7562 (merged)! - I was using the region argument passed to
GdkDrawContext::end_frame()
, but that's wrong because it includes the backbuffer's damage
This is an attempt to make incremental rendering work with PFD_SWAP_EXCHANGE
Edited by Luca Bacci