shaped-texture: Implement ClutterContent

MetaWindowActor is the compositor-side representative of a
MetaWindow. Specifically it represents the geometry of the
window under Clutter scene graph. MetaWindowActors are backed
by MetaSurfaceActors, that represent the windowing system's
surfaces themselves. Naturally, these surfaces have textures
with the pixel content of the clients associated with them.
These textures are represented by MetaShapedTexture.

MetaShapedTextures are currently implemented as ClutterActor
subclasses that override the paint function to paint the
textures it holds.

Conceptually, however, Clutter has an abstraction layer for
contents of actors: ClutterContent. Which MetaShapedTexture
fits nicely, in fact.

Make MetaShapedTexture a ClutterContent implementation. This
forces a few changes in the stack:

 * MetaShapedTexture now handles buffer scale.

 * We now paint into ClutterPaintNode instead of the direct
   framebuffer.

 * Various pieces of Wayland code now use MetaSurfaceActor
   instead of MetaShapedTexture.

 * MetaSurfaceActorWayland doesn't override size negotiation
   vfuncs anymore

https://gitlab.gnome.org/GNOME/mutter/merge_requests/409
This commit is contained in:
Georges Basile Stavracas Neto
2018-12-26 13:41:26 -02:00
committed by Jonas Ådahl
parent e33d6b2908
commit 75cffd0ec4
10 changed files with 287 additions and 366 deletions

View File

@ -25,6 +25,7 @@
#include "clutter/clutter.h"
#include "meta/compositor.h"
#include "meta/meta-shaped-texture.h"
#define META_TYPE_WINDOW_ACTOR (meta_window_actor_get_type ())
@ -38,7 +39,7 @@ META_EXPORT
MetaWindow * meta_window_actor_get_meta_window (MetaWindowActor *self);
META_EXPORT
ClutterActor * meta_window_actor_get_texture (MetaWindowActor *self);
MetaShapedTexture *meta_window_actor_get_texture (MetaWindowActor *self);
META_EXPORT
void meta_window_actor_sync_visibility (MetaWindowActor *self);