Wayland visuals refer to a pixel's bytes in order from
most significant to least significant, while the
one-byte-per-component Cogl formats refer to the order
of increasing memory addresses, so converting between
the two depends on the system's endianness.
The height was being set from the ClutterGeometry in some parts
and from the stage in others. And since both callers of this
function pass &stage_wayland->allocation as the geometry anyway,
the stage argument isn't really even needed.
Adapt to changes from this Wayland commit:
"Update surface.attach and change surface.map to surface.map_toplevel"
(82da52b15b49da3f3c7b4bd85d334ddfaa375ebc)
Adapt to changes from these wayland commits:
35fd2a8cc68c42d90756330535de04cbbb4d2613
2bb3ebe1e437acf836449f0a63f3264ad29566f2
f8fc08f77187f6a5723281dab66841e5f3c24320
http://bugzilla.clutter-project.org/show_bug.cgi?id=2474
The wayland client code has support for translating raw linux input
device key codes coming from the wayland compositor into key symbols
thanks to libxkbcommon.
A backend directly listening to linux input devices (called evdev, just
like the Xorg one) could use exactly the same code for the translation,
so abstract it a bit in a separate file.
Move the private Backend API to a separate header.
This also allows us to finally move the class vtable and instance
structure to a separate file and plug the visibility hole that left
the Backend class bare for everyone to poke into.
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.