Core Wayland window system code and protocol
Find a file
Kristian Høgsberg fbdbbdc153 Finally implement the commit/ack/frame protocol and improve repaint loop.
This implements the commit/ack/frame protocol that let clients batch up
a series of requests and then commit them atomically using the commit request.
The commit requests generats two following events: the acknowledge event,
which lets the client know that the server has received the request and
which frame the rendering has been scheduled for.  At this point the client
can start rendering the next frame or free up temporary buffers.  Then when
the compositor finally makes the newly composited frame visible on screen
the server sends a frame event, which contains the number of the frame that
was presented and the time when it happened.

The window and flower clients have been updated to use these two events in
their main loops and everything now updates per frame.  The EGL compositor
repaint loop has been tweaked to delay the compositing of the screen to
10ms after last swapbuffer completed so as to allow processing as many
requests as possible before blocking on the next vertical retrace.
2008-11-28 17:06:10 -05:00
.gitignore Add .gitignore. 2008-11-25 23:18:29 -05:00
background.c Make window prettier again. 2008-11-08 18:53:37 -05:00
cairo-util.c Optimize blur further, resize gears with window. 2008-11-19 00:49:39 -05:00
cairo-util.h Optimize window blur calculation. 2008-11-08 23:27:27 -05:00
compositor.c Add surface.map request. 2008-11-06 10:51:43 -05:00
connection.c Split out connection io buffer logic. 2008-11-06 10:51:58 -05:00
connection.h Split out connection io buffer logic. 2008-11-06 10:51:58 -05:00
egl-compositor.c Finally implement the commit/ack/frame protocol and improve repaint loop. 2008-11-28 17:06:10 -05:00
evdev.c Convert touchpad absolute events to relative. 2008-11-25 23:16:31 -05:00
event-loop.c Animate overlay on/off. 2008-11-24 01:12:46 -05:00
flower.c Finally implement the commit/ack/frame protocol and improve repaint loop. 2008-11-28 17:06:10 -05:00
gears.c Implement surface copy request, use it for egl gears. 2008-11-08 15:06:01 -05:00
gears.h Implement surface copy request, use it for egl gears. 2008-11-08 15:06:01 -05:00
glx-compositor.c Add prototypes warnings, use -fvisibility. 2008-11-08 15:49:49 -05:00
Makefile Finally implement the commit/ack/frame protocol and improve repaint loop. 2008-11-28 17:06:10 -05:00
NOTES Add note about fullscreen surfaces, misc edits. 2008-11-06 10:51:58 -05:00
pointer.c Optimize window blur calculation. 2008-11-08 23:27:27 -05:00
README README: Add link to google group. 2008-11-06 10:53:03 -05:00
screenshot.c Quit screenshooter when idle. 2008-11-24 11:32:43 -05:00
wayland-client.c Add commit request + ack event to wayland core. 2008-11-25 22:40:39 -05:00
wayland-client.h Add commit request + ack event to wayland core. 2008-11-25 22:40:39 -05:00
wayland-glib.c Use glib main loop for all clients. 2008-11-07 15:54:48 -05:00
wayland-glib.h Add glib main loop integration, use it in flower client. 2008-11-07 14:27:23 -05:00
wayland-util.c Expose screenshooting as an interface, drop SIGUSR hack. 2008-11-24 00:06:16 -05:00
wayland-util.h Expose screenshooting as an interface, drop SIGUSR hack. 2008-11-24 00:06:16 -05:00
wayland.c Finally implement the commit/ack/frame protocol and improve repaint loop. 2008-11-28 17:06:10 -05:00
wayland.h Finally implement the commit/ack/frame protocol and improve repaint loop. 2008-11-28 17:06:10 -05:00
window.c Finally implement the commit/ack/frame protocol and improve repaint loop. 2008-11-28 17:06:10 -05:00

This file describes how to build and run wayland.  See NOTES for what
wayland is or maybe will be some day.  There's a google group for
wayland/eagle discussion here:

  http://groups.google.com/group/wayland-display-server

Wayland requires the eagle EGL stack available from

  git://people.freedesktop.org/~krh/eagle

and currently assumes that eagle is checked out in a sibling
directory, for example:

  ~krh/src/wayland and
  ~krh/src/eagle

Eagle should work with a recent DRI driver from mesa, but I have mesa
repo with an eagle branch here:

  git://people.freedesktop.org/~krh/mesa

which provides and experimental DRI CopyBuffer extension, that lets
wayland use the DRI driver and the hardware for implementing buffer
swaps.  Eagle needs to be compiled against the dri_interface.h from
this branch to be able to use the CopyBuffer extension.

To run wayland you currently need intel hardware, a kernel with gem
and kernel modesetting, and it is necessary to set a couple of
environment variables.  First, set LD_LIBRARY_PATH:

  export LD_LIBRARY_PATH=$PWD:$PWD/../eagle

Yes, this sucks, but libtool sucks more.  Then to let eagle pick up
the custom dri driver, set

  export EAGLE_DRIVER_PATH=$PWD/../mesa/lib

and finally set up the path to the evdev device to use as a pointer
device:

  export WAYLAND_POINTER=/dev/by-id/whatever-it's-called-event-mouse

If you haven't already, load the i915 driver with modesetting:

  modprobe i915 modeset=1

You may need to unload it first, if it's loaded already.  Also, on
Fedora, there may be a bogus /etc/modprobe.d/i915modeset preventing
the modeset paramater from reaching the module.  Nuke it.

At this point you should be able to launch wayland and a couple of
clients.  Try something like:

  ./wayland &
  ./background <some png/jpg image smaller than 1024x768> &
  ./flower &
  ./flower &
  ./flower &
  ./window &
  ./pointer &

Maybe some day there'll be a script that does all this.  Some day...

And after all this work it may still not work or even oops your
kernel.  It's very much work in progress, so be prepared.

cheers,
Kristian