xkb: Factor out a function to copy a keymap's controls onto another

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
xkb: Repurpose XkbCopyDeviceKeymap to apply a given keymap to a device

This will also make it useful for cases when we have a new keymap to
apply to a device but don't have a source device.

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
xkb: constify XkbDDXOpenConfigFile

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
xkb: add a callback to xkbcomp

This provides a callback to write to xkbcomp's buffer once everything is
prepared.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
xkb: factor out xkb loading to LoadXkm

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
xkb: add KeymapOrDefault

Helper function to return a default map if the keymap compilation failed.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
xkb: add XkbLoadKeymapFromString

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Merge remote-tracking branch 'whot/for-keith'
kdrive: Remove duplicated definitions of some XV-related structs.

v2: Fix crash because of removed strdup. (by Markus Wick)
glamor: Use glsl "fract/mod" instead of "while" in gradient shaders.

This fixes gtkperf. It seemed to hang forever.
glamor: Use epoxy_has_gl_extension() instead of rolling our own.
glamor: Use epoxy_gl_version() instead of rolling our own.
glamor: Update GL requirements to 2.1.

We will never ever run on OpenGL 1.2 as we use shaders everywhere.
2.0 may be enough, but we also often use PBOs and our big shaders
won't fit into the first GLSL limits.
glamor: Select VBO path by ARB_mbr extension.

The mbr path was hard coded enabled for desktop gl and disabled for gles.
But there are both, desktop without mbr and mobiles with mbr.

v2: fix the selection of the finish function (by Eric)
glamor: Don't reset GL_ELEMENT_ARRAY_BUFFER as it's always bound to the same buffer.
glamor: Remove unneeded unbindings.

They are already cleared in glamor_put_vbo_space.
glamor: Drop feature dependent optimization on startup.

We don't care that much about startup time to write different code paths...
glamor: Use vbo for solid boxes.