summaryrefslogtreecommitdiff
path: root/opengl/libs/EGL/wayland-protocol/wayland-android.xml
blob: 647a8ca6fd8dde29d53e76ca3c0ce183990c779a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="android">

  <copyright>
    Copyright © 2012 Collabora, Ltd.

    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.
  </copyright>

  <interface name="android_wlegl" version="1">
    <description summary="Android EGL graphics buffer support">
      Interface used in the Android wrapper libEGL to share
      graphics buffers between the server and the client.
    </description>

    <enum name="error">
      <entry name="bad_handle" value="0" />
      <entry name="bad_value" value="1" />
    </enum>

    <request name="create_handle">
      <description summary="Create an Android native_handle_t object">
        This creator method initialises the native_handle_t object
        with everything except the file descriptors, which have to be
        submitted separately.
      </description>

      <arg name="id" type="new_id" interface="android_wlegl_handle" />
      <arg name="num_fds" type="int" />
      <arg name="ints" type="array" summary="an array of int32_t" />
    </request>

    <request name="create_buffer">
      <description summary="Create a wl_buffer from the native handle">
        Pass the Android native_handle_t to the server and attach it
        to the new wl_buffer object.

        The android_wlegl_handle object must be destroyed immediately
        after this request.
      </description>

      <arg name="id" type="new_id" interface="wl_buffer" />
      <arg name="width" type="int" />
      <arg name="height" type="int" />
      <arg name="stride" type="int" />
      <arg name="format" type="int" />
      <arg name="usage" type="int" />
      <arg name="native_handle" type="object" interface="android_wlegl_handle" />
    </request>

  </interface>

  <interface name="android_wlegl_handle" version="1">
    <description summary="An Android native_handle_t object">
      The Android native_handle_t is a semi-opaque object, that
      contains an EGL implementation specific number of int32
      values and file descriptors.

      We cannot send a variable size array of file descriptors
      over the Wayland protocol, so we send them one by one.
    </description>

    <enum name="error">
      <entry name="too_many_fds" value="0" />
    </enum>

    <request name="add_fd">
      <arg name="fd" type="fd" />
    </request>

    <request name="destroy" type="destructor" />

  </interface>

</protocol>