Use the width & height from the buffer (actual image size) when

calling evas cache image data.
When we push an updated region, be sure to account for the rectangle
position during the conversion function.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2013-04-29 11:29:33 +01:00
parent 66d258d17b
commit 672a2e36e3
1 changed files with 5 additions and 5 deletions

View File

@ -151,20 +151,21 @@ evas_swapbuf_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;
void *data;
data = evas_swapper_buffer_map(ob->priv.swapper, NULL, NULL);
data = evas_swapper_buffer_map(ob->priv.swapper, &bw, &bh);
#ifdef EVAS_CSERVE2
if (evas_cserve2_use_get())
img = (RGBA_Image *)evas_cache2_image_data(evas_common_image_cache2_get(),
ob->w, ob->h, data,
bw, bh, data,
ob->priv.destination_alpha,
EVAS_COLORSPACE_ARGB8888);
else
#endif
img = (RGBA_Image *)evas_cache_image_data(evas_common_image_cache_get(),
ob->w, ob->h, data,
bw, bh, data,
ob->priv.destination_alpha,
EVAS_COLORSPACE_ARGB8888);
@ -312,7 +313,6 @@ evas_swapbuf_update_region_push(Outbuf *ob, RGBA_Image *update, int x, int y, in
/* check for valid update image data */
if (!(src = update->image.data)) return;
bpp = depth / 8;
if (bpp <= 0) return;
@ -360,7 +360,7 @@ evas_swapbuf_update_region_push(Outbuf *ob, RGBA_Image *update, int x, int y, in
dst += (bpl * rect.y) + (rect.x * bpp);
func(src, dst, (update->cache_entry.w - w), (wid - rect.w),
rect.w, rect.h, x, y, NULL);
rect.w, rect.h, x + rx, y + ry, NULL);
}
void