From 03e4dca5738018d49aaecffe82f986263454bc89 Mon Sep 17 00:00:00 2001 From: Changyeon Lee Date: Fri, 30 Jun 2023 16:58:43 +0900 Subject: [PATCH] add single-pixel-buffer-v1 staging protocol Change-Id: I801c5b1e2b9365194e3022e6b689315f6b773519 --- Makefile.am | 33 ++++++++++- packaging/wayland-extension.spec | 1 + protocol/staging/single-pixel-buffer/README | 4 ++ .../single-pixel-buffer/single-pixel-buffer-v1.xml | 69 ++++++++++++++++++++++ 4 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 protocol/staging/single-pixel-buffer/README create mode 100644 protocol/staging/single-pixel-buffer/single-pixel-buffer-v1.xml 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 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 @@ + + + + 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. + + + + 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. + + + + + The wp_single_pixel_buffer_manager_v1 interface is a factory for + single-pixel buffers. + + + + + Destroy the wp_single_pixel_buffer_manager_v1 object. + + The child objects created via this interface are unaffected. + + + + + + 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. + + + + + + + + + -- 2.7.4