[mutter] background-content: Apply Cullable clipping even in the transformed case
- From: Robert Mader <rmader src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] background-content: Apply Cullable clipping even in the transformed case
- Date: Thu, 1 Oct 2020 23:41:54 +0000 (UTC)
commit 64d34a76489ce46926ece828259ed4c394730f94
Author: Daniel van Vugt <daniel van vugt canonical com>
Date: Thu Oct 1 18:01:46 2020 +0800
background-content: Apply Cullable clipping even in the transformed case
Just like we used to before 30809665d8.
Because in some cases `clip_region` is able to shave off an extra pixel
from the edge of the redraw rectangle(s). And not shaving that off was
making the background rendering inconsistent with shaped-texture, causing
occasional off-by-one artefacts. Now both shaped-texture and
background-content agree on the clip region again that doesn't happen.
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1443
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1464
src/compositor/meta-background-content.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/src/compositor/meta-background-content.c b/src/compositor/meta-background-content.c
index bf203aa9af..ce6ee2fff1 100644
--- a/src/compositor/meta-background-content.c
+++ b/src/compositor/meta-background-content.c
@@ -557,15 +557,23 @@ meta_background_content_paint_content (ClutterContent *content,
region = cairo_region_create_rectangle (&rect_within_stage);
}
}
-
- if (self->unobscured_region)
- cairo_region_intersect (region, self->unobscured_region);
}
else /* actor and stage space are different but we need actor space */
{
- region = cairo_region_create_rectangle (&rect_within_actor);
+ if (self->clip_region)
+ {
+ region = cairo_region_copy (self->clip_region);
+ cairo_region_intersect_rectangle (region, &rect_within_actor);
+ }
+ else
+ {
+ region = cairo_region_create_rectangle (&rect_within_actor);
+ }
}
+ if (self->unobscured_region)
+ cairo_region_intersect (region, self->unobscured_region);
+
/* region is now in actor space */
if (cairo_region_is_empty (region))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]