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>
This commit is contained in:
Chris Michael 2015-04-29 11:14:38 -04:00
parent 34fd2cfa4a
commit a3969b4d3a
1 changed files with 3 additions and 5 deletions

View File

@ -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);