Improve pixman_region32_union_rect

NEW
Unassigned

Status

()

4 years ago
4 years ago

People

(Reporter: jrmuizel, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: gfx-noted)

(Reporter)

Description

4 years ago
This currently is just a wrapper around pixman_region32_union I think we might be able to be more efficient.
Whiteboard: gfx-noted
(Reporter)

Comment 1

4 years ago
The basic idea for this algorithm would be:

union_rect(new_rect) {
  new_count = estimate_new_size(new_rect)
  if (new_count > current_size) {
    grow();
  }
  memmove(rects+(new_count-current_size), rects, current_size)
  merge(new_rect, rects)
}

This lets us operate in place which I believe pixman currently does not.
You need to log in before you can comment on or make changes to this bug.