[PATCH 2/2] damageext: Xineramify (v4)

Adam Jackson ajax at redhat.com
Wed Oct 9 09:27:21 PDT 2013


On Tue, 2013-10-08 at 15:28 -0700, Aaron Plattner wrote:
> On 10/02/2013 08:56 AM, Adam Jackson wrote:

> >   static int
> > -ProcDamageCreate(ClientPtr client)
> > +doDamageCreate(ClientPtr client, XID reportDrawable, XID reportDamage,
> > +               DamageReportFunc reportFunc)
> >   {
> >       DrawablePtr pDrawable;
> >       DamageExtPtr pDamageExt;
> >       DamageReportLevel level;
> > -    RegionPtr pRegion;
> >       int rc;
> >
> >       REQUEST(xDamageCreateReq);
> > -
> >       REQUEST_SIZE_MATCH(xDamageCreateReq);
> 
> Doesn't hurt, but the callers have to do this anyway making this 
> redundant, don't they?

Yeah, the size match can go.

> > +    FOR_NSCREENS_BACKWARD(i) {
> > +        if ((stuff->damage = damage->info[i].id)) {
> 
> Clever, which means I had to read it a few times.  How horrible would
> 
>    stuff->damage = damage->info[i].id;
>    if (stuff->damage) {
>        ...
>    }
> 
> be, to make it clearer?

Heh, yeah, fair enough.

> > +void
> > +PanoramiXDamageInit(void)
> > +{
> > +    XRT_DAMAGE = CreateNewResourceType(XineramaDeleteResource,
> > +                                       "XineramaDamage");
> 
> Maybe FatalError if this fails?

Indeed.

- ajax



More information about the xorg-devel mailing list