Add a lot more sanity checks to region code
authorBenjamin Otte <otte@gnome.org>
Mon, 20 Jul 2009 22:49:40 +0000 (00:49 +0200)
committerBenjamin Otte <otte@gnome.org>
Mon, 20 Jul 2009 22:53:09 +0000 (00:53 +0200)
commitd4b22bd9935662912641abe5fd010d906c839405
tree7a4703680a80ca4a1f7f1eb71cd5cc85e8d758eb
parenta3ad8bb5412f47776285bfc954d2275f075c8796
Add a lot more sanity checks to region code

- Introduce a GOOD_RECT() macro that checks that a pixman_box_t is not
  empty or degenerate an use it.
- Use GOOD_RECT() instead of magic if statements for funtions that take
  x, y, width, height arguments
- Use GOOD_RECT() in _reset(). The checks in the previous code seemed to
  allow an empty box, but then created a broken region from it.
- Add GOOD(region) check at the end of _translate()
pixman/pixman-region.c