forked from enlightenment/efl
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:
parent
34fd2cfa4a
commit
a3969b4d3a
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue