Skip to content

GdkWin32: Incremental rendering fixes

Luca Bacci requested to merge gdk-win32-incremental-rendering-fixes into main

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:

  1. _gdk_surface_update_size is called repeatedly (once per frame), regardless if the surface changed size or not. That in turn calls GdkDrawContext::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)!
  2. 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

Merge request reports