summaryrefslogtreecommitdiff
path: root/legacy/evas/src/modules/engines/gl_sdl/evas_engine.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2011-05-19 11:19:22 +0000
committerCarsten Haitzler <raster@rasterman.com>2011-05-19 11:19:22 +0000
commit4dd1d5cf62e51e81e4eac3a9f71a42fe1819600b (patch)
treebe45926476d862edfecc85d786fee1fa0e16d588 /legacy/evas/src/modules/engines/gl_sdl/evas_engine.c
parent359e67f68a6ad865acea81308b123faf8d06751d (diff)
fix load of data to ACTUALLY set the load error in evas's image
objects. including preload. SVN revision: 59529
Diffstat (limited to '')
-rw-r--r--legacy/evas/src/modules/engines/gl_sdl/evas_engine.c47
1 files changed, 43 insertions, 4 deletions
diff --git a/legacy/evas/src/modules/engines/gl_sdl/evas_engine.c b/legacy/evas/src/modules/engines/gl_sdl/evas_engine.c
index 27a49f3362..19bb6407f3 100644
--- a/legacy/evas/src/modules/engines/gl_sdl/evas_engine.c
+++ b/legacy/evas/src/modules/engines/gl_sdl/evas_engine.c
@@ -637,24 +637,27 @@ eng_image_dirty_region(void *data, void *image, int x, int y, int w, int h)
637} 637}
638 638
639static void * 639static void *
640eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data) 640eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data, int *err)
641{ 641{
642 Render_Engine *re; 642 Render_Engine *re;
643 Evas_GL_Image *im; 643 Evas_GL_Image *im;
644 644 int error;
645
645 re = (Render_Engine *)data; 646 re = (Render_Engine *)data;
646 if (!image) 647 if (!image)
647 { 648 {
648 *image_data = NULL; 649 *image_data = NULL;
650 if (err) *err = EVAS_LOAD_ERROR_GENERIC;
649 return NULL; 651 return NULL;
650 } 652 }
651 im = image; 653 im = image;
652 if (im->native.data) 654 if (im->native.data)
653 { 655 {
654 *image_data = NULL; 656 *image_data = NULL;
657 if (err) *err = EVAS_LOAD_ERROR_NONE;
655 return im; 658 return im;
656 } 659 }
657 evas_cache_image_load_data(&im->im->cache_entry); 660 error = evas_cache_image_load_data(&im->im->cache_entry);
658 switch (im->cs.space) 661 switch (im->cs.space)
659 { 662 {
660 case EVAS_COLORSPACE_ARGB8888: 663 case EVAS_COLORSPACE_ARGB8888:
@@ -670,7 +673,8 @@ eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data)
670 if (!im_new) 673 if (!im_new)
671 { 674 {
672 *image_data = NULL; 675 *image_data = NULL;
673 return im; 676 if (err) *err = error;
677 return im;
674 } 678 }
675 evas_gl_common_image_free(im); 679 evas_gl_common_image_free(im);
676 im = im_new; 680 im = im_new;
@@ -688,6 +692,7 @@ eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data)
688 abort(); 692 abort();
689 break; 693 break;
690 } 694 }
695 if (err) *err = error;
691 return im; 696 return im;
692} 697}
693 698
@@ -854,6 +859,17 @@ eng_canvas_alpha_get(void *data __UNUSED__, void *info __UNUSED__)
854} 859}
855 860
856static int 861static int
862eng_image_load_error_get(void *data __UNUSED__, void *image)
863{
864 Evas_GL_Image *im;
865
866 if (!image) return EVAS_LOAD_ERROR_NONE;
867 im = image;
868 return im->im->cache_entry.load_error;
869}
870
871
872static int
857module_open(Evas_Module *em) 873module_open(Evas_Module *em)
858{ 874{
859 if (!em) return 0; 875 if (!em) return 0;
@@ -917,6 +933,10 @@ module_open(Evas_Module *em)
917 ORD(image_colorspace_get); 933 ORD(image_colorspace_get);
918 ORD(image_native_set); 934 ORD(image_native_set);
919 ORD(image_native_get); 935 ORD(image_native_get);
936// ORD(image_draw_filtered);
937// ORD(image_filtered_get);
938// ORD(image_filtered_save);
939// ORD(image_filtered_free);
920 ORD(font_draw); 940 ORD(font_draw);
921 941
922 ORD(image_scale_hint_set); 942 ORD(image_scale_hint_set);
@@ -925,6 +945,25 @@ module_open(Evas_Module *em)
925 ORD(image_map_draw); 945 ORD(image_map_draw);
926 ORD(image_map_surface_new); 946 ORD(image_map_surface_new);
927 ORD(image_map_surface_free); 947 ORD(image_map_surface_free);
948
949// ORD(image_content_hint_set);
950// ORD(image_content_hint_get);
951
952// ORD(image_cache_flush);
953// ORD(image_cache_set);
954// ORD(image_cache_get);
955
956// ORD(gl_surface_create);
957// ORD(gl_surface_destroy);
958// ORD(gl_context_create);
959// ORD(gl_context_destroy);
960// ORD(gl_make_current);
961// ORD(gl_proc_address_get);
962// ORD(gl_native_surface_get);
963
964// ORD(gl_api_get);
965
966 ORD(image_load_error_get);
928 967
929 /* now advertise out own api */ 968 /* now advertise out own api */
930 em->functions = (void *)(&func); 969 em->functions = (void *)(&func);