[PATCH xserver 3/4] exa: Remove some nonsense code from ValidateGC

Adam Jackson ajax at redhat.com
Wed Mar 1 19:05:06 UTC 2017


On Thu, 2017-03-02 at 01:04 +0900, Michel Dänzer wrote:
> On 02/03/17 12:33 AM, Adam Jackson wrote:
> > 
> > -
> > -        /* Sometimes tile pixmaps are swapped, you need access to:
> > -         * - The current tile if it depth matches.
> > -         * - Or the rotated tile if that one matches depth and !(changes & GCTile).
> > -         * - Or the current tile pixmap and a newly created one.
> > -         */
> > -        if (pTile && pTile->drawable.depth != pDrawable->depth &&
> > -            !(changes & GCTile)) {
> > -            PixmapPtr pRotatedTile = fbGetRotatedPixmap(pGC);
> > -
> > -            if (pRotatedTile &&
> > -                pRotatedTile->drawable.depth == pDrawable->depth)
> > -                pTile = pRotatedTile;
> > -            else
> > -                finish_current_tile = TRUE;     /* CreatePixmap will be called. */
> > -        }
> 
> This makes finish_current_tile == FALSE always, so that and
> corresponding code is dead and can be removed as well.

Mmm, that's weird though. After this change the code is is "if have
tile pixmap, prepare access; call down to fbValidateGC; if have tile
pixmap && false, finish access". I can't imagine leaving the tile
prepared is the intent, but that also means the pre-existing exa code
is perhaps wrong as well.

I also missed that, once this series is applied, pRotatedPixmap is
entirely unused. Neat!

- ajax


More information about the xorg-devel mailing list