forked from 12to11/12to11
No description
![]() This is in preparation for a migration to the Present extension on systems that do not support frame synchronization. * 12to11.man: Remove option that is no longer useful. * Imakefile (SRCS, OBJS): Add `sync_source.c.'. * compositor.h (enum _RenderMode): New enum. (struct _RenderFuncs): Add some new functions. (enum _FrameMode): Remove ModeNotifyDisablePresent. * frame_clock.c (struct _FrameClockCallback): Add draw time to frame callback. (struct _FrameClock): Rearrange for alignment and remove many unused members. (BumpFrame): New function. (FreezeForValue): Remove code that is no longer useful, as clock->frozen no longer exists. (StartFrame, EndFrame): Remove clock "freezing" logic. Only `need_configure' remains. (RunFrameCallbacks, NoteFakeFrame): Add frame drawn time. (XLFrameClockAfterFrame): Adjust for new type of callback. (XLFrameClockFreeze): Remove function. (XLFrameClockFrameInProgress): Remove test for `frozen_until_end_frame'. (XLFrameClockHandleFrameEvent): Improve code in accordance with above changes. (XLFrameClockUnfreeze, XLFrameClockNeedConfigure): Remove functions. (XLFrameClockIsFrozen): Remove function. (XLFrameClockSetFreezeCallback): Accept new callback `fast_forward_callback'. (XLFrameClockGetFrameTime): Remove unused function. * icon_surface.c (struct _IconSurface, ReleaseBacking) (ReleaseBuffer, RunFrameCallbacks, AfterFrame, Commit) (SubsurfaceUpdate, XLGetIconSurface) (XLHandleOneXEventForIconSurfaces): Switch the icon surface to the sync helper abstraction, and allow asynch buffer release from inside. * picture_renderer.c (struct _PictureTarget): New field `next_msc' and `render_mode'. (SwapBackBuffers): Respect the render mode. (InitSynchronizedPresentation): Delete function. (InitAdditionalModifiers): Remove incorrect comment. (InitRenderFuncs): Stop initializing obsolete option. (SetRenderMode): New function. (PresentToWindow): Respect the render mode. (NotifyMsc): New function. (picture_render_funcs): Add notify_msc. (HandlePresentCompleteNotify): Call completion callback with the fraame counter. * renderer.c (RenderSetRenderMode): (RenderNotifyMsc): New functions. * subcompositor.c (struct _Subcompositor) (SubcompositorSetNoteFrameCallback): Add msc and ust to note frame callback. (PresentCompletedCallback, RenderCompletedCallback): Call with msc and ust. (BeginFrame): When presentation is being synchronized and there is no existing presentation callback, ask for an event to be sent on the next frame. (EndFrame): Do not clear the presentation callbacks, as the update might not touch anything. * test.c (NoteFrame): Update prototype. * xdg_popup.c (InternalReposition): Stop "freezing" the frame clock. * xdg_surface.c (struct _XdgRole): Replace the frame clock with the sync helper abstraction. (RunFrameCallbacks): Run with the frame time. (RunFrameCallbacksConditionally): Save the pending frame time. (UpdateFrameRefreshPrediction): Delete function. (XLHandleXEventForXdgSurfaces): Give events to the sync helper instead. (Unfreeze, IsRoleMapped, CheckFrame): Remove functions. (Commit, SubsurfaceUpdate): Update using the sync helper instead, only if not pending ack commit. (MaybeRunLateFrame, AfterFrame): Delete functions. (NoteConfigure, NoteBounds): Update for the sync helper. (WriteRedirectProperty): Always require redirection for now. Disabling redirection requires sorting out some Present problems on the X server side. (WasFrameQueued, NoteFrame): Delete functions. (HandleFreeze): Delete function. (HandleResize, CheckFastForward, HandleFrameCallback): New functions. (XLGetXdgSurface): Use the sync helper for most things. (XLXdgRoleSendConfigure, XLXdgRoleReconstrain) (XLXdgRoleGetFrameClock): Delete function. (XLXdgRoleNoteRejectedConfigure): Clean up for using the sync clock instead. |
||
---|---|---|
tests | ||
12to11-test.xml | ||
12to11.c | ||
12to11.conf | ||
12to11.man | ||
alloc.c | ||
atoms.c | ||
buffer.c | ||
buffer_release.c | ||
compositor.c | ||
compositor.h | ||
COPYING | ||
data_device.c | ||
decoration.c | ||
dmabuf.c | ||
dnd.c | ||
drm-lease-v1.xml | ||
drm_lease.c | ||
egl.c | ||
ewmh.c | ||
explicit_synchronization.c | ||
fence_ring.c | ||
fns.c | ||
frame_clock.c | ||
icon_surface.c | ||
idle-inhibit-unstable-v1.xml | ||
idle_inhibit.c | ||
Imakefile | ||
keyboard-shortcuts-inhibit-unstable-v1.xml | ||
keyboard_shortcuts_inhibit.c | ||
linux-dmabuf-unstable-v1.xml | ||
linux-explicit-synchronization-unstable-v1.xml | ||
media_types.txt | ||
mime0.awk | ||
mime1.awk | ||
mime2.awk | ||
mime3.awk | ||
mime4.awk | ||
modifiers.awk | ||
output.c | ||
picture_renderer.c | ||
pointer-constraints-unstable-v1.xml | ||
pointer-gestures-unstable-v1.xml | ||
pointer_constraints.c | ||
pointer_gestures.c | ||
port_gnu.h | ||
positioner.c | ||
primary-selection-unstable-v1.xml | ||
primary_selection.c | ||
process.c | ||
README | ||
region.c | ||
relative-pointer-unstable-v1.xml | ||
relative_pointer.c | ||
renderer.c | ||
run.c | ||
seat.c | ||
select.c | ||
shaders.awk | ||
shaders.txt | ||
shm.c | ||
single-pixel-buffer-v1.xml | ||
single_pixel_buffer.c | ||
subcompositor.c | ||
subsurface.c | ||
surface.c | ||
svnignore.txt | ||
tearing-control-v1.xml | ||
tearing_control.c | ||
test.c | ||
test_seat.c | ||
text-input-unstable-v3.xml | ||
text_input.c | ||
time.c | ||
timer.c | ||
transform.c | ||
viewporter.xml | ||
wp_viewporter.c | ||
xdata.c | ||
xdg-activation-v1.xml | ||
xdg-decoration-unstable-v1.xml | ||
xdg-shell.xml | ||
xdg_activation.c | ||
xdg_popup.c | ||
xdg_surface.c | ||
xdg_toplevel.c | ||
xdg_wm.c | ||
xerror.c | ||
xsettings.c |
This is a tool for running Wayland applications on an X server, preferably with a compositing manager running. It is not yet complete. What is not yet implemented includes support for touchscreens, and device switching in dmabuf feedback. It is not portable to systems other than recent versions of GNU/Linux running the X.Org server 1.20 or later, and has not been tested on window (and compositing) managers other than GNOME Shell. It will not work very well unless the compositing manager supports the EWMH frame synchronization protocol. Building and running this tool requires the following X protocol extensions: Nonrectangular Window Shape Extension, version 1.1 or later MIT Shared Memory Extension, version 1.2 or later X Resize, Rotate and Reflect Extension, version 1.4 or later X Synchronization Extension, version 1.0 or later X Rendering Extension, version 1.2 or later X Input Extension, version 2.3 or later Direct Rendering Interface 3, version 1.2 or later X Fixes Extension, version 1.5 or later X Presentation Extension, version 1.0 or later In addition, it requires Xlib to be built with the XCB transport, and the XCB bindings for MIT-SHM and DRI3 to be available. Sometimes, it might be desirable to build with EGL, and use OpenGL ES 2.0 for i.e. YUV video format support. To do so, uncomment the block of code for EGL support in 12to11.conf before running `xmkmf'. This will additionally require the EGL and GLESv2 development files, and for the following EGL and GLES extensions to be present at runtime: EGL_EXT_platform_base EGL_EXT_device_query EGL_KHR_image_base EGL_EXT_image_dma_buf_import_modifiers EGL_EXT_image_dma_buf_import EGL_EXT_buffer_age GL_OES_EGL_image GL_OES_EGL_image_external GL_EXT_read_format_bgra GL_EXT_unpack_subimage After building with EGL support, the renderer must be enabled by setting the environment variable "RENDERER" to "egl", or by setting the "renderer" resource (class "Renderer") to "egl". The following Wayland protocols are implemented to a more-or-less complete degree: 'wl_output', version: 4 'wl_compositor', version: 5 'wl_shm', version: 1 'xdg_wm_base', version: 5 'wl_subcompositor', version: 1 'wl_seat', version: 8 'wl_data_device_manager', version: 3 'zwp_linux_dmabuf_v1', version: 4 'zwp_primary_selection_device_manager_v1', version: 1 'wp_viewporter', version: 1 'zxdg_decoration_manager_v1', version: 1 'zwp_text_input_manager_v3', version: 1 'wp_single_pixel_buffer_manager_v1', version: 1 'zwp_pointer_constraints_v1', version: 1 'zwp_relative_pointer_manager_v1', version: 1 'zwp_idle_inhibit_manager_v1', version: 1 'xdg_activation_v1', version: 1 When built with EGL, the following Wayland protocol is also supported: 'zwp_linux_explicit_synchronization_v1', version: 2 When the X server supports version 1.6 or later of the X Resize, Rotate and Reflect Extension, the following Wayland protocol is also supported: 'wp_drm_lease_device_v1', version: 1 When the X server supports version 2.4 or later of the X Input Extension, the following Wayland protocol is also supported: 'zwp_pointer_gestures_v1', version: 3 This directory is organized as follows: Imakefile - the top level Makefile template 12to11.conf - configuration *.xml - Wayland protocol definition source *.c, *.h - C source code *.awk - scripts used to generate headers *.txt - text data used to generate some headers, i.e. those containing MIME types or shaders Building the source code is simple, provided that you have the necessary libwayland-server library, pixman, XCB, DRM, xshmfence, and X extension libraries installed: xmkmf # to generate the Makefile make # to build the binary wayland-scanner is also required when building from the repository. Running the binary should be simple as well: ./12to11 Wayland programs will then run as regular X windows. Be sure to configure your system so that idle inhibition is reported correctly. For more details, see the description of the idleInhibitCommand resource in the manual page.