[PATCH wayland-protocols 2/2] stable/viewporter: finish stabilization

Yong Bakos junk at humanoriented.com
Mon Apr 18 12:19:15 UTC 2016


On Apr 15, 2016, at 9:53 AM, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> 
> From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> 
> Rename interfaces and the protocol to follow the policy.
> 
> Reset interface versions.
> 
> Remove the redundant wp_viewport.set request.
> 
> Replace "surface coordinates" with "surface local coordinates".
> 
> Hook up to build and install.
> 
> Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>

All name replacements look good to me. I would add one line break
before the closing protocol tag, to match other xml docs. Not sure if
that should happen here, in 1/2, or in a minor patch after all of this
makes it into master.

Otherwise Reviewed-by: Yong Bakos <ybakos at humanoriented.com>

(always, my r'bs are just fwiw)

yong


> ---
> Makefile.am                      |  1 +
> stable/viewporter/viewporter.xml | 57 +++++++++++-----------------------------
> 2 files changed, 16 insertions(+), 42 deletions(-)
> 
> diff --git a/Makefile.am b/Makefile.am
> index 033789f..71d2632 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -12,6 +12,7 @@ unstable_protocols =								\
> 
> stable_protocols =								\
> 	stable/presentation-time/presentation-time.xml				\
> +	stable/viewporter/viewporter.xml					\
> 	$(NULL)
> 
> nobase_dist_pkgdata_DATA =							\
> diff --git a/stable/viewporter/viewporter.xml b/stable/viewporter/viewporter.xml
> index 0e482a6..1b47997 100644
> --- a/stable/viewporter/viewporter.xml
> +++ b/stable/viewporter/viewporter.xml
> @@ -1,5 +1,5 @@
> <?xml version="1.0" encoding="UTF-8"?>
> -<protocol name="scaler">
> +<protocol name="viewporter">
> 
>   <copyright>
>     Copyright © 2013-2014 Collabora, Ltd.
> @@ -24,7 +24,7 @@
>     DEALINGS IN THE SOFTWARE.
>   </copyright>
> 
> -  <interface name="wl_scaler" version="2">
> +  <interface name="wp_viewporter" version="1">
>     <description summary="surface cropping and scaling">
>       The global interface exposing surface cropping and scaling
>       capabilities is used to instantiate an interface extension for a
> @@ -38,7 +38,7 @@
>       <description summary="unbind from the cropping and scaling interface">
> 	Informs the server that the client will not be using this
> 	protocol object anymore. This does not affect any other objects,
> -	wl_viewport objects included.
> +	wp_viewport objects included.
>       </description>
>     </request>
> 
> @@ -51,18 +51,18 @@
>       <description summary="extend surface interface for crop and scale">
> 	Instantiate an interface extension for the given wl_surface to
> 	crop and scale its content. If the given wl_surface already has
> -	a wl_viewport object associated, the viewport_exists
> +	a wp_viewport object associated, the viewport_exists
> 	protocol error is raised.
>       </description>
> 
> -      <arg name="id" type="new_id" interface="wl_viewport"
> +      <arg name="id" type="new_id" interface="wp_viewport"
>            summary="the new viewport interface id"/>
>       <arg name="surface" type="object" interface="wl_surface"
>            summary="the surface"/>
>     </request>
>   </interface>
> 
> -  <interface name="wl_viewport" version="2">
> +  <interface name="wp_viewport" version="1">
>     <description summary="crop and scale interface to a wl_surface">
>       An additional interface to a wl_surface object, which allows the
>       client to specify the cropping and scaling of the surface
> @@ -85,7 +85,7 @@
>       this size. This overrides whatever the attached wl_buffer size is,
>       unless the wl_buffer is NULL. If the wl_buffer is NULL, the surface
>       has no content and therefore no size. Otherwise, the size is always
> -      at least 1x1 in surface coordinates.
> +      at least 1x1 in surface local coordinates.
> 
>       If the source rectangle is set, it defines what area of the
>       wl_buffer is taken as the source. If the source rectangle is set and
> @@ -97,7 +97,7 @@
>       the surface-local coordinates happen in the following order:
>         1. buffer_transform (wl_surface.set_buffer_transform)
>         2. buffer_scale (wl_surface.set_buffer_scale)
> -        3. crop and scale (wl_viewport.set*)
> +        3. crop and scale (wp_viewport.set*)
>       This means, that the source rectangle coordinates of crop and scale
>       are given in the coordinates after the buffer transform and scale,
>       i.e. in the coordinates that would be the surface-local coordinates
> @@ -113,10 +113,10 @@
>       still in the surface-local coordinate system, just like dst_width
>       and dst_height are.
> 
> -      If the wl_surface associated with the wl_viewport is destroyed,
> -      the wl_viewport object becomes inert.
> +      If the wl_surface associated with the wp_viewport is destroyed,
> +      the wp_viewport object becomes inert.
> 
> -      If the wl_viewport object is destroyed, the crop and scale
> +      If the wp_viewport object is destroyed, the crop and scale
>       state is removed from the wl_surface. The change will be applied
>       on the next wl_surface.commit.
>     </description>
> @@ -133,37 +133,10 @@
>              summary="negative or zero values in width or height"/>
>     </enum>
> 
> -    <request name="set">
> -      <description summary="set the crop and scale state">
> -	Set both source rectangle and destination size of the associated
> -	wl_surface. See wl_viewport for the description, and relation to
> -	the wl_buffer size.
> -
> -	The bad_value protocol error is raised if src_width or
> -	src_height is negative, or if dst_width or dst_height is not
> -	positive.
> -
> -	The crop and scale state is double-buffered state, and will be
> -	applied on the next wl_surface.commit.
> -
> -	Arguments dst_x and dst_y do not exist here, use the x and y
> -	arguments to wl_surface.attach. The x, y, dst_width, and dst_height
> -	define the surface-local coordinate system irrespective of the
> -	attached wl_buffer size.
> -      </description>
> -
> -      <arg name="src_x" type="fixed" summary="source rectangle x"/>
> -      <arg name="src_y" type="fixed" summary="source rectangle y"/>
> -      <arg name="src_width" type="fixed" summary="source rectangle width"/>
> -      <arg name="src_height" type="fixed" summary="source rectangle height"/>
> -      <arg name="dst_width" type="int" summary="surface width"/>
> -      <arg name="dst_height" type="int" summary="surface height"/>
> -    </request>
> -
> -    <request name="set_source" since="2">
> +    <request name="set_source">
>       <description summary="set the source rectangle for cropping">
> 	Set the source rectangle of the associated wl_surface. See
> -	wl_viewport for the description, and relation to the wl_buffer
> +	wp_viewport for the description, and relation to the wl_buffer
> 	size.
> 
> 	If width is -1.0 and height is -1.0, the source rectangle is unset
> @@ -181,10 +154,10 @@
>       <arg name="height" type="fixed" summary="source rectangle height"/>
>     </request>
> 
> -    <request name="set_destination" since="2">
> +    <request name="set_destination">
>       <description summary="set the surface size for scaling">
> 	Set the destination size of the associated wl_surface. See
> -	wl_viewport for the description, and relation to the wl_buffer
> +	wp_viewport for the description, and relation to the wl_buffer
> 	size.
> 
> 	If width is -1 and height is -1, the destination size is unset
> -- 
> 2.7.3
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel



More information about the wayland-devel mailing list