1
0
Fork 0

compositor/actor: Get ClutterBackend from MetaBackend

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3977>
This commit is contained in:
Bilal Elmoussaoui 2024-08-20 23:43:07 +02:00
parent e3f4e735f5
commit 182951dea3
2 changed files with 7 additions and 2 deletions

View file

@ -118,7 +118,10 @@ static void
set_pixmap (MetaSurfaceActorX11 *self,
Pixmap pixmap)
{
CoglContext *ctx = clutter_backend_get_cogl_context (clutter_get_default_backend ());
ClutterContext *clutter_context =
clutter_actor_get_context (CLUTTER_ACTOR (self));
ClutterBackend *backend = clutter_context_get_backend (clutter_context);
CoglContext *ctx = clutter_backend_get_cogl_context (backend);
MetaShapedTexture *stex = meta_surface_actor_get_texture (META_SURFACE_ACTOR (self));
GError *error = NULL;
CoglTexture *cogl_texture;

View file

@ -797,7 +797,9 @@ static void
build_and_scan_frame_mask (MetaWindowActorX11 *actor_x11,
MtkRegion *shape_region)
{
ClutterBackend *backend = clutter_get_default_backend ();
ClutterContext *clutter_context =
clutter_actor_get_context (CLUTTER_ACTOR (actor_x11));
ClutterBackend *backend = clutter_context_get_backend (clutter_context);
MetaWindow *window =
meta_window_actor_get_meta_window (META_WINDOW_ACTOR (actor_x11));
CoglContext *ctx = clutter_backend_get_cogl_context (backend);