Skip to content

Add texture update regions

Benjamin Otte requested to merge wip/otte/update-texture into main

This is an experiment that adds texture diffing and exposes it via GdkGLTextureBuilder::update-region and GdkGLTextureBuilder::update-texture. It is built on top of !5862 (merged).

The code by itself looks fine to me, but I do not like exposing cairo_region_t there. We could switch the API to use GdkRectangle or graphene_rect_t instead, but then we couldn't expose regions.

Also, I added my testing commit if anyone wants to play with it, it produces output like this (with debug updates enabled, left is Cairo, right is GL): Screencast_from_2023-04-28_06-08-25

The main usecase for this API is and @chergert and @bilelmoussaoui have asked for it.

Merge request reports