Feature request: expose API for adjusting GSK renderer diff behavior
I have a canvas with many complex nodes and I turned on "show graphics updates" in the inspector, and I noticed that GTK decides to invalidate the whole window when many of those nodes change, but redrawing the whole window means it now also has to redraw the nodes that didn't change, so overall it could perform worse than diffing a bit more and reusing the previous nodes.
What's best obviously varies from application to application and besides having some sane default behavior, I think it would be nice to expose a way to set the threshold that GTK gives up on diffing. Maybe some kind of multiplier on the constants in gskdiff.c so the API is not bound to a specific algorithm. Maybe something like gsk_diff_settings_set_min_cost_multiplier()
(just an idea).
I also found this in the source code which seems like a useful thing to have: gsk_diff_settings_set_allow_abort()