It sounds like wl_surface.damage was deprecated
wl_surface.damage
request says:
Note! New clients should not use this request. Instead damage can be
posted with wl_surface.damage_buffer which uses buffer coordinates
instead of surface coordinates.
I think this is too strict even with "should" and not "must". I don't believe the intention has ever been to force clients to use exclusively damage_buffer
even when damage
would be more natural.
Yes, clients usually draw in buffer coordinate system and therefore such clients naturally have damage in buffer coordinate system, but that's no reason to deny surface coordinate system damage.
By the spec, both requests work, and can even be used within the same commit.
I have seen some confusion about how to handle damage_buffer
with wp_single_pixel_buffer_manager_v1
buffers. I think the spec is clear, and that does not differ from any other buffer type with a size of 1x1. It's just that it is not possible to do non-full damage when swapping to a single-pixel-buffer with damage_buffer
, so that's a good reason to use damage
instead.
Non-full damage when switching from another buffer type to a single-pixel-buffer can occur if areas of the old buffer contain the same color as the new single-pixel-buffer.
Niche? Totally, I guess, but it sounds like it is supposed to be outright impossible which is not true.