summaryrefslogtreecommitdiff
path: root/src/sna/fb
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-09-18 12:01:49 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-09-18 13:38:47 +0100
commit22c84d02ade83c39940d76fc616a9122e535606a (patch)
treeae85df6c424e5714467f568641390b7bbc3ec3f4 /src/sna/fb
parent71fa350325bb06a6141f89ef14431d96f0c4956a (diff)
sna: Remove special casing of drawing depth=1 glyphs
It turns out that they were not so special after all, and the "fast path" was missing the important handling such as validating the GC. As a result we ended up trying to render the glyphs through a planemask of 0 and similar garbage resulting in corruption. An example given by Kaus Dittrich was the use of rotated glyphs in gnuplot. Reported-by: Klaus Dittrich Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/fb')
-rw-r--r--src/sna/fb/fbgc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sna/fb/fbgc.c b/src/sna/fb/fbgc.c
index 0969040f..83956c41 100644
--- a/src/sna/fb/fbgc.c
+++ b/src/sna/fb/fbgc.c
@@ -159,6 +159,9 @@ fbValidateGC(GCPtr gc, unsigned long changes, DrawablePtr drawable)
mask = FbFullMask(drawable->bitsPerPixel);
depthMask = FbFullMask(drawable->depth);
+ DBG(("%s: computing rrop mask=%08x, depthMask=%08x, fg=%08x, bg=%08x, planemask=%08x\n",
+ __FUNCTION__, mask, depthMask, (int)gc->fgPixel, (int)gc->bgPixel, (int)gc->planemask));
+
pgc->fg = gc->fgPixel & mask;
pgc->bg = gc->bgPixel & mask;
@@ -178,6 +181,9 @@ fbValidateGC(GCPtr gc, unsigned long changes, DrawablePtr drawable)
pgc->xor = fbXor(gc->alu, pgc->fg, pgc->pm);
pgc->bgand = fbAnd(gc->alu, pgc->bg, pgc->pm);
pgc->bgxor = fbXor(gc->alu, pgc->bg, pgc->pm);
+
+ DBG(("%s: rrop fg=%08x, bg=%08x, pm=%08x, and=%08x, xor=%08x, bgand=%08x, bgxor=%08x\n",
+ __FUNCTION__, pgc->fg, pgc->bg, pgc->pm, pgc->and, pgc->xor, pgc->bgand, pgc->bgxor));
}
if (changes & GCDashList) {