summaryrefslogtreecommitdiff
path: root/src/modules
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 /src/modules
parentc0d990c7246cde1c3b7286b22670e2fc01fce00b (diff)
Evas sw_x11: Fix previous patches
Restore support for Evas GL with the software engine (OSMesa).
Diffstat (limited to 'src/modules')
-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)
625{ 625{
626 Render_Engine *re = (Render_Engine *)data; 626 Render_Engine *re = (Render_Engine *)data;
627 Evas_Native_Surface *ns = native; 627 Evas_Native_Surface *ns = native;
628 RGBA_Image *im = image, *im2 = NULL; 628 Image_Entry *ie = image, *ie2 = NULL;
629 Image_Entry *ie = image; 629 RGBA_Image *im = image;
630 630
631 if (!im || !ns) return im; 631 if (!im || !ns) return im;
632 632
@@ -656,10 +656,17 @@ eng_image_native_set(void *data EINA_UNUSED, void *image, void *native)
656 } 656 }
657 } 657 }
658 658
659 //create new im and clean already existed im even though ns = NULL 659 // Code from software_generic
660 im2 = (RGBA_Image *)evas_cache_image_data(evas_common_image_cache_get(), 660 if ((ns->type == EVAS_NATIVE_SURFACE_OPENGL) &&
661 ie->w, ie->h, NULL, ie->flags.alpha, 661 (ns->version == EVAS_NATIVE_SURFACE_VERSION))
662 EVAS_COLORSPACE_ARGB8888); 662 ie2 = evas_cache_image_data(evas_common_image_cache_get(),
663 ie->w, ie->h, ns->data.x11.visual, 1,
664 EVAS_COLORSPACE_ARGB8888);
665 else
666 ie2 = evas_cache_image_data(evas_common_image_cache_get(),
667 ie->w, ie->h, NULL, ie->flags.alpha,
668 EVAS_COLORSPACE_ARGB8888);
669
663 if (im->native.data) 670 if (im->native.data)
664 { 671 {
665 if (im->native.func.free) 672 if (im->native.func.free)
@@ -667,25 +674,25 @@ eng_image_native_set(void *data EINA_UNUSED, void *image, void *native)
667 } 674 }
668 675
669#ifdef EVAS_CSERVE2 676#ifdef EVAS_CSERVE2
670 if (evas_cserve2_use_get() && evas_cache2_image_cached(&im->cache_entry)) 677 if (evas_cserve2_use_get() && evas_cache2_image_cached(ie))
671 evas_cache2_image_close(&im->cache_entry); 678 evas_cache2_image_close(ie);
672 else 679 else
673#endif 680#endif
674 evas_cache_image_drop(&im->cache_entry); 681 evas_cache_image_drop(ie);
675 im = im2; 682 ie = ie2;
676 683
677#ifdef BUILD_ENGINE_SOFTWARE_XLIB 684#ifdef BUILD_ENGINE_SOFTWARE_XLIB
678 if (ns->type == EVAS_NATIVE_SURFACE_X11) 685 if (ns->type == EVAS_NATIVE_SURFACE_X11)
679 { 686 {
680 return evas_xlib_image_native_set(re->generic.ob, im, ns); 687 return evas_xlib_image_native_set(re->generic.ob, ie, ns);
681 } 688 }
682#endif 689#endif
683 if (ns->type == EVAS_NATIVE_SURFACE_TBM) 690 if (ns->type == EVAS_NATIVE_SURFACE_TBM)
684 { 691 {
685 return evas_native_tbm_image_set(re->generic.ob, im, ns); 692 return evas_native_tbm_image_set(re->generic.ob, ie, ns);
686 } 693 }
687 694
688 return im; 695 return ie;
689} 696}
690 697
691static void * 698static void *