Commit Graph

2051 Commits

Author SHA1 Message Date
Jonas Ådahl
1f0ce80fb4 cogl: Add support for creating custom EGL based textures
Add API to enable the caller to have a custom method for allocating an
external texture. This will enable the possibility for mutter to
generate a texture from for example an EGLStream without having to add
support for that in Cogl.

https://bugzilla.gnome.org/show_bug.cgi?id=773629
2016-11-18 00:00:10 +08:00
Jonas Ådahl
23455985cd wayland: Make MetaWaylandBuffer handle texture generation itself
Don't rely on the Cogl layer having Wayland specific paths by
determining the buffer type and creating the EGLImage ourself, while
using the newly exposed CoglTexture from EGLImage API. This changes the
API used by MetaWaylandSurface to make the MetaWaylandBuffer API be
aware when the buffer is being attached. For SHM and EGL buffers, only
the first time it is attached will result in a new texture being
allocated, but later for EGLStream's, more logic on every attach is
needed.

https://bugzilla.gnome.org/show_bug.cgi?id=773629
2016-11-18 00:00:10 +08:00
Jonas Ådahl
ecc1f56009 cogl: Expose API for creating texture from EGLImage
Later to be used by mutter to create EGLImage's from Wayland buffers.

https://bugzilla.gnome.org/show_bug.cgi?id=773629
2016-11-18 00:00:10 +08:00
Jonas Ådahl
8f716772c2 cogl: Make platforms set the EGL_SURFACE_TYPE
Cogl has no way to know how to properly set the surface type, so lets
outsource that to the platform layer.

https://bugzilla.gnome.org/show_bug.cgi?id=773629
2016-11-18 00:00:10 +08:00
Jonas Ådahl
ce7573e2b7 cogl/egl: Fix non-Wayland build
Use #ifdef instead of #if, otherwise it won't compile when Wayland is
not available.

https://bugzilla.gnome.org/show_bug.cgi?id=770647
2016-09-02 17:04:11 +08:00
Sjoerd Simons
7d9af9585d Use _NO_CONTEXT when creating images for EGL_WAYLAND_BUFFER_WL
The WL_bind_wayland_display spec says that EGL images should be created
using EGL_WAYLAND_BUFFER_WL as the target and a NULL context. Mesa
seems to be lenient and accept any context, however some other stacks
aren't so forgiving and fail if anything apart from EGL_NO_CONTEXT is
used.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>

https://bugzilla.gnome.org/show_bug.cgi?id=769731
2016-08-29 16:31:36 +02:00
Jonas Ådahl
c55943d753 cogl: Fix a few GISCAN warnings
We tried to resolve non-introspected types; lets skip those. We didn't
have a vfunc scope on a for-each loop; declared it synchronous.

https://bugzilla.gnome.org/show_bug.cgi?id=769800
2016-08-18 11:32:33 +08:00
Thomas Hindoe Paaboel Andersen
720cbc5e5f cogl: fix indentation
https://bugzilla.gnome.org/show_bug.cgi?id=769054
2016-07-22 10:44:19 +08:00
Florian Müllner
991f2d696a cogl-gles2: Don't leak gles2 types into mutter
On i686, the GLsizeiptr typedef in cogl-gles2.h conflicts with the
system GL headers, so make sure we don't include both.

https://bugzilla.gnome.org/show_bug.cgi?id=769014
2016-07-21 00:02:53 +02:00
Florian Müllner
a310ba7649 build: Dist cogl-mutter/cogl-clutter headers 2016-07-20 14:30:57 +02:00
Jonas Ådahl
cd0f8e5cd1 cogl: Let the g-ir-scanner see the type structs typedefs
By only showing the g-ir-scanner void typedefs it will make it print
warnings. Lets please it by showing the actual typedef.

https://bugzilla.gnome.org/show_bug.cgi?id=768977
2016-07-20 14:23:48 +08:00
Jonas Ådahl
75c3cf0589 cogl: Remove support for not building with glib/gtype support
https://bugzilla.gnome.org/show_bug.cgi?id=768977
2016-07-20 14:23:48 +08:00
Jonas Ådahl
d62d780a95 Remove cogl-1.0 vs cogl-2.0 vs cogl experimental API split
Mutter (and libmutter users) are the only users of this version of
cogl, and will more or less only use the cogl-1.0, cogl-2.0 and cogl
experimental API variants, and having the possibility of having
different API versions of the same API depending on what file includes
it is error prone and confusing. Lets just remove the possibility of
having different versions of the same API.

https://bugzilla.gnome.org/show_bug.cgi?id=768977
2016-07-20 14:23:48 +08:00
Jonas Ådahl
eed71654ba Don't pretend we don't have CoglShader
We bypass our build configuration to fetch API from a version which
isn't the one we actually use. Stop bypassing and just admit that the
1.0 API is still there, but still deprecated.

https://bugzilla.gnome.org/show_bug.cgi?id=768977
2016-07-20 14:23:48 +08:00
Jonas Ådahl
835ded3f02 cogl: Remove deprecated CoglTexture functions
None were used; no reason to keep them.

https://bugzilla.gnome.org/show_bug.cgi?id=768977
2016-07-20 14:23:48 +08:00
Jonas Ådahl
3450b51da1 cogl: Remove CoglClipState
We were not using it anywhere; lets get rid of it.

https://bugzilla.gnome.org/show_bug.cgi?id=768977
2016-07-20 14:23:48 +08:00
Jonas Ådahl
1ca9d8ac02 cogl: Remove CoglFixed
We were no longer using anything from it; lets remove it.

