summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-11-19 18:54:36 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-11-19 18:54:36 +0900
commit9afe5ffb9dd7b9cf2ea151e2ae7f7e70724c5e62 (patch)
treeb40ef4306c2efe5dbe680b05335ab0952cb50d8b
parentbbe94252371396136a5dc011fe7374d9d53d4ee8 (diff)
Evas: Cosmetic changes in evas_gl_image
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_image.c66
1 files changed, 26 insertions, 40 deletions
diff --git a/src/modules/evas/engines/gl_common/evas_gl_image.c b/src/modules/evas/engines/gl_common/evas_gl_image.c
index 1192bbef9d..9e852bbced 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_image.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_image.c
@@ -763,8 +763,9 @@ evas_gl_common_image_update(Evas_Engine_GL_Context *gc, Evas_GL_Image *im)
763{ 763{
764 Image_Entry *ie; 764 Image_Entry *ie;
765 if (!im->im) return; 765 if (!im->im) return;
766 ie = (Image_Entry *)(im->im); 766 ie = &im->im->cache_entry;
767 evas_gl_common_image_alloc_ensure(im); 767 evas_gl_common_image_alloc_ensure(im);
768
768/* 769/*
769 if ((im->cs.space == EVAS_COLORSPACE_YCBCR422P601_PL) || 770 if ((im->cs.space == EVAS_COLORSPACE_YCBCR422P601_PL) ||
770 (im->cs.space == EVAS_COLORSPACE_YCBCR422P709_PL)) 771 (im->cs.space == EVAS_COLORSPACE_YCBCR422P709_PL))
@@ -786,6 +787,7 @@ evas_gl_common_image_update(Evas_Engine_GL_Context *gc, Evas_GL_Image *im)
786 } 787 }
787 else 788 else
788 */ 789 */
790
789 switch (im->cs.space) 791 switch (im->cs.space)
790 { 792 {
791 case EVAS_COLORSPACE_ARGB8888: 793 case EVAS_COLORSPACE_ARGB8888:
@@ -804,36 +806,36 @@ evas_gl_common_image_update(Evas_Engine_GL_Context *gc, Evas_GL_Image *im)
804 ((im->dirty) || (ie->animated.animated) || (ie->flags.updated_data))) 806 ((im->dirty) || (ie->animated.animated) || (ie->flags.updated_data)))
805 { 807 {
806#ifdef EVAS_CSERVE2 808#ifdef EVAS_CSERVE2
807 if (evas_cache2_image_cached(&im->im->cache_entry)) 809 if (evas_cache2_image_cached(ie))
808 { 810 {
809 evas_cache2_image_load_data(&im->im->cache_entry); 811 evas_cache2_image_load_data(ie);
810 evas_gl_common_texture_update(im->tex, im->im); 812 evas_gl_common_texture_update(im->tex, im->im);
811 evas_cache2_image_unload_data(&im->im->cache_entry); 813 evas_cache2_image_unload_data(ie);
812 } 814 }
813 else 815 else
814#endif 816#endif
815 { 817 {
816 evas_cache_image_load_data(&im->im->cache_entry); 818 evas_cache_image_load_data(ie);
817 evas_gl_common_texture_update(im->tex, im->im); 819 evas_gl_common_texture_update(im->tex, im->im);
818 evas_cache_image_unload_data(&im->im->cache_entry); 820 evas_cache_image_unload_data(ie);
819 } 821 }
820 ie->flags.updated_data = 0; 822 ie->flags.updated_data = 0;
821 } 823 }
822 if (!im->tex) 824 if (!im->tex)
823 { 825 {
824#ifdef EVAS_CSERVE2 826#ifdef EVAS_CSERVE2
825 if (evas_cache2_image_cached(&im->im->cache_entry)) 827 if (evas_cache2_image_cached(ie))
826 { 828 {
827 evas_cache2_image_load_data(&im->im->cache_entry); 829 evas_cache2_image_load_data(ie);
828 im->tex = evas_gl_common_texture_new(gc, im->im); 830 im->tex = evas_gl_common_texture_new(gc, im->im);
829 evas_cache2_image_unload_data(&im->im->cache_entry); 831 evas_cache2_image_unload_data(ie);
830 } 832 }
831 else 833 else
832#endif 834#endif
833 { 835 {
834 evas_cache_image_load_data(&im->im->cache_entry); 836 evas_cache_image_load_data(ie);
835 im->tex = evas_gl_common_texture_new(gc, im->im); 837 im->tex = evas_gl_common_texture_new(gc, im->im);
836 evas_cache_image_unload_data(&im->im->cache_entry); 838 evas_cache_image_unload_data(ie);
837 } 839 }
838 } 840 }
839 im->dirty = 0; 841 im->dirty = 0;
@@ -842,15 +844,15 @@ evas_gl_common_image_update(Evas_Engine_GL_Context *gc, Evas_GL_Image *im)
842 case EVAS_COLORSPACE_ETC1_ALPHA: 844 case EVAS_COLORSPACE_ETC1_ALPHA:
843 if ((im->tex) && (im->dirty)) 845 if ((im->tex) && (im->dirty))
844 { 846 {
845 evas_cache_image_load_data(&im->im->cache_entry); 847 evas_cache_image_load_data(ie);
846 evas_gl_common_texture_rgb_a_pair_update(im->tex, im->im); 848 evas_gl_common_texture_rgb_a_pair_update(im->tex, im->im);
847 evas_cache_image_unload_data(&im->im->cache_entry); 849 evas_cache_image_unload_data(ie);
848 } 850 }
849 else if ((!im->tex)) 851 else if ((!im->tex))
850 { 852 {
851 evas_cache_image_load_data(&im->im->cache_entry); 853 evas_cache_image_load_data(ie);
852 im->tex = evas_gl_common_texture_rgb_a_pair_new(gc, im->im); 854 im->tex = evas_gl_common_texture_rgb_a_pair_new(gc, im->im);
853 evas_cache_image_unload_data(&im->im->cache_entry); 855 evas_cache_image_unload_data(ie);
854 } 856 }
855 im->dirty = 0; 857 im->dirty = 0;
856 if (!im->tex) return; 858 if (!im->tex) return;
@@ -859,16 +861,12 @@ evas_gl_common_image_update(Evas_Engine_GL_Context *gc, Evas_GL_Image *im)
859 case EVAS_COLORSPACE_YCBCR422P709_PL: 861 case EVAS_COLORSPACE_YCBCR422P709_PL:
860 if ((im->tex) && (im->dirty)) 862 if ((im->tex) && (im->dirty))
861 { 863 {
862 evas_gl_common_texture_yuv_update(im->tex, im->cs.data, 864 evas_gl_common_texture_yuv_update(im->tex, im->cs.data, ie->w, ie->h);
863 im->im->cache_entry.w,
864 im->im->cache_entry.h);
865 im->dirty = 0; 865 im->dirty = 0;
866 } 866 }
867 if ((!im->tex) && (im->cs.data) && (*((unsigned char **)im->cs.data))) 867 if ((!im->tex) && (im->cs.data) && (*((unsigned char **)im->cs.data)))
868 { 868 {
869 im->tex = evas_gl_common_texture_yuv_new(gc, im->cs.data, 869 im->tex = evas_gl_common_texture_yuv_new(gc, im->cs.data, ie->w, ie->h);
870 im->im->cache_entry.w,
871 im->im->cache_entry.h);
872 im->dirty = 0; 870 im->dirty = 0;
873 } 871 }
874 if (!im->tex) return; 872 if (!im->tex) return;
@@ -876,16 +874,12 @@ evas_gl_common_image_update(Evas_Engine_GL_Context *gc, Evas_GL_Image *im)
876 case EVAS_COLORSPACE_YCBCR422601_PL: 874 case EVAS_COLORSPACE_YCBCR422601_PL:
877 if ((im->tex) && (im->dirty)) 875 if ((im->tex) && (im->dirty))
878 { 876 {
879 evas_gl_common_texture_yuy2_update(im->tex, im->cs.data, 877 evas_gl_common_texture_yuy2_update(im->tex, im->cs.data, ie->w, ie->h);
880 im->im->cache_entry.w,
881 im->im->cache_entry.h);
882 im->dirty = 0; 878 im->dirty = 0;
883 } 879 }
884 if ((!im->tex) && (im->cs.data) && (*((unsigned char **)im->cs.data))) 880 if ((!im->tex) && (im->cs.data) && (*((unsigned char **)im->cs.data)))
885 { 881 {
886 im->tex = evas_gl_common_texture_yuy2_new(gc, im->cs.data, 882 im->tex = evas_gl_common_texture_yuy2_new(gc, im->cs.data, ie->w, ie->h);
887 im->im->cache_entry.w,
888 im->im->cache_entry.h);
889 im->dirty = 0; 883 im->dirty = 0;
890 } 884 }
891 if (!im->tex) return; 885 if (!im->tex) return;
@@ -893,16 +887,12 @@ evas_gl_common_image_update(Evas_Engine_GL_Context *gc, Evas_GL_Image *im)
893 case EVAS_COLORSPACE_YCBCR420NV12601_PL: 887 case EVAS_COLORSPACE_YCBCR420NV12601_PL:
894 if ((im->tex) && (im->dirty)) 888 if ((im->tex) && (im->dirty))
895 { 889 {
896 evas_gl_common_texture_nv12_update(im->tex, im->cs.data, 890 evas_gl_common_texture_nv12_update(im->tex, im->cs.data, ie->w, ie->h);
897 im->im->cache_entry.w,
898 im->im->cache_entry.h);
899 im->dirty = 0; 891 im->dirty = 0;
900 } 892 }
901 if ((!im->tex) && (im->cs.data) && (*((unsigned char **)im->cs.data))) 893 if ((!im->tex) && (im->cs.data) && (*((unsigned char **)im->cs.data)))
902 { 894 {
903 im->tex = evas_gl_common_texture_nv12_new(gc, im->cs.data, 895 im->tex = evas_gl_common_texture_nv12_new(gc, im->cs.data, ie->w, ie->h);
904 im->im->cache_entry.w,
905 im->im->cache_entry.h);
906 im->dirty = 0; 896 im->dirty = 0;
907 } 897 }
908 if (!im->tex) return; 898 if (!im->tex) return;
@@ -910,16 +900,12 @@ evas_gl_common_image_update(Evas_Engine_GL_Context *gc, Evas_GL_Image *im)
910 case EVAS_COLORSPACE_YCBCR420TM12601_PL: 900 case EVAS_COLORSPACE_YCBCR420TM12601_PL:
911 if ((im->tex) && (im->dirty)) 901 if ((im->tex) && (im->dirty))
912 { 902 {
913 evas_gl_common_texture_nv12tiled_update(im->tex, im->cs.data, 903 evas_gl_common_texture_nv12tiled_update(im->tex, im->cs.data, ie->w, ie->h);
914 im->im->cache_entry.w,
915 im->im->cache_entry.h);
916 im->dirty = 0; 904 im->dirty = 0;
917 } 905 }
918 if ((!im->tex) && (im->cs.data) && (*((unsigned char **)im->cs.data))) 906 if ((!im->tex) && (im->cs.data) && (*((unsigned char **)im->cs.data)))
919 { 907 {
920 im->tex = evas_gl_common_texture_nv12tiled_new(gc, im->cs.data, 908 im->tex = evas_gl_common_texture_nv12tiled_new(gc, im->cs.data, ie->w, ie->h);
921 im->im->cache_entry.w,
922 im->im->cache_entry.h);
923 im->dirty = 0; 909 im->dirty = 0;
924 } 910 }
925 if (!im->tex) return; 911 if (!im->tex) return;