summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChangyeon Lee <cyeon.lee@samsung.com>2023-06-30 16:58:43 +0900
committerChangyeon Lee <cyeon.lee@samsung.com>2023-06-30 16:59:21 +0900
commit03e4dca5738018d49aaecffe82f986263454bc89 (patch)
treec9d12dfd447f8f4a236700a49f8d120e16da6cce
parent97c7d05335b5e7fb8500cf7215bd362d0bd7852c (diff)
downloadwayland-extension-03e4dca5738018d49aaecffe82f986263454bc89.tar.gz
wayland-extension-03e4dca5738018d49aaecffe82f986263454bc89.tar.bz2
wayland-extension-03e4dca5738018d49aaecffe82f986263454bc89.zip
add single-pixel-buffer-v1 staging protocol
Change-Id: I801c5b1e2b9365194e3022e6b689315f6b773519
-rw-r--r--Makefile.am33
-rw-r--r--packaging/wayland-extension.spec1
-rw-r--r--protocol/staging/single-pixel-buffer/README4
-rw-r--r--protocol/staging/single-pixel-buffer/single-pixel-buffer-v1.xml69
4 files changed, 106 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 107e4ff..58f6e76 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -29,6 +29,14 @@ protocol/unstable/%-server-protocol.h : $(top_srcdir)/protocol/unstable/*/%.xml
protocol/unstable/%-client-protocol.h : $(top_srcdir)/protocol/unstable/*/%.xml
$(wayland_scanner) client-header < $< > $@
+### protocol/staging/protocol.[ch]
+protocol/staging/%-protocol.c : $(top_srcdir)/protocol/staging/*/%.xml
+ $(wayland_scanner) code < $< > $@
+protocol/staging/%-server-protocol.h : $(top_srcdir)/protocol/staging/*/%.xml
+ $(wayland_scanner) server-header < $< > $@
+protocol/staging/%-client-protocol.h : $(top_srcdir)/protocol/staging/*/%.xml
+ $(wayland_scanner) client-header < $< > $@
+
### protocol/stable/protocol.[ch]
protocol/stable/%-protocol.c : $(top_srcdir)/protocol/stable/*/%.xml
$(wayland_scanner) code < $< > $@
@@ -451,6 +459,23 @@ libwtz_shell_client_la_SOURCES = protocol/tizen/wtz-shell-protocol.c
libwtz_shell_client_la_CFLAGS = @WAYLAND_CLIENT_CFLAGS@
libwtz_shell_client_la_LIBADD = @WAYLAND_CLIENT_LIBS@
+### single-pixel-buffer
+protocol_LTLIBRARIES += \
+ libsingle-pixel-buffer-v1-server.la \
+ libsingle-pixel-buffer-v1-client.la
+pkgconfig_DATA += \
+ src/single-pixel-buffer-v1-server.pc \
+ src/single-pixel-buffer-v1-client.pc
+protocolinclude_HEADERS += \
+ protocol/staging/single-pixel-buffer-v1-server-protocol.h \
+ protocol/staging/single-pixel-buffer-v1-client-protocol.h
+libsingle_pixel_buffer_v1_server_la_SOURCES = protocol/staging/single-pixel-buffer-v1-protocol.c
+libsingle_pixel_buffer_v1_server_la_CFLAGS = @WAYLAND_SERVER_CFLAGS@
+libsingle_pixel_buffer_v1_server_la_LIBADD = @WAYLAND_SERVER_LIBS@
+libsingle_pixel_buffer_v1_client_la_SOURCES = protocol/staging/single-pixel-buffer-v1-protocol.c
+libsingle_pixel_buffer_v1_client_la_CFLAGS = @WAYLAND_CLIENT_CFLAGS@
+libsingle_pixel_buffer_v1_client_la_LIBADD = @WAYLAND_CLIENT_LIBS@
+
### wayland-protocols
unstable_protocols = \
protocol/unstable/pointer-gestures/pointer-gestures-unstable-v1.xml \
@@ -477,6 +502,10 @@ unstable_protocols = \
protocol/unstable/primary-selection/primary-selection-unstable-v1.xml \
$(NULL)
+staging_protocols = \
+ protocol/staging/single-pixel-buffer/single-pixel-buffer-v1.xml \
+ $(NULL)
+
stable_protocols = \
protocol/stable/presentation-time/presentation-time.xml \
protocol/stable/viewporter/viewporter.xml \
@@ -505,12 +534,14 @@ tizen_protocols = \
nobase_dist_pkgdata_DATA = \
$(unstable_protocols) \
+ $(staging_protocols) \
$(stable_protocols) \
$(tizen_protocols) \
$(NULL)
dist_noinst_DATA = \
$(sort $(foreach p,$(unstable_protocols),$(dir $p)README)) \
+ $(sort $(foreach p,$(staging_protocols),$(dir $p)README)) \
$(sort $(foreach p,$(stable_protocols),$(dir $p)README)) \
$(NULL)
@@ -518,7 +549,7 @@ pkgconfig_DATA += src/wayland-protocols.pc
dist_check_SCRIPTS = tests/scan.sh
-TESTS = $(unstable_protocols) $(stable_protocols) $(tizen_protocols)
+TESTS = $(unstable_protocols) $(staging_protocols) $(stable_protocols) $(tizen_protocols)
TEST_EXTENSIONS = .xml
AM_TESTS_ENVIRONMENT = SCANNER='$(wayland_scanner)'; export SCANNER;
XML_LOG_COMPILER = $(srcdir)/tests/scan.sh
diff --git a/packaging/wayland-extension.spec b/packaging/wayland-extension.spec
index ba29469..b09d954 100644
--- a/packaging/wayland-extension.spec
+++ b/packaging/wayland-extension.spec
@@ -147,6 +147,7 @@ make %{?_smp_mflags}
%defattr(-,root,root)
%_datadir/wayland-extension/protocol/tizen/*
%_datadir/wayland-extension/protocol/stable/*
+%_datadir/wayland-extension/protocol/staging/*
%_datadir/wayland-extension/protocol/unstable/*
%_libdir/pkgconfig/wayland-protocols.pc
diff --git a/protocol/staging/single-pixel-buffer/README b/protocol/staging/single-pixel-buffer/README
new file mode 100644
index 0000000..b3ae55e
--- /dev/null
+++ b/protocol/staging/single-pixel-buffer/README
@@ -0,0 +1,4 @@
+Single-pixel buffer protocol
+
+Maintainers:
+Simon Ser <contact@emersion.fr>
diff --git a/protocol/staging/single-pixel-buffer/single-pixel-buffer-v1.xml b/protocol/staging/single-pixel-buffer/single-pixel-buffer-v1.xml
new file mode 100644
index 0000000..b157155
--- /dev/null
+++ b/protocol/staging/single-pixel-buffer/single-pixel-buffer-v1.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<protocol name="single_pixel_buffer_v1">
+ <copyright>
+ Copyright © 2022 Simon Ser
+
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice (including the next
+ paragraph) shall be included in all copies or substantial portions of the
+ Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+ </copyright>
+
+ <description summary="single pixel buffer factory">
+ This protocol extension allows clients to create single-pixel buffers.
+
+ Compositors supporting this protocol extension should also support the
+ viewporter protocol extension. Clients may use viewporter to scale a
+ single-pixel buffer to a desired size.
+
+ Warning! The protocol described in this file is currently in the testing
+ phase. Backward compatible changes may be added together with the
+ corresponding interface version bump. Backward incompatible changes can
+ only be done by creating a new major version of the extension.
+ </description>
+
+ <interface name="wp_single_pixel_buffer_manager_v1" version="1">
+ <description summary="global factory for single-pixel buffers">
+ The wp_single_pixel_buffer_manager_v1 interface is a factory for
+ single-pixel buffers.
+ </description>
+
+ <request name="destroy" type="destructor">
+ <description summary="destroy the manager">
+ Destroy the wp_single_pixel_buffer_manager_v1 object.
+
+ The child objects created via this interface are unaffected.
+ </description>
+ </request>
+
+ <request name="create_u32_rgba_buffer">
+ <description summary="create a 1×1 buffer from 32-bit RGBA values">
+ Create a single-pixel buffer from four 32-bit RGBA values.
+
+ Unless specified in another protocol extension, the RGBA values use
+ pre-multiplied alpha.
+
+ The width and height of the buffer are 1.
+ </description>
+ <arg name="id" type="new_id" interface="wl_buffer"/>
+ <arg name="r" type="uint" summary="value of the buffer's red channel"/>
+ <arg name="g" type="uint" summary="value of the buffer's green channel"/>
+ <arg name="b" type="uint" summary="value of the buffer's blue channel"/>
+ <arg name="a" type="uint" summary="value of the buffer's alpha channel"/>
+ </request>
+ </interface>
+</protocol>