shadow-factory: Optimize shadows entirely if clip region is empty

If the clip region is empty, we don't need to check the 9 slices
separately, nothing will be painted anyway.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/698
This commit is contained in:
Carlos Garnacho 2019-01-27 15:42:55 +01:00
parent ddbdb5fa77
commit 2812338b7a

View File

@ -218,6 +218,9 @@ meta_shadow_paint (MetaShadow *shadow,
int n_x, n_y;
gboolean source_updated = FALSE;
if (clip && cairo_region_is_empty (clip))
return;
if (shadow->scale_width)
{
n_x = 3;