forked from enlightenment/efl
Evas (Wayland_Shm Engine): Check for valid RGBA_Image before trying to
use it. Use correct stride calculation for bytes. SVN revision: 66539
This commit is contained in:
parent
810cf11241
commit
b560f1fc1a
|
@ -54,8 +54,11 @@ evas_outbuf_new_region_for_update(Outbuf *ob, int x, int y, int w, int h, int *c
|
||||||
|
|
||||||
*cx = 0; *cy = 0; *cw = w; *ch = h;
|
*cx = 0; *cy = 0; *cw = w; *ch = h;
|
||||||
im = (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get());
|
im = (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get());
|
||||||
im->cache_entry.flags.alpha = 1;
|
if (im)
|
||||||
im = (RGBA_Image *)evas_cache_image_size_set(&im->cache_entry, w, h);
|
{
|
||||||
|
im->cache_entry.flags.alpha = 1;
|
||||||
|
im = (RGBA_Image *)evas_cache_image_size_set(&im->cache_entry, w, h);
|
||||||
|
}
|
||||||
|
|
||||||
return im;
|
return im;
|
||||||
}
|
}
|
||||||
|
@ -77,7 +80,7 @@ evas_outbuf_push_updated_region(Outbuf *ob, RGBA_Image *update, int x __UNUSED__
|
||||||
DATA32 *dst, *src;
|
DATA32 *dst, *src;
|
||||||
int yy = 0, bytes = 0;
|
int yy = 0, bytes = 0;
|
||||||
|
|
||||||
bytes = (h * (w * sizeof(DATA32)));
|
bytes = ((w * sizeof(int)) * h);
|
||||||
for (yy = 0; yy < h; yy++)
|
for (yy = 0; yy < h; yy++)
|
||||||
{
|
{
|
||||||
src = update->image.data + (yy * update->cache_entry.w);
|
src = update->image.data + (yy * update->cache_entry.w);
|
||||||
|
|
Loading…
Reference in New Issue