Introduce wtz-foreign protocol 80/254980/5
authorSeunghun Lee <shiin.lee@samsung.com>
Fri, 19 Feb 2021 02:19:22 +0000 (11:19 +0900)
committerSeunghun Lee <shiin.lee@samsung.com>
Thu, 25 Mar 2021 07:46:20 +0000 (16:46 +0900)
commit633414048f1482f81de142778ac0d72825abd72d
treea6a71cc8d7273896b17c841b7bb3d65fe62d499d
parentdfa39cf496cfadc7530dd11fd010220245c93524
Introduce wtz-foreign protocol

wtz-foreign is a protocol meant to enable sharing wayland resources
between wayland clients.

For now, it provides a way to export and import a pure wl_surface.
(here 'pure' means that this wl_surface doesn't have any role.)
That is, this gives wl_surface a exported surface role.

The representative use case for exported surface is out-of-process video
playing surface.
For that, multimedia client may export its wl_surface, creating a handle
for the exported surface. The handle, in form of a unique string, may be
shared in some way with other clients (for example, D-Bus) which can
then import the exported surface with a sub-surface as a proxy.
In this way, the client will be able to manipulate an exported surface
like a sub-surface. In other words, this exported surface will be stay
glued to given sub-surface like sub-surface to its parent.

Once a client imports a exported surface, the client may change the
attributes, such as geometry or map state, of exported surface with an
object(wtz_imported_surface) created by importing a surface.
Moreover, all this changes can be applied along with the changes of
parent surface in an atomic manner using sub-surface given when creating
imported surface. See wl_subsurface.set_sync for more detail to apply
changes in an atomic manner.

But note that using exported surface can put compositor at a
disadvantage for zero-copy video presentation path, because compositor
may supposed to scale up/down exported surface without hardware support.

Hopefully, any resources required to be shared between clients in the
future can be added into this protocol.

Change-Id: I742a1d70930bb3202fd705256c65c189f47fb889
Makefile.am
protocol/tizen/wtz-foreign.xml [new file with mode: 0644]