Discussion:
[PATCH v2] protocol: prefer wl_surface.damage_buffer
Simon Ser
2018-11-05 13:57:00 UTC
Permalink
This commit makes wl_surface.damage_buffer preferred over wl_surface.damage.
wl_surface.damage can be implemented in a non-optimal way by the compositor
(e.g. by always damaging the whole 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 <***@emersion.fr>
---
protocol/wayland.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/protocol/wayland.xml b/protocol/wayland.xml
index 141038b..df2b6d2 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! 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.
</description>
<arg name="x" type="int" summary="surface-local x coordinate"/>
<arg name="y" type="int" summary="surface-local y coordinate"/>
--
2.19.1
Pekka Paalanen
2018-11-05 14:17:17 UTC
Permalink
On Mon, 05 Nov 2018 13:57:00 +0000
Post by Simon Ser
This commit makes wl_surface.damage_buffer preferred over wl_surface.damage.
wl_surface.damage can be implemented in a non-optimal way by the compositor
(e.g. by always damaging the whole 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.
---
protocol/wayland.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/protocol/wayland.xml b/protocol/wayland.xml
index 141038b..df2b6d2 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! 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.
</description>
<arg name="x" type="int" summary="surface-local x coordinate"/>
<arg name="y" type="int" summary="surface-local y coordinate"/>
Acked-by: Pekka Paalanen <***@collabora.co.uk>


Thanks,
pq
Derek Foreman
2018-11-05 19:44:07 UTC
Permalink
Post by Simon Ser
This commit makes wl_surface.damage_buffer preferred over wl_surface.damage.
wl_surface.damage can be implemented in a non-optimal way by the compositor
(e.g. by always damaging the whole 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.
Obnoxious nitpick: for some reason that file uses different formatting
than others in the repo, and 8 spaces are compressed into a single tab.
Post by Simon Ser
---
protocol/wayland.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/protocol/wayland.xml b/protocol/wayland.xml
index 141038b..df2b6d2 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! 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.
</description>
<arg name="x" type="int" summary="surface-local x coordinate"/>
<arg name="y" type="int" summary="surface-local y coordinate"/>
Derek Foreman
2018-11-30 15:28:47 UTC
Permalink
Post by Derek Foreman
Post by Simon Ser
This commit makes wl_surface.damage_buffer preferred over wl_surface.damage.
wl_surface.damage can be implemented in a non-optimal way by the compositor
(e.g. by always damaging the whole 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.
Obnoxious nitpick: for some reason that file uses different formatting
than others in the repo, and 8 spaces are compressed into a single tab.
This is landed now, I changed the formatting to match the surrounding
text when I did so.

Thanks!
Derek
Post by Derek Foreman
Post by Simon Ser
---
protocol/wayland.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/protocol/wayland.xml b/protocol/wayland.xml
index 141038b..df2b6d2 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! 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.
</description>
<arg name="x" type="int" summary="surface-local x coordinate"/>
<arg name="y" type="int" summary="surface-local y coordinate"/>
Loading...