mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-07 15:38:02 +02:00
tor: Suppress repeated spans
Under certain circumstances we will emit identical spans for when the edge covers the entire pixel and then for the subsequent pixels. These can be squashed into a single span. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
c0407e84e9
commit
4a8f638c9a
1 changed files with 2 additions and 2 deletions
|
|
@ -1816,7 +1816,7 @@ blit_with_span_renderer (struct cell_list *cells,
|
|||
{
|
||||
struct cell *cell = cells->head.next;
|
||||
int prev_x = xmin, last_x = -1;
|
||||
int cover = 0, last_cover = -1;
|
||||
int cover = 0, last_cover = 0;
|
||||
cairo_half_open_span_t *spans;
|
||||
unsigned num_spans;
|
||||
|
||||
|
|
@ -1851,7 +1851,7 @@ blit_with_span_renderer (struct cell_list *cells,
|
|||
int x = cell->x;
|
||||
int area;
|
||||
|
||||
if (x > prev_x) {
|
||||
if (x > prev_x && cover != last_cover) {
|
||||
spans[num_spans].x = prev_x;
|
||||
spans[num_spans].coverage = GRID_AREA_TO_ALPHA (cover);
|
||||
last_cover = cover;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue