Fix soft16 preload by replicating Image_Entry::info.
authorbarbieri <barbieri@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 16 Jul 2010 22:47:31 +0000 (22:47 +0000)
committerbarbieri <barbieri@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 16 Jul 2010 22:47:31 +0000 (22:47 +0000)
Software 16bpp variants were crashing if using preload as the
Image_Entry that was used by preload did not keep the loader and
module information, since these were only set in the
Soft16_Image::source.  Now we copy these members while the source is
live.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@50299 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/engines/common_16/evas_soft16_main.c

index 415d137..8177d28 100644 (file)
@@ -169,6 +169,7 @@ _evas_common_load_soft16_image_from_file(Image_Entry *ie)
    sim->cache_entry.w = sim->source->cache_entry.w;
    sim->cache_entry.h = sim->source->cache_entry.h;
    ie->flags.alpha = im->cache_entry.flags.alpha;
+   sim->cache_entry.info = im->cache_entry.info;
    if (sim->stride < 0) sim->stride = _calc_stride(sim->cache_entry.w);
 
    return 0;
@@ -288,6 +289,8 @@ _evas_common_load_soft16_image_data_from_file(Image_Entry *ie)
           soft16_image_convert_from_rgb(im, sp);
      }
    evas_cache_image_drop(&im->source->cache_entry);
+   im->cache_entry.info.module = NULL;
+   im->cache_entry.info.loader = NULL;
    im->source = NULL;
 
    return 0;