swapper -> use buf pitch, not swp->w * 4 ... if we have a buf and
authorCarsten Haitzler <raster@rasterman.com>
Thu, 14 Feb 2013 10:39:59 +0000 (10:39 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Thu, 14 Feb 2013 10:39:59 +0000 (10:39 +0000)
pitch. :) (tnks wonsik!)

SVN revision: 83889

src/modules/evas/engines/software_x11/evas_xlib_swapper.c

index 581f140..47468c9 100644 (file)
@@ -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,