undo-journal: fix build warning
scale: don't index into empty labels array
stop using hack device input handler to advance timeline
button-input: don't crash when syncing state from sim
Merge commit 'c599f7a9348bddd21644879588a5d4d852804a92' into wip/next-rebase
Integrate deps/cogl into the build system
move deps/clib to ./clib
move deps/cogl/* to ./*
Add cogl_poll_renderer_dispatch_fd api

This adds a cogl_poll_renderer_dispatch_fd function for dispatching any
work associated with just a single fd returned by
cogl_poll_renderer_get_info().
Handle rut-poll sources via libuv mainloop library

This updates all file descriptor based and idle event callback handling
to be based on the libuv mainloop API.

So that we can continue to use GApplication, gstreamer and gtk file open
dialogs on Linux; optional glib mainloop integration is supported.
Use a different glib integration approach

To integrate glib with libuv we now manually iterate the GMainContext
via the g_main_context_{prepare,check,dispatch} apis.
poll: don't skip dummy timer for timeout == 0 case
sdl2: return a CoglError instead of calling c_error

This avoids calling c_error while initializing the sdl2 winsys when
no user-event number has been allocated for cogl. This error isn't
fatal so the code now throws a CoglError instead.
build: traverse into test-fixtures/
test-utils: support testing with sdl
Add a COGL_EXT_IN_GLES3 option to specify extensions that are in GLES3

Some features that were previously available as an extension in GLES2
are now in core in GLES3 so we should be able to specify that with the
gles_availability mask of COGL_EXT_BEGIN so that GL implementations
advertising GLES3 don't have to additionally advertise the extension
for us to take advantage of it.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
Use the EGL_KHR_surfacless_context extension

The surfaceless context extension can be used to bind a context
without a surface. We can use this to avoid creating a dummy surface
when the CoglContext is first created. Otherwise we have to have the
dummy surface so that we can bind it before the first onscreen is
created.

The main awkward part of this patch is that theoretically according to
the GL and GLES spec if you first bind a context without a surface
then the default state for glDrawBuffers is GL_NONE instead of
GL_BACK. In practice Mesa doesn't seem to do this but we need to be
robust against a GL implementation that does. Therefore we track when
the CoglContext is first used with a CoglOnscreen and force the
glDrawBuffers state to be GL_BACK.

There is a further awkward part in that GLES2 doesn't actually have a
glDrawBuffers state but GLES3 does. GLES3 also defaults to GL_NONE in
this case so if GLES3 is available then we have to be sure to set the
state to GL_BACK. As far as I can tell that actually makes GLES3
incompatible with GLES2 because in theory if the application is not
aware of GLES3 then it should be able to assume the draw buffer is
always GL_BACK.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
Remove support for CoglTextureRectangle

TextureRectangle used to be useful for supporting X11 texture from
pixmap on older ATI cards without full NPOT texture support and
theoretically it was there to help at times when it's preferable
to access a texture with non-normalized coordinates.

More recent versions of glsl now offer a way to sample texture with
non-normalized coordinates and so in practice this feature represents
quite a lot of code and special cases for non-normalized coordinates for
basically zero benefit.
type: make sure to use c_realloc not g_realloc
clib: update coding style

This updates the code under clib/ to follow a Linux Kernel / K&R like
coding style with a few exceptions:

Function return types are on a separate line with parameters aligned like:

static void
my_function(int arg0,
            bool arg1,
            int arg2);

A 4 space indent is used considering that the plan is to update the
reset of the Rig code base to follow this style and it currently uses 4
space indentation so we're less likely to end up in a mess when
automatically re-indenting the code.

Notably this also updates the naming style for typedefs from:

  CTypeThing

to:

  c_type_thing_t