mutter/0013-window-actor-x11-Use-the-new-MetaShapedTexture-API.patch

47 lines
1.6 KiB
Diff

From 267f7120683f52b67311119c508ad49643f52623 Mon Sep 17 00:00:00 2001
From: Olivier Fourdan <ofourdan@redhat.com>
Date: Wed, 4 Mar 2020 11:08:01 +0100
Subject: [PATCH 13/48] window-actor/x11: Use the new MetaShapedTexture API
The code in `build_and_scan_frame_mask` predates the introduction of the
`MetaShapedTexture` API to get the texture width hand height.
Use the new `meta_shaped_texture_get_width/height` API instead of using
the CoGL paint texture.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/1091
---
src/compositor/meta-window-actor-x11.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/src/compositor/meta-window-actor-x11.c b/src/compositor/meta-window-actor-x11.c
index 228d15e04..851df7e57 100644
--- a/src/compositor/meta-window-actor-x11.c
+++ b/src/compositor/meta-window-actor-x11.c
@@ -885,7 +885,6 @@ build_and_scan_frame_mask (MetaWindowActorX11 *actor_x11,
uint8_t *mask_data;
unsigned int tex_width, tex_height;
MetaShapedTexture *stex;
- CoglTexture *paint_tex;
CoglTexture2D *mask_texture;
int stride;
cairo_t *cr;
@@ -897,12 +896,8 @@ build_and_scan_frame_mask (MetaWindowActorX11 *actor_x11,
meta_shaped_texture_set_mask_texture (stex, NULL);
- paint_tex = meta_shaped_texture_get_texture (stex);
- if (paint_tex == NULL)
- return;
-
- tex_width = cogl_texture_get_width (paint_tex);
- tex_height = cogl_texture_get_height (paint_tex);
+ tex_width = meta_shaped_texture_get_width (stex);
+ tex_height = meta_shaped_texture_get_height (stex);
stride = cairo_format_stride_for_width (CAIRO_FORMAT_A8, tex_width);
--
2.26.0.rc2