mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
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
This commit is contained in:
parent
0b102afb53
commit
267f712068
@ -885,7 +885,6 @@ build_and_scan_frame_mask (MetaWindowActorX11 *actor_x11,
|
|||||||
uint8_t *mask_data;
|
uint8_t *mask_data;
|
||||||
unsigned int tex_width, tex_height;
|
unsigned int tex_width, tex_height;
|
||||||
MetaShapedTexture *stex;
|
MetaShapedTexture *stex;
|
||||||
CoglTexture *paint_tex;
|
|
||||||
CoglTexture2D *mask_texture;
|
CoglTexture2D *mask_texture;
|
||||||
int stride;
|
int stride;
|
||||||
cairo_t *cr;
|
cairo_t *cr;
|
||||||
@ -897,12 +896,8 @@ build_and_scan_frame_mask (MetaWindowActorX11 *actor_x11,
|
|||||||
|
|
||||||
meta_shaped_texture_set_mask_texture (stex, NULL);
|
meta_shaped_texture_set_mask_texture (stex, NULL);
|
||||||
|
|
||||||
paint_tex = meta_shaped_texture_get_texture (stex);
|
tex_width = meta_shaped_texture_get_width (stex);
|
||||||
if (paint_tex == NULL)
|
tex_height = meta_shaped_texture_get_height (stex);
|
||||||
return;
|
|
||||||
|
|
||||||
tex_width = cogl_texture_get_width (paint_tex);
|
|
||||||
tex_height = cogl_texture_get_height (paint_tex);
|
|
||||||
|
|
||||||
stride = cairo_format_stride_for_width (CAIRO_FORMAT_A8, tex_width);
|
stride = cairo_format_stride_for_width (CAIRO_FORMAT_A8, tex_width);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user