Commit Graph

19 Commits

Author SHA1 Message Date
Neil Roberts
6c66148faf Update ClutterWaylandSurface to use a resource instead of wl_buffer
The Wayland server API has changed so that wl_shm_buffer is no longer
a type of wl_buffer and wl_buffer will become an opaque type. This
changes ClutterWaylandSurface to accept resources for a wl_buffer
instead of directly taking the wl_buffer so that it can do different
things depending on whether the resource points to an SHM buffer or a
normal buffer. This matches similar changes to Cogl:

https://git.gnome.org/browse/cogl/commit/?id=9b35e1651ad0e46ed48989

https://bugzilla.gnome.org/show_bug.cgi?id=703608
2013-07-10 13:28:52 +01:00
Emmanuele Bassi
41bb03da2d Use the new macros for adding private data 2013-07-03 18:04:32 +01:00
Emmanuele Bassi
0b76ba332d Fixes for the API reference
Typos, missing symbols, and missing documentation.
2012-04-27 12:30:48 +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
Robert Bragg
b5c90f6caa wayland-surface: don't queue redraw on buffer attach
Reviewed-by: Neil Roberts <neil@linux.intel.com>
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-03-01 11:41:51 +00:00
Robert Bragg
1bfd1d85eb Updates in line with latest wayland protocol
The shm buffer format enum values were renamed and the explicitly
premultiplied format was dropped since it's now assumed if the buffer
has an alpha component then it's premultiplied.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-03-01 11:41:51 +00:00
Neil Roberts
6cc58f7d7d clutter-wayland-surface: Remove the pick method
The pick method doesn't do anything special over the default pick
method provided by ClutterActor so there's no need to implement it.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-03-01 11:41:51 +00:00
Robert Bragg
560f92b698 wayland-surface: removes unused origin variable
Reviewed-by: Neil Roberts <neil@linux.intel.com>
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-03-01 11:41:51 +00:00
Robert Bragg
c1aac36d35 wayland-surface: Adds queue-damage-redraw signal
This adds a signal that's emitted whenever a wayland surface is damaged
that allows sub-classes to override the default handler to change
how clipped redraws are queued if the sub-class doesn't simply draw
a rectangle. The signal can also be used just to track damage.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-03-01 11:41:51 +00:00
Robert Bragg
b89af8efa3 wayland-surface: Add cogl-texture property
This adds a "cogl-texture" gobject property so that a compositor may
listen for notifications of changes to the texture used to paint.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-03-01 11:41:51 +00:00
Neil Roberts
8ac2200aac clutter-wayland-surface: Rename the width/height properties
This patch renames the width/height properties to
surface-width/surface-height so that they won't override the
width/height properties of ClutterActor which have different
semantics.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-03-01 11:41:51 +00:00
Robert Bragg
612bde3c4a wayland-surface: Set actor size on buffer attach
When a new buffer is attached and we update the width and height
properties for the surface we now also call clutter_actor_set_size()

Reviewed-by: Neil Roberts <neil@linux.intel.com>
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-03-01 11:41:51 +00:00
Robert Bragg
0ba6127edc wayland-surface: Adds _get_surface function
This adds a clutter_wayland_surface_get_surface() function for querying
the struct wl_surface * associated with a ClutterWaylandSurface.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-03-01 11:41:51 +00:00
Robert Bragg
83b94ec27d wayland-surface: Make _set_surface api public
This exposes a clutter_wayland_surface_set_surface() function. The
implementation ignores requests to re-set the same surface and since now
has code to cleanup old surface state before setting the new surface.
(previously the surface was construct only so this wasn't necessary)

Reviewed-by: Neil Roberts <neil@linux.intel.com>
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-03-01 11:41:51 +00:00
Robert Bragg
862eebceb6 wayland-surface: Cleanup properly in _dispose
When disposing a ClutterWaylandSurface we now make sure to unref any
pipeline we created and unref any surface buffer textures we created.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-03-01 11:41:51 +00:00
Robert Bragg
c7e10024d8 wayland-surface: remove unused damage array
There was a GArray member named damage that wasn't being used which this
patch removes.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-03-01 11:41:50 +00:00
Robert Bragg
fbf94310fc Pass a CoglContext when calling cogl_pipeline_new
The experimental cogl_pipeline_new() api was recently changed so it
explicitly takes a CoglContext. This updates all calls to
cogl_pipeline_new() in clutter accordingly.
2012-02-21 17:46:11 +00:00
Emmanuele Bassi
f0468cf828 wayland/surface: Use queue_redraw_with_clip()
Just like the X11 texture-pixmap actor.

https://bugzilla.gnome.org/show_bug.cgi?id=660997
2011-12-12 17:29:58 +00:00
Robert Bragg
16ed7677e0 Adds wayland-surface actor for wayland compositors
This adds a --enable-wayland-compositor configure option which will add
support for a ClutterWaylandSurface actor which can be used to aid in
writing Wayland compositors using Clutter by providing a ClutterActor to
represent Wayland client surfaces.

Notably this configure option isn't tied into any particular backend
since conceptually the compositor support can be used in conjunction
with any clutter backend that has corresponding Cogl support.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2011-12-08 16:13:37 +00:00