glamor: Fallback to fbPolylines for diagonal poly_line.

It's better to give a correct output when we haven't
implement all the code path.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
This commit is contained in:
Zhigang Gong 2011-06-10 16:51:27 +08:00
parent d7f8b888d0
commit a0a52be739

View File

@ -76,17 +76,13 @@ glamor_poly_lines(DrawablePtr drawable, GCPtr gc, int mode, int n,
x2 = points[i + 1].x; x2 = points[i + 1].x;
y2 = points[i + 1].y; y2 = points[i + 1].y;
} }
if (x1 != x2 && y1 != y2) { if (x1 != x2 && y1 != y2) {
PixmapPtr pixmap = glamor_get_drawable_pixmap(drawable); PixmapPtr pixmap = glamor_get_drawable_pixmap(drawable);
free(rects); free(rects);
glamor_fallback("stub diagonal poly_line\n");
ErrorF("stub diagonal poly_line\n"); goto fail;
glamor_solid_fail_region(pixmap, x1, y1, x2 - x1, y2 - y1);
return; return;
} }
if (x1 < x2) { if (x1 < x2) {
rects[i].x = x1; rects[i].x = x1;
rects[i].width = x2 - x1 + 1; rects[i].width = x2 - x1 + 1;