summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-02-10 15:02:31 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-02-10 15:10:23 +0900
commit47026701460e30a9f1b34e857372724d3d12dc0b (patch)
tree15bd71c0108b1877121e5144e2d02a0019ae5e84
parentc0d990c7246cde1c3b7286b22670e2fc01fce00b (diff)
downloadefl-47026701460e30a9f1b34e857372724d3d12dc0b.tar.gz
Evas sw_x11: Fix previous patches
Restore support for Evas GL with the software engine (OSMesa).
-rw-r--r--src/modules/evas/engines/software_x11/evas_engine.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/src/modules/evas/engines/software_x11/evas_engine.c b/src/modules/evas/engines/software_x11/evas_engine.c
index acc4412045..42edec219c 100644
--- a/src/modules/evas/engines/software_x11/evas_engine.c
+++ b/src/modules/evas/engines/software_x11/evas_engine.c
@@ -625,8 +625,8 @@ eng_image_native_set(void *data EINA_UNUSED, void *image, void *native)
{
Render_Engine *re = (Render_Engine *)data;
Evas_Native_Surface *ns = native;
- RGBA_Image *im = image, *im2 = NULL;
- Image_Entry *ie = image;
+ Image_Entry *ie = image, *ie2 = NULL;
+ RGBA_Image *im = image;
if (!im || !ns) return im;
@@ -656,10 +656,17 @@ eng_image_native_set(void *data EINA_UNUSED, void *image, void *native)
}
}
- //create new im and clean already existed im even though ns = NULL
- im2 = (RGBA_Image *)evas_cache_image_data(evas_common_image_cache_get(),
- ie->w, ie->h, NULL, ie->flags.alpha,
- EVAS_COLORSPACE_ARGB8888);
+ // Code from software_generic
+ if ((ns->type == EVAS_NATIVE_SURFACE_OPENGL) &&
+ (ns->version == EVAS_NATIVE_SURFACE_VERSION))
+ ie2 = evas_cache_image_data(evas_common_image_cache_get(),
+ ie->w, ie->h, ns->data.x11.visual, 1,
+ EVAS_COLORSPACE_ARGB8888);
+ else
+ ie2 = evas_cache_image_data(evas_common_image_cache_get(),
+ ie->w, ie->h, NULL, ie->flags.alpha,
+ EVAS_COLORSPACE_ARGB8888);
+
if (im->native.data)
{
if (im->native.func.free)
@@ -667,25 +674,25 @@ eng_image_native_set(void *data EINA_UNUSED, void *image, void *native)
}
#ifdef EVAS_CSERVE2
- if (evas_cserve2_use_get() && evas_cache2_image_cached(&im->cache_entry))
- evas_cache2_image_close(&im->cache_entry);
+ if (evas_cserve2_use_get() && evas_cache2_image_cached(ie))
+ evas_cache2_image_close(ie);
else
#endif
- evas_cache_image_drop(&im->cache_entry);
- im = im2;
+ evas_cache_image_drop(ie);
+ ie = ie2;
#ifdef BUILD_ENGINE_SOFTWARE_XLIB
if (ns->type == EVAS_NATIVE_SURFACE_X11)
{
- return evas_xlib_image_native_set(re->generic.ob, im, ns);
+ return evas_xlib_image_native_set(re->generic.ob, ie, ns);
}
#endif
if (ns->type == EVAS_NATIVE_SURFACE_TBM)
{
- return evas_native_tbm_image_set(re->generic.ob, im, ns);
+ return evas_native_tbm_image_set(re->generic.ob, ie, ns);
}
- return im;
+ return ie;
}
static void *