1
0
Fork 0
Commit graph

18 commits

Author SHA1 Message Date
Neil Roberts
d1d2120a91 kms: Use GBM surfaces
Instead of creating FBOs on the GL side, the KMS EGL platform uses the
latest changes to Mesa to create an EGL surface using a GBM surface as
the native surface type. This removes some of the special vtable hooks
that the KMS platform needed because it is now much more similar to
the other platforms.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-04-11 15:44:32 +01:00
Neil Roberts
3a4dce0c53 Move the EGL Android winsys out of cogl-winsys-egl
This moves all of the code specific to the Android platform out of
cogl-winsys-egl. It is completely untested apart from that it
compiles using a dummy android/native_window.h header.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-12-13 16:08:37 +00:00
Neil Roberts
d70c764da6 Move the EGL GDL winsys out of cogl-winsys-egl
This moves all of the code specific to the gdl winsys out of
cogl-winsys-egl. It is completely untested apart from that it
compiles.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-12-13 16:08:37 +00:00
Neil Roberts
f1d831d644 Move the EGL null winsys out of cogl-winsys-egl
This moves all of the code specific to the null winsys out of
cogl-winsys-egl.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-12-13 13:12:17 +00:00
Neil Roberts
a6b1f55546 kms: Don't use egl_surface_width/height
The egl_surface_width/height properties in CoglDisplayEGL were
accidentally being conditionally defined depending on KMS
support. They are not necessary because CoglDisplayKMS also already
stores the width/height and this was just copied over to the EGL
dipslay.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-12-13 13:12:16 +00:00
Neil Roberts
4dbef01ec3 winsys: Move Wayland-specific code out of the EGL winsys
All of the Wayland-specific code now lives in the EGL_WAYLAND winsys.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-12-12 17:41:43 +00:00
Neil Roberts
613a3390da winsys: Move X11/Xlib-specific code out of the EGL winsys
All of the X11/Xlib-specific code now lives in the EGL_X11 winsys.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-12-12 16:14:19 +00:00
Neil Roberts
7f74712a79 Remove CoglXlibDisplay
CoglXlibDisplay just contained one member called dummy_xwin. This was
not shared outside of the respective winsys's so I don't think it
really makes sense to have a separate shared struct for it. It seems
more like an implementation detail that is specific to the winsys
because for example it may be that the EGL winsys could use the
surfaceless extension and not bother with a dummy window. This will
also make it easier to factor out the Xlib-specific data in
CoglDisplayEGL to the platform data.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-12-12 16:14:18 +00:00
Neil Roberts
a8f84af776 cogl-xlib-renderer: Move private data to cogl_object_set_user_data
Previously the Xlib renderer data was meant to be the first member of
whatever the winsys data is. This doesn't work well for the EGL winsys
because it only needs the Xlib data if the X11 platform is used. The
Xlib renderer data is now instead created on demand and connected to
the object using cogl_object_set_user_data. There is a new function to
get access to it.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-12-12 16:13:57 +00:00
Neil Roberts
dd75926c1a egl: Split out the KMS winsys as overrides of the EGL winsys
Instead of having #ifdefs to hook into the normal EGL winsys, the KMS
winsys now overrides any winsys functions that it wants. Where the
winsys wants to hook into a point within a function provided by the
EGL winsys there is a EGL-platform vtable which gets set on the EGL
renderer data during renderer_connect. The KMS-specific data on all of
the structures is now allocated separately by the KMS winsys and is
pointed to by a new 'platform' pointer in the EGL data.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-12-09 17:29:49 +00:00
Neil Roberts
93e6e2051f egl: Allow multiple EGL platforms
The #ifdefs in cogl-winsys-egl have been changed so that they
additionally check renderer->winsys_vtable->id for the corresponding
winsys ID so that multiple EGL platforms can be enabled.

The is a stop-gap solution until we can move all of the EGL platforms
into their own winsys files with overrides of the EGL vtable. However
with this approach we can move one platform at a time which will make
it easier.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-12-08 19:16:41 +00:00
Neil Roberts
889e4aba9c kms: Check for the right surfaceless extension depending on driver
There are three separate EGL_KHR_surfaceless_* extensions depending on
which GL API is being used so we should probably check the right one
depending on which driver Cogl has selected.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-12-08 12:48:59 +00:00
Tomeu Vizoso
1de6575ca2 build: Add missing include in cogl-winsys-egl-private.h
We were missing APIENTRY.
2011-12-06 19:49:00 +01:00
Robert Bragg
be40cbb8c3 build: include missing headers in cogl-winsys-egl-private.h
We were missing various platform header includes in
cogl-winsys-egl-private.h when building support for non KMS egl
platforms.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
2011-11-28 23:19:45 +00:00
Robert Bragg
056daad850 build: only include cogl-winsys-kms.h if KMS enabled
Only include cogl-winsys-kms.h in cogl-winsys-egl-private.h if KMS
support has been enabled.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
2011-11-28 22:39:19 +00:00
Robert Bragg
aa6433d8c5 kms: Check for EGL_KHR_surfaceless_opengl extension
This adds a check for the EGL_KHR_surfaceless_opengl extension which we
depend on for being able to MakeCurrent (NO_SURFACE) as well as create a
context without and EGLConfig.

Reviewed-by: Rob Bradford <rob@linux.intel.com>
2011-11-28 17:38:17 +00:00
Robert Bragg
607bfec48d kms: move Cogl*EGL typedefs to cogl-winsys-egl-private.h
So that the various internal Cogl*EGL typedefs can be available to
cogl-winsys-kms.c this moves them into cogl-winsys-egl-private.h

Reviewed-by: Rob Bradford <rob@linux.intel.com>
2011-11-28 17:37:31 +00:00
Robert Bragg
60b25615fd Add _cogl_egl_texture_2d_new_from_image API
This adds an internal texture_2d constructor that can wrap an EGLImage
as a CoglTexture2D. The plan is to utilize this for texture-from-pixmap
support with EGL as well as creating textures from wayland buffers.
2011-06-01 20:44:42 +01:00