From 212731a41af62ceda58e3736334dc718ab9b2473 Mon Sep 17 00:00:00 2001 From: barbieri Date: Tue, 17 Mar 2009 20:57:02 +0000 Subject: [PATCH] fix image_data_put on software 16 bits engine. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@39537 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/engines/common_16/evas_soft16_main.c | 2 ++ src/modules/engines/software_16/evas_engine.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/engines/common_16/evas_soft16_main.c b/src/lib/engines/common_16/evas_soft16_main.c index a4b9a5c..2966ebe 100644 --- a/src/lib/engines/common_16/evas_soft16_main.c +++ b/src/lib/engines/common_16/evas_soft16_main.c @@ -232,6 +232,8 @@ _evas_common_soft16_image_from_data(Image_Entry* ie_dst, int w, int h, DATA32 *i im->flags.free_pixels = 0; im->flags.free_alpha = 0; + if (im->stride < 0) + im->stride = _calc_stride(w); /* FIXME: That's bad, the application must be aware of the engine internal. */ im->pixels = (DATA16 *) image_data; diff --git a/src/modules/engines/software_16/evas_engine.c b/src/modules/engines/software_16/evas_engine.c index ee8366e..93e4af8 100644 --- a/src/modules/engines/software_16/evas_engine.c +++ b/src/modules/engines/software_16/evas_engine.c @@ -610,7 +610,7 @@ eng_image_data_put(void *data __UNUSED__, void *image, DATA32 *image_data) old_im = image; if ((DATA16 *)image_data == old_im->pixels) return old_im; - new_im = (Soft16_Image *) evas_cache_image_copied_data(evas_common_soft16_image_cache_get(), old_im->cache_entry.w, old_im->cache_entry.h, image_data, old_im->cache_entry.flags.alpha, EVAS_COLORSPACE_RGB565_A5P); + new_im = (Soft16_Image *) evas_cache_image_data(evas_common_soft16_image_cache_get(), old_im->cache_entry.w, old_im->cache_entry.h, image_data, old_im->cache_entry.flags.alpha, EVAS_COLORSPACE_RGB565_A5P); evas_cache_image_drop(&old_im->cache_entry); return new_im; } -- 2.7.4