diff options
author | Chris Michael <cp.michael@samsung.com> | 2015-04-29 11:14:38 -0400 |
---|---|---|
committer | Chris Michael <cp.michael@samsung.com> | 2015-04-29 11:14:38 -0400 |
commit | a3969b4d3ad2708b22248b7715dd5eb15fa78eac (patch) | |
tree | b8db09385d8a8fc686a4ce973cb2934bb015ca6f | |
parent | 34fd2cfa4a3befe09f4338cab9e0f2bcbefe1af0 (diff) | |
download | efl-a3969b4d3ad2708b22248b7715dd5eb15fa78eac.tar.gz |
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>
-rw-r--r-- | src/modules/evas/engines/wayland_shm/evas_outbuf.c | 8 |
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 ab1229940f..7b4fb9185c 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); |