[PULL] Various render changes

Soeren Sandmann sandmann at cs.au.dk
Wed Apr 20 03:54:38 PDT 2011


Keith Packard <keithp at keithp.com> writes:

>> Yes, apparently I did, and also a few in the rootless code. I'll send a
>> new version pending the outcome of the discussion below.
>
> Thanks.

New version to follow.

>> Yes, eventually, I think we should. There are currently a few features
>> of the server regions that Pixman doesn't provide:
>> 
>> - There is no pixman_region_validate()
>
> This was a semi-interesting optimization when we had toolkits creating
> hundreds or thousands of windows. Having something which was explicitly
> an invalid region would be a lot cleaner API than this mess.

The function pixman_region_validate() exists in pixman, it's just not
exported. Without a more comprehensive overhaul of the pixman region
API, we might as well just export it even though it's ugly.

>> - The server uses 16 bit regions, but I think they do overflow in some
>>   cases, such as when calling CopyArea on a large pixmap. We might want
>>   to switch to 32 bit regions.
>
> The server has a million checks all over the place to try and avoid
> overflowing 16 bit regions. The only reason for using 16 bit regions was
> memory, so we should probably do a bit of instrumentation to find out
> what the memory impact would be. As above, I suspect with modern
> toolkits using few windows that we just wouldn't see the same memory
> usage anymore.

There are almost certainly cases where the server needs to turn regions
into lists of 16 bit boxes for protocol reasons - those would be
somewhat less efficient with 32 bit regions.
>
>> - Pixman's region API is not all that great, in part because it was
>>   inherited from the server, in part because it grew some idiosyncrasies
>>   of its own. At some point rethinking the pixman API entirely will be
>>   desirable.
>
> If you're thinking of reworking that API, I'd like that to happen before
> we switch the X server over...

I don't have concrete plans to reworking the pixman API, just a vague
idea that it will be useful at some point. If it happens, the new pixman
would be parallel-installable with the old one, so that the server could
be updated at its conveneince.


Soren


More information about the xorg-devel mailing list