Open Bug 1152823 Opened 9 years ago Updated 2 years ago

Improve pixman_region32_union_rect

Categories

(Core :: Graphics, defect)

x86
macOS
defect

Tracking

()

People

(Reporter: jrmuizel, Unassigned)

Details

(Whiteboard: gfx-noted)

This currently is just a wrapper around pixman_region32_union I think we might be able to be more efficient.
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.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.