From 17fcb2727d21a22dc34d8c831dd293b1a18acb19 Mon Sep 17 00:00:00 2001 From: Changyeon Lee Date: Wed, 5 Jul 2023 19:40:05 +0900 Subject: [PATCH] add wtz-blender tizen protocol This protocol provides set of interfaces used to control the alpha compositing of surface contents, base on a Chromium alpha-compositing-unstable-v1 and wayland-protocols wp_blender (development phase). Although both protocols provide an interface to equation, this protocol does not provide it because current display-server of tizen only supports premultiplied alpha blending. Change-Id: I94b13c0226d9c95a410734a11124f32fcb1d371d --- Makefile.am | 17 +++++++ protocol/tizen/wtz-blender.xml | 107 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 124 insertions(+) create mode 100644 protocol/tizen/wtz-blender.xml diff --git a/Makefile.am b/Makefile.am index 58f6e76..e20f79d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -408,6 +408,23 @@ librelative_pointer_unstable_v1_client_la_SOURCES = protocol/unstable/relative-p librelative_pointer_unstable_v1_client_la_CFLAGS = @WAYLAND_CLIENT_CFLAGS@ librelative_pointer_unstable_v1_client_la_LIBADD = @WAYLAND_CLIENT_LIBS@ +### wtz_blender +protocol_LTLIBRARIES += \ + libwtz-blender-server.la \ + libwtz-blender-client.la +pkgconfig_DATA += \ + src/wtz-blender-server.pc \ + src/wtz-blender-client.pc +protocolinclude_HEADERS += \ + protocol/tizen/wtz-blender-server-protocol.h \ + protocol/tizen/wtz-blender-client-protocol.h +libwtz_blender_server_la_SOURCES = protocol/tizen/wtz-blender-protocol.c +libwtz_blender_server_la_CFLAGS = @WAYLAND_SERVER_CFLAGS@ +libwtz_blender_server_la_LIBADD = @WAYLAND_SERVER_LIBS@ +libwtz_blender_client_la_SOURCES = protocol/tizen/wtz-blender-protocol.c +libwtz_blender_client_la_CFLAGS = @WAYLAND_CLIENT_CFLAGS@ +libwtz_blender_client_la_LIBADD = @WAYLAND_CLIENT_LIBS@ + ### wtz_foreign protocol_LTLIBRARIES += \ libwtz-foreign-server.la \ diff --git a/protocol/tizen/wtz-blender.xml b/protocol/tizen/wtz-blender.xml new file mode 100644 index 0000000..b418c99 --- /dev/null +++ b/protocol/tizen/wtz-blender.xml @@ -0,0 +1,107 @@ + + + + + Copyright 2023 Samsung Electronics co., Ltd. All Rights Reserved. + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that copyright notice and this permission + notice appear in supporting documentation, and that the name of + the copyright holders not be used in advertising or publicity + pertaining to distribution of the software without specific, + written prior permission. The copyright holders make no + representations about the suitability of this software for any + purpose. It is provided "as is" without express or implied + warranty. + + THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY + SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, + ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF + THIS SOFTWARE. + + + + This protocol allows clients to have more control over alpha compositing + of surface contents. + + + + + A global allows clients to create wtz_blend objects. + + + + + + + + + Destroy the blender object. + + + + + + Create a blend object for a surface. + + If the wl_surface already has a blend object associated, the + blend_exists protocol error is raised. + + + + + + + + + A surface extension interface for setting a global alpha value applied + to the whole surface. + + When the blend object is created its its alpha value is UINT32_MAX + (ie, opaque). + + Use of this interface has no effect on the surface's opaque region + as set by wl_surface.set_opaque_region. Clients must make sure to set + their opaque region correctly to prevent repaint artifacts. + + The blend object must be destroyed before the wl_surface, otherwise the + defunct protocol error is raised. + + + + + + + + + Destroy the blend object. + + On the next wl_surface.commit, the blend object state is withdrawn. + + + + + + Set the alpha value applied to the whole surface for compositing. This + alpha value is applied as an additional step after the processing of + per-pixel alpha values for the wl_surface. + + Zero means completely transparent, UINT32_MAX means completely opaque. + + The alpha value is double-buffered state, and will be applied on the + next wl_surface.commit. + + + + + + -- 2.7.4