summaryrefslogtreecommitdiff
path: root/src/sna/sna_accel.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2015-05-17 20:45:25 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2015-05-18 09:05:30 +0100
commitb10ef9cf5c9cc844f432e9024deeb78fa1034a8e (patch)
treede92d6fe730f1514f3396f69e55d0a948c1f94cb /src/sna/sna_accel.c
parent6d64063750535f1c2b94e075d1d525ed289821aa (diff)
sna/glyphs: Improve handling of low bitdepth mask format conversions
We shouldn't just discard the mask if the user requests that we render the glyphs through a low bitdepth mask - and in doing so we should also be careful not to improve the bitdepth of that mask (since we don't take into account the extra quantisation desired). Testcase: render-glyphs Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_accel.c')
-rw-r--r--src/sna/sna_accel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index af98301e..c79af6ac 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -817,8 +817,8 @@ create_pixmap(struct sna *sna, ScreenPtr screen,
datasize += adjust;
}
- DBG(("%s: allocating pixmap %dx%d, depth=%d, size=%ld\n",
- __FUNCTION__, width, height, depth, (long)datasize));
+ DBG(("%s: allocating pixmap %dx%d, depth=%d/%d, size=%ld\n",
+ __FUNCTION__, width, height, depth, bpp, (long)datasize));
pixmap = AllocatePixmap(screen, datasize);
if (!pixmap)
return NullPixmap;
@@ -4091,7 +4091,7 @@ sna_pixmap_create_upload(ScreenPtr screen,
assert(width);
assert(height);
- if (depth == 1)
+ if (depth < 8)
return create_pixmap(sna, screen, width, height, depth,
CREATE_PIXMAP_USAGE_SCRATCH);