diff options
author | Olivier Fourdan <ofourdan@redhat.com> | 2020-03-04 11:08:01 +0100 |
---|---|---|
committer | Olivier Fourdan <ofourdan@redhat.com> | 2020-03-10 14:52:26 +0100 |
commit | 267f7120683f52b67311119c508ad49643f52623 (patch) | |
tree | 1e2226f3f298b8c5514923118c5d2eb99f8e3f7d | |
parent | 0b102afb5392c1a8f9d1b9ed7f20aceb1fdf84b2 (diff) | |
download | mutter-267f7120683f52b67311119c508ad49643f52623.tar.gz |
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
-rw-r--r-- | src/compositor/meta-window-actor-x11.c | 9 |
1 files 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); |