summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-04-29 11:14:38 -0400
committerChris Michael <cp.michael@samsung.com>2015-04-29 11:14:38 -0400
commita3969b4d3ad2708b22248b7715dd5eb15fa78eac (patch)
treeb8db09385d8a8fc686a4ce973cb2934bb015ca6f /src/modules
parent34fd2cfa4a3befe09f4338cab9e0f2bcbefe1af0 (diff)
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.michael@samsung.com>
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_outbuf.c8
1 files 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,
332 { 332 {
333 if (!(img = ob->priv.onebuf)) 333 if (!(img = ob->priv.onebuf))
334 { 334 {
335 int bw = 0, bh = 0, bpl = 0; 335 int bw = 0, bh = 0;
336 void *data; 336 void *data;
337 337
338 if (!(data = _evas_shm_surface_data_get(ob->surface, &bw, &bh))) 338 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,
341 return NULL; 341 return NULL;
342 } 342 }
343 343
344 bpl = (bw * sizeof(int));
345
346#ifdef EVAS_CSERVE2 344#ifdef EVAS_CSERVE2
347 if (evas_cserve2_use_get()) 345 if (evas_cserve2_use_get())
348 { 346 {
349 img = (RGBA_Image *) 347 img = (RGBA_Image *)
350 evas_cache2_image_data(evas_common_image_cache2_get(), 348 evas_cache2_image_data(evas_common_image_cache2_get(),
351 bpl / sizeof(int), bh, data, 349 bw, bh, data,
352 ob->priv.destination_alpha, 350 ob->priv.destination_alpha,
353 EVAS_COLORSPACE_ARGB8888); 351 EVAS_COLORSPACE_ARGB8888);
354 } 352 }
@@ -357,7 +355,7 @@ _evas_outbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx,
357 { 355 {
358 img = (RGBA_Image *) 356 img = (RGBA_Image *)
359 evas_cache_image_data(evas_common_image_cache_get(), 357 evas_cache_image_data(evas_common_image_cache_get(),
360 bpl / sizeof(int), bh, data, 358 bw, bh, data,
361 ob->priv.destination_alpha, 359 ob->priv.destination_alpha,
362 EVAS_COLORSPACE_ARGB8888); 360 EVAS_COLORSPACE_ARGB8888);
363 361