window-actor: Add API to get a cairo surface of the window

This currently uses a hack where it pushes a CoglFramebuffer backed by a
texture to the framebuffer stack, then calls clutter_actor_paint() on
the window actor causing it to render into the framebuffer. This has the
effect that all subsurfaces of a window will be drawn as part of the
window.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/752
This commit is contained in:
Jonas Ådahl
2019-08-26 16:29:33 +03:00
parent 65fde269c6
commit 96e831dd8a
2 changed files with 117 additions and 0 deletions

View File

@ -47,6 +47,10 @@ void meta_window_actor_sync_visibility (MetaWindowActor *self
META_EXPORT
gboolean meta_window_actor_is_destroyed (MetaWindowActor *self);
META_EXPORT
cairo_surface_t * meta_window_actor_get_image (MetaWindowActor *self,
cairo_rectangle_int_t *clip);
typedef enum
{
META_SHADOW_MODE_AUTO,