mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
cogl-journal: Fix software clipping for non-intersecting rectangles
When the clip contains two rectangles which do not intersect it was generating a clip bounds where the bottom-right corner was above or to the left of the top-left corner. This would end up allowing the pixels between the two rectangles instead of clipping everything like it should. To fix this there is now an extra check which detects this situation and just clears the clip bounds to all zeroes in a similar way to what cogl-clip-stack does. https://bugzilla.gnome.org/show_bug.cgi?id=659029 Reviewed-by: Robert Bragg <robert@linux.intel.com>
This commit is contained in:
parent
17449423fa
commit
e81c1f3e9a
@ -908,6 +908,10 @@ can_software_clip_entry (CoglJournalEntry *journal_entry,
|
||||
clip_bounds_out->y_2 = MIN (clip_bounds_out->y_2, rect_y2 - ty);
|
||||
}
|
||||
|
||||
if (clip_bounds_out->x_2 <= clip_bounds_out->x_1 ||
|
||||
clip_bounds_out->y_2 <= clip_bounds_out->y_1)
|
||||
memset (clip_bounds_out, 0, sizeof (ClipBounds));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user