[PATCH 1/4] Move region implementation from mi to dix.

Soeren Sandmann sandmann at daimi.au.dk
Fri May 21 18:05:56 PDT 2010


Keith Packard <keithp at keithp.com> writes:

> There isn't any reason to have this in mi. Everything except the file
> rename was done with the included script 'fix-miregion'.

Didn't realize that the "hand-rolled changes" commit used to be part
of this. The comment I have on that part is that it seems to preserve
the macro versions of some ops rather than the function versions. For
example, I think it would be better to have this:

     void
     miRegionInit(RegionPtr pReg, BoxPtr rect, int size)
     {
         if (rect)
            pixman_region_init_with_extents (pReg, rect);
         else
            pixman_region_init (pReg);
     }

as an inline function rather than the version where those two pixman
functions are manually inlined.

Similarly, these functions

           RegionUninit
           RegionReset
           RegionNotEmpty
           RegionEmpty          -> !RegionNotEmpty

could just call the pixman equivalent like most of the other Region*
API.


Søren


More information about the xorg-devel mailing list