if (!im || !ns) return im;
- im2 = evas_cache_image_data(evas_common_image_cache_get(),
- im->w, im->h,
- NULL, 1,
- EVAS_COLORSPACE_ARGB8888);
+ if ((ns->type == EVAS_NATIVE_SURFACE_OPENGL) &&
+ (ns->version == EVAS_NATIVE_SURFACE_VERSION))
+ im2 = evas_cache_image_data(evas_common_image_cache_get(),
+ im->w, im->h,
+ ns->data.x11.visual, 1,
+ EVAS_COLORSPACE_ARGB8888);
+ else
+ im2 = evas_cache_image_data(evas_common_image_cache_get(),
+ im->w, im->h,
+ NULL, 1,
+ EVAS_COLORSPACE_ARGB8888);
if (im->references > 1)
ERR("Setting native with more than one references for im=%p", im);
if (!sfc) return 0;
+ printf("free buf %p\n", sfc->buffer);
if (sfc->buffer) free(sfc->buffer);
free(sfc);
ns->type = EVAS_NATIVE_SURFACE_OPENGL;
ns->version = EVAS_NATIVE_SURFACE_VERSION;
ns->data.x11.visual = sfc->buffer;
-
+
return 1;
#else
(void) surface;