https://bugzilla.gnome.org/show_bug.cgi?id=768977
2016-07-20 14:23:48 +08:00
Jonas Ådahl
ea64e0abfa cogl: Fix a bunch of GISCAN warnings
https://bugzilla.gnome.org/show_bug.cgi?id=768977
2016-07-20 14:23:48 +08:00
Jonas Ådahl
28a898a22f Use signals instead of onscreen framebuffer frame callbacks
CoglFrameInfo is a frame info container associated with a single
onscreen framebuffer. The clutter stage will eventually support drawing
a stage frame with multiple onscreen framebuffers, thus needs its own
frame info container.

This patch introduces a new stage signal 'presented' and a accompaning
ClutterFrameInfo and adapts the stage windows and past onscreen frame
callbacks users to use the signal and new info container.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Jonas Ådahl
c498bce9e4 cogl: Add API to get the texture from an offscreen
https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Jonas Ådahl
e420f386d2 Move cogl KMS winsys into the native backend
Move the KMS interaction from cogl into mutter, where most of the other
KMS interaction already takes place. This also removes dead code which
were only excercised when non-mutter callers used the cogl KMS backend.

The cogl KMS API was updated to pass via MetaRendererNative instead of
via the different cogl objects.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Jonas Ådahl
e05f48fc53 Make it possible to include private cogl API from mutter
If we want to put a cogl winsys backend in mutter, that backend need to
have access to the internal workings of cogl.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Jonas Ådahl
d63e9452d9 cogl: Remove some now dead code
We require glib and don't support building on win32 any more.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Jonas Ådahl
f1b7b41b8d Update .gitignore
The cogl/clutter merge made the .gitignore files in the respective
directories incorrect, due to the using absolute paths.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Jonas Ådahl
bdc68efe45 cogl: Fix signage miss match warnings
https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Jonas Ådahl
bf71cb2e3c Don't use config.h in clutter and cogl
In cogl use cogl-config.h and in clutter use clutter-build-config.h. We
can't use clutter-config.h in clutter because its already used and
installed.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Jonas Ådahl
4d13f6e2d0 cogl: Expose winsys vtable getters
This is so we can use as base in mutter's future winsys backends.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Jonas Ådahl
d6cde4b043 cogl: Add API for setting custom winsys
https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Jonas Ådahl
e2f5579391 cogl: Don't undef __INSIDE_COGL_H__ in file not defining it
If you include a file that might define __INSIDE_COGL_H__, don't
undefine it if it wasn't defined in that file. This makes it possible
to include for example cogl-gles2.h from some other file which defines
__INSIDE_COGL_H__.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Rui Matos
d4d2bf0f6c cogl: Ignore GL_CONTEXT_LOST when checking for GL errors
When using a context with robustness, glGetError() may return
GL_CONTEXT_LOST at any time and this error doesn't get cleared until
the application calls glGetGraphicsResetStatus() . This means that our
error checking can't call glGetError() in a loop without checking for
that return value and returning in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=739178
2016-06-27 20:23:49 +02:00
Rui Matos
0f2be43af4 cogl-context: Add a cogl_get_graphics_reset_status API
If the driver supports the GL_ARB_robustness extension we can expose
the graphics reset status this way.

https://bugzilla.gnome.org/show_bug.cgi?id=739178
2016-06-27 20:23:49 +02:00
Rui Matos
87f9927375 cogl-winsys-glx: Add support for NV_robustness_video_memory_purge
This adds API to allow callers to specify that they're interested in
video memory purge errors.

https://bugzilla.gnome.org/show_bug.cgi?id=739178
2016-06-27 20:23:49 +02:00
Florian Müllner
28c9b6e1d7 build: Namespace installed tests of private libraries
Currently our private cogl/clutter forks still install tests as
cogl/clutter, which conflicts with the original libraries.
2016-04-29 14:49:03 +02:00
Rico Tzschichholz
29752b6b63 cogl/clutter: Drop soname versions of private libraries 2016-04-28 15:34:51 +02:00
Florian Müllner
6e5888853e build: Export correct pkg-config names in .girs 2016-04-28 15:22:50 +02:00
Rui Matos
f7ee6caa15 cogl: Fix distcheck 2016-04-27 20:37:47 +02:00
Rui Matos
1fa540bcb7 Fix the merged build
https://bugzilla.gnome.org/show_bug.cgi?id=760439
2016-04-27 20:37:47 +02:00
Rui Matos
2d2835f02a move everything into a cogl/ directory 2016-04-22 16:44:31 +02:00
Rui Matos
e6b14a36c5 cogl: make library private to mutter 2016-04-22 16:39:46 +02:00
Rui Matos
d6dd55171a build: get rid of specialized makefile snippets 2016-04-22 16:39:46 +02:00
Rui Matos
26c94951fc disable standalone builds and drop private glib copy 2016-04-22 16:39:46 +02:00
Rui Matos
9504eac68c po: drop translations 2016-04-22 16:39:45 +02:00
Rui Matos
8366fd5438 drop remaining traces of support for directly linking libGL 2016-04-22 16:39:45 +02:00
Rui Matos
0da00392e6 quartz: drop support 2016-04-22 16:39:45 +02:00
Ray Strode
865da1457a renderer: drop wayland client support 2016-04-22 16:39:35 +02:00
Ray Strode
b5648dc0cb renderer: drop android support 2016-04-18 19:12:23 +02:00
Ray Strode
ce8aa45fa4 renderer: drop MIR support 2016-04-18 19:12:23 +02:00
Ray Strode
639ef8e195 win32: drop support 2016-04-18 19:12:23 +02:00
Ray Strode
ed9f3fd50a renderer: drop support for SDL 2016-04-18 19:09:42 +02:00
Ray Strode
7e8e1dfc8f renderer: drop GDL support 2016-04-10 20:28:55 +02:00