Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions fb/fbgc.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,24 @@ fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
pPriv->fg = pGC->fgPixel & mask;
pPriv->bg = pGC->bgPixel & mask;

/*
* Widening the planemask to cover the padding bits lets the blit and
* fill paths take their "all ones" shortcuts, but it also makes them
* write those bits. A rootless server keeps the alpha channel of its
* on screen windows opaque by clearing the alpha bits from the
* planemask (see miext/rootless/rootlessGC.c), and it can only do so
* from its own ValidateGC. mi revalidates the GC in the middle of a
* drawing operation for dashed lines, dashed arcs and opaque text,
* and by then the rootless funcs have been unwrapped by the damage
* layer, so that reassertion never happens. Leave the padding bits
* alone when they aren't part of the depth.
*/
#ifdef ROOTLESS_SAFEALPHA
if (pDrawable->depth == pDrawable->bitsPerPixel &&
(pGC->planemask & depthMask) == depthMask)
#else
if ((pGC->planemask & depthMask) == depthMask)
#endif
pPriv->pm = mask;
else
pPriv->pm = pGC->planemask & mask;
Expand Down
Loading