[PATCH] protocol: deprecate wl_surface.damage

Pekka Paalanen ppaalanen at gmail.com
Mon Nov 5 08:44:44 UTC 2018


On Sun, 04 Nov 2018 08:38:16 +0000
Simon Ser <contact at emersion.fr> wrote:

> This commit deprecates wl_surface.damage in favor of wl_surface.damage_buffer.
> 
> Having two requests makes it complicated for the compositor to handle damage,
> making it necessary to transform one into the other's coordinates.
> 
> Moreover, integration with wp_viewporter is tricky.
> 
> Signed-off-by: Simon Ser <contact at emersion.fr>
> ---
> 
> Based on the discussion in [1].
> 
> [1]: https://gitlab.freedesktop.org/wayland/weston/merge_requests/41#note_74071
> 
>  protocol/wayland.xml | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/protocol/wayland.xml b/protocol/wayland.xml
> index 141038b..c75ea3a 100644
> --- a/protocol/wayland.xml
> +++ b/protocol/wayland.xml
> @@ -1397,9 +1397,9 @@
>  	and clears pending damage. The server will clear the current
>  	damage as it repaints the surface.
>  
> -	Alternatively, damage can be posted with wl_surface.damage_buffer
> -	which uses buffer coordinates instead of surface coordinates,
> -	and is probably the preferred and intuitive way of doing this.
> +	Note! This request is deprecated and should not be used in new
> +	clients. Instead damage can be posted with wl_surface.damage_buffer
> +	which uses buffer coordinates instead of surface coordinates.
>        </description>
>        <arg name="x" type="int" summary="surface-local x coordinate"/>
>        <arg name="y" type="int" summary="surface-local y coordinate"/>

Hi,

what good does this do, when no compositor can ever stop implementing it?

I'm ok with adding a note that clients might have easier time using
damage_buffer, but I don't see anything that would allow compositors to
do otherwise. Err, well, that note is what you are replacing here.

Whatever the compositor, it will always have to translate from one
space to the other space, regardless of which request a client is
using. You need the buffer space damage to be able to update textures
(wl_shm path), and you need the surface space damage to repaint the
screen (for framebuffer damage).


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20181105/27ee38b6/attachment.sig>


More information about the wayland-devel mailing list