mirror of
https://github.com/brl/mutter.git
synced 2024-11-28 11:00:54 -05:00
shaped-texture: Prevent no clip region from being used as an empty clip region
cairo_region_copy, while valid to call on a NULL pointer, gives us an empty region instead of an infinitely big region, so the interesction won't give us what we want. Just check for this case explicitly. https://bugzilla.gnome.org/show_bug.cgi?id=707081
This commit is contained in:
parent
fc605d2561
commit
23e9947f7a
@ -257,8 +257,15 @@ meta_shaped_texture_paint (ClutterActor *actor)
|
|||||||
int n_rects;
|
int n_rects;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
region = cairo_region_copy (priv->clip_region);
|
if (priv->clip_region != NULL)
|
||||||
cairo_region_intersect (region, priv->opaque_region);
|
{
|
||||||
|
region = cairo_region_copy (priv->clip_region);
|
||||||
|
cairo_region_intersect (region, priv->opaque_region);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
region = cairo_region_reference (priv->opaque_region);
|
||||||
|
}
|
||||||
|
|
||||||
if (cairo_region_is_empty (region))
|
if (cairo_region_is_empty (region))
|
||||||
goto paint_blended;
|
goto paint_blended;
|
||||||
|
Loading…
Reference in New Issue
Block a user