1
0
Fork 0
Commit graph

35 commits

Author SHA1 Message Date
Rob Bradford
fce43c420e wayland: Use wl_cursor_theme to provide a buffer for the Wayland cursor
This change switches to the new mechanism for loading a cursor into a buffer.
It no longer relies on having a PNG stored in a known location and instead
loads from the Wayland cursor theme.

Signed-off-by: Rob Bradford <rob@linux.intel.com>
2012-10-12 15:12:55 +01:00
Daniel Stone
978202aa49 Wayland: Set default font DPI to 96
Otherwise the units test fails, since the default DPI is set to -1.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-10-12 15:12:55 +01:00
Daniel Stone
8f4e39b6d7 Port to new Wayland and xkbcommon APIs
For Wayland, this is mostly the input protocol having changed, although
there's also the SHM pool API, the cursor API, as well as fullscreen and
ping.

Also port to the new (months-old) xkbcommon API, as used by Weston 0.95.
This involves having xkbcommon manage the state for us, where
appropriate.  Fans of multi-layout keyboards (or just caps lock) will no
doubt appreciate these changes.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-10-12 15:12:55 +01:00
Robert Bragg
cf96c9caf3 include standalone cogl-wayland-server/client headers
Because the wayland-server-protocol.h header includes symbols that
collide with wayland-client-protocol.h Cogl now provides top level
<cogl/cogl-wayland-server.h> and <cogl/cogl-wayland-client.h> headers so
that applications can ensure they only include one of the wayland
protocol headers in a particular compilation unit. This updates clutter
accordingly to include those headers.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-03-20 14:36:50 +00:00
Neil Roberts
1f7968e5f9 wayland/x11: Set constraints on the CoglRenderer
When using the Wayland backend this sets a constraint that the
CoglRenderer selects the Wayland EGL winsys.

When a Wayland compositor display is set it now also sets a constraint
that the render should use EGL because only EGL renderers will set up
the required wl_drm global object.

The X11 backend now sets the X11 constraint.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-03-01 11:41:51 +00:00
Rob Bradford
737c5e1045 wayland: Save the output mode so that it can be used to fullscreen windows 2012-01-26 14:13:23 +00:00
Rob Bradford
27784de941 wayland: Update to changes in the SHM api
The enum value for the SHM formats has changed to be more explicit about the
format of the data.
2012-01-20 16:15:08 +00:00
Rob Bradford
e1434cebdb wayland: Load a buffer from well known location for the cursor
Semantic changes to Wayland means that we cannot rely on the compositor
setting a pointer buffer for us if set it to nil. The first part of fixing
this is to create an shm buffer containing the bytes for our cursor.

The best way to do this currently is to load the cursor from the well known
location where weston instals its cursor images. The code to implemente this
was derivedlifted from the Wayland backend in GTK+.
2012-01-10 17:29:32 +00:00
Rob Bradford
34cc45dae5 wayland: Update to latest Wayland API (wl_shell_surface transition)
Previously the wl_shell object held the methods that allowed a client to
request changes to the shell's state associated with a surface. These methods
have now been moved to a wl_shell_surface object.

This change allows configure events to be handled inside the stage rather than
the backend.
2011-12-08 17:44:53 +00:00
Robert Bragg
07c6f96cb4 wayland: Updates client side wayland support
This updates Wayland support in line with upstream changes to the Wayland
API and protocol.

This update means we no longer use the Cogl stub winsys so a lot of code
that had to manually interact with EGL and implement a swap_buffers
mechanism could be removed and instead we now depend on Cogl to handle
those things for us.

This update also adds an input device manager consistent with other
clutter backends.

Note: to use the client side "wayland" clutter backend you need to have
built Cogl with --enable-wayland-egl-platform. If Cogl has been built
with support for multiple winsys backends then you should run
applications with COGL_RENDERER=EGL in the environment.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2011-12-08 16:13:37 +00:00
Emmanuele Bassi
88b27beea4 wayland/backend: Remove create_stage()
The create_stage() implementation in ClutterBackendWayland isn't doing
anything special, so we can fall back to the default one.
2011-11-10 14:55:04 +00:00
Emmanuele Bassi
b980d2dc17 */backend: Store the StageWindow implementation type 2011-11-10 14:55:03 +00:00
Emmanuele Bassi
adb6ffbd0e backend: Unify the event initialization
Input backends are, in some cases, independent from the windowing system
backends; we can initialize input handling using a model similar to what
we use for windowing backends, including an environment variable and
compile-/run-time checks.

This model allows us to remove the backend-specific init_events(), and
use a generic implementation directly inside the base ClutterBackend
class, thus further reducing the backend-specific code that every
platform has to implement.

This requires some minor surgery to every single backend, to make sure
that the function exposed to initialize the event loop is similar and
performs roughly the same operations.
2011-11-10 14:42:40 +00:00
Emmanuele Bassi
42af690255 wayland/backend: Remove empty ensure_context()
There is a default fallback, now.
2011-11-10 14:42:40 +00:00
Emmanuele Bassi
a09bbffd92 Implement multi-backend support
The Clutter backend split is opaque enough that should allow us to just
build all possible backends inside the same shared object, and select
the wanted backend at initialization time.

