xserver-multidpi/exa
Søren Sandmann Pedersen 61a92a78cd Add RegionInitBoxes(), and fix some buggy callers of RegionInit().
The interface to RegionInit():

    RegionInit (RegionPtr pReg, BoxPtr rect, int size);

is very confusing because it doesn't take a list of boxes, it takes
*one* box, but if that box is NULL, it initializes an empty region
with 'size' rectangles preallocated.

Most callers of this function were correctly passing either NULL or
just one box, but there were three confused cases, where the code
seems to expect a region to be created from a list of boxes.

This patch adds a new function RegionInitBoxes() and fixes those
instances to call that instead.

And yes, the pixman function to initialize a region from a list of
boxes is called init_rects() because pixman is also awesome.

V2: Make RegionInitBoxes() return a Bool indicating whether the call
    succeeded, and fix the callers to check this return value.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Søren Sandmann <ssp@redhat.com>
2011-04-22 21:39:31 -04:00
..
exa_accel.c EXA: Fix crash with fill using 1x1 tile of depth < 8 (bug #24703). 2010-12-22 11:38:05 -08:00
exa_classic.c Revert "dix: Remove usage_hint from pixmaps, store it in ->drawable.class" 2011-03-17 23:48:52 -07:00
exa_driver.c Revert "dix: Remove usage_hint from pixmaps, store it in ->drawable.class" 2011-03-17 23:48:52 -07:00
exa_glyphs.c Remove more superfluous if(p) checks around free(p) 2010-06-11 19:05:46 +07:00
exa_migration_classic.c Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07:00
exa_migration_mixed.c Revert "dix: Remove usage_hint from pixmaps, store it in ->drawable.class" 2011-03-17 23:48:52 -07:00
exa_mixed.c Revert "dix: Remove usage_hint from pixmaps, store it in ->drawable.class" 2011-03-17 23:48:52 -07:00
exa_offscreen.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
exa_priv.h EXA: Use dixGetPrivate(Addr) instead of dixLookupPrivate. 2011-03-28 08:30:35 -07:00
exa_render.c Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07:00
exa_unaccel.c Add RegionInitBoxes(), and fix some buggy callers of RegionInit(). 2011-04-22 21:39:31 -04:00
exa.c exa: Only call driver FinishAccess hook if PrepareAccess hook succeeded. 2011-02-02 14:53:31 -08:00
exa.h Revert "dix: Remove usage_hint from pixmaps, store it in ->drawable.class" 2011-03-17 23:48:52 -07:00
Makefile.am exa: A simple 3rd backend implementation. 2009-08-06 23:48:14 +02:00