[PATCH xserver 2/3] glamor: Accelerate up XY pixmap putimage a little

Adam Jackson ajax at redhat.com
Mon Oct 3 18:59:09 UTC 2016


On Fri, 2016-09-30 at 22:44 -0700, Keith Packard wrote:

> +    /* copy mode for the first plane to clear all of the other bits */
> +    gcv[0].val = GXcopy;
> +    gcv[1].val = gc->fgPixel;
> +    gcv[2].val = gc->bgPixel;
> +    ChangeGC(NullClient, temp_gc, GCFunction|GCForeground|GCBackground, gcv);

You don't need to set GCFunction here, the scratch gc already has
GXcopy set.

You _do_ need to copy GCPlanemask from the source gc, because for
XYPixmap PutImage that determines how many planes of data were given;
if you let it stay as FB_ALLONES when it should only be, say, 0x3,
you'll read in 30 planes of garbage.

- ajax


More information about the xorg-devel mailing list