libliftoff
libliftoff copied to clipboard
Incremental CRTC_* property changes
Leftover from https://github.com/emersion/libliftoff/issues/6#issuecomment-541075601.
If only CRTC_{X,Y,W,H} changes and the intersection between layers doesn't, we can re-use the previous alloc.
Note, on some Intel platforms sometimes putting a layer into a plane can succeed if the position coords are even (for some YUV formats). Let's not bother about this case.
Something similar should hold for the alpha property. Once suitable plane has been found alpha should always be changable without the need to realloc.
The alpha optimization has been added in 9bfe58b7d2aa ("Don't re-alloc when alpha changes").