[PULL] Various render changes

Soeren Sandmann sandmann at cs.au.dk
Thu Apr 14 21:41:20 PDT 2011


Keith Packard <keithp at keithp.com> writes:

> On Thu, 07 Apr 2011 19:41:33 +0200, Soeren Sandmann <sandmann at cs.au.dk> wrote:
>
>> Søren Sandmann Pedersen (8):
>>       Track damage for fbTrapezoids() and fbTriangles().
>>       Add RegionInitBoxes(), and fix some buggy callers of RegionInit().
>>       Make RegionInit() and RegionCreate() take just a box and no size
>
> Did you miss glx/glxdri2.c? I'm getting compile errors with that file.

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.

> Also, if REGION_INIT is going to ignore an argument, you should simply
> remove it from the API.

Well, the REGION_* macros were introduced in 

    7ef612de784daaed09ba13f4615c10714614033f

to preserve source compatibility when the pScreen argument went away, so
changing their signature would make them pointless. If we are going to
do that, why not delete them entirely? I would be fine with that, but it
would belong in a different commit than this one.

> Do we want to just use the pixmap signatures here? RegionInitWithExtents
> and RegionInit?

I don't have a strong opinion on that.

> Are we eventually going to just use the pixman API directly?

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()

- Pixman doesn't have malloc'ed regions, like the ones povided by
  RegionCreate().

Both could be fixed in pixman. It would also be possible to keep the
mallocing wrappers in the server. Pixman API additions will have to wait
until pixman 0.24.0 which would ordinarily come out in November (0.22.0
is due in two weeks), but if we want to fix the regions in 1.11, a
shorter release cycle for 0.24 would be fine with me.

Other questions include:

- 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.

- 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.

>>       render: Delete PictureGradientColor()

> Reviewed-by: Keith Packard <keithp at keithp.com>

>>       render: Remove unused fields in the source picture structs

> Reviewed-by: Keith Packard <keithp at keithp.com>

>>       render: Remove unused TriStrip and TriFan typedefs

> Reviewed-by: Keith Packard <keithp at keithp.com>

>>       fb: Call miCompositeSourceValidate() on the source in fbShapes()

> Reviewed-by: Keith Packard <keithp at keithp.com>

Thanks for the reviews. I have put the reviewed patches here:

    git://anongit.freedesktop.org/~sandmann/xserver for-keithp

>>       Fix trapezoid and triangle rendering to windows
>
> My brain is full.

This one is getting urgent.

I don't want to force the issue, but I am going to release pixman 0.21.8
with the corresponding pixman patch in it on Monday at the latest. When
that happens, the combination of git X server and pixman 0.21.8 will
have broken trapezoid rendering. Someone may bisect it down to
788ccb9a8bcf6a4f and ask to revert that, but the correct fix is the
patch above. I'll send it a third time as a follow-up to this mail.


Soren


More information about the xorg-devel mailing list