sna: Fix reversal of zero/wide for PolyRectangle

Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42414
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2011-10-31 11:56:53 +00:00
parent b1287e4934
commit 9a2e59bfba
1 changed files with 4 additions and 8 deletions

View File

@ -4247,7 +4247,7 @@ sna_poly_rectangle_blt(DrawablePtr drawable,
struct kgem_bo *bo,
struct sna_damage **damage,
GCPtr gc, int n, xRectangle *r,
const BoxRec *extents, bool clipped)
const BoxRec *extents, unsigned clipped)
{
struct sna *sna = to_sna_from_drawable(drawable);
PixmapPtr pixmap = get_drawable_pixmap(drawable);
@ -4255,24 +4255,20 @@ sna_poly_rectangle_blt(DrawablePtr drawable,
BoxRec boxes[512], *b = boxes, *const last_box = boxes+ARRAY_SIZE(boxes);
int16_t dx, dy;
static void * const jump[] = {
&&zero,
&&zero_clipped,
&&wide,
&&zero,
&&wide_clipped,
&&zero_clipped,
};
unsigned v;
DBG(("%s: alu=%d, width=%d, fg=%08lx, damge=%p, clipped?=%d\n",
__FUNCTION__, gc->alu, gc->lineWidth, gc->fgPixel, damage, clipped));
if (!sna_fill_init_blt(&fill, sna, pixmap, bo, gc->alu, gc->fgPixel))
return FALSE;
get_drawable_deltas(drawable, pixmap, &dx, &dy);
v = !!clipped;
v |= (gc->lineWidth <= 1) << 1;
goto *jump[v];
goto *jump[(gc->lineWidth <= 1) | clipped];
zero:
dx += drawable->x;