devilhorns pushed a commit to branch master.

commit 036454746b1937789a2b2fe9d80f32661f6047fa
Author: Chris Michael <[email protected]>
Date:   Tue Apr 30 14:34:18 2013 +0100

    Fix update_region to use bpl from the buffer
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/modules/evas/engines/wayland_shm/evas_swapbuf.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/modules/evas/engines/wayland_shm/evas_swapbuf.c 
b/src/modules/evas/engines/wayland_shm/evas_swapbuf.c
index e48f39b..10dcdb7 100644
--- a/src/modules/evas/engines/wayland_shm/evas_swapbuf.c
+++ b/src/modules/evas/engines/wayland_shm/evas_swapbuf.c
@@ -151,21 +151,25 @@ evas_swapbuf_update_region_new(Outbuf *ob, int x, int y, 
int w, int h, int *cx,
      {
         if (!(img = ob->priv.onebuf))
           {
+             int bpl = 0;
              int bw = 0, bh = 0;
              void *data;
 
              data = evas_swapper_buffer_map(ob->priv.swapper, &bw, &bh);
+             bpl = (bw * sizeof(int));
 
 #ifdef EVAS_CSERVE2
              if (evas_cserve2_use_get())
                img = (RGBA_Image 
*)evas_cache2_image_data(evas_common_image_cache2_get(),
-                                                          bw, bh, data, 
+                                                          bpl / sizeof(int), 
bh, 
+                                                          data, 
                                                           
ob->priv.destination_alpha, 
                                                           
EVAS_COLORSPACE_ARGB8888);
              else
 #endif
                img = (RGBA_Image 
*)evas_cache_image_data(evas_common_image_cache_get(),
-                                                         bw, bh, data, 
+                                                         bpl / sizeof(int), 
bh, 
+                                                         data, 
                                                          
ob->priv.destination_alpha, 
                                                          
EVAS_COLORSPACE_ARGB8888);
 

-- 

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1

Reply via email to