Skip to content

util: Lower the priority of the helper spawn

Jordan Petridis requested to merge alatiera/loupe:alatiera/spawn-idle into main

The default spawn method of the context, gets scheduled with G_PRIORITY_DEFAULT (0), which takes priority over GTK's GDK_PRIORITY_REDRAW which has a value of 120.

  #define GDK_PRIORITY_REDRAW     (G_PRIORITY_HIGH_IDLE + 20)

This causes all the futures we spawn to take priority over redraw and potentially miss/drop frames.

Switch the default priority we use to G_PRIORITY_DEFAULT_IDLE (200) so that it will always be scheduled after GDK_PRIORITY_REDRAW

Merge request reports