diff --git a/doc/doxygen/gen-doxygen.py b/doc/doxygen/gen-doxygen.py
index 1bb07e57..6006efb1 100755
--- a/doc/doxygen/gen-doxygen.py
+++ b/doc/doxygen/gen-doxygen.py
@@ -9,11 +9,6 @@ import sys
# Custom configuration for each documentation format
doxygen_templates = {
- 'xml': [
- 'GENERATE_XML=YES\n',
- 'XML_OUTPUT={format}/{section}\n',
- 'INPUT= {files}\n',
- ],
'html': [
'GENERATE_HTML=YES\n',
'HTML_OUTPUT={format}/{section}\n',
@@ -60,9 +55,9 @@ parser.add_argument('--section',
metavar='NAME',
default='Client')
parser.add_argument('--output-format',
- help='The output format: xml, html, man',
+ help='The output format: html, man',
metavar='FORMAT',
- default='xml')
+ default='html')
parser.add_argument('--stamp',
help='Stamp file to output',
metavar='STAMP_FILE',
diff --git a/doc/doxygen/meson.build b/doc/doxygen/meson.build
index 7d9938e8..bd4c5170 100644
--- a/doc/doxygen/meson.build
+++ b/doc/doxygen/meson.build
@@ -48,8 +48,6 @@ extra_cursor_files = [
gen_doxygen = find_program('gen-doxygen.py')
-subdir('xml')
-
formats = {
'html': {
'Client': shared_files + client_files + extra_client_files,
diff --git a/doc/doxygen/xml/Client/meson.build b/doc/doxygen/xml/Client/meson.build
deleted file mode 100644
index e51fccb6..00000000
--- a/doc/doxygen/xml/Client/meson.build
+++ /dev/null
@@ -1,17 +0,0 @@
-tgt = custom_target(
- 'xml-Client-doc',
- command: [
- gen_doxygen,
- # XXX pass doxygen path as argument
- '--builddir=@OUTDIR@',
- '--section=Client',
- '--output-format=xml',
- wayland_doxygen,
- '@INPUT@',
- ],
- input: [ shared_files, client_files ],
- output: [ 'combine.xslt', 'index.xml' ],
-)
-
-doxygen_Client_combine_xslt = tgt[0]
-doxygen_Client_index_xml = tgt[1]
diff --git a/doc/doxygen/xml/Server/meson.build b/doc/doxygen/xml/Server/meson.build
deleted file mode 100644
index 5df97440..00000000
--- a/doc/doxygen/xml/Server/meson.build
+++ /dev/null
@@ -1,17 +0,0 @@
-tgt = custom_target(
- 'xml-Server-doc',
- command: [
- gen_doxygen,
- # XXX pass doxygen path as argument
- '--builddir=@OUTDIR@',
- '--section=Server',
- '--output-format=xml',
- wayland_doxygen,
- '@INPUT@',
- ],
- input: [ shared_files, server_files ],
- output: [ 'combine.xslt', 'index.xml' ],
-)
-
-doxygen_Server_combine_xslt = tgt[0]
-doxygen_Server_index_xml = tgt[1]
diff --git a/doc/doxygen/xml/meson.build b/doc/doxygen/xml/meson.build
deleted file mode 100644
index 479af8e7..00000000
--- a/doc/doxygen/xml/meson.build
+++ /dev/null
@@ -1,2 +0,0 @@
-subdir('Client')
-subdir('Server')
diff --git a/doc/meson.build b/doc/meson.build
index b9f6fcba..f59a11d0 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -2,10 +2,7 @@ if not get_option('libraries')
error('-Ddocumentation=true requires -Dlibraries=true')
endif
-dot = find_program('dot')
doxygen = find_program('doxygen')
-xsltproc = find_program('xsltproc')
-xmlto = find_program('xmlto')
mdbook = find_program('mdbook')
cmd = run_command(doxygen, '--version', check: true)
@@ -15,19 +12,6 @@ if vers.version_compare('< 1.6.0')
error('Doxygen 1.6 or later is required for building documentation, found @0@.'.format(vers))
endif
-cmd = run_command(dot, '-V', check: true)
-message('dot: ' + cmd.stderr().strip())
-vers = cmd.stderr().split('version')[1].strip().split(' ')[0]
-if vers.version_compare('< 2.26.0')
- error('Dot (Graphviz) 2.26 or later is required for building documentation, found @0@.'.format(vers))
-endif
-
-manpage_xsl = 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl'
-cmd = run_command(xsltproc, '--nonet', manpage_xsl, check: false)
-if cmd.returncode() != 0
- error('The style sheet for man pages providing "@0@" was not found.'.format(manpage_xsl))
-endif
-
publican_install_prefix = join_paths(
get_option('prefix'),
get_option('datadir'),
@@ -39,5 +23,4 @@ publican_install_prefix = join_paths(
publican_html_dir = 'html'
subdir('doxygen')
-subdir('publican')
subdir('book')
diff --git a/doc/publican/.gitignore b/doc/publican/.gitignore
deleted file mode 100644
index c1656e70..00000000
--- a/doc/publican/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Wayland
-en-US/
-publican-copy.cfg
diff --git a/doc/publican/Architecture.xml b/doc/publican/Architecture.xml
deleted file mode 100644
index fb317685..00000000
--- a/doc/publican/Architecture.xml
+++ /dev/null
@@ -1,392 +0,0 @@
-
-
-%BOOK_ENTITIES;
-]>
-
- Wayland Architecture
-
- X vs. Wayland Architecture
-
- A good way to understand the Wayland architecture
- and how it is different from X is to follow an event
- from the input device to the point where the change
- it affects appears on screen.
-
-
- This is where we are now with X:
-
-
- X architecture diagram
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- The kernel gets an event from an input
- device and sends it to X through the evdev
- input driver. The kernel does all the hard
- work here by driving the device and
- translating the different device specific
- event protocols to the linux evdev input
- event standard.
-
-
-
-
- The X server determines which window the
- event affects and sends it to the clients
- that have selected for the event in question
- on that window. The X server doesn't
- actually know how to do this right, since
- the window location on screen is controlled
- by the compositor and may be transformed in
- a number of ways that the X server doesn't
- understand (scaled down, rotated, wobbling,
- etc).
-
-
-
-
- The client looks at the event and decides
- what to do. Often the UI will have to change
- in response to the event - perhaps a check
- box was clicked or the pointer entered a
- button that must be highlighted. Thus the
- client sends a rendering request back to the
- X server.
-
-
-
-
- When the X server receives the rendering
- request, it sends it to the driver to let it
- program the hardware to do the rendering.
- The X server also calculates the bounding
- region of the rendering, and sends that to
- the compositor as a damage event.
-
-
-
-
- The damage event tells the compositor that
- something changed in the window and that it
- has to recomposite the part of the screen
- where that window is visible. The compositor
- is responsible for rendering the entire
- screen contents based on its scenegraph and
- the contents of the X windows. Yet, it has
- to go through the X server to render this.
-
-
-
-
- The X server receives the rendering requests
- from the compositor and either copies the
- compositor back buffer to the front buffer
- or does a pageflip. In the general case, the
- X server has to do this step so it can
- account for overlapping windows, which may
- require clipping and determine whether or
- not it can page flip. However, for a
- compositor, which is always fullscreen, this
- is another unnecessary context switch.
-
-
-
-
-
- As suggested above, there are a few problems with this
- approach. The X server doesn't have the information to
- decide which window should receive the event, nor can it
- transform the screen coordinates to window-local
- coordinates. And even though X has handed responsibility for
- the final painting of the screen to the compositing manager,
- X still controls the front buffer and modesetting. Most of
- the complexity that the X server used to handle is now
- available in the kernel or self contained libraries (KMS,
- evdev, mesa, fontconfig, freetype, cairo, Qt etc). In
- general, the X server is now just a middle man that
- introduces an extra step between applications and the
- compositor and an extra step between the compositor and the
- hardware.
-
-
- In Wayland the compositor is the display server. We transfer
- the control of KMS and evdev to the compositor. The Wayland
- protocol lets the compositor send the input events directly
- to the clients and lets the client send the damage event
- directly to the compositor:
-
-
- Wayland architecture diagram
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- The kernel gets an event and sends
- it to the compositor. This
- is similar to the X case, which is
- great, since we get to reuse all the
- input drivers in the kernel.
-
-
-
-
- The compositor looks through its
- scenegraph to determine which window
- should receive the event. The
- scenegraph corresponds to what's on
- screen and the compositor
- understands the transformations that
- it may have applied to the elements
- in the scenegraph. Thus, the
- compositor can pick the right window
- and transform the screen coordinates
- to window-local coordinates, by
- applying the inverse
- transformations. The types of
- transformation that can be applied
- to a window is only restricted to
- what the compositor can do, as long
- as it can compute the inverse
- transformation for the input events.
-
-
-
-
- As in the X case, when the client
- receives the event, it updates the
- UI in response. But in the Wayland
- case, the rendering happens in the
- client, and the client just sends a
- request to the compositor to
- indicate the region that was
- updated.
-
-
-
-
- The compositor collects damage
- requests from its clients and then
- recomposites the screen. The
- compositor can then directly issue
- an ioctl to schedule a pageflip with
- KMS.
-
-
-
-
-
-
-
-
- Wayland Rendering
-
- One of the details I left out in the above overview
- is how clients actually render under Wayland. By
- removing the X server from the picture we also
- removed the mechanism by which X clients typically
- render. But there's another mechanism that we're
- already using with DRI2 under X: direct rendering.
- With direct rendering, the client and the server
- share a video memory buffer. The client links to a
- rendering library such as OpenGL that knows how to
- program the hardware and renders directly into the
- buffer. The compositor in turn can take the buffer
- and use it as a texture when it composites the
- desktop. After the initial setup, the client only
- needs to tell the compositor which buffer to use and
- when and where it has rendered new content into it.
-
-
-
- This leaves an application with two ways to update its window contents:
-
-
-
-
-
- Render the new content into a new buffer and tell the compositor
- to use that instead of the old buffer. The application can
- allocate a new buffer every time it needs to update the window
- contents or it can keep two (or more) buffers around and cycle
- between them. The buffer management is entirely under
- application control.
-
-
-
-
- Render the new content into the buffer that it previously
- told the compositor to to use. While it's possible to just
- render directly into the buffer shared with the compositor,
- this might race with the compositor. What can happen is that
- repainting the window contents could be interrupted by the
- compositor repainting the desktop. If the application gets
- interrupted just after clearing the window but before
- rendering the contents, the compositor will texture from a
- blank buffer. The result is that the application window will
- flicker between a blank window or half-rendered content. The
- traditional way to avoid this is to render the new content
- into a back buffer and then copy from there into the
- compositor surface. The back buffer can be allocated on the
- fly and just big enough to hold the new content, or the
- application can keep a buffer around. Again, this is under
- application control.
-
-
-
-
-
- In either case, the application must tell the compositor
- which area of the surface holds new contents. When the
- application renders directly to the shared buffer, the
- compositor needs to be noticed that there is new content.
- But also when exchanging buffers, the compositor doesn't
- assume anything changed, and needs a request from the
- application before it will repaint the desktop. The idea
- that even if an application passes a new buffer to the
- compositor, only a small part of the buffer may be
- different, like a blinking cursor or a spinner.
-
-
-
- Accelerated GPU Buffer Exchange
-
- Clients
- exchange
- GPU buffers with the compositor as dma-buf file descriptors, which are universal handles
- that are independent of any particular rendering API or memory allocator. The
- linux-dmabuf-v1
- protocol is used to turn one or more dma-buf FDs into a
- wl_buffer.
-
-
- If the client uses the
- Vulkan
- or
- EGL
- (via
- wayland-egl)
- window-system integration
- (WSI), this is done transparently by the WSI.
-
-
- Clients can alternatively allocate and import dma-bufs themselves
- using the GBM library, Vulkan, udmabuf, or dma-buf heaps.
-
-
-
-
- Using GBM, the client can allocate a gbm_bo and export one or more
- dma-buf FDs from it.
-
-
-
-
- Using Vulkan, the client can create a VkDeviceMemory object and use
- VK_EXT_external_memory_dma_buf
- and
- VK_EXT_image_drm_format_modifier
- to export a dma-buf FD from it.
-
-
-
-
- udmabuf
- can be used to create dma-buf FDs from linear host memory.
-
-
-
-
- Dma-buf heaps
- can be used by privileged applications to create dma-buf FDs on embedded
- devices.
-
-
-
-
- Compositors use
- VK_EXT_external_memory_dma_buf
- and
- VK_EXT_image_drm_format_modifier
- or
- EGL_EXT_image_dma_buf_import
- and
- EGL_EXT_image_dma_buf_import_modifiers
- to import the dma-bufs provided by the client into their own Vulkan or
- EGL renderers.
-
-
- Clients do not need to wait for the GPU to finish rendering before submitting
- dma-bufs to the compositor. Clients can use the
- linux-drm-syncobj-v1
- protocol to exchange DRM synchronization objects with the compositor. These objects
- are used to asynchronously signal ownership transfer of buffers from clients to the
- compositor and vice versa. The WSIs do this transparently.
-
-
- If the linux-drm-syncobj-v1 protocol is not supported by the compositor, clients
- and compositors can use the
- DMA_BUF_IOCTL_EXPORT_SYNC_FILE
- and
- DMA_BUF_IOCTL_IMPORT_SYNC_FILE
- ioctls to access and create implicit synchronization barriers.
-
-
-
- Display Programming
-
- Compositors enumerate DRM KMS devices using
- udev.
- Udev also notifies compositors of KMS device and display hotplug events.
-
-
- Access to DRM KMS device ioctls is privileged. Since compositors usually run as
- unprivileged applications, they typically gain access to a privileged file
- descriptor using the
- TakeDevice
- method provided by logind.
-
-
- Using the file descriptor, compositors use KMS
- ioctls
- to enumerate the available displays.
-
-
- Compositors use
- atomic mode setting
- to change the buffer shown by the display, to change the display's resolution, to
- enable or disable HDR, and so on.
-
-
-
diff --git a/doc/publican/Author_Group.xml b/doc/publican/Author_Group.xml
deleted file mode 100644
index 2bdde62b..00000000
--- a/doc/publican/Author_Group.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-%BOOK_ENTITIES;
-]>
-
-
- Kristian
- Høgsberg
-
- Intel Corporation
-
- krh@bitplanet.net
-
-
-
diff --git a/doc/publican/Book_Info.xml b/doc/publican/Book_Info.xml
deleted file mode 100644
index 897673a0..00000000
--- a/doc/publican/Book_Info.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-%BOOK_ENTITIES;
-]>
-
- Wayland
- The Wayland Protocol
- Documentation
- 0.1
- 1
- 0
-
-
- Wayland is a protocol for a compositor to talk to
- its clients as well as a C library implementation of
- that protocol. The compositor can be a standalone
- display server running on Linux kernel modesetting
- and evdev input devices, an X application, or a
- Wayland client itself. The clients can be
- traditional applications, X servers (rootless or
- fullscreen) or other display servers.
-
-
-
-
-
-
-
-
-
- Wayland logo
-
-
-
-
-
-
-
- Copyright &YEAR; &HOLDER;
-
-
-
- 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.
-
-
-
-
-
-
diff --git a/doc/publican/Client.xml b/doc/publican/Client.xml
deleted file mode 100644
index 19bf3e95..00000000
--- a/doc/publican/Client.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-%BOOK_ENTITIES;
-]>
-
- Client API
- Introduction
-
- The open-source reference implementation of Wayland protocol is
- split in two C libraries, libwayland-client and libwayland-server. Their main
- responsibility is to handle the Inter-process communication
- (IPC) with each other, therefore guaranteeing
- the protocol objects marshaling and messages synchronization.
-
-
- A client uses libwayland-client to communicate with one or more
- wayland servers. A wl_display object is
- created and manages each open connection to a server. At least one
- wl_event_queue
- object is created for each wl_display, this holds events as they
- are received from the server until they can be
- processed. Multi-threading is supported by creating an additional
- wl_event_queue for each additional thread, each object can have
- it's events placed in a particular queue, so potentially a
- different thread could be made to handle the events for each
- object created.
-
-
- Though some convenience functions are provided, libwayland-client
- is designed to allow the calling code to wait for events, so that
- different polling mechanisms can be used. A file descriptor is
- provided, when it becomes ready for reading the calling code can
- ask libwayland-client to read the available events from it into
- the wl_event_queue objects.
-
-
- The library only provides low-level access to the wayland objects.
- Each object created by the client is represented by a wl_proxy object that this
- library creates. This includes the id that is actually
- communicated over the socket to the server, a void* data pointer
- that is intended to point at a client's representation of the
- object, and a pointer to a static wl_interface object,
- which is generated from the xml and identifies the object's class
- and can be used for introspection into the messages and events.
-
-
- Messages are sent by calling wl_proxy_marshal. This will write a
- message to the socket, by using the message id and the
- wl_interface to identify the types of each argument and convert
- them into stream format. Most software will call type-safe
- wrappers generated from the xml description of the Wayland protocols. For
- instance the C header file generated from the xml defines the
- following inline function to transmit the wl_surface::attach
- message:
-
- static inline void
-wl_surface_attach(struct wl_surface *wl_surface, struct wl_buffer *buffer, int32_t x, int32_t y)
-{
- wl_proxy_marshal((struct wl_proxy *) wl_surface, WL_SURFACE_ATTACH, buffer, x, y);
-}
-
- Events (messages from the server) are handled by calling a
- "dispatcher" callback the client stores in the wl_proxy for each
- event. A language binding for a string-based interpreter, such as
- CPython, might have a dispatcher that uses the event name from the
- wl_interface to identify the function to call. The default
- dispatcher uses the message id number to index an array of
- functions pointers, called a wl_listener, and the wl_interface to
- convert data from the stream into arguments to the function. The
- C header file generated from the xml defines a per-class structure
- that forces the function pointers to be of the correct type, for
- instance the wl_surface::enter
- event defines this pointer in the wl_surface_listener object:
-
- struct wl_surface_listener {
- void (*enter)(void *data, struct wl_surface *, struct wl_output *);
- ...
-}
-
-
-
- &doxygen;
-
diff --git a/doc/publican/Color.xml b/doc/publican/Color.xml
deleted file mode 100644
index ceee779e..00000000
--- a/doc/publican/Color.xml
+++ /dev/null
@@ -1,139 +0,0 @@
-
-
-%BOOK_ENTITIES;
-]>
-
-
- Color management
-
-
- Overview
-
-
- Color management in Wayland considers only displays. All pictures in
- Wayland are always display-referred, meaning that the pixel values are
- intended as-is for some specific display where they would produce the
- light emissions (stimuli) the picture's
- author desired. Wayland does not support displaying "raw" camera or
- scanner images as they are not display-referred, nor are they even
- pictures without complex and subjective processing.
-
-
- Stimuli — the picture itself — are only half of the picture reproduction.
- The other half is the environment where a display is viewed. A striking
- example is comparing a brightly lit office to a dark movie theater, the
- stimuli required to produce a good reading of the picture is greatly
- different. Therefore display-referred does not include only the display
- but the viewing environment as well.
-
-
- Window systems have been very well capable of operating without any
- explicit consideration to color management. This is because there used to
- be the implicit assumption of the standard display, the sRGB display,
- which all computer monitors implemented, more or less. The viewing
- environment was and still is accounted by adjusting the display and/or the
- room to produce a workable experience. Pictures are authored on a computer
- system by drawing, painting and adjusting the picture until it looks right
- on the author's monitor. This implicitly builds the standard display and
- environment assumption into the picture data. Deviations from the sRGB
- specification were minor enough that they often did not matter if not in a
- professional context like the printing industry. Displaying video material
- required some more attention to the details, because video and television
- standards differ enough from the sRGB display. What really made explicit
- color management a hard requirement for entertainment is the coming of
- wide color gamut (WCG) and high dynamic range (HDR) materials and
- displays.
-
-
- The color management design in Wayland follows the general Wayland design
- principles: compositors tell clients what would be the optimal thing to
- do, clients tell the compositors what kind of pictures they are actually
- producing, and then compositors display those pictures the best they can.
-
-
-
-
- Protocol Interfaces
-
-
- Color management interfaces in Wayland and divided into two protocols:
- color-management
- and
- color-representation.
- They are designed to work together, but they can also be used
- independently when the other one is not needed.
-
-
-
- Color-management
-
-
- Color management protocol has two main purposes. First, it puts the
- responsibility of color management on the compositor. This means that
- clients do not necessarily need to care about color management at all,
- and can display just fine by using the traditional standard display
- assumption even when the actual display is wildly different. Clients
- can also choose to target some other assumed display and let the
- compositor handle it, or they can explicitly render for the actual
- display at hand. Second, when the window system has multiple different
- monitors, and a wl_surface happens to span more than one monitor, the
- compositor can display the surface content correctly on all spanned
- monitors simultaneously, as much as physically possible.
-
-
- Color-management protocol concentrates on colorimetry: when you have a
- pixel with RGB values, what stimulus do those values represent. The
- stimulus definition follows the CIE 1931 two-degree observer model. Some
- core concepts here are color primaries, white point, transfer function,
- and dynamic range. The viewing environment is represented in an
- extremely simplified way as the reference white luminance. The
- connection between pixel RGB values and stimulus plus viewing
- environment is recorded in an image description
- object. Clients can create image description objects and tag
- wl_surfaces with them, to indicate what kind of surface
- content there will be. Clients can also ask what image description the
- compositor would prefer to have on the wl_surface, and that
- preference can change over time, e.g. when the wl_surface
- is moved from one
- wl_output to another. Following the compositor's preference
- may provide advantages in image quality and power consumption.
-
-
- Image description objects can come in two flavors: parametric and
- ICC-based. The above was written with parametric image descriptions in
- mind, and they have first-class support for HDR. ICC-based image
- descriptions are wrapping an ICC profile and have no other data. ICC
- profiles are the standard tool for standard dynamic range (SDR) display
- color management. This means the capabilities between the two flavors
- differ, and one cannot always be replaced by the other. Compositor
- support for each flavor is optional.
-
-
-
-
- Color-representation
-
-
- Color-representation protocol deals with (potentially sub-sampled)
- YCbCr-RGB conversion, quantization range, and the inclusion of alpha in
- the RGB color channels, a.k.a. pre-multiplication. There are several
- different specifications on how an YCbCr-like (including ICtCp) signal,
- with chroma sub-sampling or not, is created from a full-resolution RGB
- image. Again, a client can tag a wl_surface with
- color-representation metadata to tell the compositor what kind of pixel
- data will be displayed through the wl_surface.
-
-
- The main purpose of color-representation is to correctly off-load the
- YCbCr-RGB conversion to the compositor, which can then opportunistically
- off-load it further to very power-efficient fixed-function circuitry in
- a display controller. This can significantly reduce power consumption
- when watching videos compared to using a GPU for the same, and on some
- embedded hardware platforms it is a hard requirement for processing high
- resolution video.
-
-
-
-
diff --git a/doc/publican/Compositors.xml b/doc/publican/Compositors.xml
deleted file mode 100644
index 7a7bdaa0..00000000
--- a/doc/publican/Compositors.xml
+++ /dev/null
@@ -1,128 +0,0 @@
-
-
-%BOOK_ENTITIES;
-]>
-
- Types of Compositors
-
-
- Compositors come in different types, depending on which
- role they play in the overall architecture of the OS.
- For instance, a
- system compositor
- can be used for booting the system, handling multiple user switching, a
- possible console terminal emulator and so forth. A different compositor, a
- session compositor
- would provide the actual desktop environment. There are many ways for
- different types of compositors to co-exist.
-
-
- In this section, we introduce three types of Wayland compositors relying
- on libwayland-server.
-
-
-
- System Compositor
-
- A system compositor can run from early boot until shutdown.
- It effectively replaces the kernel vt system, and can tie in
- with the systems graphical boot setup and multiseat support.
-
-
- A system compositor can host different types of session
- compositors, and let us switch between multiple sessions
- (fast user switching, or secure/personal desktop switching).
-
-
- A linux implementation of a system compositor will typically
- use libudev, egl, kms, evdev and cairo.
-
-
- For fullscreen clients, the system compositor can reprogram the
- video scanout address to read directly from the client provided
- buffer.
-
-
-
- Session Compositor
-
- A session compositor is responsible for a single user session.
- If a system compositor is present, the session compositor will
- run nested under the system compositor. Nesting is feasible because
- the protocol is asynchronous; roundtrips would be too expensive
- when nesting is involved. If no system compositor is present, a
- session compositor can run directly on the hardware.
-
-
- X applications can continue working under a session compositor
- by means of a root-less X server that is activated on demand.
-
-
- Possible examples for session compositors include
-
-
-
- gnome-shell
-
-
-
-
- moblin
-
-
-
-
- kwin
-
-
-
-
- kmscon
-
-
-
-
- rdp session
-
-
-
-
- Weston with X11 or Wayland backend is a session compositor nested
- in another session compositor.
-
-
-
-
- fullscreen X session under Wayland
-
-
-
-
-
-
- Embedding Compositor
-
- X11 lets clients embed windows from other clients, or lets clients
- copy pixmap contents rendered by another client into their window.
- This is often used for applets in a panel, browser plugins and similar.
- Wayland doesn't directly allow this, but clients can communicate GEM
- buffer names out-of-band, for example, using D-Bus, or command line
- arguments when the panel launches the applet. Another option is to
- use a nested Wayland instance. For this, the Wayland server will have
- to be a library that the host application links to. The host
- application will then pass the Wayland server socket name to the
- embedded application, and will need to implement the Wayland
- compositor interface. The host application composites the client
- surfaces as part of it's window, that is, in the web page or in the
- panel. The benefit of nesting the Wayland server is that it provides
- the requests the embedded client needs to inform the host about buffer
- updates and a mechanism for forwarding input events from the host
- application.
-
-
- An example for this kind of setup is firefox embedding the flash
- player as a kind of special-purpose compositor.
-
-
-
diff --git a/doc/publican/Content_Updates.xml b/doc/publican/Content_Updates.xml
deleted file mode 100644
index 30c4ed33..00000000
--- a/doc/publican/Content_Updates.xml
+++ /dev/null
@@ -1,460 +0,0 @@
-
-
-%BOOK_ENTITIES;
-]>
-
-
- Content Updates
-
-
- Overview
-
-
- In the Wayland protocol, requests are asynchronous but take effect
- immediately when the compositor receives them. However, some requests on
- surfaces are not applied immediately but are instead double-buffered to
- allow atomic changes. These double-buffered changes are committed through
- the wl_surface.commit request, which creates a Content Update.
-
-
-
- Content Updates encapsulate all double-buffered state changes and can be
- applied by the compositor. The complexity arises when considering
- subsurfaces, which can operate in synchronized mode. When a subsurface is
- synchronized, its Content Updates must be applied atomically together with
- the parent surface's state. This synchronization can extend through an
- entire tree of subsurfaces, where child subsurfaces inherit the
- synchronized behavior from their parents.
-
-
-
- Historically, Content Updates from synchronized subsurfaces were merged
- into the pending state of the parent surface on commit. However, the
- introduction of constraints—which can defer the application of Content
- Updates—necessitated a more sophisticated model. This led to the
- implementation of per-surface queues of Content Updates, with dependencies
- between Content Updates across different queues. This queuing model
- maintains backwards compatibility with the earlier approach of merging
- Content Updates into the parent's pending state on commit.
-
-
-
- The core protocol defines the semantics of Content Updates using
- per-surface queues, but compositors that do not need to support constraints
- may implement the simpler legacy model where synchronized subsurface states
- are merged directly into the parent's pending state.
-
-
-
-
- Rules
-
-
- The core protocol specifies the behavior in wl_subsurface and
- wl_surface.commit. The behavior can be summarized by the following rules:
-
-
-
-
-
- Content Updates (CU) contain all double-buffered state of the surface and
- selected state from their direct children.
-
-
-
-
- Surfaces which are effectively synchronized create Synchronized
- Content Updates (SCU), otherwise they create Desync Content Updates
- (DCU).
-
-
-
-
- When a CU is created, it gets a dependency on the previous CU of the
- same queues (if it exists).
-
-
-
-
- When a CU is created, it gets a dependency on the last SCU of direct
- child surfaces that are not reachable (if they exists).
-
-
-
-
- The CUs and their dependencies form a DAG, where CUs are nodes and
- dependencies are edges.
-
-
-
-
- All DCUs starting from the front of the queues until the first SCU or
- the back of the queue is reached are candidates.
-
-
-
-
- If the maximal DAG that's reachable from a candidate (candidate DAG)
- does not have any constraints, then this DAG can be applied.
-
-
-
-
- A DAG is applied atomically by recursively applying a content update
- without dependencies and removing it from the DAG.
-
-
-
-
- Surfaces transition from effectively sync to effectively desync after
- their parents.
-
-
-
-
- When a surface transitions to effectively desync, all SCUs in its
- queue which are not reachable by a DCU become DCUs.
-
-
-
-
-
-
- Examples
-
-
- These examples should help to build an intuition for how content updates
- actually behave. They cover the interesting edge cases, such as
- subsurfaces with constraints, and transitioning from a sync subsurface to
- a desync one.
-
-
- In all the examples below, the surface T1 refers to a toplevel surface,
- SS1 refers to a sub-surface which is a child of T1, and SS2 refers to a
- sub-surface which is a child of SS1.
-
-
-
- Legend
-
-
-
-
-
-
-
-
- Simple Desynchronized Case
-
-
-
-
-
-
- SS2 is effectively desynchronized and commits. This results in the
- desynchronized content update (DCU) 1.
-
-
-
-
-
-
-
-
-
- DCU 1 is a candidate, and the candidate DAG
- reachable from DCU 1 is only
- DCU 1 itself. DCU 1 and
- thus the candidate DAG does not have any constraints and can be
- applied.
-
-
-
-
-
-
-
-
-
- The content updates of the candidate DAG get applied to the surface
- atomically.
-
-
-
-
-
-
-
-
-
- T1 commits a DCU with a buffer-sync constraint.
- It is a candidate but its DAG can't be applied because it contains a
- constraint.
-
-
-
-
-
-
-
-
-
- T1 commits another CU (DCU 3) which is added at
- the end of the queue, with a dependency to the previous CU (DCU
- 2). Both DCU 2 and DCU
- 3 are candidates, but both DAGs contain DCU
- 2 with a constraint, and can't be applied.
-
-
-
-
-
-
-
-
-
- When the constraint gets cleared, both DAGs can be applied to the
- surface atomitcally (either only 2, or
- 2 and 3).
-
-
-
-
-
-
- Simple Synchronized Case
-
-
-
-
-
-
- SS1 and SS2 are effectively synchronized. SS2 commits SCU 1.
-
-
-
-
-
-
-
-
-
- SS1 commits SCU 2. The direct child surfaces SS2 has the last SCU 1 in its queue, which is not reachable. This creates a dependency from SCU 2 to SCU 1.
-
-
-
-
-
-
-
-
-
- SS1 commits SCU 3. The direct child surfaces SS2 has the last SCU 1 in its queue, which is already reachable by SCU 2. No dependency to SCU 1 is created. A dependency to the previous CU of the same queue (SCU 2) is created.
-
-
-
-
-
-
-
-
-
- T1 commit DCU 4. It is a candidate, its DAG does not contain any constraint and it can be applied.
-
-
-
-
-
-
-
-
-
- The DAG gets applied to the surfaces atomically.
-
-
-
- Every DCU (1 and 6) contain
- CUs with constraints in their candidate DAG
-
-
-
-
-
-
-
-
-
- Waiting until the buffer-sync constrain on CU
- 1 is cleared, the candidate DAG of CU
- 1 does not contain constraints and can be applied
-
-
-
-
-
-
-
-
-
- That leaves the candidate DAG of CU 6 which still
- contains another CU with a buffer-sync constrain
-
-
-
-
-
-
-
-
-
- Waiting until the buffer-sync constrain on CU
- 6 is cleared, the candidate DAG of
- 6 does not contain CUs with constraints and can
- be applied.
-
-
-
-
-
-
-
-
-
- There is no DCU left and no constraint remaining. Nothing more can be
- applied without a new CU.
-
-
-
- There are four SCUs and all surfaces are effectively synchronized.
-
-
-
-
-
-
-
-
-
- Surface SS1 transitions to effectively
- desynchronized and SCU 2 becomes a DCU because
- it is not reachable from a DCU
-
-
-
-
-
-
-
-
-
- Surface SS2 transitions to effectively
- desynchronized. SCUs 3 and
- 4 become DCUs because they are not reachable
- from a DCU. SCU 1 does not change because it is
- reachable by DCU 2.
-
-