mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 12:02:04 +00:00
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
This commit is contained in:
parent
4e9a2e4799
commit
64d34a7648
@ -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))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user