This requires some work in the build system, as well as the
initialization code, to remove duplicate functions that might cause
conflicts at build and link time. We also need to defer all the checks
of the internal state of the platform-specific API to run-time type
checks.
2011-11-03 13:45:19 +00:00
Emmanuele Bassi
09de87b0e5 backend: Remove atexit handlers
The g_atexit() function has been deprecated in GLib as it is a fairly
bad idea in basically all cases.

We could probably use a GCC destructor if we didn't care about
portability, but for the time being we just remove the atexit() handler
that disposed the backend.
2011-10-31 10:33:46 +00:00
Emmanuele Bassi
146e15297f debug: Clean up debugging notes 2011-10-17 10:24:25 +01:00
Robert Bragg
223e14811c Removes Cogl from the repository
Cogl has now been split out into a standalone project with a separate
repository at git://git.gnome.org/cogl. From now on the Clutter build
will now simply look for a cogl-1.0 pkg-config file to find a suitable
Cogl library to link against at build time.
2011-05-06 15:44:08 +01:00
Robert Bragg
532b563439 Add temporary cogl-clutter.h to aid splitting out Cogl
This gives us a way to clearly track the internal Cogl API that Clutter
depends on. The aim is to split Cogl out from Clutter into a standalone
3D graphics API and eventually we want to get rid of any private
interfaces for Clutter so its useful to have a handle on that task.
Actually it's not as bad as I was expecting though.
2011-04-11 17:54:35 +01:00
Emmanuele Bassi
354f7b0e25 backend: Remove usage of CLUTTER_STAGE_TYPE
It's only used for debugging purposes, and it's of limited usage since
the stage creation is deferred to the backend implementation itself.
2011-02-15 14:48:41 +00:00
nobled
c1a27d481b wayland: set renderable type on dummy surface
Make sure it's compatible with the API that's in use.
2011-02-08 16:16:18 +00:00
nobled
20b1350614 wayland: check for egl extensions explicitly
eglGetProcAddress() returns non-null function pointers
whether or not they're actually supported by the driver,
since it can be used before any driver gets loaded. So
we have to check if the extensions are advertised first,
which requires having an initialized display, so we split
the display creation code into its own function.

The exception to extension-checking is EGL_MESA_drm_display,
since by definition it's needed before any display is even
created.
2011-02-08 16:15:09 +00:00
nobled
e855bc45a2 wayland: fall back to shm buffers if drm fails 2011-02-01 02:58:15 +00:00
nobled
d84f31ef3a wayland: add shm buffer code
It's not enabled to do anything yet.
2011-02-01 02:58:11 +00:00
nobled
7e4a8fd907 wayland: don't require the surfaceless extensions
Just create a one-pixel dummy surface for eglMakeCurrent().
2011-01-30 22:43:50 +00:00
nobled
ffd7197dd6 wayland: check for API-specific surfaceless extension
It's a whole different extension name for each GL api.
2011-01-30 22:22:10 +00:00
nobled
542717e45b wayland: fix GLES context creation
It was unconditionally binding the desktop-GL API and
requesting the wrong API version in the case of GLES1.
2011-01-30 22:18:55 +00:00
nobled
9dcb9453ed wayland: use EGL_NO_SURFACE 2011-01-30 22:13:07 +00:00
nobled
0886452dc2 wayland: update to new api
Adapt to changes from this Wayland commit:
"Update surface.attach and change surface.map to surface.map_toplevel"
(82da52b15b49da3f3c7b4bd85d334ddfaa375ebc)
2011-01-28 17:29:48 +00:00
nobled
2a45ea6839 wayland: fix connecting to default socket
Fixes a mistake in commit "wayland: Update to current api"
(e7f62bc936)
2011-01-28 16:50:06 +00:00
Emmanuele Bassi
24133ddadc Rename the EGLDisplay accessors
The accessor for the EGL display should be namespaced for the correct
backend-specific API.
2010-12-09 15:34:22 +00:00
nobled
e7f62bc936 wayland: Update to current api
Adapt to changes from these wayland commits:
35fd2a8cc68c42d90756330535de04cbbb4d2613
2bb3ebe1e437acf836449f0a63f3264ad29566f2
f8fc08f77187f6a5723281dab66841e5f3c24320

http://bugzilla.clutter-project.org/show_bug.cgi?id=2474
2010-12-09 13:32:49 +00:00
Emmanuele Bassi
8613013ab0 Clean up clutter-private.h/3
Move Stage private API to a separate header.
2010-10-21 11:33:26 +01:00
Kristian Høgsberg
134ce072e7 The amazing lazy-copy-back-repaint-page-flip
Always use pageflipping, but avoid full repaint by copying back dirty
regions from front to back.  Additionally, we dealy copying back until
we're ready to paint the new frame, so we can avoid copying areas that
will be repainted anyway.

This is the least amount of copying per frame we can get away with at all
and at the same time we don't have to worry about stalling the GPU on
synchronized blits since we always pageflip.
2010-10-14 16:23:05 +01:00
Kristian Høgsberg
cb5582c4ab Add wayland backend
This adds a clutter backend for running under the wayland window system.
Initial cogl framebuffer integration by Robert Bragg.
2010-10-14 16:23:05 +01:00