From f4da5922d357371ac5f578364c64add979cf7443 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Thu, 14 Feb 2013 10:39:59 +0000 Subject: [PATCH] swapper -> use buf pitch, not swp->w * 4 ... if we have a buf and pitch. :) (tnks wonsik!) SVN revision: 83889 --- src/modules/evas/engines/software_x11/evas_xlib_swapper.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/evas/engines/software_x11/evas_xlib_swapper.c b/src/modules/evas/engines/software_x11/evas_xlib_swapper.c index 581f14097f..47468c9485 100644 --- a/src/modules/evas/engines/software_x11/evas_xlib_swapper.c +++ b/src/modules/evas/engines/software_x11/evas_xlib_swapper.c @@ -688,7 +688,11 @@ evas_xlib_swapper_buffer_map(X_Swapper *swp, int *bpl, int *w, int *h) if (swp->mapped) { - if (bpl) *bpl = swp->w * 4; + if (bpl) + { + if ((swp->buf) && (swp->buf->pitch > 0)) *bpl = swp->buf->pitch; + else *bpl = swp->w * 4; + } return swp->buf_data; } swp->buf = sym_DRI2GetBuffers(swp->disp, swp->draw,