This updates Wayland support in line with upstream changes to the Wayland
API and protocol.
This update means we no longer use the Cogl stub winsys so a lot of code
that had to manually interact with EGL and implement a swap_buffers
mechanism could be removed and instead we now depend on Cogl to handle
those things for us.
This update also adds an input device manager consistent with other
clutter backends.
Note: to use the client side "wayland" clutter backend you need to have
built Cogl with --enable-wayland-egl-platform. If Cogl has been built
with support for multiple winsys backends then you should run
applications with COGL_RENDERER=EGL in the environment.
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
The ClutterGeometry type is a poor substitute of cairo_rectangle_int_t,
with unsigned integers for width and height to complicate matters.
Let's remove the internal usage of ClutterGeometry and switch to the
rectangle type from Cairo.
https://bugzilla.gnome.org/show_bug.cgi?id=656663
We need to *write* to the shared memory, not read from it.
cogl_texture_from_data() is read-only, it doesn't keep
the data in sync with the texture.
Instead, we have to call cogl_texture_get_data() ourselves
to sync manually.
Always use pageflipping, but avoid full repaint by copying back dirty
regions from front to back. Additionally, we dealy copying back until
we're ready to paint the new frame, so we can avoid copying areas that
will be repainted anyway.
This is the least amount of copying per frame we can get away with at all
and at the same time we don't have to worry about stalling the GPU on
synchronized blits since we always pageflip.