This improves the error message in the case where libgbm is missing when
the KMS egl platform has been enabled.
https://bugzilla.gnome.org/show_bug.cgi?id=706808
Reviewed-by: Neil Roberts <neil@linux.intel.com>
Previously when we released a .bzip2 file the Gnome release scripts
will just convert this to a .xz file and generate its own checksum.
The .bzip2 is never actually available on the FTP server. This isn't
ideal because we were listing the checksum of the .bzip2 file in the
release message but that is useless information. This patch changes it
to generate a .xz file instead which is also what Clutter does.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit cd20c869f303a3526335e77b1913c0555e226a3f)
This adds a COGL_DRIVER_WEBGL enum and a new driver description for
webgl in cogl-renderer.c. This also adds a COGL_DRIVER_FLAG_OPENGL_WEB
driver flag and a HAVE_COGL_WEBGL define which we can start to use to
handle special cases where webgl differs from gles2.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 2c167b7a4ee56241827322bbe7cb287b0628437c)
As far as I can tell --enable-cogl-path is enabled by default but the
help string for it was suggesting otherwise.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit 9c75fc5463acf1cb51bf00d9914678013ed9d248)
The help string had the wrong name presumably resulting from a cut and
paste error of the --enable-debug option.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau at intel.com>
(cherry picked from commit fb6a582ae41a5511c837846e8fbac46462fce93d)
This splits out the cogl_path_ api into a separate cogl-path sub-library
like cogl-pango and cogl-gst. This enables developers to build Cogl with
this sub-library disabled if they don't need it which can be useful when
its important to keep the size of an application and its dependencies
down to a minimum. The functions cogl_framebuffer_{fill,stroke}_path
have been renamed to cogl_path_{fill,stroke}.
There were a few places in core cogl and cogl-gst that referenced the
CoglPath api and these have been decoupled by using the CoglPrimitive
api instead. In the case of cogl_framebuffer_push_path_clip() the core
clip stack no longer accepts path clips directly but it's now possible
to get a CoglPrimitive for the fill of a path and so the implementation
of cogl_framebuffer_push_path_clip() now lives in cogl-path and works as
a shim that first gets a CoglPrimitive and uses
cogl_framebuffer_push_primitive_clip instead.
We may want to consider renaming cogl_framebuffer_push_path_clip to
put it in the cogl_path_ namespace.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 8aadfd829239534fb4ec8255cdea813d698c5a3f)
So as to avoid breaking the 1.x API or even the ABI since we are quite
late in the 1.16 development cycle the patch was modified to build
cogl-path as a noinst_LTLIBRARY before building cogl and link the code
directly into libcogl.so as it was previously. This way we can wait
until the start of the 1.18 cycle before splitting the code into a
separate libcogl-path.so.
This also adds shims for cogl_framebuffer_fill/stroke_path() to avoid
breaking the 1.x API/ABI.
Install the conformance tests, and metadata to run them
with gnome-desktop-testing-runner.
https://bugzilla.gnome.org/show_bug.cgi?id=702942
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit 53f3eb421239982b69569ad03ccbfa4b4f601cf3)
The version of gbm can sometimes be suffixed with ‘-devel’. This was
making the GBM_MICRO define come out as 0-devel which was generating a
warning when it was used in a #if check. This patch makes it chop off
anything after a ‘-’ using sed.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit 64472027fb5750971e94c0b4c6c624a39e5abe2f)
CoglFixed was trying to use the __FLOAT_WORD_ORDER macro in order to
do some fast float conversions but it wasn't including any header that
could define it so it was giving an annoying warning. This patch
checks for the macro in endian.h in the configure script and only
checks its value if it's available.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
Since the Wayland server support has been updated to use wl_shm_buffer
we need the latest git version of Wayland to build. Previously the
configure.ac file only had one define for the minimum version of both
the client-side and server-side support but as they are now different
this patch splits them out.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit 75d62292fc268164f8a085225033abe17e59ba1c)
Adds documentation comments to CoglGstVideoSink and makes it generate
a separate manual to contain it.
One thing that I wasn't able to figure out with this was how to get
the documentation to have correct references to the main Cogl docs.
You can pass arguments to gtkdoc-fixxref to point to other manuals,
but presumably this needs the installed locations and when the
Cogl-Gst documentation is generated the Cogl docs may not have been
installed yet.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit 5acdf8db47311893a9cf9ea04a66a287b657b8b0)
The experimental HW decode path was adapted from clutter-gst based on
some experimental gstreamer api. This path was disabled by upstream
gstreamer developers back in september last year due to instabilities.
Without understanding how the experimental api is implemented it seems
rather strange to be plucking out the GL handle of a cogl texture and
passing that to some unknown gstreamer code which would presumably
somehow have to use the same GL context as Cogl to be able to do
something with that texture. For now we can strip all of this unused
code and it would be easy enough to re-instate later if it's useful.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 2a24cb9f2a283af87bb685b3e9c7e3af1ffeab6e)
CoglGst is a GStreamer integration library that facilitates
video playback using the Cogl API. It works by retrieving
each video frame from the GStreamer pipeline and attaching
it to a Cogl pipeline in the form of a Cogl texture along
with possible color model conversion shaders. The pipeline
is then retrieved by the user during each draw. An example
use of the CoglGst API is included in the examples directory.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit dfb94cf4b0b6b42d6465df362a0c0af780596890)
This adds a white-box unit test that verifies that GL_BLEND is disabled
when drawing an opaque rectangle, enabled when drawing a transparent
rectangle and then disabled again when drawing a transparent rectangle
but with a blend string that effectively disables blending.
This shares the test utilities and launcher infrastructure we are using
for conformance tests so we get consistent reporting and so unit tests
will be run against a range of different drivers.
This adds a --enable-unit-tests configure option which is enabled by
default but if disabled will make all UNIT_TESTS() into static inline
functions that we should expect the compiler to discard since they won't
be referenced by anything.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 9047cce06bbf9051ec77e622be2fdbb96ed767a8)
This enables basic Emscripten support in Cogl via the SDL winsys.
Assuming you have setup an emscripten toolchain you can configure Cogl
like this:
emconfigure ./configure --enable-debug --enable-emscripten
Building the examples will build .html files that can be loaded directly
by a WebGL enabled browser.
Note: at this point the emscripten support has just barely been smoke
tested so it's expected that as we continue to build on this we will
learn about more things we need to change in Cogl to full support this
environment.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit a3bc2e7539391b074e697839dfae60b69c37cf10)
‘sincos’ is a GNU extension. cogl-gles2-gears was using it without
defining _GNU_SOURCE so it was generating some annoying warnings. This
patch fixes it by making the example include config.h which will end
up defining _GNU_SOURCE.
In addition this patch adds a configure check for the function and
provides a fallback if it's not available.
https://bugzilla.gnome.org/show_bug.cgi?id=697330
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit eb5c92952e1882c95cfd6debc69a2c9efff096b9)
https://bugzilla.gnome.org/show_bug.cgi?id=697330
Reviewed-by: Robert Bragg <robert@linux.intel.com>
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit a7b4930e14add7d955c22f396178b71083dfb52f)
Conflicts:
cogl/Makefile.am
The quartz image backend is using functions from the
ApplicationServices framework and I was getting linker errors if I
didn't use this option. I'm not sure how anyone managed to build it
before without this.
https://bugzilla.gnome.org/show_bug.cgi?id=696730
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit 54d9139a929560d6703428371b38b83e7d965f45)
Previously Cogl would accept any version of Wayland when building the
Wayland backend. Seeing as there is now a stable API we might as well
specify that we require at least version 1.0.0. This is now also
mentioned in the README. This patch also changes it to use
PKG_CHECK_MODULES instead of PKG_CHECK_EXISTS because it does need to
abort if it fails and it shouldn't be checking it silently.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit d899955b714e5ed50c6c89b9fde4b341bcf80558)
This updates Cogland example compositor to use the stable Wayland 1.0
API.
• When the client attaches a new buffer to a surface it is now added
to a struct contaning pending the state instead of immediately
switching to the new buffer. This state is then flushed when the
surface is committed.
• The frame callbacks are now queued in a pending list and only added
to the compositor's main list when the surface is committed. Both
lists are now a wl_list instead of a GQueue because it makes it
easier to remove the callback without knowing which list it is in.
• When the buffer is destroyed for a surface the resource for the
buffer is now sent a release event.
• It now flushes the clients in the prepare for the for the Wayland
event GSource. This is part of the multi-threaded API in this
Wayland patch:
http://cgit.freedesktop.org/wayland/wayland/commit/?id=53d24713a31d59
• Implements a dummy wl_region interface. The only interfaces that
actually use regions (the opaque and input regions) are ignored but
we need the interface to create a resource.
• Most the of the SHM interface is now implemented directly in
libwayland-server except that it still needs to copy the data to the
subregion of the texture when the damage region is committed.
• The callback list for when a resource is destroyed has been unified
into a generic wl_signal implementation so the signature for the
functions has been changed.
http://cgit.freedesktop.org/wayland/wayland/commit/?h=6802eaa68af9022
• The wl_buffer struct no longer has a user_data parameter so we can't
attach our own CoglandBuffer data to it. Instead the CoglandSurface
now just keeps track of the wl_buffer directly.
• The Cogland example is now unconditionally built instead of checking
the Wayland version number in the configure script. It looks like
this check was broken anyway because it was checking the version of
the gbm package rather than a Wayland package.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit 4cbbc0f8e3de1fd44dee08b487f1c3f97dda8ede)
Conflicts:
examples/Makefile.am
examples/cogland.c
The CoglOutput object represents one output such as a monitor or
laptop panel, with information about attributes of the output such as
the position of the output within the global coordinate space, and
the refresh rate.
We don't yet publically export the ability to get output information but
we track it for the GLX backend, where we'll use it to track the refresh
rate.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit d7ef9d8d71488d0e6874f1ffc6e48700d5c82a31)
The libraries prefixes where never set in the configure script and
GDKPIXBUF_PREFIX had a typo.
(cherry picked from commit 5d8c0e13ed0572f806fdff2bff1d5904ed3bf69b)
This allows us to catch the use of undefined macros (that default to 0)
in preprocessor conditionals.
(cherry picked from commit 53ddc20fe9cd1400d18274e521932f84a4aecc5b)
Some variables (notably multiline ones) are not really supposed to be
substituted by automake. Let's take COGL_DEFINES for instance, you get:
COGL_DEFINES =
#define COGL_HAS_GLIB_SUPPORT
#define COGL_HAS_GTYPE_SUPPORT
#define COGL_HAS_GL
#define CLUTTER_COGL_HAS_GL
#define COGL_HAS_GLX_SUPPORT
#define COGL_HAS_SDL
...
This only works because the '#' character makes it look like a comment
and COGL_DEFINES becomes an empty variable
Automake allows to exclude variables from the list of substitutions,
let's use it for those two.
(cherry picked from commit e0a9d8d775c90c60b6e63b52771e896da3641a40)
This fixes some problems which were stopping --disable-glib from
working properly:
• A lot of the public headers were including glib.h. This shouldn't be
necessary because the API doesn't expose any glib types. Otherwise
any apps would require glib in order to get the header.
• The public headers were using G_BEGIN_DECLS. There is now a
replacement macro called COGL_BEGIN_DECLS which is defined in
cogl-types.h.
• A similar fix has been done for G_GNUC_NULL_TERMINATED and
G_GNUC_DEPRECATED.
• The CFLAGS were not including $(builddir)/deps/glib which was
preventing it finding the generated glibconfig.h when building out
of tree.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit 4138b3141c2f39cddaea3d72bfc04342ed5092d0)
The GDK pixbuf support requires being able to propagate errors from
GDKPixbuf as GErrors. This won't work if we are using the builtin
version of GLib because any attempt to call g_error_free from within
Cogl will use the internal version which will free the error using the
wrong slice allocator. It probably doesn't make much sense to build
without glib but with gdk-pixbuf so there's not much point in trying
to work around this situation.
Previously if you specified --enable-gdk-pixbuf but gdk-pixbuf was not
available it would silently disable it. This pach also fixes it so
that it will report an error in that case.
If --enable-gdk-pixbuf is not specified it will now default to
enabling it only if both glib is enabled and gdk-pixbuf is available.
This patch looks slightly longer than it ought to be because it moves
the check for glib up to above the descisions about the image backend.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit 8b1eabdc08da89a57792f9eb666e893a6cbb4e26)
glib's configure.ac uses libtool to determine the extension of shared
libraries. So let's generate the libtool file early in configure.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit ae457e0e2463bcec4f5891778e8ada9924f91be7)
This option will generate a libcogl2 DSO that depends on the least
possible external libraries.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit 6357960e1b91081546adf1bb110067d7db4d7400)
This commit pushes --disable-glib to the extreme of embedding the par of
glib cogl depends on in tree to be able to generate a DSO that does not
depend on an external glib.
To do so, it:
- keeps a lot of glib's configure.ac in as-glibconfig.m4
- pulls the code cogl depends on and the necessary dependencies
Reviewed-by: Robert Bragg <robert@linux.intel.com>
Instead of using the variable to use in Makefile.ams.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit 016f2276823a8a8cde33d3e7062c61469921a9f1)