Adam Jackson <[email protected]> writes: > The comment in CreateGCperDepth here is wrong, there is already a 1bpp > entry in the pixmap format list.
Yeah, but I don't think numDepths includes bitmaps; it's computed only
From visuals in miInitVisuals:
ndepth = 0;
for (visuals = miVisuals; visuals; visuals = nextVisuals) {
nextVisuals = visuals->next;
ndepth++;
nvisual += visuals->count;
}
And that's why all of these loops are
for (i = 0; i <= pScreen->numDepths; i++)
as the depth 1 entry is at 0. So, we either need to add depth 1 to the
numDepths array (which would mess up the visual stuff), or continue to
special case it for scratch GCs.
When the server has depth-1 windows, we end up with two scratch
GCs. And, the scratch GC code will actually use them if you need two
at a time. Weird stuff. And was this way all the way back to X11R1.
I'd say don't mess with this.
--
-keith
signature.asc
Description: PGP signature
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
