devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a3969b4d3ad2708b22248b7715dd5eb15fa78eac

commit a3969b4d3ad2708b22248b7715dd5eb15fa78eac
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Wed Apr 29 11:14:38 2015 -0400

    evas-wayland-shm: Use size of buffer when caching
    
    Summary: evas_cache and evas_cache2 are expecting the width of the
    buffer when caching so just use that directly rather than calculating
    bpl.
    
    @fix
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 src/modules/evas/engines/wayland_shm/evas_outbuf.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/modules/evas/engines/wayland_shm/evas_outbuf.c 
b/src/modules/evas/engines/wayland_shm/evas_outbuf.c
index ab12299..7b4fb91 100644
--- a/src/modules/evas/engines/wayland_shm/evas_outbuf.c
+++ b/src/modules/evas/engines/wayland_shm/evas_outbuf.c
@@ -332,7 +332,7 @@ _evas_outbuf_update_region_new(Outbuf *ob, int x, int y, 
int w, int h, int *cx,
      {
         if (!(img = ob->priv.onebuf))
           {
-             int bw = 0, bh = 0, bpl = 0;
+             int bw = 0, bh = 0;
              void *data;
 
              if (!(data = _evas_shm_surface_data_get(ob->surface, &bw, &bh)))
@@ -341,14 +341,12 @@ _evas_outbuf_update_region_new(Outbuf *ob, int x, int y, 
int w, int h, int *cx,
                   return NULL;
                }
 
-             bpl = (bw * sizeof(int));
-
 #ifdef EVAS_CSERVE2
              if (evas_cserve2_use_get())
                {
                   img = (RGBA_Image *)
                     evas_cache2_image_data(evas_common_image_cache2_get(),
-                                           bpl / sizeof(int), bh, data,
+                                           bw, bh, data,
                                            ob->priv.destination_alpha,
                                            EVAS_COLORSPACE_ARGB8888);
                }
@@ -357,7 +355,7 @@ _evas_outbuf_update_region_new(Outbuf *ob, int x, int y, 
int w, int h, int *cx,
                {
                   img = (RGBA_Image *)
                     evas_cache_image_data(evas_common_image_cache_get(),
-                                          bpl / sizeof(int), bh, data,
+                                          bw, bh, data,
                                           ob->priv.destination_alpha,
                                           EVAS_COLORSPACE_ARGB8888);
 

-- 


Reply via email to