[mutter/wip/carlosg/clip-me-harder: 1/5] compositor: Optimize shadows entirely if clip region is empty
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/clip-me-harder: 1/5] compositor: Optimize shadows entirely if clip region is empty
- Date: Mon, 28 Jan 2019 12:22:53 +0000 (UTC)
commit 85d5584e270070e856133dfe34f94a970196b3d8
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Jan 27 15:42:55 2019 +0100
compositor: 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.
src/compositor/meta-shadow-factory.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/src/compositor/meta-shadow-factory.c b/src/compositor/meta-shadow-factory.c
index 9fdecacde..3a03c3b0e 100644
--- a/src/compositor/meta-shadow-factory.c
+++ b/src/compositor/meta-shadow-factory.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]