From 07274513e984f0b5544586c74508ccd16e7dcafa Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sun, 13 Jan 2013 17:29:19 +1000 Subject: Remove EFL, since it's been released now. --- .../evas/src/modules/engines/gl_common/Makefile.am | 164 -- .../evas/src/modules/engines/gl_common/Makefile.in | 875 ------- .../src/modules/engines/gl_common/evas_gl_common.h | 659 ----- .../modules/engines/gl_common/evas_gl_context.c | 2723 -------------------- .../src/modules/engines/gl_common/evas_gl_filter.c | 181 -- .../src/modules/engines/gl_common/evas_gl_font.c | 203 -- .../src/modules/engines/gl_common/evas_gl_image.c | 968 ------- .../src/modules/engines/gl_common/evas_gl_line.c | 35 - .../modules/engines/gl_common/evas_gl_polygon.c | 307 --- .../modules/engines/gl_common/evas_gl_private.h | 32 - .../modules/engines/gl_common/evas_gl_rectangle.c | 53 - .../src/modules/engines/gl_common/evas_gl_shader.c | 1262 --------- .../modules/engines/gl_common/evas_gl_texture.c | 1669 ------------ .../engines/gl_common/shader/compile-s3c6410.sh | 47 - .../engines/gl_common/shader/compile-sgx.sh | 48 - .../modules/engines/gl_common/shader/filter_blur.h | 24 - .../engines/gl_common/shader/filter_blur.shd | 24 - .../engines/gl_common/shader/filter_blur_bgra.h | 24 - .../engines/gl_common/shader/filter_blur_bgra.shd | 24 - .../gl_common/shader/filter_blur_bgra_nomul.h | 24 - .../gl_common/shader/filter_blur_bgra_nomul.shd | 24 - .../engines/gl_common/shader/filter_blur_nomul.h | 24 - .../engines/gl_common/shader/filter_blur_nomul.shd | 24 - .../engines/gl_common/shader/filter_greyscale.h | 15 - .../engines/gl_common/shader/filter_greyscale.shd | 15 - .../gl_common/shader/filter_greyscale_bgra.h | 15 - .../gl_common/shader/filter_greyscale_bgra.shd | 15 - .../gl_common/shader/filter_greyscale_bgra_nomul.h | 14 - .../shader/filter_greyscale_bgra_nomul.shd | 14 - .../gl_common/shader/filter_greyscale_nomul.h | 14 - .../gl_common/shader/filter_greyscale_nomul.shd | 14 - .../engines/gl_common/shader/filter_invert.h | 14 - .../engines/gl_common/shader/filter_invert.shd | 14 - .../engines/gl_common/shader/filter_invert_bgra.h | 14 - .../gl_common/shader/filter_invert_bgra.shd | 14 - .../gl_common/shader/filter_invert_bgra_nomul.h | 15 - .../gl_common/shader/filter_invert_bgra_nomul.shd | 15 - .../engines/gl_common/shader/filter_invert_nomul.h | 14 - .../gl_common/shader/filter_invert_nomul.shd | 14 - .../engines/gl_common/shader/filter_sepia.h | 20 - .../engines/gl_common/shader/filter_sepia.shd | 20 - .../engines/gl_common/shader/filter_sepia_bgra.h | 20 - .../engines/gl_common/shader/filter_sepia_bgra.shd | 20 - .../gl_common/shader/filter_sepia_bgra_nomul.h | 18 - .../gl_common/shader/filter_sepia_bgra_nomul.shd | 18 - .../engines/gl_common/shader/filter_sepia_nomul.h | 18 - .../gl_common/shader/filter_sepia_nomul.shd | 18 - .../modules/engines/gl_common/shader/font_frag.h | 14 - .../modules/engines/gl_common/shader/font_frag.shd | 14 - .../gl_common/shader/font_frag_bin_s3c6410.h | 9 - .../engines/gl_common/shader/font_frag_s3c6410.asm | 26 - .../modules/engines/gl_common/shader/font_vert.h | 15 - .../modules/engines/gl_common/shader/font_vert.shd | 15 - .../gl_common/shader/font_vert_bin_s3c6410.h | 20 - .../engines/gl_common/shader/img_bgra_frag.h | 14 - .../engines/gl_common/shader/img_bgra_frag.shd | 14 - .../gl_common/shader/img_bgra_frag_bin_s3c6410.h | 11 - .../engines/gl_common/shader/img_bgra_nomul_frag.h | 13 - .../gl_common/shader/img_bgra_nomul_frag.shd | 13 - .../shader/img_bgra_nomul_frag_bin_s3c6410.h | 10 - .../engines/gl_common/shader/img_bgra_nomul_vert.h | 12 - .../gl_common/shader/img_bgra_nomul_vert.shd | 12 - .../shader/img_bgra_nomul_vert_bin_s3c6410.h | 17 - .../engines/gl_common/shader/img_bgra_vert.h | 15 - .../engines/gl_common/shader/img_bgra_vert.shd | 15 - .../gl_common/shader/img_bgra_vert_bin_s3c6410.h | 20 - .../modules/engines/gl_common/shader/img_frag.h | 14 - .../modules/engines/gl_common/shader/img_frag.shd | 14 - .../gl_common/shader/img_frag_bin_s3c6410.h | 9 - .../engines/gl_common/shader/img_frag_s3c6410.asm | 26 - .../engines/gl_common/shader/img_mask_frag.h | 15 - .../engines/gl_common/shader/img_mask_vert.h | 16 - .../engines/gl_common/shader/img_nomul_frag.h | 13 - .../engines/gl_common/shader/img_nomul_frag.shd | 13 - .../gl_common/shader/img_nomul_frag_bin_s3c6410.h | 10 - .../engines/gl_common/shader/img_nomul_vert.h | 12 - .../engines/gl_common/shader/img_nomul_vert.shd | 12 - .../gl_common/shader/img_nomul_vert_bin_s3c6410.h | 17 - .../modules/engines/gl_common/shader/img_vert.h | 15 - .../modules/engines/gl_common/shader/img_vert.shd | 15 - .../gl_common/shader/img_vert_bin_s3c6410.h | 20 - .../modules/engines/gl_common/shader/make-c-bin.sh | 3 - .../modules/engines/gl_common/shader/make-c-str.sh | 3 - .../modules/engines/gl_common/shader/nv12_frag.h | 31 - .../modules/engines/gl_common/shader/nv12_frag.shd | 31 - .../engines/gl_common/shader/nv12_nomul_frag.h | 31 - .../engines/gl_common/shader/nv12_nomul_frag.shd | 31 - .../engines/gl_common/shader/nv12_nomul_vert.h | 14 - .../engines/gl_common/shader/nv12_nomul_vert.shd | 14 - .../modules/engines/gl_common/shader/nv12_vert.h | 16 - .../modules/engines/gl_common/shader/nv12_vert.shd | 16 - .../modules/engines/gl_common/shader/rect_frag.h | 13 - .../modules/engines/gl_common/shader/rect_frag.shd | 13 - .../gl_common/shader/rect_frag_bin_s3c6410.h | 6 - .../engines/gl_common/shader/rect_frag_s3c6410.asm | 24 - .../modules/engines/gl_common/shader/rect_vert.h | 12 - .../modules/engines/gl_common/shader/rect_vert.shd | 12 - .../gl_common/shader/rect_vert_bin_s3c6410.h | 17 - .../modules/engines/gl_common/shader/tex_frag.h | 14 - .../modules/engines/gl_common/shader/tex_frag.shd | 14 - .../gl_common/shader/tex_frag_bin_s3c6410.h | 9 - .../engines/gl_common/shader/tex_frag_s3c6410.asm | 26 - .../engines/gl_common/shader/tex_nomul_frag.h | 13 - .../engines/gl_common/shader/tex_nomul_frag.shd | 13 - .../gl_common/shader/tex_nomul_frag_bin_s3c6410.h | 10 - .../engines/gl_common/shader/tex_nomul_vert.h | 12 - .../engines/gl_common/shader/tex_nomul_vert.shd | 12 - .../gl_common/shader/tex_nomul_vert_bin_s3c6410.h | 17 - .../modules/engines/gl_common/shader/tex_vert.h | 15 - .../modules/engines/gl_common/shader/tex_vert.shd | 15 - .../gl_common/shader/tex_vert_bin_s3c6410.h | 20 - .../modules/engines/gl_common/shader/yuv_frag.h | 24 - .../modules/engines/gl_common/shader/yuv_frag.shd | 24 - .../gl_common/shader/yuv_frag_bin_s3c6410.h | 24 - .../engines/gl_common/shader/yuv_frag_s3c6410.asm | 46 - .../engines/gl_common/shader/yuv_nomul_frag.h | 23 - .../engines/gl_common/shader/yuv_nomul_frag.shd | 23 - .../gl_common/shader/yuv_nomul_frag_bin_s3c6410.h | 23 - .../engines/gl_common/shader/yuv_nomul_vert.h | 14 - .../engines/gl_common/shader/yuv_nomul_vert.shd | 14 - .../gl_common/shader/yuv_nomul_vert_bin_s3c6410.h | 23 - .../modules/engines/gl_common/shader/yuv_vert.h | 17 - .../modules/engines/gl_common/shader/yuv_vert.shd | 17 - .../gl_common/shader/yuv_vert_bin_s3c6410.h | 26 - .../modules/engines/gl_common/shader/yuy2_frag.h | 30 - .../modules/engines/gl_common/shader/yuy2_frag.shd | 30 - .../engines/gl_common/shader/yuy2_nomul_frag.h | 30 - .../engines/gl_common/shader/yuy2_nomul_frag.shd | 30 - .../engines/gl_common/shader/yuy2_nomul_vert.h | 13 - .../engines/gl_common/shader/yuy2_nomul_vert.shd | 13 - .../modules/engines/gl_common/shader/yuy2_vert.h | 16 - .../modules/engines/gl_common/shader/yuy2_vert.shd | 16 - 132 files changed, 11253 deletions(-) delete mode 100644 libraries/evas/src/modules/engines/gl_common/Makefile.am delete mode 100644 libraries/evas/src/modules/engines/gl_common/Makefile.in delete mode 100644 libraries/evas/src/modules/engines/gl_common/evas_gl_common.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/evas_gl_context.c delete mode 100644 libraries/evas/src/modules/engines/gl_common/evas_gl_filter.c delete mode 100644 libraries/evas/src/modules/engines/gl_common/evas_gl_font.c delete mode 100644 libraries/evas/src/modules/engines/gl_common/evas_gl_image.c delete mode 100644 libraries/evas/src/modules/engines/gl_common/evas_gl_line.c delete mode 100644 libraries/evas/src/modules/engines/gl_common/evas_gl_polygon.c delete mode 100644 libraries/evas/src/modules/engines/gl_common/evas_gl_private.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/evas_gl_rectangle.c delete mode 100644 libraries/evas/src/modules/engines/gl_common/evas_gl_shader.c delete mode 100644 libraries/evas/src/modules/engines/gl_common/evas_gl_texture.c delete mode 100755 libraries/evas/src/modules/engines/gl_common/shader/compile-s3c6410.sh delete mode 100755 libraries/evas/src/modules/engines/gl_common/shader/compile-sgx.sh delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_blur.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_blur.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra_nomul.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra_nomul.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_blur_nomul.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_blur_nomul.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra_nomul.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra_nomul.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_nomul.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_nomul.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_invert.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_invert.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra_nomul.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra_nomul.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_invert_nomul.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_invert_nomul.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_sepia.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_sepia.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra_nomul.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra_nomul.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_nomul.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_nomul.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/font_frag.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/font_frag.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/font_frag_bin_s3c6410.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/font_frag_s3c6410.asm delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/font_vert.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/font_vert.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/font_vert_bin_s3c6410.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_bgra_frag.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_bgra_frag.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_bgra_frag_bin_s3c6410.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_frag.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_frag.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_frag_bin_s3c6410.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_vert.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_vert.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_vert_bin_s3c6410.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_bgra_vert.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_bgra_vert.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_bgra_vert_bin_s3c6410.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_frag.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_frag.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_frag_bin_s3c6410.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_frag_s3c6410.asm delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_mask_frag.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_mask_vert.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_nomul_frag.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_nomul_frag.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_nomul_frag_bin_s3c6410.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_nomul_vert.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_nomul_vert.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_nomul_vert_bin_s3c6410.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_vert.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_vert.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/img_vert_bin_s3c6410.h delete mode 100755 libraries/evas/src/modules/engines/gl_common/shader/make-c-bin.sh delete mode 100755 libraries/evas/src/modules/engines/gl_common/shader/make-c-str.sh delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/nv12_frag.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/nv12_frag.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_frag.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_frag.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_vert.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_vert.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/nv12_vert.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/nv12_vert.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/rect_frag.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/rect_frag.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/rect_frag_bin_s3c6410.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/rect_frag_s3c6410.asm delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/rect_vert.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/rect_vert.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/rect_vert_bin_s3c6410.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/tex_frag.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/tex_frag.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/tex_frag_bin_s3c6410.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/tex_frag_s3c6410.asm delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_frag.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_frag.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_frag_bin_s3c6410.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_vert.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_vert.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_vert_bin_s3c6410.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/tex_vert.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/tex_vert.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/tex_vert_bin_s3c6410.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuv_frag.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuv_frag.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuv_frag_bin_s3c6410.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuv_frag_s3c6410.asm delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_frag.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_frag.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_frag_bin_s3c6410.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_vert.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_vert.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_vert_bin_s3c6410.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuv_vert.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuv_vert.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuv_vert_bin_s3c6410.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuy2_frag.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuy2_frag.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_frag.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_frag.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_vert.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_vert.shd delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuy2_vert.h delete mode 100644 libraries/evas/src/modules/engines/gl_common/shader/yuy2_vert.shd (limited to 'libraries/evas/src/modules/engines/gl_common') diff --git a/libraries/evas/src/modules/engines/gl_common/Makefile.am b/libraries/evas/src/modules/engines/gl_common/Makefile.am deleted file mode 100644 index 15acc02..0000000 --- a/libraries/evas/src/modules/engines/gl_common/Makefile.am +++ /dev/null @@ -1,164 +0,0 @@ - -MAINTAINERCLEANFILES = Makefile.in - -AM_CPPFLAGS = \ --I. \ --I$(top_srcdir)/src/lib \ --I$(top_srcdir)/src/lib/include \ -@FREETYPE_CFLAGS@ \ -@PIXMAN_CFLAGS@ \ -@GL_EET_CFLAGS@ \ -@EINA_CFLAGS@ - -if BUILD_ENGINE_GL_COMMON - -noinst_LTLIBRARIES = libevas_engine_gl_common.la -libevas_engine_gl_common_la_SOURCES = \ -evas_gl_private.h \ -evas_gl_common.h \ -evas_gl_context.c \ -evas_gl_shader.c \ -evas_gl_rectangle.c \ -evas_gl_texture.c \ -evas_gl_image.c \ -evas_gl_font.c \ -evas_gl_polygon.c \ -evas_gl_line.c \ -evas_gl_filter.c \ -shader/rect_frag.h \ -shader/rect_frag_bin_s3c6410.h \ -shader/rect_vert.h \ -shader/rect_vert_bin_s3c6410.h \ -shader/font_frag.h \ -shader/font_frag_bin_s3c6410.h \ -shader/font_vert.h \ -shader/font_vert_bin_s3c6410.h \ -shader/img_frag.h \ -shader/img_frag_bin_s3c6410.h \ -shader/img_vert.h \ -shader/img_vert_bin_s3c6410.h \ -shader/img_nomul_frag.h \ -shader/img_nomul_frag_bin_s3c6410.h \ -shader/img_nomul_vert.h \ -shader/img_nomul_vert_bin_s3c6410.h \ -shader/img_bgra_frag.h \ -shader/img_bgra_frag_bin_s3c6410.h \ -shader/img_bgra_vert.h \ -shader/img_bgra_vert_bin_s3c6410.h \ -shader/img_bgra_nomul_frag.h \ -shader/img_bgra_nomul_frag_bin_s3c6410.h \ -shader/img_bgra_nomul_vert.h \ -shader/img_bgra_nomul_vert_bin_s3c6410.h \ -shader/img_mask_frag.h \ -shader/img_mask_vert.h \ -shader/nv12_nomul_vert.h \ -shader/nv12_vert.h \ -shader/nv12_nomul_frag.h \ -shader/nv12_frag.h \ -shader/yuv_frag.h \ -shader/yuv_frag_bin_s3c6410.h \ -shader/yuv_vert.h \ -shader/yuv_vert_bin_s3c6410.h \ -shader/yuv_nomul_frag.h \ -shader/yuv_nomul_frag_bin_s3c6410.h \ -shader/yuv_nomul_vert.h \ -shader/yuv_nomul_vert_bin_s3c6410.h \ -shader/tex_frag.h \ -shader/tex_frag_bin_s3c6410.h \ -shader/tex_vert.h \ -shader/tex_vert_bin_s3c6410.h \ -shader/tex_nomul_frag.h \ -shader/tex_nomul_frag_bin_s3c6410.h \ -shader/tex_nomul_vert.h \ -shader/tex_nomul_vert_bin_s3c6410.h \ -shader/filter_invert.h \ -shader/filter_invert_nomul.h \ -shader/filter_invert_bgra.h \ -shader/filter_invert_bgra_nomul.h \ -shader/filter_sepia.h \ -shader/filter_sepia_nomul.h \ -shader/filter_sepia_bgra.h \ -shader/filter_sepia_bgra_nomul.h \ -shader/filter_greyscale.h \ -shader/filter_greyscale_nomul.h \ -shader/filter_greyscale_bgra.h \ -shader/filter_greyscale_bgra_nomul.h \ -shader/filter_blur.h \ -shader/filter_blur_nomul.h \ -shader/filter_blur_bgra.h \ -shader/filter_blur_bgra_nomul.h \ -shader/yuy2_frag.h \ -shader/yuy2_vert.h \ -shader/yuy2_nomul_frag.h \ -shader/yuy2_nomul_vert.h - -libevas_engine_gl_common_la_LIBADD = @EINA_LIBS@ @GL_EET_LIBS@ @evas_engine_gl_common_libs@ @dlopen_libs@ -endif - -EXTRA_DIST = \ -shader/compile-s3c6410.sh \ -shader/compile-sgx.sh \ -shader/make-c-bin.sh \ -shader/make-c-str.sh \ -shader/rect_frag.shd \ -shader/rect_frag_s3c6410.asm \ -shader/rect_vert.shd \ -shader/font_frag.shd \ -shader/font_frag_s3c6410.asm \ -shader/font_vert.shd \ -shader/img_frag.shd \ -shader/img_frag_s3c6410.asm \ -shader/img_vert.shd \ -shader/img_nomul_frag.shd \ -shader/img_nomul_vert.shd \ -shader/img_bgra_vert.shd \ -shader/img_bgra_frag.shd \ -shader/img_bgra_vert.shd \ -shader/img_bgra_nomul_frag.shd \ -shader/img_bgra_nomul_vert.shd \ -shader/img_mask_frag.h \ -shader/img_mask_vert.h \ -shader/yuv_frag.shd \ -shader/yuv_frag_s3c6410.asm \ -shader/yuv_vert.shd \ -shader/yuv_nomul_frag.shd \ -shader/yuv_nomul_vert.shd \ -shader/tex_frag.shd \ -shader/tex_frag_s3c6410.asm \ -shader/tex_vert.shd \ -shader/tex_nomul_frag.shd \ -shader/tex_nomul_vert.shd \ -shader/filter_invert.shd \ -shader/filter_invert_nomul.shd \ -shader/filter_invert_bgra.shd \ -shader/filter_invert_bgra_nomul.shd \ -shader/filter_greyscale.shd \ -shader/filter_greyscale_nomul.shd \ -shader/filter_greyscale_bgra.shd \ -shader/filter_greyscale_bgra_nomul.shd \ -shader/filter_sepia.shd \ -shader/filter_sepia_nomul.shd \ -shader/filter_sepia_bgra.shd \ -shader/filter_sepia_bgra_nomul.shd \ -shader/filter_blur.shd \ -shader/filter_blur_nomul.shd \ -shader/filter_blur_bgra.shd \ -shader/filter_blur_bgra_nomul.shd \ -shader/nv12_frag.h \ -shader/nv12_frag.shd \ -shader/nv12_nomul_frag.h \ -shader/nv12_nomul_frag.shd \ -shader/nv12_nomul_vert.h \ -shader/nv12_nomul_vert.shd \ -shader/nv12_vert.h \ -shader/nv12_vert.shd \ -shader/yuy2_frag.h \ -shader/yuy2_frag.shd \ -shader/yuy2_nomul_frag.h \ -shader/yuy2_nomul_frag.shd \ -shader/yuy2_nomul_vert.h \ -shader/yuy2_nomul_vert.shd \ -shader/yuy2_vert.h \ -shader/yuy2_vert.shd - - diff --git a/libraries/evas/src/modules/engines/gl_common/Makefile.in b/libraries/evas/src/modules/engines/gl_common/Makefile.in deleted file mode 100644 index 5a9a1ef..0000000 --- a/libraries/evas/src/modules/engines/gl_common/Makefile.in +++ /dev/null @@ -1,875 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = src/modules/engines/gl_common -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ - $(top_srcdir)/m4/efl_coverage.m4 \ - $(top_srcdir)/m4/efl_doxygen.m4 \ - $(top_srcdir)/m4/efl_fnmatch.m4 \ - $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ - $(top_srcdir)/m4/evas_check_engine.m4 \ - $(top_srcdir)/m4/evas_check_loader.m4 \ - $(top_srcdir)/m4/evas_converter.m4 \ - $(top_srcdir)/m4/evas_dither.m4 \ - $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libevas_engine_gl_common_la_DEPENDENCIES = -am__libevas_engine_gl_common_la_SOURCES_DIST = evas_gl_private.h \ - evas_gl_common.h evas_gl_context.c evas_gl_shader.c \ - evas_gl_rectangle.c evas_gl_texture.c evas_gl_image.c \ - evas_gl_font.c evas_gl_polygon.c evas_gl_line.c \ - evas_gl_filter.c shader/rect_frag.h \ - shader/rect_frag_bin_s3c6410.h shader/rect_vert.h \ - shader/rect_vert_bin_s3c6410.h shader/font_frag.h \ - shader/font_frag_bin_s3c6410.h shader/font_vert.h \ - shader/font_vert_bin_s3c6410.h shader/img_frag.h \ - shader/img_frag_bin_s3c6410.h shader/img_vert.h \ - shader/img_vert_bin_s3c6410.h shader/img_nomul_frag.h \ - shader/img_nomul_frag_bin_s3c6410.h shader/img_nomul_vert.h \ - shader/img_nomul_vert_bin_s3c6410.h shader/img_bgra_frag.h \ - shader/img_bgra_frag_bin_s3c6410.h shader/img_bgra_vert.h \ - shader/img_bgra_vert_bin_s3c6410.h \ - shader/img_bgra_nomul_frag.h \ - shader/img_bgra_nomul_frag_bin_s3c6410.h \ - shader/img_bgra_nomul_vert.h \ - shader/img_bgra_nomul_vert_bin_s3c6410.h \ - shader/img_mask_frag.h shader/img_mask_vert.h \ - shader/nv12_nomul_vert.h shader/nv12_vert.h \ - shader/nv12_nomul_frag.h shader/nv12_frag.h shader/yuv_frag.h \ - shader/yuv_frag_bin_s3c6410.h shader/yuv_vert.h \ - shader/yuv_vert_bin_s3c6410.h shader/yuv_nomul_frag.h \ - shader/yuv_nomul_frag_bin_s3c6410.h shader/yuv_nomul_vert.h \ - shader/yuv_nomul_vert_bin_s3c6410.h shader/tex_frag.h \ - shader/tex_frag_bin_s3c6410.h shader/tex_vert.h \ - shader/tex_vert_bin_s3c6410.h shader/tex_nomul_frag.h \ - shader/tex_nomul_frag_bin_s3c6410.h shader/tex_nomul_vert.h \ - shader/tex_nomul_vert_bin_s3c6410.h shader/filter_invert.h \ - shader/filter_invert_nomul.h shader/filter_invert_bgra.h \ - shader/filter_invert_bgra_nomul.h shader/filter_sepia.h \ - shader/filter_sepia_nomul.h shader/filter_sepia_bgra.h \ - shader/filter_sepia_bgra_nomul.h shader/filter_greyscale.h \ - shader/filter_greyscale_nomul.h shader/filter_greyscale_bgra.h \ - shader/filter_greyscale_bgra_nomul.h shader/filter_blur.h \ - shader/filter_blur_nomul.h shader/filter_blur_bgra.h \ - shader/filter_blur_bgra_nomul.h shader/yuy2_frag.h \ - shader/yuy2_vert.h shader/yuy2_nomul_frag.h \ - shader/yuy2_nomul_vert.h -@BUILD_ENGINE_GL_COMMON_TRUE@am_libevas_engine_gl_common_la_OBJECTS = \ -@BUILD_ENGINE_GL_COMMON_TRUE@ evas_gl_context.lo \ -@BUILD_ENGINE_GL_COMMON_TRUE@ evas_gl_shader.lo \ -@BUILD_ENGINE_GL_COMMON_TRUE@ evas_gl_rectangle.lo \ -@BUILD_ENGINE_GL_COMMON_TRUE@ evas_gl_texture.lo \ -@BUILD_ENGINE_GL_COMMON_TRUE@ evas_gl_image.lo evas_gl_font.lo \ -@BUILD_ENGINE_GL_COMMON_TRUE@ evas_gl_polygon.lo \ -@BUILD_ENGINE_GL_COMMON_TRUE@ evas_gl_line.lo evas_gl_filter.lo -libevas_engine_gl_common_la_OBJECTS = \ - $(am_libevas_engine_gl_common_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -@BUILD_ENGINE_GL_COMMON_TRUE@am_libevas_engine_gl_common_la_rpath = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(libevas_engine_gl_common_la_SOURCES) -DIST_SOURCES = $(am__libevas_engine_gl_common_la_SOURCES_DIST) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CHECK_CFLAGS = @CHECK_CFLAGS@ -CHECK_LIBS = @CHECK_LIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ -DIRECTFB_LIBS = @DIRECTFB_LIBS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ -ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ -EDB_CFLAGS = @EDB_CFLAGS@ -EDB_LIBS = @EDB_LIBS@ -EDJE_CFLAGS = @EDJE_CFLAGS@ -EDJE_LIBS = @EDJE_LIBS@ -EET_CFLAGS = @EET_CFLAGS@ -EET_LIBS = @EET_LIBS@ -EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ -EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ -EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ -EGREP = @EGREP@ -EINA_CFLAGS = @EINA_CFLAGS@ -EINA_LIBS = @EINA_LIBS@ -EVAS_CFLAGS = @EVAS_CFLAGS@ -EVAS_LIBS = @EVAS_LIBS@ -EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ -EVIL_CFLAGS = @EVIL_CFLAGS@ -EVIL_LIBS = @EVIL_LIBS@ -EXEEXT = @EXEEXT@ -EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ -EXOTIC_LIBS = @EXOTIC_LIBS@ -FGREP = @FGREP@ -FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ -FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ -FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ -FRIBIDI_LIBS = @FRIBIDI_LIBS@ -GL_EET_CFLAGS = @GL_EET_CFLAGS@ -GL_EET_LIBS = @GL_EET_LIBS@ -GREP = @GREP@ -HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ -HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ -LINEBREAK_LIBS = @LINEBREAK_LIBS@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULE_ARCH = @MODULE_ARCH@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJC = @OBJC@ -OBJCDEPMODE = @OBJCDEPMODE@ -OBJCFLAGS = @OBJCFLAGS@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ -PIXMAN_LIBS = @PIXMAN_LIBS@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -PNG_CFLAGS = @PNG_CFLAGS@ -PNG_LIBS = @PNG_LIBS@ -RANLIB = @RANLIB@ -SDL_CFLAGS = @SDL_CFLAGS@ -SDL_LIBS = @SDL_LIBS@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SHM_OPEN_LINK = @SHM_OPEN_LINK@ -STRIP = @STRIP@ -SVG_CFLAGS = @SVG_CFLAGS@ -SVG_LIBS = @SVG_LIBS@ -VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ -VALGRIND_LIBS = @VALGRIND_LIBS@ -VERSION = @VERSION@ -VMAJ = @VMAJ@ -WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ -WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ -XCB_CFLAGS = @XCB_CFLAGS@ -XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ -XCB_GL_LIBS = @XCB_GL_LIBS@ -XCB_LIBS = @XCB_LIBS@ -XEXT_CFLAGS = @XEXT_CFLAGS@ -XEXT_LIBS = @XEXT_LIBS@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_OBJC = @ac_ct_OBJC@ -altivec_cflags = @altivec_cflags@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -dlopen_libs = @dlopen_libs@ -docdir = @docdir@ -dvidir = @dvidir@ -edje_cc = @edje_cc@ -efl_doxygen = @efl_doxygen@ -efl_have_doxygen = @efl_have_doxygen@ -evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ -evas_engine_buffer_libs = @evas_engine_buffer_libs@ -evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ -evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ -evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ -evas_engine_directfb_libs = @evas_engine_directfb_libs@ -evas_engine_fb_cflags = @evas_engine_fb_cflags@ -evas_engine_fb_libs = @evas_engine_fb_libs@ -evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ -evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ -evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ -evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ -evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ -evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ -evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ -evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ -evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ -evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ -evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ -evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ -evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ -evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ -evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ -evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ -evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ -evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ -evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ -evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ -evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ -evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ -evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ -evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ -evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ -evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ -evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ -evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ -evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ -evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ -evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ -evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ -evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ -evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ -evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ -evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ -evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ -evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ -evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ -evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ -evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ -evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ -evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ -evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ -evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ -evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ -evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ -evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ -evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ -evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ -evas_image_loader_png_libs = @evas_image_loader_png_libs@ -evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ -evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ -evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ -evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ -evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ -evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ -evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ -evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ -evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ -evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ -evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ -evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ -exec_prefix = @exec_prefix@ -have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ -have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ -have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ -have_evas_engine_software_x11 = @have_evas_engine_software_x11@ -have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ -have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ -have_lcov = @have_lcov@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -lt_enable_auto_import = @lt_enable_auto_import@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfig_requires_private = @pkgconfig_requires_private@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pthread_cflags = @pthread_cflags@ -pthread_libs = @pthread_libs@ -release_info = @release_info@ -requirement_evas = @requirement_evas@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -version_info = @version_info@ -MAINTAINERCLEANFILES = Makefile.in -AM_CPPFLAGS = \ --I. \ --I$(top_srcdir)/src/lib \ --I$(top_srcdir)/src/lib/include \ -@FREETYPE_CFLAGS@ \ -@PIXMAN_CFLAGS@ \ -@GL_EET_CFLAGS@ \ -@EINA_CFLAGS@ - -@BUILD_ENGINE_GL_COMMON_TRUE@noinst_LTLIBRARIES = libevas_engine_gl_common.la -@BUILD_ENGINE_GL_COMMON_TRUE@libevas_engine_gl_common_la_SOURCES = \ -@BUILD_ENGINE_GL_COMMON_TRUE@evas_gl_private.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@evas_gl_common.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@evas_gl_context.c \ -@BUILD_ENGINE_GL_COMMON_TRUE@evas_gl_shader.c \ -@BUILD_ENGINE_GL_COMMON_TRUE@evas_gl_rectangle.c \ -@BUILD_ENGINE_GL_COMMON_TRUE@evas_gl_texture.c \ -@BUILD_ENGINE_GL_COMMON_TRUE@evas_gl_image.c \ -@BUILD_ENGINE_GL_COMMON_TRUE@evas_gl_font.c \ -@BUILD_ENGINE_GL_COMMON_TRUE@evas_gl_polygon.c \ -@BUILD_ENGINE_GL_COMMON_TRUE@evas_gl_line.c \ -@BUILD_ENGINE_GL_COMMON_TRUE@evas_gl_filter.c \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/rect_frag.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/rect_frag_bin_s3c6410.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/rect_vert.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/rect_vert_bin_s3c6410.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/font_frag.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/font_frag_bin_s3c6410.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/font_vert.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/font_vert_bin_s3c6410.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_frag.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_frag_bin_s3c6410.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_vert.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_vert_bin_s3c6410.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_nomul_frag.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_nomul_frag_bin_s3c6410.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_nomul_vert.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_nomul_vert_bin_s3c6410.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_bgra_frag.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_bgra_frag_bin_s3c6410.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_bgra_vert.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_bgra_vert_bin_s3c6410.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_bgra_nomul_frag.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_bgra_nomul_frag_bin_s3c6410.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_bgra_nomul_vert.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_bgra_nomul_vert_bin_s3c6410.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_mask_frag.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/img_mask_vert.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/nv12_nomul_vert.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/nv12_vert.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/nv12_nomul_frag.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/nv12_frag.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/yuv_frag.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/yuv_frag_bin_s3c6410.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/yuv_vert.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/yuv_vert_bin_s3c6410.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/yuv_nomul_frag.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/yuv_nomul_frag_bin_s3c6410.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/yuv_nomul_vert.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/yuv_nomul_vert_bin_s3c6410.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/tex_frag.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/tex_frag_bin_s3c6410.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/tex_vert.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/tex_vert_bin_s3c6410.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/tex_nomul_frag.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/tex_nomul_frag_bin_s3c6410.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/tex_nomul_vert.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/tex_nomul_vert_bin_s3c6410.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_invert.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_invert_nomul.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_invert_bgra.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_invert_bgra_nomul.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_sepia.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_sepia_nomul.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_sepia_bgra.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_sepia_bgra_nomul.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_greyscale.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_greyscale_nomul.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_greyscale_bgra.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_greyscale_bgra_nomul.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_blur.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_blur_nomul.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_blur_bgra.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/filter_blur_bgra_nomul.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/yuy2_frag.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/yuy2_vert.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/yuy2_nomul_frag.h \ -@BUILD_ENGINE_GL_COMMON_TRUE@shader/yuy2_nomul_vert.h - -@BUILD_ENGINE_GL_COMMON_TRUE@libevas_engine_gl_common_la_LIBADD = @EINA_LIBS@ @GL_EET_LIBS@ @evas_engine_gl_common_libs@ @dlopen_libs@ -EXTRA_DIST = \ -shader/compile-s3c6410.sh \ -shader/compile-sgx.sh \ -shader/make-c-bin.sh \ -shader/make-c-str.sh \ -shader/rect_frag.shd \ -shader/rect_frag_s3c6410.asm \ -shader/rect_vert.shd \ -shader/font_frag.shd \ -shader/font_frag_s3c6410.asm \ -shader/font_vert.shd \ -shader/img_frag.shd \ -shader/img_frag_s3c6410.asm \ -shader/img_vert.shd \ -shader/img_nomul_frag.shd \ -shader/img_nomul_vert.shd \ -shader/img_bgra_vert.shd \ -shader/img_bgra_frag.shd \ -shader/img_bgra_vert.shd \ -shader/img_bgra_nomul_frag.shd \ -shader/img_bgra_nomul_vert.shd \ -shader/img_mask_frag.h \ -shader/img_mask_vert.h \ -shader/yuv_frag.shd \ -shader/yuv_frag_s3c6410.asm \ -shader/yuv_vert.shd \ -shader/yuv_nomul_frag.shd \ -shader/yuv_nomul_vert.shd \ -shader/tex_frag.shd \ -shader/tex_frag_s3c6410.asm \ -shader/tex_vert.shd \ -shader/tex_nomul_frag.shd \ -shader/tex_nomul_vert.shd \ -shader/filter_invert.shd \ -shader/filter_invert_nomul.shd \ -shader/filter_invert_bgra.shd \ -shader/filter_invert_bgra_nomul.shd \ -shader/filter_greyscale.shd \ -shader/filter_greyscale_nomul.shd \ -shader/filter_greyscale_bgra.shd \ -shader/filter_greyscale_bgra_nomul.shd \ -shader/filter_sepia.shd \ -shader/filter_sepia_nomul.shd \ -shader/filter_sepia_bgra.shd \ -shader/filter_sepia_bgra_nomul.shd \ -shader/filter_blur.shd \ -shader/filter_blur_nomul.shd \ -shader/filter_blur_bgra.shd \ -shader/filter_blur_bgra_nomul.shd \ -shader/nv12_frag.h \ -shader/nv12_frag.shd \ -shader/nv12_nomul_frag.h \ -shader/nv12_nomul_frag.shd \ -shader/nv12_nomul_vert.h \ -shader/nv12_nomul_vert.shd \ -shader/nv12_vert.h \ -shader/nv12_vert.shd \ -shader/yuy2_frag.h \ -shader/yuy2_frag.shd \ -shader/yuy2_nomul_frag.h \ -shader/yuy2_nomul_frag.shd \ -shader/yuy2_nomul_vert.h \ -shader/yuy2_nomul_vert.shd \ -shader/yuy2_vert.h \ -shader/yuy2_vert.shd - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/engines/gl_common/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/modules/engines/gl_common/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libevas_engine_gl_common.la: $(libevas_engine_gl_common_la_OBJECTS) $(libevas_engine_gl_common_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) $(am_libevas_engine_gl_common_la_rpath) $(libevas_engine_gl_common_la_OBJECTS) $(libevas_engine_gl_common_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_gl_context.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_gl_filter.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_gl_font.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_gl_image.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_gl_line.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_gl_polygon.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_gl_rectangle.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_gl_shader.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_gl_texture.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libraries/evas/src/modules/engines/gl_common/evas_gl_common.h b/libraries/evas/src/modules/engines/gl_common/evas_gl_common.h deleted file mode 100644 index 051fb3b..0000000 --- a/libraries/evas/src/modules/engines/gl_common/evas_gl_common.h +++ /dev/null @@ -1,659 +0,0 @@ -#ifndef EVAS_GL_COMMON_H -#define EVAS_GL_COMMON_H - -#include "evas_common.h" -#include "evas_private.h" -#include "config.h" - -#include -#include -#include -#include -#include -#include -#include - -#define GL_GLEXT_PROTOTYPES - -#ifdef BUILD_ENGINE_GL_COCOA -# include -# include -#else -# ifdef _EVAS_ENGINE_SDL_H -# if defined(GLES_VARIETY_S3C6410) || defined(GLES_VARIETY_SGX) -# include -# else -# include -# endif -# else -# if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) -# if defined(GLES_VARIETY_S3C6410) -# include -# elif defined(GLES_VARIETY_SGX) -# include -# include -# endif -# else -# include -# include -# endif -# endif -#endif - -#ifndef GL_TEXTURE_RECTANGLE_NV -# define GL_TEXTURE_RECTANGLE_NV 0x84F5 -#endif -#ifndef GL_BGRA -# define GL_BGRA 0x80E1 -#endif - -#ifndef EGL_NO_CONTEXT -# define EGL_NO_CONTEXT 0 -#endif -#ifndef EGL_NONE -# define EGL_NONE 0x3038 -#endif -#ifndef EGL_TRUE -# define EGL_TRUE 1 -#endif -#ifndef EGL_FALSE -# define EGL_FALSE 0 -#endif - -#ifndef EGL_MAP_GL_TEXTURE_2D_SEC -# define EGL_MAP_GL_TEXTURE_2D_SEC 0x3201 -#endif -#ifndef EGL_MAP_GL_TEXTURE_HEIGHT_SEC -# define EGL_MAP_GL_TEXTURE_HEIGHT_SEC 0x3202 -#endif -#ifndef EGL_MAP_GL_TEXTURE_WIDTH_SEC -# define EGL_MAP_GL_TEXTURE_WIDTH_SEC 0x3203 -#endif -#ifndef EGL_MAP_GL_TEXTURE_FORMAT_SEC -# define EGL_MAP_GL_TEXTURE_FORMAT_SEC 0x3204 -#endif -#ifndef EGL_MAP_GL_TEXTURE_RGB_SEC -# define EGL_MAP_GL_TEXTURE_RGB_SEC 0x3205 -#endif -#ifndef EGL_MAP_GL_TEXTURE_RGBA_SEC -# define EGL_MAP_GL_TEXTURE_RGBA_SEC 0x3206 -#endif -#ifndef EGL_MAP_GL_TEXTURE_BGRA_SEC -# define EGL_MAP_GL_TEXTURE_BGRA_SEC 0x3207 -#endif -#ifndef EGL_MAP_GL_TEXTURE_LUMINANCE_SEC -# define EGL_MAP_GL_TEXTURE_LUMINANCE_SEC 0x3208 -#endif -#ifndef EGL_MAP_GL_TEXTURE_LUMINANCE_ALPHA_SEC -# define EGL_MAP_GL_TEXTURE_LUMINANCE_ALPHA_SEC 0x3209 -#endif -#ifndef EGL_MAP_GL_TEXTURE_PIXEL_TYPE_SEC -# define EGL_MAP_GL_TEXTURE_PIXEL_TYPE_SEC 0x320a -#endif -#ifndef EGL_MAP_GL_TEXTURE_UNSIGNED_BYTE_SEC -# define EGL_MAP_GL_TEXTURE_UNSIGNED_BYTE_SEC 0x320b -#endif -#ifndef EGL_MAP_GL_TEXTURE_STRIDE_IN_BYTES_SEC -# define EGL_MAP_GL_TEXTURE_STRIDE_IN_BYTES_SEC 0x320c -#endif -#ifndef GL_PROGRAM_BINARY_LENGTH -# define GL_PROGRAM_BINARY_LENGTH 0x8741 -#endif -#ifndef GL_NUM_PROGRAM_BINARY_FORMATS -# define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE -#endif -#ifndef GL_PROGRAM_BINARY_FORMATS -# define GL_PROGRAM_BINARY_FORMATS 0x87FF -#endif -#ifndef GL_PROGRAM_BINARY_RETRIEVABLE_HINT -# define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 -#endif - -#define SHAD_VERTEX 0 -#define SHAD_COLOR 1 -#define SHAD_TEXUV 2 -#define SHAD_TEXUV2 3 -#define SHAD_TEXUV3 4 -#define SHAD_TEXM 5 - -typedef struct _Evas_GL_Program Evas_GL_Program; -typedef struct _Evas_GL_Program_Source Evas_GL_Program_Source; -typedef struct _Evas_GL_Shared Evas_GL_Shared; -typedef struct _Evas_Engine_GL_Context Evas_Engine_GL_Context; -typedef struct _Evas_GL_Texture_Pool Evas_GL_Texture_Pool; -typedef struct _Evas_GL_Texture Evas_GL_Texture; -typedef struct _Evas_GL_Image Evas_GL_Image; -typedef struct _Evas_GL_Font_Texture Evas_GL_Font_Texture; -typedef struct _Evas_GL_Polygon Evas_GL_Polygon; -typedef struct _Evas_GL_Polygon_Point Evas_GL_Polygon_Point; - -typedef enum { - SHADER_RECT, - SHADER_FONT, - SHADER_IMG, - SHADER_IMG_NOMUL, - SHADER_IMG_BGRA, - SHADER_IMG_BGRA_NOMUL, - SHADER_IMG_MASK, - SHADER_YUV, - SHADER_YUV_NOMUL, - SHADER_YUY2, - SHADER_YUY2_NOMUL, - SHADER_NV12, - SHADER_NV12_NOMUL, - SHADER_TEX, - SHADER_TEX_NOMUL, - SHADER_FILTER_INVERT, - SHADER_FILTER_INVERT_NOMUL, - SHADER_FILTER_INVERT_BGRA, - SHADER_FILTER_INVERT_BGRA_NOMUL, - SHADER_FILTER_GREYSCALE, - SHADER_FILTER_GREYSCALE_NOMUL, - SHADER_FILTER_GREYSCALE_BGRA, - SHADER_FILTER_GREYSCALE_BGRA_NOMUL, - SHADER_FILTER_SEPIA, - SHADER_FILTER_SEPIA_NOMUL, - SHADER_FILTER_SEPIA_BGRA, - SHADER_FILTER_SEPIA_BGRA_NOMUL, - /* SHADER_FILTER_BLUR, */ - /* SHADER_FILTER_BLUR_NOMUL, */ - /* SHADER_FILTER_BLUR_BGRA, */ - /* SHADER_FILTER_BLUR_BGRA_NOMUL, */ - SHADER_LAST -} Evas_GL_Shader; - -struct _Evas_GL_Program -{ - GLuint vert, frag, prog; - - int tex_count; -}; - -struct _Evas_GL_Program_Source -{ - const char *src; - const unsigned int *bin; - int bin_size; -}; - -struct _Evas_GL_Shared -{ - Eina_List *images; - - int images_size; - - struct { - GLint max_texture_units; - GLint max_texture_size; - GLint max_vertex_elements; - GLfloat anisotropic; - Eina_Bool rgb : 1; - Eina_Bool bgra : 1; - Eina_Bool tex_npo2 : 1; - Eina_Bool tex_rect : 1; - Eina_Bool sec_image_map : 1; - Eina_Bool bin_program : 1; - // tuning params - per gpu/cpu combo? -#define MAX_CUTOUT 512 -#define DEF_CUTOUT 512 - -// FIXME bug with pipes > 1 right now, should default to 32 -#define MAX_PIPES 128 -#define DEF_PIPES 32 -#define DEF_PIPES_SGX_540 32 -#define DEF_PIPES_TEGRA_2 1 - -#define MIN_ATLAS_ALLOC 16 -#define MAX_ATLAS_ALLOC 1024 -#define DEF_ATLAS_ALLOC 1024 - -#define MIN_ATLAS_ALLOC_ALPHA 16 -#define MAX_ATLAS_ALLOC_ALPHA 4096 -#define DEF_ATLAS_ALLOC_ALPHA 4096 - -#define MAX_ATLAS_W 512 -#define DEF_ATLAS_W 512 - -#define MAX_ATLAS_H 512 -#define DEF_ATLAS_H 512 - -#define MIN_ATLAS_SLOT 16 -#define MAX_ATLAS_SLOT 512 -#define DEF_ATLAS_SLOT 16 - - struct { - struct { - int max; - } cutout; - struct { - int max; - } pipes; - struct { - int max_alloc_size; - int max_alloc_alpha_size; - int max_w; - int max_h; - int slot_size; - } atlas; - } tune; - } info; - - struct { - Eina_List *whole; - Eina_List *atlas[33][3]; - } tex; - - Eina_Hash *native_pm_hash; - Eina_Hash *native_tex_hash; - - Evas_GL_Program shader[SHADER_LAST]; - - int references; - int w, h; - int rot; - int mflip; - // persp map - int foc, z0, px, py; - int ax, ay; -}; - -#define RTYPE_RECT 1 -#define RTYPE_IMAGE 2 -#define RTYPE_FONT 3 -#define RTYPE_YUV 4 -#define RTYPE_MAP 5 /* need to merge with image */ -#define RTYPE_IMASK 6 -#define RTYPE_YUY2 7 -#define RTYPE_NV12 8 - -struct _Evas_Engine_GL_Context -{ - int references; - int w, h; - int rot; - int foc, z0, px, py; - RGBA_Draw_Context *dc; - - Evas_GL_Shared *shared; - - int flushnum; - struct { - int top_pipe; - struct { - GLuint cur_prog; - GLuint cur_tex, cur_texu, cur_texv; - GLuint cur_texm, cur_texmu, cur_texmv; - int render_op; - int cx, cy, cw, ch; - int smooth; - int blend; - int clip; - } current; - } state; - - struct { - struct { - int x, y, w, h; - int type; - } region; - struct { - int x, y, w, h; - Eina_Bool active : 1; - } clip; - struct { - Evas_GL_Image *surface; - GLuint cur_prog; - GLuint cur_tex, cur_texu, cur_texv, cur_texm; - void *cur_tex_dyn, *cur_texu_dyn, *cur_texv_dyn; - int render_op; - int cx, cy, cw, ch; - int smooth; - int blend; - int clip; - } shader; - struct { - int num, alloc; - GLshort *vertex; - GLubyte *color; - GLfloat *texuv; - GLfloat *texuv2; - GLfloat *texuv3; - GLfloat *texm; - Eina_Bool line: 1; - Eina_Bool use_vertex : 1; - Eina_Bool use_color : 1; - Eina_Bool use_texuv : 1; - Eina_Bool use_texuv2 : 1; - Eina_Bool use_texuv3 : 1; - Eina_Bool use_texm : 1; - Evas_GL_Image *im; - } array; - } pipe[MAX_PIPES]; - - struct { - Eina_Bool size : 1; - } change; - - Eina_Bool havestuff : 1; - - Evas_GL_Image *def_surface; - - /* If this is set: Force drawing with a particular filter */ - GLuint filter_prog; - -#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) -// FIXME: hack. expose egl display to gl core for egl image sec extn. - void *egldisp; -#endif -}; - -struct _Evas_GL_Texture_Pool -{ - Evas_Engine_GL_Context *gc; - GLuint texture, fb; - GLuint intformat, format, dataformat; - int w, h; - int references; - int slot, fslot; - struct { - void *img; - unsigned int *data; - int w, h; - int stride; - int checked_out; - } dyn; - Eina_List *allocations; - Eina_Bool whole : 1; - Eina_Bool render : 1; - Eina_Bool native : 1; - Eina_Bool dynamic : 1; -}; - -struct _Evas_GL_Texture -{ - Evas_Engine_GL_Context *gc; - Evas_GL_Image *im; - Evas_GL_Texture_Pool *pt, *ptu, *ptv, *ptuv; - int x, y, w, h; - double sx1, sy1, sx2, sy2; - int references; - - struct - { - Evas_GL_Texture_Pool *pt[2], *ptuv[2]; - int source; - } double_buffer; - - Eina_Bool alpha : 1; - Eina_Bool dyn : 1; -}; - -struct _Evas_GL_Image -{ - Evas_Engine_GL_Context *gc; - RGBA_Image *im; - Evas_GL_Texture *tex; - RGBA_Image_Loadopts load_opts; - int references; - // if im->im == NULL, it's a render-surface so these here are used - int w, h; - struct { - int space; - void *data; - unsigned char no_free : 1; - } cs; - - struct { - void *data; - struct { - void (*bind) (void *data, void *image); - void (*unbind) (void *data, void *image); - void (*free) (void *data, void *image); - void *data; - } func; - int yinvert; - int target; - int mipmap; - unsigned char loose : 1; - } native; - - int scale_hint, content_hint; - int csize; - - Eina_List *filtered; - - unsigned char dirty : 1; - unsigned char cached : 1; - unsigned char alpha : 1; - unsigned char tex_only : 1; -}; - -struct _Evas_GL_Font_Texture -{ - Evas_GL_Texture *tex; -}; - -struct _Evas_GL_Polygon -{ - Eina_List *points; - Eina_Bool changed : 1; -}; - -struct _Evas_GL_Polygon_Point -{ - int x, y; -}; - -#if 0 -extern Evas_GL_Program_Source shader_rect_frag_src; -extern Evas_GL_Program_Source shader_rect_vert_src; -extern Evas_GL_Program_Source shader_font_frag_src; -extern Evas_GL_Program_Source shader_font_vert_src; - -extern Evas_GL_Program_Source shader_img_frag_src; -extern Evas_GL_Program_Source shader_img_vert_src; -extern Evas_GL_Program_Source shader_img_nomul_frag_src; -extern Evas_GL_Program_Source shader_img_nomul_vert_src; -extern Evas_GL_Program_Source shader_img_bgra_frag_src; -extern Evas_GL_Program_Source shader_img_bgra_vert_src; -extern Evas_GL_Program_Source shader_img_bgra_nomul_frag_src; -extern Evas_GL_Program_Source shader_img_bgra_nomul_vert_src; -extern Evas_GL_Program_Source shader_img_mask_frag_src; -extern Evas_GL_Program_Source shader_img_mask_vert_src; - -extern Evas_GL_Program_Source shader_yuv_frag_src; -extern Evas_GL_Program_Source shader_yuv_vert_src; -extern Evas_GL_Program_Source shader_yuv_nomul_frag_src; -extern Evas_GL_Program_Source shader_yuv_nomul_vert_src; - -extern Evas_GL_Program_Source shader_yuy2_frag_src; -extern Evas_GL_Program_Source shader_yuy2_vert_src; -extern Evas_GL_Program_Source shader_yuy2_nomul_frag_src; -extern Evas_GL_Program_Source shader_yuy2_nomul_vert_src; - -extern Evas_GL_Program_Source shader_tex_frag_src; -extern Evas_GL_Program_Source shader_tex_vert_src; -extern Evas_GL_Program_Source shader_tex_nomul_frag_src; -extern Evas_GL_Program_Source shader_tex_nomul_vert_src; - -extern Evas_GL_Program_Source shader_filter_invert_frag_src; -extern Evas_GL_Program_Source shader_filter_invert_nomul_frag_src; -extern Evas_GL_Program_Source shader_filter_invert_bgra_frag_src; -extern Evas_GL_Program_Source shader_filter_invert_bgra_nomul_frag_src; -extern Evas_GL_Program_Source shader_filter_sepia_frag_src; -extern Evas_GL_Program_Source shader_filter_sepia_nomul_frag_src; -extern Evas_GL_Program_Source shader_filter_sepia_bgra_frag_src; -extern Evas_GL_Program_Source shader_filter_sepia_bgra_nomul_frag_src; -extern Evas_GL_Program_Source shader_filter_greyscale_frag_src; -extern Evas_GL_Program_Source shader_filter_greyscale_nomul_frag_src; -extern Evas_GL_Program_Source shader_filter_greyscale_bgra_frag_src; -extern Evas_GL_Program_Source shader_filter_greyscale_bgra_nomul_frag_src; -/* blur (annoyingly) needs (aka is faster with) a vertex shader */ -extern Evas_GL_Program_Source shader_filter_blur_vert_src; -extern Evas_GL_Program_Source shader_filter_blur_frag_src; -extern Evas_GL_Program_Source shader_filter_blur_nomul_frag_src; -extern Evas_GL_Program_Source shader_filter_blur_bgra_frag_src; -extern Evas_GL_Program_Source shader_filter_blur_bgra_nomul_frag_src; -#endif - -void glerr(int err, const char *file, const char *func, int line, const char *op); - -Evas_Engine_GL_Context *evas_gl_common_context_new(void); -void evas_gl_common_context_free(Evas_Engine_GL_Context *gc); -void evas_gl_common_context_use(Evas_Engine_GL_Context *gc); -void evas_gl_common_context_newframe(Evas_Engine_GL_Context *gc); -void evas_gl_common_context_resize(Evas_Engine_GL_Context *gc, int w, int h, int rot); -void evas_gl_common_context_target_surface_set(Evas_Engine_GL_Context *gc, Evas_GL_Image *surface); - -void evas_gl_common_context_line_push(Evas_Engine_GL_Context *gc, - int x1, int y1, int x2, int y2, - int clip, int cx, int cy, int cw, int ch, - int r, int g, int b, int a); -void evas_gl_common_context_rectangle_push(Evas_Engine_GL_Context *gc, - int x, int y, int w, int h, - int r, int g, int b, int a); -void evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc, - Evas_GL_Texture *tex, - double sx, double sy, double sw, double sh, - int x, int y, int w, int h, - int r, int g, int b, int a, - Eina_Bool smooth, Eina_Bool tex_only); -void evas_gl_common_context_image_mask_push(Evas_Engine_GL_Context *gc, - Evas_GL_Texture *tex, - Evas_GL_Texture *texm, - double sx, double sy, double sw, double sh, - double sxm, double sym, double swm, double shm, - int x, int y, int w, int h, - int r, int g, int b, int a, - Eina_Bool smooth); - - -void evas_gl_common_context_font_push(Evas_Engine_GL_Context *gc, - Evas_GL_Texture *tex, - double sx, double sy, double sw, double sh, - int x, int y, int w, int h, - int r, int g, int b, int a); -void evas_gl_common_context_yuv_push(Evas_Engine_GL_Context *gc, - Evas_GL_Texture *tex, - double sx, double sy, double sw, double sh, - int x, int y, int w, int h, - int r, int g, int b, int a, - Eina_Bool smooth); -void evas_gl_common_context_yuy2_push(Evas_Engine_GL_Context *gc, - Evas_GL_Texture *tex, - double sx, double sy, double sw, double sh, - int x, int y, int w, int h, - int r, int g, int b, int a, - Eina_Bool smooth); -void evas_gl_common_context_nv12_push(Evas_Engine_GL_Context *gc, - Evas_GL_Texture *tex, - double sx, double sy, double sw, double sh, - int x, int y, int w, int h, - int r, int g, int b, int a, - Eina_Bool smooth); -void evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc, - Evas_GL_Texture *tex, - int npoints, - RGBA_Map_Point *p, - int clip, int cx, int cy, int cw, int ch, - int r, int g, int b, int a, - Eina_Bool smooth, - Eina_Bool tex_only, - Evas_Colorspace cspace); -void evas_gl_common_context_flush(Evas_Engine_GL_Context *gc); - -int evas_gl_common_shader_program_init(Evas_GL_Shared *shared); -void evas_gl_common_shader_program_init_done(void); -void evas_gl_common_shader_program_shutdown(Evas_GL_Program *p); - -void evas_gl_common_rect_draw(Evas_Engine_GL_Context *gc, int x, int y, int w, int h); - -void evas_gl_texture_pool_empty(Evas_GL_Texture_Pool *pt); -Evas_GL_Texture *evas_gl_common_texture_new(Evas_Engine_GL_Context *gc, RGBA_Image *im); -Evas_GL_Texture *evas_gl_common_texture_native_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha, Evas_GL_Image *im); -Evas_GL_Texture *evas_gl_common_texture_render_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha); -Evas_GL_Texture *evas_gl_common_texture_dynamic_new(Evas_Engine_GL_Context *gc, Evas_GL_Image *im); -void evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im); -void evas_gl_common_texture_free(Evas_GL_Texture *tex); -Evas_GL_Texture *evas_gl_common_texture_alpha_new(Evas_Engine_GL_Context *gc, DATA8 *pixels, unsigned int w, unsigned int h, int fh); -void evas_gl_common_texture_alpha_update(Evas_GL_Texture *tex, DATA8 *pixels, unsigned int w, unsigned int h, int fh); -Evas_GL_Texture *evas_gl_common_texture_yuv_new(Evas_Engine_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h); -void evas_gl_common_texture_yuv_update(Evas_GL_Texture *tex, DATA8 **rows, unsigned int w, unsigned int h); -Evas_GL_Texture *evas_gl_common_texture_yuy2_new(Evas_Engine_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h); -void evas_gl_common_texture_yuy2_update(Evas_GL_Texture *tex, DATA8 **rows, unsigned int w, unsigned int h); -Evas_GL_Texture *evas_gl_common_texture_nv12_new(Evas_Engine_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h); -void evas_gl_common_texture_nv12_update(Evas_GL_Texture *tex, DATA8 **row, unsigned int w, unsigned int h); -Evas_GL_Texture *evas_gl_common_texture_nv12tiled_new(Evas_Engine_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h); -void evas_gl_common_texture_nv12tiled_update(Evas_GL_Texture *tex, DATA8 **row, unsigned int w, unsigned int h); - -void evas_gl_common_image_all_unload(Evas_Engine_GL_Context *gc); - -void evas_gl_common_image_ref(Evas_GL_Image *im); -void evas_gl_common_image_unref(Evas_GL_Image *im); -Evas_GL_Image *evas_gl_common_image_load(Evas_Engine_GL_Context *gc, const char *file, const char *key, Evas_Image_Load_Opts *lo, int *error); -Evas_GL_Image *evas_gl_common_image_new_from_data(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, int cspace); -Evas_GL_Image *evas_gl_common_image_new_from_copied_data(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, int cspace); -Evas_GL_Image *evas_gl_common_image_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha, int cspace); -Evas_GL_Image *evas_gl_common_image_alpha_set(Evas_GL_Image *im, int alpha); -void evas_gl_common_image_native_enable(Evas_GL_Image *im); -void evas_gl_common_image_native_disable(Evas_GL_Image *im); -void evas_gl_common_image_scale_hint_set(Evas_GL_Image *im, int hint); -void evas_gl_common_image_content_hint_set(Evas_GL_Image *im, int hint); -void evas_gl_common_image_cache_flush(Evas_Engine_GL_Context *gc); -void evas_gl_common_image_free(Evas_GL_Image *im); -Evas_GL_Image *evas_gl_common_image_surface_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha); -void evas_gl_common_image_dirty(Evas_GL_Image *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h); -void evas_gl_common_image_update(Evas_Engine_GL_Context *gc, Evas_GL_Image *im); -void evas_gl_common_image_map_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im, int npoints, RGBA_Map_Point *p, int smooth, int level); -void evas_gl_common_image_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int smooth); - -void *evas_gl_font_texture_new(void *gc, RGBA_Font_Glyph *fg); -void evas_gl_font_texture_free(void *); -void evas_gl_font_texture_draw(void *gc, void *surface, void *dc, RGBA_Font_Glyph *fg, int x, int y); - -Evas_GL_Polygon *evas_gl_common_poly_point_add(Evas_GL_Polygon *poly, int x, int y); -Evas_GL_Polygon *evas_gl_common_poly_points_clear(Evas_GL_Polygon *poly); -void evas_gl_common_poly_draw(Evas_Engine_GL_Context *gc, Evas_GL_Polygon *poly, int x, int y); - -void evas_gl_common_line_draw(Evas_Engine_GL_Context *gc, int x1, int y1, int x2, int y2); - -#if 0 // filtering disabled -void evas_gl_common_filter_draw(Evas_Engine_GL_Context *context, Evas_GL_Image *im, Evas_Filter_Info *filter); -Filtered_Image *evas_gl_common_image_filtered_get(Evas_GL_Image *im, uint8_t *key, size_t keylen); -Filtered_Image *evas_gl_common_image_filtered_save(Evas_GL_Image *im, Evas_GL_Image *fimage, uint8_t *key, size_t keylen); -void evas_gl_common_image_filtered_free(Evas_GL_Image *im, Filtered_Image *); -#endif - -extern void (*glsym_glGenFramebuffers) (GLsizei a, GLuint *b); -extern void (*glsym_glBindFramebuffer) (GLenum a, GLuint b); -extern void (*glsym_glFramebufferTexture2D) (GLenum a, GLenum b, GLenum c, GLuint d, GLint e); -extern void (*glsym_glDeleteFramebuffers) (GLsizei a, const GLuint *b); -extern void (*glsym_glGetProgramBinary) (GLuint a, GLsizei b, GLsizei *c, GLenum *d, void *e); -extern void (*glsym_glProgramBinary) (GLuint a, GLenum b, const void *c, GLint d); -extern void (*glsym_glProgramParameteri) (GLuint a, GLuint b, GLint d); - -#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) -extern void *(*secsym_eglCreateImage) (void *a, void *b, GLenum c, void *d, const int *e); -extern unsigned int (*secsym_eglDestroyImage) (void *a, void *b); -extern void (*secsym_glEGLImageTargetTexture2DOES) (int a, void *b); -extern void *(*secsym_eglMapImageSEC) (void *a, void *b); -extern unsigned int (*secsym_eglUnmapImageSEC) (void *a, void *b); -extern unsigned int (*secsym_eglGetImageAttribSEC) (void *a, void *b, int c, int *d); -#endif - -//#define GL_ERRORS 1 - -#ifdef GL_ERRORS -# define GLERR(fn, fl, ln, op) \ - { \ - int __gl_err = glGetError(); \ - if (__gl_err != GL_NO_ERROR) glerr(__gl_err, fl, fn, ln, op); \ - } -#else -# define GLERR(fn, fl, ln, op) -#endif - -Eina_Bool evas_gl_common_module_open(void); -void evas_gl_common_module_close(void); - -#endif diff --git a/libraries/evas/src/modules/engines/gl_common/evas_gl_context.c b/libraries/evas/src/modules/engines/gl_common/evas_gl_context.c deleted file mode 100644 index 62e72bd..0000000 --- a/libraries/evas/src/modules/engines/gl_common/evas_gl_context.c +++ /dev/null @@ -1,2723 +0,0 @@ -#include "evas_gl_private.h" - -#ifdef HAVE_DLSYM -# include /* dlopen,dlclose,etc */ -#else -# error gl_common should not get compiled if dlsym is not found on the system! -#endif - -#define PRG_INVALID 0xffffffff -#define GLPIPES 1 - -static int sym_done = 0; -int _evas_engine_GL_common_log_dom = -1; - -typedef void (*glsym_func_void) (); - -void (*glsym_glGenFramebuffers) (GLsizei a, GLuint *b) = NULL; -void (*glsym_glBindFramebuffer) (GLenum a, GLuint b) = NULL; -void (*glsym_glFramebufferTexture2D) (GLenum a, GLenum b, GLenum c, GLuint d, GLint e) = NULL; -void (*glsym_glDeleteFramebuffers) (GLsizei a, const GLuint *b) = NULL; -void (*glsym_glGetProgramBinary) (GLuint a, GLsizei b, GLsizei *c, GLenum *d, void *e) = NULL; -void (*glsym_glProgramBinary) (GLuint a, GLenum b, const void *c, GLint d) = NULL; -void (*glsym_glProgramParameteri) (GLuint a, GLuint b, GLint d) = NULL; - -#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) -// just used for finding symbols :) -typedef void (*_eng_fn) (void); - -typedef _eng_fn (*secsym_func_eng_fn) (); -typedef unsigned int (*secsym_func_uint) (); -typedef void *(*secsym_func_void_ptr) (); - -static _eng_fn (*secsym_eglGetProcAddress) (const char *a) = NULL; - -void *(*secsym_eglCreateImage) (void *a, void *b, GLenum c, void *d, const int *e) = NULL; -unsigned int (*secsym_eglDestroyImage) (void *a, void *b) = NULL; -void (*secsym_glEGLImageTargetTexture2DOES) (int a, void *b) = NULL; -void *(*secsym_eglMapImageSEC) (void *a, void *b) = NULL; -unsigned int (*secsym_eglUnmapImageSEC) (void *a, void *b) = NULL; -unsigned int (*secsym_eglGetImageAttribSEC) (void *a, void *b, int c, int *d) = NULL; -#endif - -static int dbgflushnum = -1; - -static void -sym_missing(void) -{ - ERR("GL symbols missing!"); -} - -static void -gl_symbols(void) -{ - if (sym_done) return; - sym_done = 1; - - /* FIXME: If using the SDL engine, we should use SDL_GL_GetProcAddress - * instead of dlsym - * if (!dst) dst = (typ)SDL_GL_GetProcAddress(sym) - */ -#define FINDSYM(dst, sym, typ) if (!dst) dst = (typ)dlsym(RTLD_DEFAULT, sym) -#define FALLBAK(dst, typ) if (!dst) dst = (typ)sym_missing; - - FINDSYM(glsym_glGenFramebuffers, "glGenFramebuffers", glsym_func_void); - FINDSYM(glsym_glGenFramebuffers, "glGenFramebuffersEXT", glsym_func_void); - FINDSYM(glsym_glGenFramebuffers, "glGenFramebuffersARB", glsym_func_void); - FALLBAK(glsym_glGenFramebuffers, glsym_func_void); - - FINDSYM(glsym_glBindFramebuffer, "glBindFramebuffer", glsym_func_void); - FINDSYM(glsym_glBindFramebuffer, "glBindFramebufferEXT", glsym_func_void); - FINDSYM(glsym_glBindFramebuffer, "glBindFramebufferARB", glsym_func_void); - FALLBAK(glsym_glBindFramebuffer, glsym_func_void); - - FINDSYM(glsym_glFramebufferTexture2D, "glFramebufferTexture2D", glsym_func_void); - FINDSYM(glsym_glFramebufferTexture2D, "glFramebufferTexture2DEXT", glsym_func_void); - FINDSYM(glsym_glFramebufferTexture2D, "glFramebufferTexture2DARB", glsym_func_void); - FALLBAK(glsym_glFramebufferTexture2D, glsym_func_void); - - FINDSYM(glsym_glDeleteFramebuffers, "glDeleteFramebuffers", glsym_func_void); - FINDSYM(glsym_glDeleteFramebuffers, "glDeleteFramebuffersEXT", glsym_func_void); - FINDSYM(glsym_glDeleteFramebuffers, "glDeleteFramebuffersARB", glsym_func_void); - FALLBAK(glsym_glDeleteFramebuffers, glsym_func_void); - - FINDSYM(glsym_glGetProgramBinary, "glGetProgramBinary", glsym_func_void); - FINDSYM(glsym_glGetProgramBinary, "glGetProgramBinaryEXT", glsym_func_void); - FINDSYM(glsym_glGetProgramBinary, "glGetProgramBinaryARB", glsym_func_void); - FINDSYM(glsym_glGetProgramBinary, "glGetProgramBinaryOES", glsym_func_void); - - FINDSYM(glsym_glProgramBinary, "glProgramBinary", glsym_func_void); - FINDSYM(glsym_glProgramBinary, "glProgramBinaryEXT", glsym_func_void); - FINDSYM(glsym_glProgramBinary, "glProgramBinaryARB", glsym_func_void); - - FINDSYM(glsym_glProgramParameteri, "glProgramParameteri", glsym_func_void); - FINDSYM(glsym_glProgramParameteri, "glProgramParameteriEXT", glsym_func_void); - FINDSYM(glsym_glProgramParameteri, "glProgramParameteriARB", glsym_func_void); - -#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) -#undef FINDSYM -#define FINDSYM(dst, sym, typ) \ - if ((!dst) && (secsym_eglGetProcAddress)) dst = (typ)secsym_eglGetProcAddress(sym); \ - if (!dst) dst = (typ)dlsym(RTLD_DEFAULT, sym) -// yes - gl core looking for egl stuff. i know it's odd. a reverse-layer thing -// but it will work as the egl/glx layer calls gl core common stuff and thus -// these symbols will work. making the glx/egl + x11 layer do this kind-of is -// wrong as this is not x11 (output) layer specific like the native surface -// stuff. this is generic zero-copy textures for gl - - FINDSYM(secsym_eglGetProcAddress, "eglGetProcAddress", secsym_func_eng_fn); - FINDSYM(secsym_eglGetProcAddress, "eglGetProcAddressEXT", secsym_func_eng_fn); - FINDSYM(secsym_eglGetProcAddress, "eglGetProcAddressARB", secsym_func_eng_fn); - FINDSYM(secsym_eglGetProcAddress, "eglGetProcAddressKHR", secsym_func_eng_fn); - - FINDSYM(secsym_eglCreateImage, "eglCreateImage", secsym_func_void_ptr); - FINDSYM(secsym_eglCreateImage, "eglCreateImageEXT", secsym_func_void_ptr); - FINDSYM(secsym_eglCreateImage, "eglCreateImageARB", secsym_func_void_ptr); - FINDSYM(secsym_eglCreateImage, "eglCreateImageKHR", secsym_func_void_ptr); - - FINDSYM(secsym_eglDestroyImage, "eglDestroyImage", secsym_func_uint); - FINDSYM(secsym_eglDestroyImage, "eglDestroyImageEXT", secsym_func_uint); - FINDSYM(secsym_eglDestroyImage, "eglDestroyImageARB", secsym_func_uint); - FINDSYM(secsym_eglDestroyImage, "eglDestroyImageKHR", secsym_func_uint); - - FINDSYM(glsym_glGetProgramBinary, "glGetProgramBinary", glsym_func_void); - FINDSYM(glsym_glGetProgramBinary, "glGetProgramBinaryEXT", glsym_func_void); - FINDSYM(glsym_glGetProgramBinary, "glGetProgramBinaryARB", glsym_func_void); - FINDSYM(glsym_glGetProgramBinary, "glGetProgramBinaryOES", glsym_func_void); - FINDSYM(glsym_glGetProgramBinary, "glGetProgramBinaryKHR", glsym_func_void); - - FINDSYM(glsym_glProgramBinary, "glProgramBinary", glsym_func_void); - FINDSYM(glsym_glProgramBinary, "glProgramBinaryEXT", glsym_func_void); - FINDSYM(glsym_glProgramBinary, "glProgramBinaryARB", glsym_func_void); - FINDSYM(glsym_glProgramBinary, "glProgramBinaryOES", glsym_func_void); - FINDSYM(glsym_glProgramBinary, "glProgramBinaryKHR", glsym_func_void); - - FINDSYM(glsym_glProgramParameteri, "glProgramParameteri", glsym_func_void); - FINDSYM(glsym_glProgramParameteri, "glProgramParameteriEXT", glsym_func_void); - FINDSYM(glsym_glProgramParameteri, "glProgramParameteriARB", glsym_func_void); - FINDSYM(glsym_glProgramParameteri, "glProgramParameteriOES", glsym_func_void); - FINDSYM(glsym_glProgramParameteri, "glProgramParameteriKHR", glsym_func_void); - - FINDSYM(secsym_glEGLImageTargetTexture2DOES, "glEGLImageTargetTexture2DOES", glsym_func_void); - - FINDSYM(secsym_eglMapImageSEC, "eglMapImageSEC", secsym_func_void_ptr); - - FINDSYM(secsym_eglUnmapImageSEC, "eglUnmapImageSEC", secsym_func_uint); - - FINDSYM(secsym_eglGetImageAttribSEC, "eglGetImageAttribSEC", secsym_func_uint); -#endif -} - -static void shader_array_flush(Evas_Engine_GL_Context *gc); - -static Evas_Engine_GL_Context *_evas_gl_common_context = NULL; -static Evas_GL_Shared *shared = NULL; - -void -glerr(int err, const char *file, const char *func, int line, const char *op) -{ - const char *errmsg; - char buf[32]; - - switch (err) - { - case GL_INVALID_ENUM: - errmsg = "GL_INVALID_ENUM"; - break; - case GL_INVALID_VALUE: - errmsg = "GL_INVALID_VALUE"; - break; - case GL_INVALID_OPERATION: - errmsg = "GL_INVALID_OPERATION"; - break; - case GL_OUT_OF_MEMORY: - errmsg = "GL_OUT_OF_MEMORY"; - break; - default: - snprintf(buf, sizeof(buf), "%#x", err); - errmsg = buf; - } - - eina_log_print(_evas_engine_GL_common_log_dom, EINA_LOG_LEVEL_ERR, - file, func, line, "%s: %s", op, errmsg); -} - -static void -matrix_ortho(GLfloat *m, - GLfloat l, GLfloat r, - GLfloat t, GLfloat b, - GLfloat near, GLfloat far, - int rot, int vw, int vh, - int foc, GLfloat orth) -{ - GLfloat rotf; - GLfloat cosv, sinv; - GLfloat tx, ty; - - rotf = (((rot / 90) & 0x3) * M_PI) / 2.0; - - tx = -0.5 * (1.0 - orth); - ty = -0.5 * (1.0 - orth); - - if (rot == 90) - { - tx += -(vw * 1.0); - ty += -(vh * 0.0); - } - if (rot == 180) - { - tx += -(vw * 1.0); - ty += -(vh * 1.0); - } - if (rot == 270) - { - tx += -(vw * 0.0); - ty += -(vh * 1.0); - } - - cosv = cos(rotf); - sinv = sin(rotf); - - m[0] = (2.0 / (r - l)) * ( cosv); - m[1] = (2.0 / (r - l)) * ( sinv); - m[2] = 0.0; - m[3] = 0.0; - - m[4] = (2.0 / (t - b)) * (-sinv); - m[5] = (2.0 / (t - b)) * ( cosv); - m[6] = 0.0; - m[7] = 0.0; - - m[8] = 0.0; - m[9] = 0.0; - m[10] = -(2.0 / (far - near)); - m[11] = 1.0 / (GLfloat)foc; - - m[12] = (m[0] * tx) + (m[4] * ty) - ((r + l) / (r - l)); - m[13] = (m[1] * tx) + (m[5] * ty) - ((t + b) / (t - b)); - m[14] = (m[2] * tx) + (m[6] * ty) - ((near + far) / (far - near)); - m[15] = (m[3] * tx) + (m[7] * ty) + orth; -} - -static int -_evas_gl_common_version_check() -{ - char *version; - char *tmp; - char *tmp2; - int major; - int minor; - - /* - * glGetString returns a string describing the current GL connection. - * GL_VERSION is used to get the version of the connection - */ - - version = (char *)glGetString(GL_VERSION); - - /* - * OpengL ES - * - * 1.* : The form is: - * - * OpenGL ES- . - * - * where is either "CM" or "CL". The minor can be followed by the vendor - * specific information - * - * 2.0 : The form is: - * - * OpenGLES - */ - - /* OpenGL ES 1.* ? */ - - if ((tmp = strstr(version, "OpenGL ES-CM ")) || (tmp = strstr(version, "OpenGL ES-CL "))) - { - /* Not supported */ - return 0; - } - - /* OpenGL ES 2.* ? */ - - if ((tmp = strstr(version, "OpenGL ES "))) - { - /* Supported */ - return 1; - } - - /* - * OpenGL - * - * The GL_VERSION and GL_SHADING_LANGUAGE_VERSION strings begin with a - * version number. The version number uses one of these forms: - * - * major_number.minor_number - * major_number.minor_number.release_number - * - * Vendor-specific information may follow the version number. Its format - * depends on the implementation, but a space always separates the - * version number and the vendor-specific information. - */ - - /* glGetString() returns a static string, and we are going to */ - /* modify it, so we get a copy first */ - version = strdup(version); - if (!version) - return 0; - - tmp = strchr(version, '.'); - /* the first '.' always exists */ - *tmp = '\0'; - major = atoi(version); - /* FIXME: maybe we can assume that minor in only a cipher */ - tmp2 = ++tmp; - while ((*tmp != '.') && (*tmp != ' ') && (*tmp != '\0')) - tmp++; - /* *tmp is '\0' : version is major_number.minor_number */ - /* *tmp is '.' : version is major_number.minor_number.release_number */ - /* *tmp is ' ' : version is major_number.minor_number followed by vendor */ - *tmp = '\0'; - minor = atoi(tmp2); - free(version); - - if (((major == 1) && (minor >= 4)) || (major >= 2)) - return 1; - - return 0; -} - -static void -_evas_gl_common_viewport_set(Evas_Engine_GL_Context *gc) -{ - GLfloat proj[16]; - unsigned int i; - int w = 1, h = 1, m = 1, rot = 1, foc = 0; - - EINA_SAFETY_ON_NULL_RETURN(gc); - foc = gc->foc; - // surface in pipe 0 will be the same as all pipes - if ((gc->pipe[0].shader.surface == gc->def_surface) || - (!gc->pipe[0].shader.surface)) - { - w = gc->w; - h = gc->h; - rot = gc->rot; - } - else - { - w = gc->pipe[0].shader.surface->w; - h = gc->pipe[0].shader.surface->h; - rot = 0; - m = -1; - } - - if ((!gc->change.size) || - ((gc->shared->w == w) && (gc->shared->h == h) && - (gc->shared->rot == rot) && (gc->shared->foc == gc->foc) && - (gc->shared->mflip == m))) - return; - - gc->shared->w = w; - gc->shared->h = h; - gc->shared->rot = rot; - gc->shared->mflip = m; - gc->shared->foc = foc; - gc->shared->z0 = gc->z0; - gc->shared->px = gc->px; - gc->shared->py = gc->py; - gc->change.size = 0; - - if (foc == 0) - { - if ((rot == 0) || (rot == 180)) - glViewport(0, 0, w, h); - else - glViewport(0, 0, h, w); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - // std matrix - if (m == 1) - matrix_ortho(proj, - 0, w, 0, h, - -1000000.0, 1000000.0, - rot, w, h, - 1, 1.0); - // v flipped matrix for render-to-texture - else - matrix_ortho(proj, - 0, w, h, 0, - -1000000.0, 1000000.0, - rot, w, h, - 1, 1.0); - } - else - { - int px, py, vx, vy, vw = 0, vh = 0, ax = 0, ay = 0, ppx = 0, ppy = 0; - - px = gc->shared->px; - py = gc->shared->py; - - if ((rot == 0 ) || (rot == 90 )) ppx = px; - else if ((rot == 180) || (rot == 270)) ppx = w - px; - if ((rot == 0 ) || (rot == 270)) ppy = py; - else if ((rot == 90 ) || (rot == 180)) ppy = h - py; - - vx = ((w / 2) - ppx); - if (vx >= 0) - { - vw = w + (2 * vx); - if ((rot == 0 ) || (rot == 90 )) ax = 2 * vx; - else if ((rot == 180) || (rot == 270)) ax = 0; - } - else - { - vw = w - (2 * vx); - if ((rot == 0 ) || (rot == 90 )) ax = 0; - else if ((rot == 180) || (rot == 270)) ax = ppx - px; - vx = 0; - } - - vy = ((h / 2) - ppy); - if (vy < 0) - { - vh = h - (2 * vy); - if ((rot == 0 )) ay = 0; - else if ((rot == 90 ) || (rot == 180) || (rot == 270)) ay = ppy - py; - vy = -vy; - } - else - { - vh = h + (2 * vy); - if ((rot == 0 ) || (rot == 270)) ay = 2 * vy; - else if ((rot == 90 ) || (rot == 180)) ay = 0; - vy = 0; - } - - if (m == -1) ay = vy * 2; - - if ((rot == 0) || (rot == 180)) - glViewport(-2 * vx, -2 * vy, vw, vh); - else - glViewport(-2 * vy, -2 * vx, vh, vw); - if (m == 1) - matrix_ortho(proj, 0, vw, 0, vh, - -1000000.0, 1000000.0, - rot, vw, vh, - foc, 0.0); - else - matrix_ortho(proj, 0, vw, vh, 0, - -1000000.0, 1000000.0, - rot, vw, vh, - foc, 0.0); - gc->shared->ax = ax; - gc->shared->ay = ay; - } - - for (i = 0; i < SHADER_LAST; ++i) - { - glUseProgram(gc->shared->shader[i].prog); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader[i].prog, "mvp"), 1, GL_FALSE, proj); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } - - if (gc->state.current.cur_prog == PRG_INVALID) - glUseProgram(gc->shared->shader[0].prog); - else glUseProgram(gc->state.current.cur_prog); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); -} - -Evas_Engine_GL_Context * -evas_gl_common_context_new(void) -{ - Evas_Engine_GL_Context *gc; - const char *s; - int i; - -#if 1 - if (_evas_gl_common_context) - { - _evas_gl_common_context->references++; - return _evas_gl_common_context; - } -#endif - if (!_evas_gl_common_version_check()) - return NULL; - gc = calloc(1, sizeof(Evas_Engine_GL_Context)); - if (!gc) return NULL; - - gl_symbols(); - - gc->references = 1; - - _evas_gl_common_context = gc; - - for (i = 0; i < MAX_PIPES; i++) - gc->pipe[i].shader.render_op = EVAS_RENDER_BLEND; - - if (!shared) - { - const GLubyte *ext; - - shared = calloc(1, sizeof(Evas_GL_Shared)); - ext = glGetString(GL_EXTENSIONS); - if (ext) - { - if (getenv("EVAS_GL_INFO")) - fprintf(stderr, "EXT:\n%s\n", ext); - if ((strstr((char *)ext, "GL_ARB_texture_non_power_of_two")) || - (strstr((char *)ext, "OES_texture_npot")) || - (strstr((char *)ext, "GL_IMG_texture_npot"))) - shared->info.tex_npo2 = 1; - if ((strstr((char *)ext, "GL_NV_texture_rectangle")) || - (strstr((char *)ext, "GL_EXT_texture_rectangle")) || - (strstr((char *)ext, "GL_ARB_texture_rectangle"))) - shared->info.tex_rect = 1; - if ((strstr((char *)ext, "GL_ARB_get_program_binary")) || - (strstr((char *)ext, "GL_OES_get_program_binary"))) - shared->info.bin_program = 1; -#ifdef GL_TEXTURE_MAX_ANISOTROPY_EXT - if ((strstr((char *)ext, "GL_EXT_texture_filter_anisotropic"))) - glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, - &(shared->info.anisotropic)); -#endif -#ifdef GL_BGRA - if ((strstr((char *)ext, "GL_EXT_bgra")) || - (strstr((char *)ext, "GL_EXT_texture_format_BGRA8888"))) - shared->info.bgra = 1; -#endif -#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) - // FIXME: there should be an extension name/string to check for - // not just symbols in the lib - i = 0; - s = getenv("EVAS_GL_NO_MAP_IMAGE_SEC"); - if (s) i = atoi(s); - if (!i) - { - // test for all needed symbols - be "conservative" and - // need all of it - if ((secsym_eglCreateImage) && - (secsym_eglDestroyImage) && - (secsym_glEGLImageTargetTexture2DOES) && - (secsym_eglMapImageSEC) && - (secsym_eglUnmapImageSEC) && - (secsym_eglGetImageAttribSEC)) - shared->info.sec_image_map = 1; - } -#endif - } - glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, - &(shared->info.max_texture_units)); - glGetIntegerv(GL_MAX_TEXTURE_SIZE, - &(shared->info.max_texture_size)); - shared->info.max_vertex_elements = 6 * 100000; -#ifdef GL_MAX_ELEMENTS_VERTICES -/* only applies to glDrawRangeElements. don't really need to get it. - glGetIntegerv(GL_MAX_ELEMENTS_VERTICES, - &(shared->info.max_vertex_elements)); - */ -#endif - s = getenv("EVAS_GL_VERTEX_MAX"); - if (s) shared->info.max_vertex_elements = atoi(s); - if (shared->info.max_vertex_elements < 6) - shared->info.max_vertex_elements = 6; - - // magic numbers that are a result of imperical testing and getting - // "best case" performance across a range of systems - shared->info.tune.cutout.max = DEF_CUTOUT; - shared->info.tune.pipes.max = DEF_PIPES; - shared->info.tune.atlas.max_alloc_size = DEF_ATLAS_ALLOC; - shared->info.tune.atlas.max_alloc_alpha_size = DEF_ATLAS_ALLOC_ALPHA; - shared->info.tune.atlas.max_w = DEF_ATLAS_W; - shared->info.tune.atlas.max_h = DEF_ATLAS_H; - shared->info.tune.atlas.slot_size = DEF_ATLAS_SLOT; - - // per gpu hacks. based on impirical measurement of some known gpu's - s = (const char *)glGetString(GL_RENDERER); - if (s) - { - if (strstr(s, "PowerVR SGX 540")) - shared->info.tune.pipes.max = DEF_PIPES_SGX_540; - else if (strstr(s, "NVIDIA Tegra")) - shared->info.tune.pipes.max = DEF_PIPES_TEGRA_2; - } - -#define GETENVOPT(name, tune_param, min, max) \ - do { \ - const char *__v = getenv(name); \ - if (__v) { \ - shared->info.tune.tune_param = atoi(__v); \ - if (shared->info.tune.tune_param > max) \ - shared->info.tune.tune_param = max; \ - else if (shared->info.tune.tune_param < min) \ - shared->info.tune.tune_param = min; \ - } \ - } while (0) - - GETENVOPT("EVAS_GL_CUTOUT_MAX", cutout.max, -1, 0x7fffffff); - GETENVOPT("EVAS_GL_PIPES_MAX", pipes.max, 1, MAX_PIPES); - GETENVOPT("EVAS_GL_ATLAS_ALLOC_SIZE", atlas.max_alloc_size, MIN_ATLAS_ALLOC, MAX_ATLAS_ALLOC); - GETENVOPT("EVAS_GL_ATLAS_ALLOC_ALPHA_SIZE", atlas.max_alloc_alpha_size, MIN_ATLAS_ALLOC_ALPHA, MAX_ATLAS_ALLOC_ALPHA); - GETENVOPT("EVAS_GL_ATLAS_MAX_W", atlas.max_w, 0, MAX_ATLAS_W); - GETENVOPT("EVAS_GL_ATLAS_MAX_H", atlas.max_h, 0, MAX_ATLAS_H); - GETENVOPT("EVAS_GL_ATLAS_SLOT_SIZE", atlas.slot_size, MIN_ATLAS_SLOT, MAX_ATLAS_SLOT); - s = (const char *)getenv("EVAS_GL_GET_PROGRAM_BINARY"); - if (s) - { - if (atoi(s) == 0) shared->info.bin_program = 0; - } - - if (getenv("EVAS_GL_INFO")) - fprintf(stderr, - "max tex size %ix%i\n" - "max units %i\n" - "non-power-2 tex %i\n" - "rect tex %i\n" - "bgra : %i\n" - "max ansiotropic filtering: %3.3f\n" - "egl sec map image: %i\n" - "max vertex count: %i\n" - "\n" - "(can set EVAS_GL_VERTEX_MAX EVAS_GL_NO_MAP_IMAGE_SEC EVAS_GL_INFO EVAS_GL_MEMINFO )\n" - "\n" - "EVAS_GL_GET_PROGRAM_BINARY: %i\n" - "EVAS_GL_CUTOUT_MAX: %i\n" - "EVAS_GL_PIPES_MAX: %i\n" - "EVAS_GL_ATLAS_ALLOC_SIZE: %i\n" - "EVAS_GL_ATLAS_ALLOC_ALPHA_SIZE: %i\n" - "EVAS_GL_ATLAS_MAX_W x EVAS_GL_ATLAS_MAX_H: %i x %i\n" - "EVAS_GL_ATLAS_SLOT_SIZE: %i\n" - , - (int)shared->info.max_texture_size, (int)shared->info.max_texture_size, - (int)shared->info.max_texture_units, - (int)shared->info.tex_npo2, - (int)shared->info.tex_rect, - (int)shared->info.bgra, - (double)shared->info.anisotropic, - (int)shared->info.sec_image_map, - (int)shared->info.max_vertex_elements, - - (int)shared->info.bin_program, - (int)shared->info.tune.cutout.max, - (int)shared->info.tune.pipes.max, - (int)shared->info.tune.atlas.max_alloc_size, - (int)shared->info.tune.atlas.max_alloc_alpha_size, - (int)shared->info.tune.atlas.max_w, (int)shared->info.tune.atlas.max_h, - (int)shared->info.tune.atlas.slot_size - ); - - glDisable(GL_DEPTH_TEST); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glEnable(GL_DITHER); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glDisable(GL_BLEND); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - // no dest alpha -// glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // dest alpha -// glBlendFunc(GL_SRC_ALPHA, GL_ONE); // ??? - glDepthMask(GL_FALSE); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); -#ifdef GL_TEXTURE_MAX_ANISOTROPY_EXT - if (shared->info.anisotropic > 0.0) - { - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.0); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } -#endif - - glEnableVertexAttribArray(SHAD_VERTEX); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glEnableVertexAttribArray(SHAD_COLOR); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - - if (!evas_gl_common_shader_program_init(shared)) goto error; - -#define SHADER_TEXTURE_ADD(Shared, Shader, Name) \ - glUseProgram(Shared->shader[SHADER_##Shader].prog); \ - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); \ - glUniform1i(glGetUniformLocation(Shared->shader[SHADER_##Shader].prog, #Name), Shared->shader[SHADER_##Shader].tex_count++); \ - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - - SHADER_TEXTURE_ADD(shared, YUV, tex); - SHADER_TEXTURE_ADD(shared, YUV, texu); - SHADER_TEXTURE_ADD(shared, YUV, texv); - - SHADER_TEXTURE_ADD(shared, YUY2, tex); - SHADER_TEXTURE_ADD(shared, YUY2, texuv); - - SHADER_TEXTURE_ADD(shared, NV12, tex); - SHADER_TEXTURE_ADD(shared, NV12, texuv); - - SHADER_TEXTURE_ADD(shared, YUV_NOMUL, tex); - SHADER_TEXTURE_ADD(shared, YUV_NOMUL, texu); - SHADER_TEXTURE_ADD(shared, YUV_NOMUL, texv); - - SHADER_TEXTURE_ADD(shared, YUY2_NOMUL, tex); - SHADER_TEXTURE_ADD(shared, YUY2_NOMUL, texuv); - - SHADER_TEXTURE_ADD(shared, NV12_NOMUL, tex); - SHADER_TEXTURE_ADD(shared, NV12_NOMUL, texuv); - - SHADER_TEXTURE_ADD(shared, IMG_MASK, tex); - SHADER_TEXTURE_ADD(shared, IMG_MASK, texm); - - if (gc->state.current.cur_prog == PRG_INVALID) - glUseProgram(gc->shared->shader[0].prog); - else glUseProgram(gc->state.current.cur_prog); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - - evas_gl_common_shader_program_init_done(); - // in shader: - // uniform sampler2D tex[8]; - // - // in code: - // GLuint texes[8]; - // GLint loc = glGetUniformLocation(prog, "tex"); - // glUniform1iv(loc, 8, texes); - - shared->native_pm_hash = eina_hash_int32_new(NULL); - shared->native_tex_hash = eina_hash_int32_new(NULL); - } - gc->shared = shared; - gc->shared->references++; - _evas_gl_common_viewport_set(gc); - - gc->def_surface = evas_gl_common_image_surface_new(gc, 1, 1, 1); - - return gc; - error: - evas_gl_common_context_free(gc); - return NULL; -} - -void -evas_gl_common_context_free(Evas_Engine_GL_Context *gc) -{ - int i, j; - Eina_List *l; - - gc->references--; - if (gc->references > 0) return; - if (gc->shared) gc->shared->references--; - - if (gc->def_surface) evas_gl_common_image_free(gc->def_surface); - - if (gc->shared) - { - for (i = 0; i < gc->shared->info.tune.pipes.max; i++) - { - if (gc->pipe[i].array.vertex) free(gc->pipe[i].array.vertex); - if (gc->pipe[i].array.color) free(gc->pipe[i].array.color); - if (gc->pipe[i].array.texuv) free(gc->pipe[i].array.texuv); - if (gc->pipe[i].array.texm) free(gc->pipe[i].array.texm); - if (gc->pipe[i].array.texuv2) free(gc->pipe[i].array.texuv2); - if (gc->pipe[i].array.texuv3) free(gc->pipe[i].array.texuv3); - } - } - - if ((gc->shared) && (gc->shared->references == 0)) - { - Evas_GL_Texture_Pool *pt; - - for (i = 0; i < SHADER_LAST; ++i) - evas_gl_common_shader_program_shutdown(&(gc->shared->shader[i])); - - while (gc->shared->images) - { - evas_gl_common_image_free(gc->shared->images->data); - } - - EINA_LIST_FOREACH(gc->shared->tex.whole, l, pt) - evas_gl_texture_pool_empty(pt); - for (i = 0; i < 33; i++) - { - for (j = 0; j < 3; j++) - { - EINA_LIST_FOREACH(gc->shared->tex.atlas[i][j], l, pt) - evas_gl_texture_pool_empty(pt); - } - } - eina_hash_free(gc->shared->native_pm_hash); - eina_hash_free(gc->shared->native_tex_hash); - free(gc->shared); - shared = NULL; - } - if (gc == _evas_gl_common_context) _evas_gl_common_context = NULL; - free(gc); -} - -void -evas_gl_common_context_use(Evas_Engine_GL_Context *gc) -{ - if (_evas_gl_common_context == gc) return; - _evas_gl_common_context = gc; - if (gc) _evas_gl_common_viewport_set(gc); -} - -void -evas_gl_common_context_newframe(Evas_Engine_GL_Context *gc) -{ - int i; - - if (dbgflushnum < 0) - { - dbgflushnum = 0; - if (getenv("EVAS_GL_DBG")) dbgflushnum = 1; - } - if (dbgflushnum) printf("----prev-flushnum: %i -----------------------------------\n", gc->flushnum); - - gc->flushnum = 0; - gc->state.current.cur_prog = 0; - gc->state.current.cur_tex = 0; - gc->state.current.cur_texu = 0; - gc->state.current.cur_texv = 0; - gc->state.current.cur_texm = 0; - gc->state.current.cur_texmu = 0; - gc->state.current.cur_texmv = 0; - gc->state.current.render_op = 0; - gc->state.current.smooth = 0; - gc->state.current.blend = 0; - gc->state.current.clip = 0; - gc->state.current.cx = 0; - gc->state.current.cy = 0; - gc->state.current.cw = 0; - gc->state.current.ch = 0; - - for (i = 0; i < gc->shared->info.tune.pipes.max; i++) - { - gc->pipe[i].region.x = 0; - gc->pipe[i].region.y = 0; - gc->pipe[i].region.w = 0; - gc->pipe[i].region.h = 0; - gc->pipe[i].region.type = 0; - gc->pipe[i].clip.active = 0; - gc->pipe[i].clip.x = 0; - gc->pipe[i].clip.y = 0; - gc->pipe[i].clip.w = 0; - gc->pipe[i].clip.h = 0; - gc->pipe[i].shader.surface = NULL; - gc->pipe[i].shader.cur_prog = 0; - gc->pipe[i].shader.cur_tex = 0; - gc->pipe[i].shader.cur_texu = 0; - gc->pipe[i].shader.cur_texv = 0; - gc->pipe[i].shader.cur_texm = 0; - gc->pipe[i].shader.render_op = EVAS_RENDER_BLEND; - gc->pipe[i].shader.smooth = 0; - gc->pipe[i].shader.blend = 0; - gc->pipe[i].shader.clip = 0; - gc->pipe[i].shader.cx = 0; - gc->pipe[i].shader.cy = 0; - gc->pipe[i].shader.cw = 0; - gc->pipe[i].shader.ch = 0; - } - gc->change.size = 1; - - glDisable(GL_SCISSOR_TEST); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glScissor(0, 0, 0, 0); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - - glDisable(GL_DEPTH_TEST); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glEnable(GL_DITHER); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glDisable(GL_BLEND); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - // no dest alpha -// glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // dest alpha -// glBlendFunc(GL_SRC_ALPHA, GL_ONE); // ??? - glDepthMask(GL_FALSE); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); -#ifdef GL_TEXTURE_MAX_ANISOTROPY_EXT - if (shared->info.anisotropic > 0.0) - { - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.0); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } -#endif - - glEnableVertexAttribArray(SHAD_VERTEX); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glEnableVertexAttribArray(SHAD_COLOR); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - if (gc->state.current.cur_prog == PRG_INVALID) - glUseProgram(gc->shared->shader[0].prog); - else glUseProgram(gc->state.current.cur_prog); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - - glActiveTexture(GL_TEXTURE0); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glBindTexture(GL_TEXTURE_2D, gc->pipe[0].shader.cur_tex); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - - _evas_gl_common_viewport_set(gc); -} - -void -evas_gl_common_context_resize(Evas_Engine_GL_Context *gc, int w, int h, int rot) -{ - if ((gc->w == w) && (gc->h == h) && (gc->rot == rot)) return; - evas_gl_common_context_flush(gc); - gc->change.size = 1; - gc->rot = rot; - gc->w = w; - gc->h = h; - if (_evas_gl_common_context == gc) _evas_gl_common_viewport_set(gc); -} - -void -evas_gl_common_context_target_surface_set(Evas_Engine_GL_Context *gc, - Evas_GL_Image *surface) -{ - if (surface == gc->pipe[0].shader.surface) return; - - evas_gl_common_context_flush(gc); - - gc->state.current.cur_prog = PRG_INVALID; - gc->state.current.cur_tex = -1; - gc->state.current.cur_texu = -1; - gc->state.current.cur_texv = -1; - gc->state.current.render_op = -1; - gc->state.current.smooth = -1; - gc->state.current.blend = -1; - gc->state.current.clip = -1; - gc->state.current.cx = -1; - gc->state.current.cy = -1; - gc->state.current.cw = -1; - gc->state.current.ch = -1; - - gc->pipe[0].shader.surface = surface; - gc->change.size = 1; -#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) -# ifndef GL_FRAMEBUFFER -# define GL_FRAMEBUFFER GL_FRAMEBUFFER_OES -# endif -#else -# ifndef GL_FRAMEBUFFER -# define GL_FRAMEBUFFER GL_FRAMEBUFFER_EXT -# endif -#endif - if (gc->pipe[0].shader.surface == gc->def_surface) - { - glsym_glBindFramebuffer(GL_FRAMEBUFFER, 0); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } - else - { - glsym_glBindFramebuffer(GL_FRAMEBUFFER, surface->tex->pt->fb); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } - _evas_gl_common_viewport_set(gc); -} - -#define PUSH_VERTEX(n, x, y, z) \ - gc->pipe[n].array.vertex[nv++] = x; \ - gc->pipe[n].array.vertex[nv++] = y; \ - gc->pipe[n].array.vertex[nv++] = z -#define PUSH_COLOR(n, r, g, b, a) \ - gc->pipe[n].array.color[nc++] = r; \ - gc->pipe[n].array.color[nc++] = g; \ - gc->pipe[n].array.color[nc++] = b; \ - gc->pipe[n].array.color[nc++] = a -#define PUSH_TEXUV(n, u, v) \ - gc->pipe[n].array.texuv[nu++] = u; \ - gc->pipe[n].array.texuv[nu++] = v -#define PUSH_TEXUV2(n, u, v) \ - gc->pipe[n].array.texuv2[nu2++] = u; \ - gc->pipe[n].array.texuv2[nu2++] = v -#define PUSH_TEXUV3(n, u, v) \ - gc->pipe[n].array.texuv3[nu3++] = u; \ - gc->pipe[n].array.texuv3[nu3++] = v -#define PUSH_TEXM(n, u, v) \ - gc->pipe[n].array.texm[nm++] = u; \ - gc->pipe[n].array.texm[nm++] = v - - -static inline void -array_alloc(Evas_Engine_GL_Context *gc, int n) -{ - gc->havestuff = EINA_TRUE; - if (gc->pipe[n].array.num <= gc->pipe[n].array.alloc) return; - gc->pipe[n].array.alloc += 6 * 1024; - if (gc->pipe[n].array.use_vertex) - gc->pipe[n].array.vertex = realloc(gc->pipe[n].array.vertex, - gc->pipe[n].array.alloc * sizeof(GLshort) * 3); - if (gc->pipe[n].array.use_color) - gc->pipe[n].array.color = realloc(gc->pipe[n].array.color, - gc->pipe[n].array.alloc * sizeof(GLubyte) * 4); - if (gc->pipe[n].array.use_texuv) - gc->pipe[n].array.texuv = realloc(gc->pipe[n].array.texuv, - gc->pipe[n].array.alloc * sizeof(GLfloat) * 2); - if (gc->pipe[n].array.use_texm) - gc->pipe[n].array.texm = realloc(gc->pipe[n].array.texm, - gc->pipe[n].array.alloc * sizeof(GLfloat) * 2); - if (gc->pipe[n].array.use_texuv2) - gc->pipe[n].array.texuv2 = realloc(gc->pipe[n].array.texuv2, - gc->pipe[n].array.alloc * sizeof(GLfloat) * 2); - if (gc->pipe[n].array.use_texuv3) - gc->pipe[n].array.texuv3 = realloc(gc->pipe[n].array.texuv3, - gc->pipe[n].array.alloc * sizeof(GLfloat) * 2); -} - -#ifdef GLPIPES -static int -pipe_region_intersects(Evas_Engine_GL_Context *gc, int n, - int x, int y, int w, int h) -{ - int i, rx, ry, rw, rh, ii; - - rx = gc->pipe[n].region.x; - ry = gc->pipe[n].region.y; - rw = gc->pipe[n].region.w; - rh = gc->pipe[n].region.h; - if (!RECTS_INTERSECT(x, y, w, h, rx, ry, rw, rh)) - return 0; - - // a hack for now. map pipes use their whole bounding box for intersects - // which at worst case reduces to old pipeline flushes, but cheaper than - // full quad region or triangle intersects right now - if (gc->pipe[n].region.type == RTYPE_MAP) return 1; - - for (i = 0, - ii = 0; - - i < gc->pipe[n].array.num; - - i += (3 * 2), - ii += (3 * 3 * 2)) - { // tri 1... - // 0, 1, 2 < top left - // 3, 4, 5 < top right - // 6. 7, 8 < bottom left - rx = gc->pipe[n].array.vertex[ii + 0]; - ry = gc->pipe[n].array.vertex[ii + 1]; - rw = gc->pipe[n].array.vertex[ii + 3] - rx; - rh = gc->pipe[n].array.vertex[ii + 7] - ry; - if (RECTS_INTERSECT(x, y, w, h, rx, ry, rw, rh)) - return 1; - } - return 0; -} -#endif - -static void -pipe_region_expand(Evas_Engine_GL_Context *gc, int n, - int x, int y, int w, int h) -{ - int x1, y1, x2, y2; - - if (gc->pipe[n].region.w <= 0) - { - gc->pipe[n].region.x = x; - gc->pipe[n].region.y = y; - gc->pipe[n].region.w = w; - gc->pipe[n].region.h = h; - return; - } - x1 = gc->pipe[n].region.x; - y1 = gc->pipe[n].region.y; - x2 = gc->pipe[n].region.x + gc->pipe[n].region.w; - y2 = gc->pipe[n].region.y + gc->pipe[n].region.h; - if (x < x1) x1 = x; - if (y < y1) y1 = y; - if ((x + w) > x2) x2 = x + w; - if ((y + h) > y2) y2 = y + h; - gc->pipe[n].region.x = x1; - gc->pipe[n].region.y = y1; - gc->pipe[n].region.w = x2 - x1; - gc->pipe[n].region.h = y2 - y1; -} - -static Eina_Bool -vertex_array_size_check(Evas_Engine_GL_Context *gc, int pn, int n) -{ - return 1; -// this fixup breaks for expedite test 32. why? - if ((gc->pipe[pn].array.num + n) > gc->shared->info.max_vertex_elements) - { - shader_array_flush(gc); - return 0; - } - return 1; -} - -static inline Evas_GL_Shader -evas_gl_common_shader_choice(int npoints __UNUSED__, - RGBA_Map_Point *p, - int r, int g, int b, int a, - Evas_GL_Shader nomul, - Evas_GL_Shader mul) -{ - if ((a == 255) && (r == 255) && (g == 255) && (b == 255)) - { - if (!p) return nomul; - - if ((p[0].col == 0xffffffff) && (p[1].col == 0xffffffff) && - (p[2].col == 0xffffffff) && (p[3].col == 0xffffffff)) - return nomul; - } - return mul; -} - -static int -_evas_gl_common_context_push(int rtype, - Evas_Engine_GL_Context *gc, - Evas_GL_Texture *tex, - Evas_GL_Texture *texm, - GLuint prog, - int x, int y, int w, int h, - Eina_Bool blend, - Eina_Bool smooth, - Eina_Bool clip, - int cx, int cy, int cw, int ch) -{ - int pn = 0; - -#ifdef GLPIPES - again: -#endif - vertex_array_size_check(gc, gc->state.top_pipe, 6); - pn = gc->state.top_pipe; -#ifdef GLPIPES - if (!((pn == 0) && (gc->pipe[pn].array.num == 0))) - { - int found = 0; - int i; - - for (i = pn; i >= 0; i--) - { - if ((gc->pipe[i].region.type == rtype) - && (!tex || gc->pipe[i].shader.cur_tex == tex->pt->texture) - && (!texm || gc->pipe[i].shader.cur_texm == texm->pt->texture) - && (gc->pipe[i].shader.cur_prog == prog) - && (gc->pipe[i].shader.smooth == smooth) - && (gc->pipe[i].shader.blend == blend) - && (gc->pipe[i].shader.render_op == gc->dc->render_op) - && (gc->pipe[i].shader.clip == clip) - && (!clip || ((gc->pipe[i].shader.cx == cx) - && (gc->pipe[i].shader.cy == cy) - && (gc->pipe[i].shader.cw == cw) - && (gc->pipe[i].shader.ch == ch)))) - { - found = 1; - pn = i; - break; - } - if (pipe_region_intersects(gc, i, x, y, w, h)) break; - } - if (!found) - { - pn = gc->state.top_pipe + 1; - if (pn >= gc->shared->info.tune.pipes.max) - { - shader_array_flush(gc); - goto again; - } - gc->state.top_pipe = pn; - } - } - if ((tex) && (((tex->im) && (tex->im->native.data)) || tex->pt->dyn.img)) - { - if (gc->pipe[pn].array.im != tex->im) - { - shader_array_flush(gc); - pn = gc->state.top_pipe; - gc->pipe[pn].array.im = tex->im; - goto again; - } - } -#else - if (!((gc->pipe[pn].region.type == rtype) - && (!tex || gc->pipe[pn].shader.cur_tex == tex->pt->texture) - && (!texm || gc->pipe[pn].shader.cur_texm == texm->pt->texture) - && (gc->pipe[pn].shader.cur_prog == prog) - && (gc->pipe[pn].shader.smooth == smooth) - && (gc->pipe[pn].shader.blend == blend) - && (gc->pipe[pn].shader.render_op == gc->dc->render_op) - && (gc->pipe[pn].shader.clip == clip) - && (!clip || ((gc->pipe[pn].shader.cx == cx) - && (gc->pipe[pn].shader.cy == cy) - && (gc->pipe[pn].shader.cw == cw) - && (gc->pipe[pn].shader.ch == ch))))) - { - shader_array_flush(gc); - } - if ((tex) && (((tex->im) && (tex->im->native.data)) || tex->pt->dyn.img)) - { - if (gc->pipe[pn].array.im != tex->im) - { - shader_array_flush(gc); - gc->pipe[pn].array.im = tex->im; - } - } -#endif - - return pn; -} - -void -evas_gl_common_context_line_push(Evas_Engine_GL_Context *gc, - int x1, int y1, int x2, int y2, - int clip, int cx, int cy, int cw, int ch, - int r, int g, int b, int a) -{ - int pnum, nv, nc, nu, nt, i; - Eina_Bool blend = 0; - GLuint prog = gc->shared->shader[SHADER_RECT].prog; - int pn = 0; - - if (a < 255) blend = 1; - if (gc->dc->render_op == EVAS_RENDER_COPY) blend = 0; - - shader_array_flush(gc); - vertex_array_size_check(gc, gc->state.top_pipe, 2); - pn = gc->state.top_pipe; - gc->pipe[pn].shader.cur_tex = 0; - gc->pipe[pn].shader.cur_prog = prog; - gc->pipe[pn].shader.blend = blend; - gc->pipe[pn].shader.render_op = gc->dc->render_op; - gc->pipe[pn].shader.clip = clip; - gc->pipe[pn].shader.cx = cx; - gc->pipe[pn].shader.cy = cy; - gc->pipe[pn].shader.cw = cw; - gc->pipe[pn].shader.ch = ch; - - gc->pipe[pn].array.line = 1; - gc->pipe[pn].array.use_vertex = 1; - gc->pipe[pn].array.use_color = 1; - gc->pipe[pn].array.use_texuv = 0; - gc->pipe[pn].array.use_texuv2 = 0; - gc->pipe[pn].array.use_texuv3 = 0; - - pnum = gc->pipe[pn].array.num; - nv = pnum * 3; nc = pnum * 4; nu = pnum * 2; nt = pnum * 4; - gc->pipe[pn].array.num += 2; - array_alloc(gc, pn); - - PUSH_VERTEX(pn, x1, y1, 0); - PUSH_VERTEX(pn, x2, y2, 0); - - for (i = 0; i < 2; i++) - { - PUSH_COLOR(pn, r, g, b, a); - } - - shader_array_flush(gc); - gc->pipe[pn].array.line = 0; - gc->pipe[pn].array.use_vertex = 0; - gc->pipe[pn].array.use_color = 0; - gc->pipe[pn].array.use_texuv = 0; - gc->pipe[pn].array.use_texuv2 = 0; - gc->pipe[pn].array.use_texuv3 = 0; -} - -void -evas_gl_common_context_rectangle_push(Evas_Engine_GL_Context *gc, - int x, int y, int w, int h, - int r, int g, int b, int a) -{ - int pnum, nv, nc, nu, nt, i; - Eina_Bool blend = 0; - GLuint prog = gc->shared->shader[SHADER_RECT].prog; - int pn = 0; - - if (gc->dc->mask.mask) - { - RGBA_Draw_Context *dc; - dc = gc->dc; - Evas_GL_Image *im; - im = (void *)dc->mask.mask; - evas_gl_common_context_font_push(gc, im->tex, - x - dc->mask.x,y - dc->mask.y, - dc->mask.w,dc->mask.h, - x,y,w,h,r,g,b,a); - return; - } - - if (a < 255) blend = 1; - if (gc->dc->render_op == EVAS_RENDER_COPY) blend = 0; - -again: - vertex_array_size_check(gc, gc->state.top_pipe, 6); - pn = gc->state.top_pipe; -#ifdef GLPIPES - if ((pn == 0) && (gc->pipe[pn].array.num == 0)) - { - gc->pipe[pn].region.type = RTYPE_RECT; - gc->pipe[pn].shader.cur_tex = 0; - gc->pipe[pn].shader.cur_prog = prog; - gc->pipe[pn].shader.blend = blend; - gc->pipe[pn].shader.render_op = gc->dc->render_op; - gc->pipe[pn].shader.clip = 0; - gc->pipe[pn].shader.cx = 0; - gc->pipe[pn].shader.cy = 0; - gc->pipe[pn].shader.cw = 0; - gc->pipe[pn].shader.ch = 0; - gc->pipe[pn].array.line = 0; - gc->pipe[pn].array.use_vertex = 1; - gc->pipe[pn].array.use_color = 1; - gc->pipe[pn].array.use_texuv = 0; - gc->pipe[pn].array.use_texuv2 = 0; - gc->pipe[pn].array.use_texuv3 = 0; - } - else - { - int found = 0; - - for (i = pn; i >= 0; i--) - { - if ((gc->pipe[i].region.type == RTYPE_RECT) - && (gc->pipe[i].shader.cur_tex == 0) - && (gc->pipe[i].shader.cur_prog == prog) - && (gc->pipe[i].shader.blend == blend) - && (gc->pipe[i].shader.render_op == gc->dc->render_op) - && (gc->pipe[i].shader.clip == 0) - ) - { - found = 1; - pn = i; - break; - } - if (pipe_region_intersects(gc, i, x, y, w, h)) break; - } - if (!found) - { - pn = gc->state.top_pipe + 1; - if (pn >= gc->shared->info.tune.pipes.max) - { - shader_array_flush(gc); - goto again; - } - gc->state.top_pipe = pn; - gc->pipe[pn].region.type = RTYPE_RECT; - gc->pipe[pn].shader.cur_tex = 0; - gc->pipe[pn].shader.cur_prog = prog; - gc->pipe[pn].shader.blend = blend; - gc->pipe[pn].shader.render_op = gc->dc->render_op; - gc->pipe[pn].shader.clip = 0; - gc->pipe[pn].shader.cx = 0; - gc->pipe[pn].shader.cy = 0; - gc->pipe[pn].shader.cw = 0; - gc->pipe[pn].shader.ch = 0; - gc->pipe[pn].array.line = 0; - gc->pipe[pn].array.use_vertex = 1; - gc->pipe[pn].array.use_color = 1; - gc->pipe[pn].array.use_texuv = 0; - gc->pipe[pn].array.use_texuv2 = 0; - gc->pipe[pn].array.use_texuv3 = 0; - } - } -#else - if ((gc->pipe[pn].shader.cur_tex != 0) - || (gc->pipe[pn].shader.cur_prog != prog) - || (gc->pipe[pn].shader.blend != blend) - || (gc->pipe[pn].shader.render_op != gc->dc->render_op) - || (gc->pipe[pn].shader.clip != 0) - ) - { - shader_array_flush(gc); - pn = gc->state.top_pipe; - gc->pipe[pn].shader.cur_tex = 0; - gc->pipe[pn].shader.cur_prog = prog; - gc->pipe[pn].shader.blend = blend; - gc->pipe[pn].shader.render_op = gc->dc->render_op; - gc->pipe[pn].shader.clip = 0; - gc->pipe[pn].shader.cx = 0; - gc->pipe[pn].shader.cy = 0; - gc->pipe[pn].shader.cw = 0; - gc->pipe[pn].shader.ch = 0; - } - - gc->pipe[pn].region.type = RTYPE_RECT; - gc->pipe[pn].array.line = 0; - gc->pipe[pn].array.use_vertex = 1; - gc->pipe[pn].array.use_color = 1; - gc->pipe[pn].array.use_texuv = 0; - gc->pipe[pn].array.use_texuv2 = 0; - gc->pipe[pn].array.use_texuv3 = 0; -#endif - - pipe_region_expand(gc, pn, x, y, w, h); - - pnum = gc->pipe[pn].array.num; - nv = pnum * 3; nc = pnum * 4; nu = pnum * 2; nt = pnum * 4; - gc->pipe[pn].array.num += 6; - array_alloc(gc, pn); - - PUSH_VERTEX(pn, x , y , 0); - PUSH_VERTEX(pn, x + w, y , 0); - PUSH_VERTEX(pn, x , y + h, 0); - - PUSH_VERTEX(pn, x + w, y , 0); - PUSH_VERTEX(pn, x + w, y + h, 0); - PUSH_VERTEX(pn, x , y + h, 0); - - for (i = 0; i < 6; i++) - { - PUSH_COLOR(pn, r, g, b, a); - } -} - -void -evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc, - Evas_GL_Texture *tex, - double sx, double sy, double sw, double sh, - int x, int y, int w, int h, - int r, int g, int b, int a, - Eina_Bool smooth, Eina_Bool tex_only) -{ - int pnum, nv, nc, nu, nu2, nt, i; - GLfloat tx1, tx2, ty1, ty2; - Eina_Bool blend = 1; - GLuint prog = gc->shared->shader[SHADER_IMG].prog; - int pn = 0; - - if (!tex->alpha) blend = 0; - if (a < 255) blend = 1; - - if (gc->filter_prog) - { - prog = gc->filter_prog; - } - else if (tex_only) - { - if (tex->pt->dyn.img) - { - prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a, - SHADER_IMG_BGRA_NOMUL, SHADER_IMG_BGRA)].prog; - } - else - { - prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a, - SHADER_TEX_NOMUL, SHADER_TEX)].prog; - } - } - else - { - if (tex->gc->shared->info.bgra) - { - prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a, - SHADER_IMG_BGRA_NOMUL, SHADER_IMG_BGRA)].prog; - } - else - { - prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a, - SHADER_IMG_NOMUL, SHADER_IMG)].prog; - } - } - - pn = _evas_gl_common_context_push(RTYPE_IMAGE, - gc, tex, NULL, - prog, - x, y, w, h, - blend, - smooth, - 0, 0, 0, 0, 0); - - gc->pipe[pn].region.type = RTYPE_IMAGE; - gc->pipe[pn].shader.cur_tex = tex->pt->texture; - gc->pipe[pn].shader.cur_prog = prog; - gc->pipe[pn].shader.smooth = smooth; - gc->pipe[pn].shader.blend = blend; - gc->pipe[pn].shader.render_op = gc->dc->render_op; - gc->pipe[pn].shader.clip = 0; - gc->pipe[pn].shader.cx = 0; - gc->pipe[pn].shader.cy = 0; - gc->pipe[pn].shader.cw = 0; - gc->pipe[pn].shader.ch = 0; - gc->pipe[pn].array.line = 0; - gc->pipe[pn].array.use_vertex = 1; - // if nomul... dont need this - gc->pipe[pn].array.use_color = 1; - gc->pipe[pn].array.use_texuv = 1; - gc->pipe[pn].array.use_texuv2 = 0; - gc->pipe[pn].array.use_texuv3 = 0; - - pipe_region_expand(gc, pn, x, y, w, h); - - pnum = gc->pipe[pn].array.num; - nv = pnum * 3; nc = pnum * 4; nu = pnum * 2; nu2 = pnum * 2; - nt = pnum * 4; - gc->pipe[pn].array.num += 6; - array_alloc(gc, pn); - - if ((tex->im) && (tex->im->native.data) && (!tex->im->native.yinvert)) - { - tx1 = ((double)(tex->x) + sx) / (double)tex->pt->w; - ty1 = 1.0 - ((double)(tex->y) + sy) / (double)tex->pt->h; - tx2 = ((double)(tex->x) + sx + sw) / (double)tex->pt->w; - ty2 = 1.0 - ((double)(tex->y) + sy + sh) / (double)tex->pt->h; - } - else - { - tx1 = ((double)(tex->x) + sx) / (double)tex->pt->w; - ty1 = ((double)(tex->y) + sy) / (double)tex->pt->h; - tx2 = ((double)(tex->x) + sx + sw) / (double)tex->pt->w; - ty2 = ((double)(tex->y) + sy + sh) / (double)tex->pt->h; - } - - PUSH_VERTEX(pn, x , y , 0); - PUSH_VERTEX(pn, x + w, y , 0); - PUSH_VERTEX(pn, x , y + h, 0); - - PUSH_TEXUV(pn, tx1, ty1); - PUSH_TEXUV(pn, tx2, ty1); - PUSH_TEXUV(pn, tx1, ty2); - - PUSH_VERTEX(pn, x + w, y , 0); - PUSH_VERTEX(pn, x + w, y + h, 0); - PUSH_VERTEX(pn, x , y + h, 0); - - PUSH_TEXUV(pn, tx2, ty1); - PUSH_TEXUV(pn, tx2, ty2); - PUSH_TEXUV(pn, tx1, ty2); - - // if nomul... dont need this - for (i = 0; i < 6; i++) - { - PUSH_COLOR(pn, r, g, b, a); - } -} - -void -evas_gl_common_context_image_mask_push(Evas_Engine_GL_Context *gc, - Evas_GL_Texture *tex, - Evas_GL_Texture *texm, - double sx, double sy, double sw, double sh, - double sxm, double sym, double swm,double shm, - int x, int y, int w, int h, - int r, int g, int b, int a, - Eina_Bool smooth) -{ - int pnum, nv, nc, nu, nm, nt, i; - GLfloat tx1, tx2, ty1, ty2; - GLfloat txm1, txm2, tym1, tym2; - Eina_Bool blend = 1; - GLuint prog = gc->shared->shader[SHADER_IMG_MASK].prog; - int pn = 0; - -#if 0 - if (tex->gc->shared->info.bgra) - { - prog = gc->shared->shader[SHADER_IMG_MASK].prog; - } - else - { -#warning Nash: FIXME: Need two shaders? - printf("Not good: Need other texture\n"); - prog = gc->shared->shader[SHADER_IMG].prog; - } -#endif - - pn = _evas_gl_common_context_push(RTYPE_IMASK, - gc, tex, texm, - prog, - x, y, w, h, - blend, - smooth, - 0, 0, 0, 0, 0); - - gc->pipe[pn].region.type = RTYPE_IMASK; - gc->pipe[pn].shader.cur_tex = tex->pt->texture; - gc->pipe[pn].shader.cur_texm = texm->pt->texture; - gc->pipe[pn].shader.cur_prog = prog; - gc->pipe[pn].shader.smooth = smooth; - gc->pipe[pn].shader.blend = blend; - gc->pipe[pn].shader.render_op = gc->dc->render_op; - gc->pipe[pn].shader.clip = 0; - gc->pipe[pn].shader.cx = 0; - gc->pipe[pn].shader.cy = 0; - gc->pipe[pn].shader.cw = 0; - gc->pipe[pn].shader.ch = 0; - gc->pipe[pn].array.line = 0; - gc->pipe[pn].array.use_vertex = 1; - // if nomul... dont need this - gc->pipe[pn].array.use_color = 1; - gc->pipe[pn].array.use_texuv = 1; - gc->pipe[pn].array.use_texuv2 = 0; - gc->pipe[pn].array.use_texuv3 = 0; - gc->pipe[pn].array.use_texm = 1; - - pipe_region_expand(gc, pn, x, y, w, h); - - pnum = gc->pipe[pn].array.num; - nv = pnum * 3; nc = pnum * 4; nm = pnum * 2; nu = pnum * 2; - nt = pnum * 4; - gc->pipe[pn].array.num += 6; - array_alloc(gc, pn); - - if ((tex->im) && (tex->im->native.data) && (!tex->im->native.yinvert)) - { - tx1 = ((double)(tex->x) + sx) / (double)tex->pt->w; - ty1 = ((double)(tex->y) + sy + sh) / (double)tex->pt->h; - tx2 = ((double)(tex->x) + sx + sw) / (double)tex->pt->w; - ty2 = ((double)(tex->y) + sy) / (double)tex->pt->h; - - txm1 = ((double)(texm->x) + sxm) / (double)texm->pt->w; - tym1 = ((double)(texm->y) + sym + shm) / (double)texm->pt->h; - txm2 = ((double)(texm->x) + sxm + swm) / (double)texm->pt->w; - tym2 = ((double)(texm->y) + sym) / (double)texm->pt->h; - } - else - { - tx1 = ((double)(tex->x) + sx) / (double)tex->pt->w; - ty1 = ((double)(tex->y) + sy) / (double)tex->pt->h; - tx2 = ((double)(tex->x) + sx + sw) / (double)tex->pt->w; - ty2 = ((double)(tex->y) + sy + sh) / (double)tex->pt->h; - - txm1 = (texm->x + sxm) / (double)texm->pt->w; - tym1 = (texm->y + sym) / (double)texm->pt->h; - txm2 = (texm->x + sxm + swm) / (double)texm->pt->w; - tym2 = (texm->y + sym + shm) / (double)texm->pt->h; - } - // printf(" %3.6lf %3.6lf %3.6lf %3.6lf\n",sx,sy,sw,sh); - // printf("m%3.6lf %3.6lf %3.6lf %3.6lf\n",sxm,sym,swm,shm); - // printf(" %3f %3f %3f %3f\n",tx1,ty1,tx2,ty2); - // printf("m%3f %3f %3f %3f\n",txm1,tym1,txm2,tym2); - - PUSH_VERTEX(pn, x , y , 0); - PUSH_VERTEX(pn, x + w, y , 0); - PUSH_VERTEX(pn, x , y + h, 0); - - PUSH_TEXUV(pn, tx1, ty1); - PUSH_TEXUV(pn, tx2, ty1); - PUSH_TEXUV(pn, tx1, ty2); - - PUSH_TEXM(pn, txm1, tym1); - PUSH_TEXM(pn, txm2, tym1); - PUSH_TEXM(pn, txm1, tym2); - - PUSH_VERTEX(pn, x + w, y , 0); - PUSH_VERTEX(pn, x + w, y + h, 0); - PUSH_VERTEX(pn, x , y + h, 0); - - PUSH_TEXUV(pn, tx2, ty1); - PUSH_TEXUV(pn, tx2, ty2); - PUSH_TEXUV(pn, tx1, ty2); - - PUSH_TEXM(pn, txm2, tym1); - PUSH_TEXM(pn, txm2, tym2); - PUSH_TEXM(pn, txm1, tym2); - - // if nomul... dont need this - for (i = 0; i < 6; i++) - { - PUSH_COLOR(pn, r, g, b, a); - } -} - - -void -evas_gl_common_context_font_push(Evas_Engine_GL_Context *gc, - Evas_GL_Texture *tex, - double sx, double sy, double sw, double sh, - int x, int y, int w, int h, - int r, int g, int b, int a) -{ - int pnum, nv, nc, nu, nt, i; - GLfloat tx1, tx2, ty1, ty2; - GLuint prog = gc->shared->shader[SHADER_FONT].prog; - int pn = 0; - - pn = _evas_gl_common_context_push(RTYPE_FONT, - gc, tex, NULL, - prog, - x, y, w, h, - 1, - 0, - 0, 0, 0, 0, 0); - - gc->pipe[pn].region.type = RTYPE_FONT; - gc->pipe[pn].shader.cur_tex = tex->pt->texture; - gc->pipe[pn].shader.cur_prog = prog; - gc->pipe[pn].shader.smooth = 0; - gc->pipe[pn].shader.blend = 1; - gc->pipe[pn].shader.render_op = gc->dc->render_op; - gc->pipe[pn].shader.clip = 0; - gc->pipe[pn].shader.cx = 0; - gc->pipe[pn].shader.cy = 0; - gc->pipe[pn].shader.cw = 0; - gc->pipe[pn].shader.ch = 0; - gc->pipe[pn].array.line = 0; - gc->pipe[pn].array.use_vertex = 1; - gc->pipe[pn].array.use_color = 1; - gc->pipe[pn].array.use_texuv = 1; - gc->pipe[pn].array.use_texuv2 = 0; - gc->pipe[pn].array.use_texuv3 = 0; - - pipe_region_expand(gc, pn, x, y, w, h); - - pnum = gc->pipe[pn].array.num; - nv = pnum * 3; nc = pnum * 4; nu = pnum * 2; nt = pnum * 4; - gc->pipe[pn].array.num += 6; - array_alloc(gc, pn); - - if (sw == 0.0) - { - tx1 = tex->sx1; - ty1 = tex->sy1; - tx2 = tex->sx2; - ty2 = tex->sy2; - } - else - { - tx1 = ((double)(tex->x) + sx) / (double)tex->pt->w; - ty1 = ((double)(tex->y) + sy) / (double)tex->pt->h; - tx2 = ((double)(tex->x) + sx + sw) / (double)tex->pt->w; - ty2 = ((double)(tex->y) + sy + sh) / (double)tex->pt->h; - } - - PUSH_VERTEX(pn, x , y , 0); - PUSH_VERTEX(pn, x + w, y , 0); - PUSH_VERTEX(pn, x , y + h, 0); - - PUSH_TEXUV(pn, tx1, ty1); - PUSH_TEXUV(pn, tx2, ty1); - PUSH_TEXUV(pn, tx1, ty2); - - PUSH_VERTEX(pn, x + w, y , 0); - PUSH_VERTEX(pn, x + w, y + h, 0); - PUSH_VERTEX(pn, x , y + h, 0); - - PUSH_TEXUV(pn, tx2, ty1); - PUSH_TEXUV(pn, tx2, ty2); - PUSH_TEXUV(pn, tx1, ty2); - - for (i = 0; i < 6; i++) - { - PUSH_COLOR(pn, r, g, b, a); - } -} - -void -evas_gl_common_context_yuv_push(Evas_Engine_GL_Context *gc, - Evas_GL_Texture *tex, - double sx, double sy, double sw, double sh, - int x, int y, int w, int h, - int r, int g, int b, int a, - Eina_Bool smooth) -{ - int pnum, nv, nc, nu, nu2, nu3, nt, i; - GLfloat tx1, tx2, ty1, ty2, t2x1, t2x2, t2y1, t2y2; - Eina_Bool blend = 0; - GLuint prog; - int pn = 0; - - if (a < 255) blend = 1; - - prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a, - SHADER_YUV_NOMUL, SHADER_YUV)].prog; - - pn = _evas_gl_common_context_push(RTYPE_YUV, - gc, tex, NULL, - prog, - x, y, w, h, - blend, - smooth, - 0, 0, 0, 0, 0); - - gc->pipe[pn].region.type = RTYPE_YUV; - gc->pipe[pn].shader.cur_tex = tex->pt->texture; - gc->pipe[pn].shader.cur_texu = tex->ptu->texture; - gc->pipe[pn].shader.cur_texv = tex->ptv->texture; - gc->pipe[pn].shader.cur_prog = prog; - gc->pipe[pn].shader.smooth = smooth; - gc->pipe[pn].shader.blend = blend; - gc->pipe[pn].shader.render_op = gc->dc->render_op; - gc->pipe[pn].shader.clip = 0; - gc->pipe[pn].shader.cx = 0; - gc->pipe[pn].shader.cy = 0; - gc->pipe[pn].shader.cw = 0; - gc->pipe[pn].shader.ch = 0; - gc->pipe[pn].array.line = 0; - gc->pipe[pn].array.use_vertex = 1; - gc->pipe[pn].array.use_color = 1; - gc->pipe[pn].array.use_texuv = 1; - gc->pipe[pn].array.use_texuv2 = 1; - gc->pipe[pn].array.use_texuv3 = 1; - - pipe_region_expand(gc, pn, x, y, w, h); - - pnum = gc->pipe[pn].array.num; - nv = pnum * 3; nc = pnum * 4; nu = pnum * 2; - nu2 = pnum * 2; nu3 = pnum * 2; nt = pnum * 4; - gc->pipe[pn].array.num += 6; - array_alloc(gc, pn); - - tx1 = (sx) / (double)tex->pt->w; - ty1 = (sy) / (double)tex->pt->h; - tx2 = (sx + sw) / (double)tex->pt->w; - ty2 = (sy + sh) / (double)tex->pt->h; - - t2x1 = ((sx) / 2) / (double)tex->ptu->w; - t2y1 = ((sy) / 2) / (double)tex->ptu->h; - t2x2 = ((sx + sw) / 2) / (double)tex->ptu->w; - t2y2 = ((sy + sh) / 2) / (double)tex->ptu->h; - - PUSH_VERTEX(pn, x , y , 0); - PUSH_VERTEX(pn, x + w, y , 0); - PUSH_VERTEX(pn, x , y + h, 0); - - PUSH_TEXUV(pn, tx1, ty1); - PUSH_TEXUV(pn, tx2, ty1); - PUSH_TEXUV(pn, tx1, ty2); - - PUSH_TEXUV2(pn, t2x1, t2y1); - PUSH_TEXUV2(pn, t2x2, t2y1); - PUSH_TEXUV2(pn, t2x1, t2y2); - - PUSH_TEXUV3(pn, t2x1, t2y1); - PUSH_TEXUV3(pn, t2x2, t2y1); - PUSH_TEXUV3(pn, t2x1, t2y2); - - PUSH_VERTEX(pn, x + w, y , 0); - PUSH_VERTEX(pn, x + w, y + h, 0); - PUSH_VERTEX(pn, x , y + h, 0); - - PUSH_TEXUV(pn, tx2, ty1); - PUSH_TEXUV(pn, tx2, ty2); - PUSH_TEXUV(pn, tx1, ty2); - - PUSH_TEXUV2(pn, t2x2, t2y1); - PUSH_TEXUV2(pn, t2x2, t2y2); - PUSH_TEXUV2(pn, t2x1, t2y2); - - PUSH_TEXUV3(pn, t2x2, t2y1); - PUSH_TEXUV3(pn, t2x2, t2y2); - PUSH_TEXUV3(pn, t2x1, t2y2); - - for (i = 0; i < 6; i++) - { - PUSH_COLOR(pn, r, g, b, a); - } -} - -void -evas_gl_common_context_yuy2_push(Evas_Engine_GL_Context *gc, - Evas_GL_Texture *tex, - double sx, double sy, double sw, double sh, - int x, int y, int w, int h, - int r, int g, int b, int a, - Eina_Bool smooth) -{ - int pnum, nv, nc, nu, nu2, nu3, nt, i; - GLfloat tx1, tx2, ty1, ty2, t2x1, t2x2, t2y1, t2y2; - Eina_Bool blend = 0; - GLuint prog; - int pn = 0; - - if (a < 255) blend = 1; - - prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a, - SHADER_YUY2_NOMUL, SHADER_YUY2)].prog; - - pn = _evas_gl_common_context_push(RTYPE_YUY2, - gc, tex, NULL, - prog, - x, y, w, h, - blend, - smooth, - 0, 0, 0, 0, 0); - - gc->pipe[pn].region.type = RTYPE_YUY2; - gc->pipe[pn].shader.cur_tex = tex->pt->texture; - gc->pipe[pn].shader.cur_texu = tex->ptuv->texture; - gc->pipe[pn].shader.cur_prog = prog; - gc->pipe[pn].shader.smooth = smooth; - gc->pipe[pn].shader.blend = blend; - gc->pipe[pn].shader.render_op = gc->dc->render_op; - gc->pipe[pn].shader.clip = 0; - gc->pipe[pn].shader.cx = 0; - gc->pipe[pn].shader.cy = 0; - gc->pipe[pn].shader.cw = 0; - gc->pipe[pn].shader.ch = 0; - gc->pipe[pn].array.line = 0; - gc->pipe[pn].array.use_vertex = 1; - gc->pipe[pn].array.use_color = 1; - gc->pipe[pn].array.use_texuv = 1; - gc->pipe[pn].array.use_texuv2 = 1; - gc->pipe[pn].array.use_texuv3 = 0; - - pipe_region_expand(gc, pn, x, y, w, h); - - pnum = gc->pipe[pn].array.num; - nv = pnum * 3; nc = pnum * 4; nu = pnum * 2; - nu2 = pnum * 2; nu3 = pnum * 2; nt = pnum * 4; - gc->pipe[pn].array.num += 6; - array_alloc(gc, pn); - - tx1 = (sx) / (double)tex->pt->w; - ty1 = (sy) / (double)tex->pt->h; - tx2 = (sx + sw) / (double)tex->pt->w; - ty2 = (sy + sh) / (double)tex->pt->h; - - t2x1 = sx / (double)tex->ptuv->w; - t2y1 = sy / (double)tex->ptuv->h; - t2x2 = (sx + sw) / (double)tex->ptuv->w; - t2y2 = (sy + sh) / (double)tex->ptuv->h; - - PUSH_VERTEX(pn, x , y , 0); - PUSH_VERTEX(pn, x + w, y , 0); - PUSH_VERTEX(pn, x , y + h, 0); - - PUSH_TEXUV(pn, tx1, ty1); - PUSH_TEXUV(pn, tx2, ty1); - PUSH_TEXUV(pn, tx1, ty2); - - PUSH_TEXUV2(pn, t2x1, t2y1); - PUSH_TEXUV2(pn, t2x2, t2y1); - PUSH_TEXUV2(pn, t2x1, t2y2); - - PUSH_VERTEX(pn, x + w, y , 0); - PUSH_VERTEX(pn, x + w, y + h, 0); - PUSH_VERTEX(pn, x , y + h, 0); - - PUSH_TEXUV(pn, tx2, ty1); - PUSH_TEXUV(pn, tx2, ty2); - PUSH_TEXUV(pn, tx1, ty2); - - PUSH_TEXUV2(pn, t2x2, t2y1); - PUSH_TEXUV2(pn, t2x2, t2y2); - PUSH_TEXUV2(pn, t2x1, t2y2); - - for (i = 0; i < 6; i++) - { - PUSH_COLOR(pn, r, g, b, a); - } -} - -void -evas_gl_common_context_nv12_push(Evas_Engine_GL_Context *gc, - Evas_GL_Texture *tex, - double sx, double sy, double sw, double sh, - int x, int y, int w, int h, - int r, int g, int b, int a, - Eina_Bool smooth) -{ - int pnum, nv, nc, nu, nu2, nu3, nt, i; - GLfloat tx1, tx2, ty1, ty2, t2x1, t2x2, t2y1, t2y2; - Eina_Bool blend = 0; - GLuint prog; - int pn = 0; - - if (a < 255) blend = 1; - - prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a, - SHADER_NV12_NOMUL, SHADER_NV12)].prog; - - pn = _evas_gl_common_context_push(RTYPE_NV12, - gc, tex, NULL, - prog, - x, y, w, h, - blend, - smooth, - 0, 0, 0, 0, 0); - - gc->pipe[pn].region.type = RTYPE_NV12; - gc->pipe[pn].shader.cur_tex = tex->pt->texture; - gc->pipe[pn].shader.cur_tex_dyn = tex->pt->dyn.img; - gc->pipe[pn].shader.cur_texu = tex->ptuv->texture; - gc->pipe[pn].shader.cur_texu_dyn = tex->ptuv->dyn.img; - gc->pipe[pn].shader.cur_prog = prog; - gc->pipe[pn].shader.smooth = smooth; - gc->pipe[pn].shader.blend = blend; - gc->pipe[pn].shader.render_op = gc->dc->render_op; - gc->pipe[pn].shader.clip = 0; - gc->pipe[pn].shader.cx = 0; - gc->pipe[pn].shader.cy = 0; - gc->pipe[pn].shader.cw = 0; - gc->pipe[pn].shader.ch = 0; - gc->pipe[pn].array.line = 0; - gc->pipe[pn].array.use_vertex = 1; - gc->pipe[pn].array.use_color = 1; - gc->pipe[pn].array.use_texuv = 1; - gc->pipe[pn].array.use_texuv2 = 1; - gc->pipe[pn].array.use_texuv3 = 0; - - pipe_region_expand(gc, pn, x, y, w, h); - - pnum = gc->pipe[pn].array.num; - nv = pnum * 3; nc = pnum * 4; nu = pnum * 2; - nu2 = pnum * 2; nu3 = pnum * 2; nt = pnum * 4; - gc->pipe[pn].array.num += 6; - array_alloc(gc, pn); - - tx1 = (sx) / (double)tex->pt->w; - ty1 = (sy) / (double)tex->pt->h; - tx2 = (sx + sw) / (double)tex->pt->w; - ty2 = (sy + sh) / (double)tex->pt->h; - - t2x1 = sx / (double)tex->ptuv->w; - t2y1 = sy / (double)tex->ptuv->h; - t2x2 = (sx + sw) / (double)tex->ptuv->w; - t2y2 = (sy + sh) / (double)tex->ptuv->h; - - PUSH_VERTEX(pn, x , y , 0); - PUSH_VERTEX(pn, x + w, y , 0); - PUSH_VERTEX(pn, x , y + h, 0); - - PUSH_TEXUV(pn, tx1, ty1); - PUSH_TEXUV(pn, tx2, ty1); - PUSH_TEXUV(pn, tx1, ty2); - - PUSH_TEXUV2(pn, t2x1, t2y1); - PUSH_TEXUV2(pn, t2x2, t2y1); - PUSH_TEXUV2(pn, t2x1, t2y2); - - PUSH_VERTEX(pn, x + w, y , 0); - PUSH_VERTEX(pn, x + w, y + h, 0); - PUSH_VERTEX(pn, x , y + h, 0); - - PUSH_TEXUV(pn, tx2, ty1); - PUSH_TEXUV(pn, tx2, ty2); - PUSH_TEXUV(pn, tx1, ty2); - - PUSH_TEXUV2(pn, t2x2, t2y1); - PUSH_TEXUV2(pn, t2x2, t2y2); - PUSH_TEXUV2(pn, t2x1, t2y2); - - for (i = 0; i < 6; i++) - { - PUSH_COLOR(pn, r, g, b, a); - } -} - -void -evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc, - Evas_GL_Texture *tex, - int npoints, - RGBA_Map_Point *p, - int clip, int cx, int cy, int cw, int ch, - int r, int g, int b, int a, - Eina_Bool smooth, Eina_Bool tex_only, - Evas_Colorspace cspace) -{ - int pnum, nv, nc, nu, nu2, nu3, nt, i; - const int points[6] = { 0, 1, 2, 0, 2, 3 }; - int x = 0, y = 0, w = 0, h = 0, px = 0, py = 0; - GLfloat tx[4], ty[4], t2x[4], t2y[4]; - Eina_Bool blend = 1; - DATA32 cmul; - GLuint prog = gc->shared->shader[SHADER_IMG].prog; - Eina_Bool utexture = EINA_FALSE; - Eina_Bool uvtexture = EINA_FALSE; - int pn = 0; - int flat = 0; - - if (!tex->alpha) blend = 0; - if (a < 255) blend = 1; - if (npoints != 4) - { - // FIXME: nash - you didn't fix this for n points. its still all - // 4 point stuff!!! grrrr. - abort(); - } - if ((A_VAL(&(p[0].col)) < 0xff) || (A_VAL(&(p[1].col)) < 0xff) || - (A_VAL(&(p[2].col)) < 0xff) || (A_VAL(&(p[3].col)) < 0xff)) - blend = 1; - - if ((p[0].z == p[1].z) && (p[1].z == p[2].z) && (p[2].z == p[3].z)) - flat = 1; - - if (!clip) cx = cy = cw = ch = 0; - - if (!flat) - { - if (p[0].foc <= 0) flat = 1; - } - - switch (cspace) - { - case EVAS_COLORSPACE_YCBCR422P601_PL: - case EVAS_COLORSPACE_YCBCR422P709_PL: - prog = gc->shared->shader[evas_gl_common_shader_choice(npoints, p, r, g, b, a, - SHADER_YUV_NOMUL, SHADER_YUV)].prog; - utexture = EINA_TRUE; - break; - case EVAS_COLORSPACE_YCBCR422601_PL: - prog = gc->shared->shader[evas_gl_common_shader_choice(npoints, p, r, g, b, a, - SHADER_YUY2_NOMUL, SHADER_YUY2)].prog; - uvtexture = EINA_TRUE; - break; - case EVAS_COLORSPACE_YCBCR420NV12601_PL: - case EVAS_COLORSPACE_YCBCR420TM12601_PL: - prog = gc->shared->shader[evas_gl_common_shader_choice(npoints, p, r, g, b, a, - SHADER_NV12_NOMUL, SHADER_NV12)].prog; - uvtexture = EINA_TRUE; - break; - - default: - if (tex_only) - { - if (tex->pt->dyn.img) - { - prog = gc->shared->shader[evas_gl_common_shader_choice(npoints, p, r, g, b, a, - SHADER_IMG_BGRA_NOMUL, SHADER_IMG_BGRA)].prog; - } - else - { - prog = gc->shared->shader[evas_gl_common_shader_choice(npoints, p, r, g, b, a, - SHADER_TEX_NOMUL, SHADER_TEX)].prog; - } - } - else - { - if (tex->gc->shared->info.bgra) - { - prog = gc->shared->shader[evas_gl_common_shader_choice(npoints, p, r, g, b, a, - SHADER_IMG_BGRA_NOMUL, - SHADER_IMG_BGRA)].prog; - } - else - { - prog = gc->shared->shader[evas_gl_common_shader_choice(npoints, p, r, g, b, a, - SHADER_IMG_NOMUL, - SHADER_IMG)].prog; - } - } - } - - x = w = (p[0].x >> FP); - y = h = (p[0].y >> FP); - for (i = 0; i < 4; i++) - { - tx[i] = ((double)(tex->x) + (((double)p[i].u) / FP1)) / - (double)tex->pt->w; - ty[i] = ((double)(tex->y) + (((double)p[i].v) / FP1)) / - (double)tex->pt->h; - px = (p[i].x >> FP); - if (px < x) x = px; - else if (px > w) w = px; - py = (p[i].y >> FP); - if (py < y) y = py; - else if (py > h) h = py; - if (utexture) - { - t2x[i] = ((((double)p[i].u / 2) / FP1)) / (double)tex->ptu->w; - t2y[i] = ((((double)p[i].v / 2) / FP1)) / (double)tex->ptu->h; - } - else if (uvtexture) - { - t2x[i] = ((((double)p[i].u / 2) / FP1)) / (double)tex->ptuv->w; - t2y[i] = ((((double)p[i].v / 2) / FP1)) / (double)tex->ptuv->h; - } - } - w = w - x; - h = h - y; - - if (clip) - { - int nx = x, ny = y, nw = w, nh = h; - - RECTS_CLIP_TO_RECT(nx, ny, nw, nh, cx, cy, cw, ch); - if ((nx == x) && (ny == y) && (nw == w) && (nh == h)) - { - clip = 0; cx = 0; cy = 0; cw = 0; ch = 0; - } - x = nx; y = nw; w = nw; h = nh; - } - - if (!flat) - { - shader_array_flush(gc); - gc->foc = p[0].foc >> FP; - gc->z0 = p[0].z0 >> FP; - gc->px = p[0].px >> FP; - gc->py = p[0].py >> FP; - gc->change.size = 1; - _evas_gl_common_viewport_set(gc); - } - - pn = _evas_gl_common_context_push(RTYPE_MAP, - gc, tex, NULL, - prog, - x, y, w, h, - blend, - smooth, - clip, cx, cy, cw, ch); - gc->pipe[pn].region.type = RTYPE_MAP; - gc->pipe[pn].shader.cur_tex = tex->pt->texture; - if (utexture) - { - gc->pipe[pn].shader.cur_texu = tex->ptu->texture; - gc->pipe[pn].shader.cur_texu_dyn = tex->ptu->dyn.img; - gc->pipe[pn].shader.cur_texv = tex->ptv->texture; - gc->pipe[pn].shader.cur_texv_dyn = tex->ptv->dyn.img; - } - else if (uvtexture) - { - gc->pipe[pn].shader.cur_texu = tex->ptuv->texture; - gc->pipe[pn].shader.cur_texu_dyn = tex->ptuv->dyn.img; - } - gc->pipe[pn].shader.cur_prog = prog; - gc->pipe[pn].shader.smooth = smooth; - gc->pipe[pn].shader.blend = blend; - gc->pipe[pn].shader.render_op = gc->dc->render_op; - gc->pipe[pn].shader.clip = clip; - gc->pipe[pn].shader.cx = cx; - gc->pipe[pn].shader.cy = cy; - gc->pipe[pn].shader.cw = cw; - gc->pipe[pn].shader.ch = ch; - gc->pipe[pn].array.line = 0; - gc->pipe[pn].array.use_vertex = 1; - gc->pipe[pn].array.use_color = 1; - gc->pipe[pn].array.use_texuv = 1; - gc->pipe[pn].array.use_texuv2 = (utexture || uvtexture) ? 1 : 0; - gc->pipe[pn].array.use_texuv3 = (utexture) ? 1 : 0; - - pipe_region_expand(gc, pn, x, y, w, h); - - pnum = gc->pipe[pn].array.num; - nv = pnum * 3; nc = pnum * 4; nu = pnum * 2; nu2 = pnum * 2; - nu2 = pnum * 2; nu3 = pnum * 2; nt = pnum * 4; - gc->pipe[pn].array.num += 6; - array_alloc(gc, pn); - - if ((tex->im) && (tex->im->native.data) && (!tex->im->native.yinvert)) - { - for (i = 0; i < 4; i++) - { - ty[i] = 1.0 - ty[i]; - if (utexture || uvtexture) - t2y[i] = 1.0 - t2y[i]; - } - } - - cmul = ARGB_JOIN(a, r, g, b); - for (i = 0; i < 6; i++) - { - DATA32 cl = MUL4_SYM(cmul, p[points[i]].col); - if (flat) - { - PUSH_VERTEX(pn, - (p[points[i]].x >> FP), - (p[points[i]].y >> FP), - 0); - } - else - { - PUSH_VERTEX(pn, - (p[points[i]].fx) + gc->shared->ax, - (p[points[i]].fy) + gc->shared->ay, - (p[points[i]].fz) - + (gc->shared->foc - gc->shared->z0)); - } - PUSH_TEXUV(pn, - tx[points[i]], - ty[points[i]]); - if (utexture) - { - PUSH_TEXUV2(pn, - t2x[points[i]], - t2y[points[i]]); - PUSH_TEXUV3(pn, - t2x[points[i]], - t2y[points[i]]); - } - else if (uvtexture) - { - PUSH_TEXUV2(pn, - t2x[points[i]], - t2y[points[i]]); - } - - PUSH_COLOR(pn, - R_VAL(&cl), - G_VAL(&cl), - B_VAL(&cl), - A_VAL(&cl)); - } - if (!flat) - { - shader_array_flush(gc); - gc->foc = 0; - gc->z0 = 0; - gc->px = 0; - gc->py = 0; - gc->change.size = 1; - _evas_gl_common_viewport_set(gc); - } -} - -void -evas_gl_common_context_flush(Evas_Engine_GL_Context *gc) -{ - shader_array_flush(gc); -} - -static void -scissor_rot(Evas_Engine_GL_Context *gc __UNUSED__, - int rot, int gw, int gh, int cx, int cy, int cw, int ch) -{ - switch (rot) - { - case 0: // UP this way: ^ - glScissor(cx, cy, cw, ch); - break; - case 90: // UP this way: < - glScissor(gh - (cy + ch), cx, ch, cw); - break; - case 180: // UP this way: v - glScissor(gw - (cx + cw), gh - (cy + ch), cw, ch); - break; - case 270: // UP this way: > - glScissor(cy, gw - (cx + cw), ch, cw); - break; - default: // assume up is up - glScissor(cx, cy, cw, ch); - break; - } -} - -static void -shader_array_flush(Evas_Engine_GL_Context *gc) -{ - int i, gw, gh, setclip, cy, fbo = 0, done = 0; - - if (!gc->havestuff) return; - gw = gc->w; - gh = gc->h; - if (!((gc->pipe[0].shader.surface == gc->def_surface) || - (!gc->pipe[0].shader.surface))) - { - gw = gc->pipe[0].shader.surface->w; - gh = gc->pipe[0].shader.surface->h; - fbo = 1; - } - for (i = 0; i < gc->shared->info.tune.pipes.max; i++) - { - if (gc->pipe[i].array.num <= 0) break; - setclip = 0; - done++; - gc->flushnum++; - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - if (gc->pipe[i].shader.cur_prog != gc->state.current.cur_prog) - { - glUseProgram(gc->pipe[i].shader.cur_prog); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } - - if (gc->pipe[i].shader.cur_tex != gc->state.current.cur_tex) - { -#if 0 - if (gc->pipe[i].shader.cur_tex) - { - glEnable(GL_TEXTURE_2D); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } - else - { - glDisable(GL_TEXTURE_2D); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } -#endif - glActiveTexture(GL_TEXTURE0); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glBindTexture(GL_TEXTURE_2D, gc->pipe[i].shader.cur_tex); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } - if (gc->pipe[i].array.im) - { -#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) - if (gc->pipe[i].array.im->tex->pt->dyn.img) - { - secsym_glEGLImageTargetTexture2DOES - (GL_TEXTURE_2D, gc->pipe[i].array.im->tex->pt->dyn.img); - } - else -#endif - { - if (!gc->pipe[i].array.im->native.loose) - { - if (gc->pipe[i].array.im->native.func.bind) - gc->pipe[i].array.im->native.func.bind(gc->pipe[i].array.im->native.func.data, - gc->pipe[i].array.im); - } - } - } - if (gc->pipe[i].shader.render_op != gc->state.current.render_op) - { - switch (gc->pipe[i].shader.render_op) - { - case EVAS_RENDER_BLEND: /**< default op: d = d*(1-sa) + s */ - glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - break; - case EVAS_RENDER_COPY: /**< d = s */ - gc->pipe[i].shader.blend = 0; - glBlendFunc(GL_ONE, GL_ONE); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - break; - // FIXME: fix blend funcs below! - case EVAS_RENDER_BLEND_REL: /**< d = d*(1 - sa) + s*da */ - case EVAS_RENDER_COPY_REL: /**< d = s*da */ - case EVAS_RENDER_ADD: /**< d = d + s */ - case EVAS_RENDER_ADD_REL: /**< d = d + s*da */ - case EVAS_RENDER_SUB: /**< d = d - s */ - case EVAS_RENDER_SUB_REL: /**< d = d - s*da */ - case EVAS_RENDER_TINT: /**< d = d*s + d*(1 - sa) + s*(1 - da) */ - case EVAS_RENDER_TINT_REL: /**< d = d*(1 - sa + s) */ - case EVAS_RENDER_MASK: /**< d = d*sa */ - case EVAS_RENDER_MUL: /**< d = d*s */ - default: - glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - break; - } - } - if (gc->pipe[i].shader.blend != gc->state.current.blend) - { - if (gc->pipe[i].shader.blend) - { - glEnable(GL_BLEND); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } - else - { - glDisable(GL_BLEND); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } - } - if ((gc->pipe[i].shader.smooth != gc->state.current.smooth) || - (gc->pipe[i].shader.cur_tex != gc->state.current.cur_tex)) - { - if (gc->pipe[i].shader.smooth) - { -#ifdef GL_TEXTURE_MAX_ANISOTROPY_EXT - if (shared->info.anisotropic > 0.0) - { - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, shared->info.anisotropic); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } -#endif - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } - else - { -#ifdef GL_TEXTURE_MAX_ANISOTROPY_EXT - if (shared->info.anisotropic > 0.0) - { - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.0); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } -#endif - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } - } - if (gc->pipe[i].shader.clip != gc->state.current.clip) - { - - if (gc->pipe[i].shader.clip) - { - cy = gh - gc->pipe[i].shader.cy - gc->pipe[i].shader.ch; - if (fbo) cy = gc->pipe[i].shader.cy; - glEnable(GL_SCISSOR_TEST); - if (!fbo) - scissor_rot(gc, gc->rot, gw, gh, - gc->pipe[i].shader.cx, - cy, - gc->pipe[i].shader.cw, - gc->pipe[i].shader.ch); - else - glScissor(gc->pipe[i].shader.cx, cy, - gc->pipe[i].shader.cw, gc->pipe[i].shader.ch); - setclip = 1; - } - else - { - glDisable(GL_SCISSOR_TEST); - glScissor(0, 0, 0, 0); - } - } - if ((gc->pipe[i].shader.clip) && (!setclip)) - { - if ((gc->pipe[i].shader.cx != gc->state.current.cx) || - (gc->pipe[i].shader.cy != gc->state.current.cy) || - (gc->pipe[i].shader.cw != gc->state.current.cw) || - (gc->pipe[i].shader.ch != gc->state.current.ch)) - { - cy = gh - gc->pipe[i].shader.cy - gc->pipe[i].shader.ch; - if (fbo) cy = gc->pipe[i].shader.cy; - if (!fbo) - scissor_rot(gc, gc->rot, gw, gh, - gc->pipe[i].shader.cx, - cy, - gc->pipe[i].shader.cw, - gc->pipe[i].shader.ch); - else - glScissor(gc->pipe[i].shader.cx, cy, - gc->pipe[i].shader.cw, gc->pipe[i].shader.ch); - } - } - - glVertexAttribPointer(SHAD_VERTEX, 3, GL_SHORT, GL_FALSE, 0, gc->pipe[i].array.vertex); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glVertexAttribPointer(SHAD_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, 0, gc->pipe[i].array.color); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - if (gc->pipe[i].array.use_texuv) - { - glEnableVertexAttribArray(SHAD_TEXUV); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glVertexAttribPointer(SHAD_TEXUV, 2, GL_FLOAT, GL_FALSE, 0, gc->pipe[i].array.texuv); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } - else - { - glDisableVertexAttribArray(SHAD_TEXUV); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } - - if (gc->pipe[i].array.line) - { - glDisableVertexAttribArray(SHAD_TEXUV); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glDisableVertexAttribArray(SHAD_TEXUV2); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glDisableVertexAttribArray(SHAD_TEXUV3); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glDrawArrays(GL_LINES, 0, gc->pipe[i].array.num); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } - else - { - if (gc->pipe[i].array.use_texm) - { - glEnableVertexAttribArray(SHAD_TEXM); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glVertexAttribPointer(SHAD_TEXM, 2, GL_FLOAT, GL_FALSE, 0, gc->pipe[i].array.texm); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glActiveTexture(GL_TEXTURE1); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glBindTexture(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texm); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glActiveTexture(GL_TEXTURE0); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } - else - { - glDisableVertexAttribArray(SHAD_TEXM); - } - if ((gc->pipe[i].array.use_texuv2) && (gc->pipe[i].array.use_texuv3)) - { - glEnableVertexAttribArray(SHAD_TEXUV2); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glEnableVertexAttribArray(SHAD_TEXUV3); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glVertexAttribPointer(SHAD_TEXUV2, 2, GL_FLOAT, GL_FALSE, 0, gc->pipe[i].array.texuv2); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glVertexAttribPointer(SHAD_TEXUV3, 2, GL_FLOAT, GL_FALSE, 0, gc->pipe[i].array.texuv3); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - - glActiveTexture(GL_TEXTURE1); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glBindTexture(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texu); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); -#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) - if (gc->pipe[i].shader.cur_texu_dyn) - secsym_glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texu_dyn); -#endif - - glActiveTexture(GL_TEXTURE2); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glBindTexture(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texv); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); -#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) - if (gc->pipe[i].shader.cur_texv_dyn) - secsym_glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texv_dyn); -#endif - glActiveTexture(GL_TEXTURE0); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } - else if (gc->pipe[i].array.use_texuv2) - { - glEnableVertexAttribArray(SHAD_TEXUV2); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glVertexAttribPointer(SHAD_TEXUV2, 2, GL_FLOAT, GL_FALSE, 0, gc->pipe[i].array.texuv2); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - - glActiveTexture(GL_TEXTURE1); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glBindTexture(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texu); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); -#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) - if (gc->pipe[i].shader.cur_texu_dyn) - secsym_glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texu_dyn); -#endif - glActiveTexture(GL_TEXTURE0); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } - else - { - glDisableVertexAttribArray(SHAD_TEXUV2); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glDisableVertexAttribArray(SHAD_TEXUV3); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } - if (dbgflushnum) - { - const char *types[6] = - {"----", "RECT", "IMAG", "FONT", "YUV-", "MAP"}; - printf(" DRAW#%3i %4i -> %p[%4ix%4i] @ %4ix%4i -{ tex %4i type %s }-\n", - i, - gc->pipe[i].array.num / 6, - gc->pipe[0].shader.surface, - gc->pipe[0].shader.surface->w, - gc->pipe[0].shader.surface->h, - gw, gh, - gc->pipe[i].shader.cur_tex, - types[gc->pipe[i].region.type] - ); - } - glDrawArrays(GL_TRIANGLES, 0, gc->pipe[i].array.num); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } - if (gc->pipe[i].array.im) - { - if (!gc->pipe[i].array.im->native.loose) - { - if (gc->pipe[i].array.im->native.func.unbind) - gc->pipe[i].array.im->native.func.unbind(gc->pipe[i].array.im->native.func.data, - gc->pipe[i].array.im); - } - gc->pipe[i].array.im = NULL; - } - - gc->state.current.cur_prog = gc->pipe[i].shader.cur_prog; - gc->state.current.cur_tex = gc->pipe[i].shader.cur_tex; - gc->state.current.render_op = gc->pipe[i].shader.render_op; - gc->state.current.cx = gc->pipe[i].shader.cx; - gc->state.current.cy = gc->pipe[i].shader.cy; - gc->state.current.cw = gc->pipe[i].shader.cw; - gc->state.current.ch = gc->pipe[i].shader.ch; - gc->state.current.smooth = gc->pipe[i].shader.smooth; - gc->state.current.blend = gc->pipe[i].shader.blend; - gc->state.current.clip = gc->pipe[i].shader.clip; - - if (gc->pipe[i].array.vertex) free(gc->pipe[i].array.vertex); - if (gc->pipe[i].array.color) free(gc->pipe[i].array.color); - if (gc->pipe[i].array.texuv) free(gc->pipe[i].array.texuv); - if (gc->pipe[i].array.texm) free(gc->pipe[i].array.texm); - if (gc->pipe[i].array.texuv2) free(gc->pipe[i].array.texuv2); - if (gc->pipe[i].array.texuv3) free(gc->pipe[i].array.texuv3); - - gc->pipe[i].array.vertex = NULL; - gc->pipe[i].array.color = NULL; - gc->pipe[i].array.texuv = NULL; - gc->pipe[i].array.texm = NULL; - gc->pipe[i].array.texuv2 = NULL; - gc->pipe[i].array.texuv3 = NULL; - - gc->pipe[i].array.num = 0; - gc->pipe[i].array.alloc = 0; - - gc->pipe[i].region.x = 0; - gc->pipe[i].region.y = 0; - gc->pipe[i].region.w = 0; - gc->pipe[i].region.h = 0; - gc->pipe[i].region.type = 0; - } - gc->state.top_pipe = 0; - if (dbgflushnum) - { - if (done > 0) printf("DONE (pipes): %i\n", done); - } - gc->havestuff = EINA_FALSE; -} - -Eina_Bool -evas_gl_common_module_open(void) -{ - if (_evas_engine_GL_common_log_dom < 0) - _evas_engine_GL_common_log_dom = eina_log_domain_register - ("evas-gl_common", EVAS_DEFAULT_LOG_COLOR); - if (_evas_engine_GL_common_log_dom < 0) - { - EINA_LOG_ERR("Can not create a module log domain."); - return EINA_FALSE; - } - return EINA_TRUE; -} - -void -evas_gl_common_module_close(void) -{ - if (_evas_engine_GL_common_log_dom < 0) return; - eina_log_domain_unregister(_evas_engine_GL_common_log_dom); - _evas_engine_GL_common_log_dom = -1; -} diff --git a/libraries/evas/src/modules/engines/gl_common/evas_gl_filter.c b/libraries/evas/src/modules/engines/gl_common/evas_gl_filter.c deleted file mode 100644 index a9d18d8..0000000 --- a/libraries/evas/src/modules/engines/gl_common/evas_gl_filter.c +++ /dev/null @@ -1,181 +0,0 @@ -#include "evas_gl_private.h" - -#if 0 // filtering disabled -void -evas_gl_common_filter_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im, Evas_Filter_Info *filter) -{ - RGBA_Draw_Context *dc; - GLuint prog; - int r,g,b,a; - int nomul, bgra; - - dc = gc->dc; - - if (dc->mul.use) - { - a = (dc->mul.col >> 24) & 0xff; - r = (dc->mul.col >> 16) & 0xff; - g = (dc->mul.col >> 8 ) & 0xff; - b = (dc->mul.col ) & 0xff; - } - else - { - r = g = b = a = 255; - } - - nomul = (a == 255 && r == 255 && g == 255 && b == 255) ? 1 : 0; - bgra = (gc->shared->info.bgra) ? 1 : 0; - - /* FIXME: This should so be a table */ -#if 0 - if (filter->filter == EVAS_FILTER_BLUR) - { - if (bgra) - { - if (nomul) - prog = gc->shared->shader.filter_blur_bgra_nomul.prog; - else - prog = gc->shared->shader.filter_blur_bgra.prog; - } - else - { - if (a == 255 && r == 255 && g == 255 && b == 255) - prog = gc->shared->shader.filter_blur_nomul.prog; - else - prog = gc->shared->shader.filter_blur.prog; - } - } - else -#endif - if (filter->filter == EVAS_FILTER_INVERT) - { - if (bgra) - { - if (nomul) - prog = gc->shared->shader.filter_invert_bgra_nomul.prog; - else - prog = gc->shared->shader.filter_invert_bgra.prog; - } - else - { - if (a == 255 && r == 255 && g == 255 && b == 255) - prog = gc->shared->shader.filter_invert_nomul.prog; - else - prog = gc->shared->shader.filter_invert.prog; - } - } - else if (filter->filter == EVAS_FILTER_SEPIA) - { - if (bgra) - { - if (nomul) - prog = gc->shared->shader.filter_sepia_bgra_nomul.prog; - else - prog = gc->shared->shader.filter_sepia_bgra.prog; - } - else - { - if (nomul) - prog = gc->shared->shader.filter_sepia_nomul.prog; - else - prog = gc->shared->shader.filter_sepia.prog; - } - - } - else /*if (filter->filter == EVAS_FILTER_GREYSCALE)*/ - { - printf("BGRA: %s Nomul: %s\n",bgra?"true":"false",nomul?"nomul":"mul"); - if (bgra) - { - if (nomul) - prog = gc->shared->shader.filter_greyscale_bgra_nomul.prog; - else - prog = gc->shared->shader.filter_greyscale_bgra.prog; - } - else - { - if (nomul) - prog = gc->shared->shader.filter_greyscale_nomul.prog; - else - prog = gc->shared->shader.filter_greyscale.prog; - } - - } - - printf("Prog: %d %d %d\n",prog,im->w,im->h); - gc->filter_prog = prog; - evas_gl_common_image_update(gc, im); - evas_gl_common_context_image_push(gc, im->tex, 0, 0, im->w, im->h, - 0, 0, im->w, im->h, - r,g,b,a, - 1, im->tex_only); - gc->filter_prog = 0; -} - - -Filtered_Image * -evas_gl_common_image_filtered_get(Evas_GL_Image *im, uint8_t *key, size_t len) -{ - Filtered_Image *fi; - Eina_List *l; - - for (l = im->filtered ; l ; l = l->next) - { - fi = l->data; - if (fi->keylen != len) continue; - if (memcmp(key, fi->key, len) != 0) continue; - fi->ref ++; - return fi; - } - - return NULL; -} - -Filtered_Image * -evas_gl_common_image_filtered_save(Evas_GL_Image *im, Evas_GL_Image *fimage, - uint8_t *key, size_t keylen) -{ - Filtered_Image *fi; - Eina_List *l; - - for (l = im->filtered ; l ; l = l->next) - { - fi = l->data; - if (fi->keylen != keylen) continue; - if (memcmp(key, fi->key, keylen) != 0) continue; - - fi->image = (void *)fimage; - fi->ref ++; - return fi; - } - - fi = calloc(1,sizeof(Filtered_Image)); - if (!fi) return NULL; - - fi->keylen = keylen; - fi->key = malloc(keylen); - memcpy(fi->key, key, keylen); - fi->image = (void *)fimage; - fi->ref = 1; - - im->filtered = eina_list_prepend(im->filtered, fi); - - return fi; -} - -void -evas_gl_common_image_filtered_free(Evas_GL_Image *image, Filtered_Image *fi) -{ - fi->ref --; - if (fi->ref) return; - - free(fi->key); - evas_gl_common_image_free((void *)fi->image); - fi->image = NULL; - - image->filtered = eina_list_remove(image->filtered, fi); -} -#endif - - -/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/ diff --git a/libraries/evas/src/modules/engines/gl_common/evas_gl_font.c b/libraries/evas/src/modules/engines/gl_common/evas_gl_font.c deleted file mode 100644 index e5f3a4a..0000000 --- a/libraries/evas/src/modules/engines/gl_common/evas_gl_font.c +++ /dev/null @@ -1,203 +0,0 @@ -#include "evas_gl_private.h" - -void * -evas_gl_font_texture_new(void *context, RGBA_Font_Glyph *fg) -{ - Evas_Engine_GL_Context *gc = context; - Evas_GL_Texture *tex; - DATA8 *data; - int w, h, j, nw; - DATA8 *ndata; - int fh; - - if (fg->ext_dat) return fg->ext_dat; // FIXME: one engine at a time can do this :( - - w = fg->glyph_out->bitmap.width; - h = fg->glyph_out->bitmap.rows; - if ((w == 0) || (h == 0)) return NULL; - - data = fg->glyph_out->bitmap.buffer; - j = fg->glyph_out->bitmap.pitch; - if (j < w) j = w; - - nw = ((w + 3) / 4) * 4; - ndata = alloca(nw *h); - if (!ndata) return NULL; - if (fg->glyph_out->bitmap.num_grays == 256) - { - int x, y; - DATA8 *p1, *p2; - - for (y = 0; y < h; y++) - { - p1 = data + (j * y); - p2 = ndata + (nw * y); - for (x = 0; x < w; x++) - { - *p2 = *p1; - p1++; - p2++; - } - } - } - else if (fg->glyph_out->bitmap.num_grays == 0) - { - DATA8 *tmpbuf = NULL, *dp, *tp, bits; - int bi, bj, end; - const DATA8 bitrepl[2] = {0x0, 0xff}; - - tmpbuf = alloca(w); - if (tmpbuf) - { - int x, y; - DATA8 *p1, *p2; - - for (y = 0; y < h; y++) - { - p1 = tmpbuf; - p2 = ndata + (nw * y); - tp = tmpbuf; - dp = data + (y * fg->glyph_out->bitmap.pitch); - for (bi = 0; bi < w; bi += 8) - { - bits = *dp; - if ((w - bi) < 8) end = w - bi; - else end = 8; - for (bj = 0; bj < end; bj++) - { - *tp = bitrepl[(bits >> (7 - bj)) & 0x1]; - tp++; - } - dp++; - } - for (x = 0; x < w; x++) - { - *p2 = *p1; - p1++; - p2++; - } - } - } - } -// fh = h; - fh = fg->fi->max_h; - tex = evas_gl_common_texture_alpha_new(gc, ndata, w, h, fh); - tex->sx1 = ((double)(tex->x)) / (double)tex->pt->w; - tex->sy1 = ((double)(tex->y)) / (double)tex->pt->h; - tex->sx2 = ((double)(tex->x + tex->w)) / (double)tex->pt->w; - tex->sy2 = ((double)(tex->y + tex->h)) / (double)tex->pt->h; - return tex; -} - -void -evas_gl_font_texture_free(void *tex) -{ - if (!tex) return; - evas_gl_common_texture_free(tex); -} - -void -evas_gl_font_texture_draw(void *context, void *surface __UNUSED__, void *draw_context, RGBA_Font_Glyph *fg, int x, int y) -{ - Evas_Engine_GL_Context *gc = context; - RGBA_Draw_Context *dc = draw_context; - Evas_GL_Texture *tex; - Cutout_Rects *rects; - Cutout_Rect *rct; - int r, g, b, a; - double ssx, ssy, ssw, ssh; - int c, cx, cy, cw, ch; - int i; - int sx, sy, sw, sh; - - if (dc != gc->dc) return; - tex = fg->ext_dat; - if (!tex) return; - a = (dc->col.col >> 24) & 0xff; - if (a == 0) return; - r = (dc->col.col >> 16) & 0xff; - g = (dc->col.col >> 8 ) & 0xff; - b = (dc->col.col ) & 0xff; - sx = 0; sy = 0; sw = tex->w, sh = tex->h; - if ((!gc->dc->cutout.rects) || - ((gc->shared->info.tune.cutout.max > 0) && - (gc->dc->cutout.active > gc->shared->info.tune.cutout.max))) - { - if (gc->dc->clip.use) - { - int nx, ny, nw, nh; - - nx = x; ny = y; nw = tex->w; nh = tex->h; - RECTS_CLIP_TO_RECT(nx, ny, nw, nh, - gc->dc->clip.x, gc->dc->clip.y, - gc->dc->clip.w, gc->dc->clip.h); - if ((nw < 1) || (nh < 1)) return; - if ((nx == x) && (ny == y) && (nw == tex->w) && (nh == tex->h)) - { - evas_gl_common_context_font_push(gc, tex, - 0.0, 0.0, 0.0, 0.0, -// sx, sy, sw, sh, - x, y, tex->w, tex->h, - r, g, b, a); - return; - } - ssx = (double)sx + ((double)(sw * (nx - x)) / (double)(tex->w)); - ssy = (double)sy + ((double)(sh * (ny - y)) / (double)(tex->h)); - ssw = ((double)sw * (double)(nw)) / (double)(tex->w); - ssh = ((double)sh * (double)(nh)) / (double)(tex->h); - evas_gl_common_context_font_push(gc, tex, - ssx, ssy, ssw, ssh, - nx, ny, nw, nh, - r, g, b, a); - } - else - { - evas_gl_common_context_font_push(gc, tex, - 0.0, 0.0, 0.0, 0.0, -// sx, sy, sw, sh, - x, y, tex->w, tex->h, - r, g, b, a); - } - return; - } - /* save out clip info */ - c = gc->dc->clip.use; cx = gc->dc->clip.x; cy = gc->dc->clip.y; cw = gc->dc->clip.w; ch = gc->dc->clip.h; - evas_common_draw_context_clip_clip(gc->dc, 0, 0, gc->w, gc->h); - evas_common_draw_context_clip_clip(gc->dc, x, y, tex->w, tex->h); - /* our clip is 0 size.. abort */ - if ((gc->dc->clip.w <= 0) || (gc->dc->clip.h <= 0)) - { - gc->dc->clip.use = c; gc->dc->clip.x = cx; gc->dc->clip.y = cy; gc->dc->clip.w = cw; gc->dc->clip.h = ch; - return; - } - rects = evas_common_draw_context_apply_cutouts(dc); - for (i = 0; i < rects->active; ++i) - { - int nx, ny, nw, nh; - - rct = rects->rects + i; - nx = x; ny = y; nw = tex->w; nh = tex->h; - RECTS_CLIP_TO_RECT(nx, ny, nw, nh, rct->x, rct->y, rct->w, rct->h); - if ((nw < 1) || (nh < 1)) continue; - if ((nx == x) && (ny == y) && (nw == tex->w) && (nh == tex->h)) - { - evas_gl_common_context_font_push(gc, tex, - 0.0, 0.0, 0.0, 0.0, -// sx, sy, sw, sh, - x, y, tex->w, tex->h, - r, g, b, a); - continue; - } - ssx = (double)sx + ((double)(sw * (nx - x)) / (double)(tex->w)); - ssy = (double)sy + ((double)(sh * (ny - y)) / (double)(tex->h)); - ssw = ((double)sw * (double)(nw)) / (double)(tex->w); - ssh = ((double)sh * (double)(nh)) / (double)(tex->h); - evas_gl_common_context_font_push(gc, tex, - ssx, ssy, ssw, ssh, - nx, ny, nw, nh, - r, g, b, a); - } - evas_common_draw_context_apply_clear_cutouts(rects); - /* restore clip info */ - gc->dc->clip.use = c; gc->dc->clip.x = cx; gc->dc->clip.y = cy; gc->dc->clip.w = cw; gc->dc->clip.h = ch; -} diff --git a/libraries/evas/src/modules/engines/gl_common/evas_gl_image.c b/libraries/evas/src/modules/engines/gl_common/evas_gl_image.c deleted file mode 100644 index 1d4b1f8..0000000 --- a/libraries/evas/src/modules/engines/gl_common/evas_gl_image.c +++ /dev/null @@ -1,968 +0,0 @@ -#include "evas_gl_private.h" - -void -evas_gl_common_image_all_unload(Evas_Engine_GL_Context *gc) -{ - Eina_List *l; - Evas_GL_Image *im; - - EINA_LIST_FOREACH(gc->shared->images, l, im) - { - if (im->im) evas_cache_image_unload_data(&im->im->cache_entry); - if (im->tex) - { - if (!im->tex->pt->dyn.img) - { - evas_gl_common_texture_free(im->tex); - im->tex = NULL; - } - } - } -} - -static void -_evas_gl_image_cache_trim(Evas_Engine_GL_Context *gc) -{ - int size = evas_common_image_get_cache(); - - while (gc->shared->images_size > size) - { - Evas_GL_Image *im2; - Eina_List *l = NULL; - - EINA_LIST_REVERSE_FOREACH(gc->shared->images, l, im2) - { - if (im2->references == 0) - { - im2->cached = 0; - im2->gc->shared->images = - eina_list_remove_list(im2->gc->shared->images, l); - im2->gc->shared->images_size -= (im2->csize); - evas_gl_common_image_free(im2); - l = NULL; - break; - } - } - if ((gc->shared->images_size > size) && (l)) - { -// printf("EEK %i > %i, no 0 ref imgs\n", -// gc->shared->images_size, size); - break; - } - if (!gc->shared->images) - { -// printf("EEK %i > %i, no imgs\n", -// gc->shared->images_size, size); - break; - } - } -} - -static Eina_Bool -_evas_gl_image_cache_add(Evas_GL_Image *im) -{ - if (im->references == 0) - { - im->csize = im->w * im->h * 4; - im->gc->shared->images_size += im->csize; - _evas_gl_image_cache_trim(im->gc); - return EINA_TRUE; - } - else - { - im->gc->shared->images = eina_list_remove(im->gc->shared->images, im); - im->cached = 0; - } - return EINA_FALSE; -} - -void -evas_gl_common_image_ref(Evas_GL_Image *im) -{ - if (im->references == 0) - { - im->gc->shared->images_size -= (im->csize); - } - im->references++; -} - -void -evas_gl_common_image_unref(Evas_GL_Image *im) -{ - im->references--; - if (im->references == 0) - { - _evas_gl_image_cache_add(im); - } -} - -Evas_GL_Image * -evas_gl_common_image_load(Evas_Engine_GL_Context *gc, const char *file, const char *key, Evas_Image_Load_Opts *lo, int *error) -{ - Evas_GL_Image *im; - RGBA_Image *im_im; - Eina_List *l; - - im_im = evas_common_load_image_from_file(file, key, lo, error); - if (!im_im) return NULL; - - /* i'd LOVe to do this, but we can't because we load to load header - * to get image size to know if its too big or not! so this disallows - * us to know that - photocam thus suffers - if (((int)im_im->cache_entry.w > gc->shared->info.max_texture_size) || - ((int)im_im->cache_entry.h > gc->shared->info.max_texture_size)) - { - evas_cache_image_drop(&(im_im->cache_entry)); - *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; - return NULL; - } - */ - - // FIXME: keep unreffed shared images around - EINA_LIST_FOREACH(gc->shared->images, l, im) - { - if (im->im == im_im) - { -// why did i put this here? i think to free the rgba pixel data once a texture -// exists. -// evas_cache_image_drop(&(im_im->cache_entry)); - gc->shared->images = eina_list_remove_list(gc->shared->images, l); - gc->shared->images = eina_list_prepend(gc->shared->images, im); - evas_gl_common_image_ref(im); - *error = EVAS_LOAD_ERROR_NONE; - return im; - } - } - - im = calloc(1, sizeof(Evas_GL_Image)); - if (!im) - { - evas_cache_image_drop(&(im_im->cache_entry)); - *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; - return NULL; - } - im->references = 1; - im->im = im_im; - im->gc = gc; - im->cached = 1; - im->cs.space = EVAS_COLORSPACE_ARGB8888; - im->alpha = im->im->cache_entry.flags.alpha; - im->w = im->im->cache_entry.w; - im->h = im->im->cache_entry.h; - if (lo) im->load_opts = *lo; - gc->shared->images = eina_list_prepend(gc->shared->images, im); - return im; -} - -Evas_GL_Image * -evas_gl_common_image_new_from_data(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, int cspace) -{ - Evas_GL_Image *im; - Eina_List *l; - - if (((int)w > gc->shared->info.max_texture_size) || - ((int)h > gc->shared->info.max_texture_size)) - return NULL; - - if (data) - { - EINA_LIST_FOREACH(gc->shared->images, l, im) - { - if (((void *)(im->im->image.data) == (void *)data) && - (im->im->cache_entry.w == w) && - (im->im->cache_entry.h == h)) - { - gc->shared->images = eina_list_remove_list(gc->shared->images, l); - gc->shared->images = eina_list_prepend(gc->shared->images, im); - evas_gl_common_image_ref(im); - return im; - } - } - } - im = calloc(1, sizeof(Evas_GL_Image)); - if (!im) return NULL; - im->references = 1; - im->im = (RGBA_Image *) evas_cache_image_data(evas_common_image_cache_get(), - w, h, data, alpha, cspace); - if (!im->im) - { - free(im); - return NULL; - } - im->gc = gc; - im->cs.space = cspace; - im->alpha = im->im->cache_entry.flags.alpha; - im->w = im->im->cache_entry.w; - im->h = im->im->cache_entry.h; - switch (cspace) - { - case EVAS_COLORSPACE_ARGB8888: - break; - case EVAS_COLORSPACE_YCBCR422P601_PL: - case EVAS_COLORSPACE_YCBCR422P709_PL: - if (im->tex) evas_gl_common_texture_free(im->tex); - im->tex = NULL; - im->cs.data = data; - im->cs.no_free = 1; - break; - default: - abort(); - break; - } - return im; -} - -Evas_GL_Image * -evas_gl_common_image_new_from_copied_data(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, int cspace) -{ - Evas_GL_Image *im; - - if (((int)w > gc->shared->info.max_texture_size) || - ((int)h > gc->shared->info.max_texture_size)) - return NULL; - - im = calloc(1, sizeof(Evas_GL_Image)); - if (!im) return NULL; - im->references = 1; - im->im = (RGBA_Image *) evas_cache_image_copied_data(evas_common_image_cache_get(), - w, h, data, alpha, cspace); - if (!im->im) - { - free(im); - return NULL; - } - im->gc = gc; - im->cs.space = cspace; - im->alpha = im->im->cache_entry.flags.alpha; - im->w = im->im->cache_entry.w; - im->h = im->im->cache_entry.h; - switch (cspace) - { - case EVAS_COLORSPACE_ARGB8888: - break; - case EVAS_COLORSPACE_YCBCR422P601_PL: - case EVAS_COLORSPACE_YCBCR422P709_PL: - if (im->tex) evas_gl_common_texture_free(im->tex); - im->tex = NULL; - im->cs.no_free = 0; - if (im->im->cache_entry.h > 0) - im->cs.data = calloc(1, im->im->cache_entry.h * sizeof(unsigned char *) * 2); - if ((data) && (im->cs.data)) - memcpy(im->cs.data, data, im->im->cache_entry.h * sizeof(unsigned char *) * 2); - break; - default: - abort(); - break; - } - return im; -} - -Evas_GL_Image * -evas_gl_common_image_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha, int cspace) -{ - Evas_GL_Image *im; - - if (((int)w > gc->shared->info.max_texture_size) || - ((int)h > gc->shared->info.max_texture_size)) - return NULL; - - im = calloc(1, sizeof(Evas_GL_Image)); - if (!im) return NULL; - im->references = 1; - im->im = (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get()); - if (!im->im) - { - free(im); - return NULL; - } - im->gc = gc; - im->im->cache_entry.flags.alpha = alpha ? 1 : 0; - im->cs.space = cspace; - im->alpha = im->im->cache_entry.flags.alpha; - im->im->cache_entry.w = w; - im->im->cache_entry.h = h; - im->w = im->im->cache_entry.w; - im->h = im->im->cache_entry.h; - evas_cache_image_colorspace(&im->im->cache_entry, cspace); - im->im = (RGBA_Image *)evas_cache_image_size_set(&im->im->cache_entry, w, h); - switch (cspace) - { - case EVAS_COLORSPACE_ARGB8888: - break; - case EVAS_COLORSPACE_YCBCR422P601_PL: - case EVAS_COLORSPACE_YCBCR422P709_PL: - case EVAS_COLORSPACE_YCBCR422601_PL: - case EVAS_COLORSPACE_YCBCR420NV12601_PL: - case EVAS_COLORSPACE_YCBCR420TM12601_PL: -// if (im->tex) evas_gl_common_texture_free(im->tex); - im->tex = NULL; - im->cs.no_free = 0; - if (im->im->cache_entry.h > 0) - im->cs.data = calloc(1, im->im->cache_entry.h * sizeof(unsigned char *) * 2); - break; - default: - abort(); - break; - } - return im; -} - -Evas_GL_Image * -evas_gl_common_image_alpha_set(Evas_GL_Image *im, int alpha) -{ - if (!im) return NULL; - if (im->alpha == alpha) return im; - im->alpha = alpha; - if (!im->im) return im; - im->im->cache_entry.flags.alpha = alpha ? 1 : 0; - if (im->tex) - { - evas_gl_common_texture_free(im->tex); - im->tex = NULL; - } - if (!im->tex) - im->tex = evas_gl_common_texture_new(im->gc, im->im); - return im; -} - -void -evas_gl_common_image_native_enable(Evas_GL_Image *im) -{ - if (im->cs.data) - { - if (!im->cs.no_free) free(im->cs.data); - im->cs.data = NULL; - } - im->cs.no_free = 0; - if (im->cached) - { - if (im->references == 0) - im->gc->shared->images_size -= (im->csize); - im->gc->shared->images = eina_list_remove(im->gc->shared->images, im); - im->cached = 0; - } - if (im->im) - { - evas_cache_image_drop(&im->im->cache_entry); - im->im = NULL; - } - if (im->tex) - { - evas_gl_common_texture_free(im->tex); - im->tex = NULL; - } - - im->cs.space = EVAS_COLORSPACE_ARGB8888; - im->tex = evas_gl_common_texture_native_new(im->gc, im->w, im->h, im->alpha, im); - im->tex_only = 1; -} - -void -evas_gl_common_image_native_disable(Evas_GL_Image *im) -{ - if (im->im) - { - evas_cache_image_drop(&im->im->cache_entry); - im->im = NULL; - } - if (im->tex) - { - evas_gl_common_texture_free(im->tex); - im->tex = NULL; - } - im->tex_only = 0; - - im->im = (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get()); - im->im->cache_entry.flags.alpha = im->alpha; - im->cs.space = EVAS_COLORSPACE_ARGB8888; - evas_cache_image_colorspace(&im->im->cache_entry, im->cs.space); - im->im = (RGBA_Image *)evas_cache_image_size_set(&im->im->cache_entry, im->w, im->h); - if (!im->tex) - im->tex = evas_gl_common_texture_new(im->gc, im->im); -} - -void -evas_gl_common_image_scale_hint_set(Evas_GL_Image *im, int hint) -{ - im->scale_hint = hint; - // FIXME: take advantage of this even in gl (eg if image is - // 1600x1200 but we always use it at 800x600 or even less - drop - // the texture res down for "non dynamic" stuff to save memory) -} - -void -evas_gl_common_image_content_hint_set(Evas_GL_Image *im, int hint) -{ - if (im->content_hint == hint) return; - im->content_hint = hint; - if (!im->gc) return; - if (!im->gc->shared->info.sec_image_map) return; - if (!im->gc->shared->info.bgra) return; - // does not handle yuv yet. - if (im->cs.space != EVAS_COLORSPACE_ARGB8888) return; - if (im->content_hint == EVAS_IMAGE_CONTENT_HINT_DYNAMIC) - { - if (im->cs.data) - { - if (!im->cs.no_free) free(im->cs.data); - im->cs.data = NULL; - } - im->cs.no_free = 0; - if (im->cached) - { - if (im->references == 0) - im->gc->shared->images_size -= im->csize; - im->gc->shared->images = eina_list_remove(im->gc->shared->images, im); - im->cached = 0; - } - if (im->im) - { - evas_cache_image_drop(&im->im->cache_entry); - im->im = NULL; - } - if (im->tex) - { - evas_gl_common_texture_free(im->tex); - im->tex = NULL; - } - im->tex = evas_gl_common_texture_dynamic_new(im->gc, im); - im->tex_only = 1; - } - else - { - if (im->im) - { - evas_cache_image_drop(&im->im->cache_entry); - im->im = NULL; - } - if (im->tex) - { - evas_gl_common_texture_free(im->tex); - im->tex = NULL; - } - im->tex_only = 0; - - im->im = (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get()); - im->im->cache_entry.flags.alpha = im->alpha; - im->cs.space = EVAS_COLORSPACE_ARGB8888; - evas_cache_image_colorspace(&im->im->cache_entry, im->cs.space); - im->im = (RGBA_Image *)evas_cache_image_size_set(&im->im->cache_entry, im->w, im->h); - if (!im->tex) - im->tex = evas_gl_common_texture_new(im->gc, im->im); - } -} - -void -evas_gl_common_image_cache_flush(Evas_Engine_GL_Context *gc) -{ - _evas_gl_image_cache_trim(gc); -} - -void -evas_gl_common_image_free(Evas_GL_Image *im) -{ -#if 0 // filtering disabled - Filtered_Image *fi; -#endif - - evas_gl_common_context_flush(im->gc); - im->references--; - if (im->references > 0) return; - - if (im->native.func.free) - im->native.func.free(im->native.func.data, im); - - if (im->cs.data) - { - if (!im->cs.no_free) free(im->cs.data); - } - if (im->cached) - { - if (_evas_gl_image_cache_add(im)) return; - } - if (im->im) evas_cache_image_drop(&im->im->cache_entry); - if (im->tex) evas_gl_common_texture_free(im->tex); - -#if 0 // filtering disabled - EINA_LIST_FREE(im->filtered, fi) - { - free(fi->key); - evas_gl_common_image_free((Evas_GL_Image *)fi->image); - free(fi); - } -#endif - - free(im); -} - -Evas_GL_Image * -evas_gl_common_image_surface_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha) -{ - Evas_GL_Image *im; - - if (((int)w > gc->shared->info.max_texture_size) || - ((int)h > gc->shared->info.max_texture_size)) - return NULL; - - im = calloc(1, sizeof(Evas_GL_Image)); - if (!im) return NULL; - im->references = 1; - im->gc = gc; - im->cs.space = EVAS_COLORSPACE_ARGB8888; - im->alpha = alpha; - im->w = w; - im->h = h; - im->tex = evas_gl_common_texture_render_new(gc, w, h, alpha); - im->tex_only = 1; - return im; -} - -void -evas_gl_common_image_dirty(Evas_GL_Image *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h) -{ - if ((w == 0) && (h == 0) && (x == 0) && (y == 0)) - { - w = im->w; - h = im->h; - } - if (im->im) - { - im->im = (RGBA_Image *)evas_cache_image_dirty(&im->im->cache_entry, x, y, w, h); - } - im->dirty = 1; -} - -void -evas_gl_common_image_update(Evas_Engine_GL_Context *gc, Evas_GL_Image *im) -{ - Image_Entry *ie; - if (!im->im) return; - ie = (Image_Entry *)(im->im); -/* - if ((im->cs.space == EVAS_COLORSPACE_YCBCR422P601_PL) || - (im->cs.space == EVAS_COLORSPACE_YCBCR422P709_PL)) - { - // SOFTWARE convert. do multi texture later - if ((im->cs.data) && (*((unsigned char **)im->cs.data))) - { - if (im->dirty || !im->im->image.data) - { - free(im->im->image.data); - im->im->image.data = malloc(im->im->cache_entry.w * im->im->cache_entry.h * sizeof(DATA32)); - if (im->im->image.data) - evas_common_convert_yuv_420p_601_rgba(im->cs.data, - (void *)im->im->image.data, - im->im->cache_entry.w, im->im->cache_entry.h); - } - } - space = EVAS_COLORSPACE_ARGB8888; - } - else - */ - switch (im->cs.space) - { - case EVAS_COLORSPACE_ARGB8888: - if ((im->tex) && - ((im->dirty) || (ie->flags.animated))) - { - evas_cache_image_load_data(&im->im->cache_entry); - evas_gl_common_texture_update(im->tex, im->im); - evas_cache_image_unload_data(&im->im->cache_entry); - } - if (!im->tex) - { - evas_cache_image_load_data(&im->im->cache_entry); - im->tex = evas_gl_common_texture_new(gc, im->im); - evas_cache_image_unload_data(&im->im->cache_entry); - } - im->dirty = 0; - if (!im->tex) return; - break; - case EVAS_COLORSPACE_YCBCR422P601_PL: - case EVAS_COLORSPACE_YCBCR422P709_PL: - if ((im->tex) && (im->dirty)) - { - evas_gl_common_texture_yuv_update(im->tex, im->cs.data, - im->im->cache_entry.w, - im->im->cache_entry.h); - im->dirty = 0; - } - if ((!im->tex) && (im->cs.data) && (*((unsigned char **)im->cs.data))) - { - im->tex = evas_gl_common_texture_yuv_new(gc, im->cs.data, - im->im->cache_entry.w, - im->im->cache_entry.h); - im->dirty = 0; - } - if (!im->tex) return; - break; - case EVAS_COLORSPACE_YCBCR422601_PL: - if ((im->tex) && (im->dirty)) - { - evas_gl_common_texture_yuy2_update(im->tex, im->cs.data, - im->im->cache_entry.w, - im->im->cache_entry.h); - im->dirty = 0; - } - if ((!im->tex) && (im->cs.data) && (*((unsigned char **)im->cs.data))) - { - im->tex = evas_gl_common_texture_yuy2_new(gc, im->cs.data, - im->im->cache_entry.w, - im->im->cache_entry.h); - im->dirty = 0; - } - if (!im->tex) return; - break; - case EVAS_COLORSPACE_YCBCR420NV12601_PL: - if ((im->tex) && (im->dirty)) - { - evas_gl_common_texture_nv12_update(im->tex, im->cs.data, - im->im->cache_entry.w, - im->im->cache_entry.h); - im->dirty = 0; - } - if ((!im->tex) && (im->cs.data) && (*((unsigned char **)im->cs.data))) - { - im->tex = evas_gl_common_texture_nv12_new(gc, im->cs.data, - im->im->cache_entry.w, - im->im->cache_entry.h); - im->dirty = 0; - } - if (!im->tex) return; - break; - case EVAS_COLORSPACE_YCBCR420TM12601_PL: - if ((im->tex) && (im->dirty)) - { - evas_gl_common_texture_nv12tiled_update(im->tex, im->cs.data, - im->im->cache_entry.w, - im->im->cache_entry.h); - im->dirty = 0; - } - if ((!im->tex) && (im->cs.data) && (*((unsigned char **)im->cs.data))) - { - im->tex = evas_gl_common_texture_nv12tiled_new(gc, im->cs.data, - im->im->cache_entry.w, - im->im->cache_entry.h); - im->dirty = 0; - } - if (!im->tex) return; - break; - default: - ERR("unhandled img format colorspace=%d", im->cs.space); - break; - } -} - -void -evas_gl_common_image_map_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im, - int npoints, RGBA_Map_Point *p, int smooth, int level __UNUSED__) -{ - RGBA_Draw_Context *dc; - int r, g, b, a; - int c, cx, cy, cw, ch; - - dc = gc->dc; - if (dc->mul.use) - { - a = (dc->mul.col >> 24) & 0xff; - r = (dc->mul.col >> 16) & 0xff; - g = (dc->mul.col >> 8 ) & 0xff; - b = (dc->mul.col ) & 0xff; - } - else - { - r = g = b = a = 255; - } - - evas_gl_common_image_update(gc, im); - - c = gc->dc->clip.use; - cx = gc->dc->clip.x; cy = gc->dc->clip.y; - cw = gc->dc->clip.w; ch = gc->dc->clip.h; - im->tex->im = im; - - evas_gl_common_context_image_map_push(gc, im->tex, npoints, p, - c, cx, cy, cw, ch, - r, g, b, a, smooth, im->tex_only, - im->cs.space); -} - -void -evas_gl_common_image_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int smooth) -{ - RGBA_Draw_Context *dc; - Evas_GL_Image *imm; - int r, g, b, a; - double ssx, ssy, ssw, ssh; - double mssx, mssy, mssw, mssh; - Cutout_Rects *rects; - Cutout_Rect *rct; - int c, cx, cy, cw, ch; - int i; - int yuv = 0; - int yuy2 = 0; - int nv12 = 0; - - if (sw < 1) sw = 1; - if (sh < 1) sh = 1; - dc = gc->dc; - imm = (Evas_GL_Image *)dc->mask.mask; - if (dc->mul.use) - { - a = (dc->mul.col >> 24) & 0xff; - r = (dc->mul.col >> 16) & 0xff; - g = (dc->mul.col >> 8 ) & 0xff; - b = (dc->mul.col ) & 0xff; - } - else - { - r = g = b = a = 255; - } - - evas_gl_common_image_update(gc, im); - if (!im->tex) - { - evas_gl_common_rect_draw(gc, dx, dy, dw, dh); - return; - } - if (imm) - { - evas_gl_common_image_update(gc, imm); - if (!imm->tex) imm = NULL; /* Turn of mask on error */ - } - - if ((im->cs.space == EVAS_COLORSPACE_YCBCR422P601_PL) || - (im->cs.space == EVAS_COLORSPACE_YCBCR422P709_PL)) - yuv = 1; - if (im->cs.space == EVAS_COLORSPACE_YCBCR422601_PL) - yuy2 = 1; - if ((im->cs.space == EVAS_COLORSPACE_YCBCR420NV12601_PL) || - (im->cs.space == EVAS_COLORSPACE_YCBCR420TM12601_PL)) - nv12 = 1; - - im->tex->im = im; - if (imm) imm->tex->im = imm; - if ((!gc->dc->cutout.rects) || - ((gc->shared->info.tune.cutout.max > 0) && - (gc->dc->cutout.active > gc->shared->info.tune.cutout.max))) - { - if (gc->dc->clip.use) - { - int nx, ny, nw, nh; - double scalex,scaley; - - nx = dx; ny = dy; nw = dw; nh = dh; - RECTS_CLIP_TO_RECT(nx, ny, nw, nh, - gc->dc->clip.x, gc->dc->clip.y, - gc->dc->clip.w, gc->dc->clip.h); - if ((nw < 1) || (nh < 1)) return; - if ((!imm) && (nx == dx) && (ny == dy) && (nw == dw) && (nh == dh)) - { - if (yuv) - evas_gl_common_context_yuv_push(gc, - im->tex, - sx, sy, sw, sh, - dx, dy, dw, dh, - r, g, b, a, - smooth); - else if (yuy2) - evas_gl_common_context_yuy2_push(gc, - im->tex, - sx, sy, sw, sh, - dx, dy, dw, dh, - r, g, b, a, - smooth); - else if (nv12) - evas_gl_common_context_nv12_push(gc, - im->tex, - sx, sy, sw, sh, - dx, dy, dw, dh, - r, g, b, a, - smooth); - else - - evas_gl_common_context_image_push(gc, - im->tex, - sx, sy, sw, sh, - dx, dy, dw, dh, - r, g, b, a, - smooth, im->tex_only); - return; - } - - ssx = (double)sx + ((double)(sw * (nx - dx)) / (double)(dw)); - ssy = (double)sy + ((double)(sh * (ny - dy)) / (double)(dh)); - ssw = ((double)sw * (double)(nw)) / (double)(dw); - ssh = ((double)sh * (double)(nh)) / (double)(dh); - if (imm) - { - /* Correct ones here */ - scalex = imm->w / (double)dc->mask.w; - scaley = imm->h / (double)dc->mask.h; - mssx = scalex * (nx - dc->mask.x); - mssy = scaley * (ny - dc->mask.y); - mssw = scalex * nw; - mssh = scaley * nh; - - /* No yuv + imm I'm afraid */ - evas_gl_common_context_image_mask_push(gc, - im->tex, - imm->tex, - ssx, ssy, ssw, ssh, - mssx, mssy, mssw, mssh, - //dc->mask.x, dc->mask.y, dc->mask.w, dc->mask.h, - nx, ny, nw, nh, - r, g, b, a, - smooth); - } - else if (yuv) - evas_gl_common_context_yuv_push(gc, - im->tex, - ssx, ssy, ssw, ssh, - nx, ny, nw, nh, - r, g, b, a, - smooth); - else if (yuy2) - evas_gl_common_context_yuy2_push(gc, - im->tex, - ssx, ssy, ssw, ssh, - nx, ny, nw, nh, - r, g, b, a, - smooth); - else if (nv12) - evas_gl_common_context_nv12_push(gc, - im->tex, - ssx, ssy, ssw, ssh, - nx, ny, nw, nh, - r, g, b, a, - smooth); - else - evas_gl_common_context_image_push(gc, - im->tex, - ssx, ssy, ssw, ssh, - nx, ny, nw, nh, - r, g, b, a, - smooth, im->tex_only); - } - else - { - if (yuv) - evas_gl_common_context_yuv_push(gc, - im->tex, - sx, sy, sw, sh, - dx, dy, dw, dh, - r, g, b, a, - smooth); - else if (yuy2) - evas_gl_common_context_yuy2_push(gc, - im->tex, - sx, sy, sw, sh, - dx, dy, dw, dh, - r, g, b, a, - smooth); - else if (nv12) - evas_gl_common_context_nv12_push(gc, - im->tex, - sx, sy, sw, sh, - dx, dy, dw, dh, - r, g, b, a, - smooth); - else - evas_gl_common_context_image_push(gc, - im->tex, - sx, sy, sw, sh, - dx, dy, dw, dh, - r, g, b, a, - smooth, im->tex_only); - } - return; - } - - /* save out clip info */ - c = gc->dc->clip.use; cx = gc->dc->clip.x; cy = gc->dc->clip.y; cw = gc->dc->clip.w; ch = gc->dc->clip.h; - evas_common_draw_context_clip_clip(gc->dc, 0, 0, gc->w, gc->h); - evas_common_draw_context_clip_clip(gc->dc, dx, dy, dw, dh); - /* our clip is 0 size.. abort */ - if ((gc->dc->clip.w <= 0) || (gc->dc->clip.h <= 0)) - { - gc->dc->clip.use = c; gc->dc->clip.x = cx; gc->dc->clip.y = cy; gc->dc->clip.w = cw; gc->dc->clip.h = ch; - return; - } - rects = evas_common_draw_context_apply_cutouts(dc); - for (i = 0; i < rects->active; ++i) - { - int nx, ny, nw, nh; - - rct = rects->rects + i; - nx = dx; ny = dy; nw = dw; nh = dh; - RECTS_CLIP_TO_RECT(nx, ny, nw, nh, rct->x, rct->y, rct->w, rct->h); - if ((nw < 1) || (nh < 1)) continue; - if ((nx == dx) && (ny == dy) && (nw == dw) && (nh == dh)) - { - if (yuv) - evas_gl_common_context_yuv_push(gc, - im->tex, - sx, sy, sw, sh, - dx, dy, dw, dh, - r, g, b, a, - smooth); - else if (yuy2) - evas_gl_common_context_yuy2_push(gc, - im->tex, - sx, sy, sw, sh, - dx, dy, dw, dh, - r, g, b, a, - smooth); - else if (nv12) - evas_gl_common_context_nv12_push(gc, - im->tex, - sx, sy, sw, sh, - dx, dy, dw, dh, - r, g, b, a, - smooth); - else - evas_gl_common_context_image_push(gc, - im->tex, - sx, sy, sw, sh, - dx, dy, dw, dh, - r, g, b, a, - smooth, im->tex_only); - continue; - } - ssx = (double)sx + ((double)(sw * (nx - dx)) / (double)(dw)); - ssy = (double)sy + ((double)(sh * (ny - dy)) / (double)(dh)); - ssw = ((double)sw * (double)(nw)) / (double)(dw); - ssh = ((double)sh * (double)(nh)) / (double)(dh); - if (yuv) - evas_gl_common_context_yuv_push(gc, - im->tex, - ssx, ssy, ssw, ssh, - nx, ny, nw, nh, - r, g, b, a, - smooth); - else if (yuy2) - evas_gl_common_context_yuy2_push(gc, - im->tex, - ssx, ssy, ssw, ssh, - nx, ny, nw, nh, - r, g, b, a, - smooth); - else if (nv12) - evas_gl_common_context_nv12_push(gc, - im->tex, - ssx, ssy, ssw, ssh, - nx, ny, nw, nh, - r, g, b, a, - smooth); - else - evas_gl_common_context_image_push(gc, - im->tex, - ssx, ssy, ssw, ssh, - nx, ny, nw, nh, - r, g, b, a, - smooth, im->tex_only); - } - evas_common_draw_context_apply_clear_cutouts(rects); - /* restore clip info */ - gc->dc->clip.use = c; gc->dc->clip.x = cx; gc->dc->clip.y = cy; gc->dc->clip.w = cw; gc->dc->clip.h = ch; -} diff --git a/libraries/evas/src/modules/engines/gl_common/evas_gl_line.c b/libraries/evas/src/modules/engines/gl_common/evas_gl_line.c deleted file mode 100644 index f8ace2e..0000000 --- a/libraries/evas/src/modules/engines/gl_common/evas_gl_line.c +++ /dev/null @@ -1,35 +0,0 @@ -#include "evas_gl_private.h" - -void -evas_gl_common_line_draw(Evas_Engine_GL_Context *gc, int x1, int y1, int x2, int y2) -{ - RGBA_Draw_Context *dc; - int r, g, b, a; - int c, cx, cy, cw, ch; - - dc = gc->dc; - if (dc->mul.use) - { - a = (dc->mul.col >> 24) & 0xff; - r = (dc->mul.col >> 16) & 0xff; - g = (dc->mul.col >> 8 ) & 0xff; - b = (dc->mul.col ) & 0xff; - } - else - { - a = (dc->col.col >> 24) & 0xff; - r = (dc->col.col >> 16) & 0xff; - g = (dc->col.col >> 8 ) & 0xff; - b = (dc->col.col ) & 0xff; - } - - glFlush(); - - c = gc->dc->clip.use; - cx = gc->dc->clip.x; cy = gc->dc->clip.y; - cw = gc->dc->clip.w; ch = gc->dc->clip.h; - - evas_gl_common_context_line_push(gc, x1, y1, x2, y2, - c, cx, cy, cw, ch, - r, g, b, a); -} diff --git a/libraries/evas/src/modules/engines/gl_common/evas_gl_polygon.c b/libraries/evas/src/modules/engines/gl_common/evas_gl_polygon.c deleted file mode 100644 index 06647cd..0000000 --- a/libraries/evas/src/modules/engines/gl_common/evas_gl_polygon.c +++ /dev/null @@ -1,307 +0,0 @@ -#include "evas_gl_private.h" - -// FIXME: this is a verbatim copy of the software poly renderer. it just -// use gl to draw 1 pixel high spans like software does. this is to make -// sure rendering correctness matches the software engine but also to save -// time in coming up with a good triangulation algorithm. if you want to -// feel free to turn this into a real triangulation system and use gl to its -// fullest, but as such polygons are used so little, it's not worth it. - -typedef struct _RGBA_Span RGBA_Span; -typedef struct _RGBA_Edge RGBA_Edge; -typedef struct _RGBA_Vertex RGBA_Vertex; - -struct _RGBA_Span -{ - EINA_INLIST; - int x, y, w; -}; - -struct _RGBA_Edge -{ - double x, dx; - int i; -}; - -struct _RGBA_Vertex -{ - double x, y; - int i; -}; - -#define POLY_EDGE_DEL(_i) \ - { \ - int _j; \ - \ - for (_j = 0; (_j < num_active_edges) && (edges[_j].i != _i); _j++); \ - if (_j < num_active_edges) \ - { \ - num_active_edges--; \ - memmove(&(edges[_j]), &(edges[_j + 1]), \ - (num_active_edges - _j) * sizeof(RGBA_Edge)); \ - } \ - } - -#define POLY_EDGE_ADD(_i, _y) \ - { \ - int _j; \ - float _dx; \ - RGBA_Vertex *_p, *_q; \ - if (_i < (n - 1)) _j = _i + 1; \ - else _j = 0; \ - if (point[_i].y < point[_j].y) \ - { \ - _p = &(point[_i]); \ - _q = &(point[_j]); \ - } \ - else \ - { \ - _p = &(point[_j]); \ - _q = &(point[_i]); \ - } \ - edges[num_active_edges].dx = _dx = (_q->x - _p->x) / (_q->y - _p->y); \ - edges[num_active_edges].x = (_dx * ((float)_y + 0.5 - _p->y)) + _p->x; \ - edges[num_active_edges].i = _i; \ - num_active_edges++; \ - } - -Evas_GL_Polygon * -evas_gl_common_poly_point_add(Evas_GL_Polygon *poly, int x, int y) -{ - Evas_GL_Polygon_Point *pt; - - if (!poly) poly = calloc(1, sizeof(Evas_GL_Polygon)); - if (!poly) return NULL; - pt = calloc(1, sizeof(Evas_GL_Polygon_Point)); - if (!pt) return NULL; - pt->x = x; - pt->y = y; - poly->points = eina_list_append(poly->points, pt); - poly->changed = 1; - return poly; -} - -Evas_GL_Polygon * -evas_gl_common_poly_points_clear(Evas_GL_Polygon *poly) -{ - if (!poly) return NULL; - while (poly->points) - { - Evas_GL_Polygon_Point *pt; - - pt = poly->points->data; - poly->points = eina_list_remove(poly->points, pt); - free(pt); - } - free(poly); - return NULL; -} - -static int -polygon_point_sorter(const void *a, const void *b) -{ - RGBA_Vertex *p, *q; - - p = (RGBA_Vertex *)a; - q = (RGBA_Vertex *)b; - if (p->y <= q->y) return -1; - return 1; -} - -static int -polygon_edge_sorter(const void *a, const void *b) -{ - RGBA_Edge *p, *q; - - p = (RGBA_Edge *)a; - q = (RGBA_Edge *)b; - if (p->x <= q->x) return -1; - return 1; -} - -void -evas_gl_common_poly_draw(Evas_Engine_GL_Context *gc, Evas_GL_Polygon *poly, int dx, int dy) -{ - Cutout_Rects *rects; - Cutout_Rect *r; - int c, cx, cy, cw, ch, cr, cg, cb, ca, i; - int x = 0, y = 0, w = 0, h = 0; - - Eina_List *l; - int n, k, num_active_edges, y0, y1, *sorted_index, j; - RGBA_Edge *edges; - RGBA_Vertex *point; - Evas_GL_Polygon_Point *pt; - Eina_Inlist *spans; - - /* save out clip info */ - c = gc->dc->clip.use; cx = gc->dc->clip.x; cy = gc->dc->clip.y; cw = gc->dc->clip.w; ch = gc->dc->clip.h; - - ca = (gc->dc->col.col >> 24) & 0xff; - if (ca <= 0) return; - cr = (gc->dc->col.col >> 16) & 0xff; - cg = (gc->dc->col.col >> 8 ) & 0xff; - cb = (gc->dc->col.col ) & 0xff; - - n = eina_list_count(poly->points); - if (n < 3) return; - edges = malloc(sizeof(RGBA_Edge) * n); - if (!edges) return; - point = malloc(sizeof(RGBA_Vertex) * n); - if (!point) - { - free(edges); - return; - } - sorted_index = malloc(sizeof(int) * n); - if (!sorted_index) - { - free(edges); - free(point); - return; - } - - k = 0; - EINA_LIST_FOREACH(poly->points, l, pt) - { - point[k].x = pt->x + dx; - point[k].y = pt->y + dy; - point[k].i = k; - k++; - } - qsort(point, n, sizeof(RGBA_Vertex), polygon_point_sorter); - for (k = 0; k < n; k++) sorted_index[k] = point[k].i; - k = 0; - - EINA_LIST_FOREACH(poly->points, l, pt) - { - point[k].x = pt->x + dx; - point[k].y = pt->y + dy; - point[k].i = k; - k++; - } - - y0 = MAX(cy, ceil(point[sorted_index[0]].y - 0.5)); - y1 = MIN(cy + ch - 1, floor(point[sorted_index[n - 1]].y - 0.5)); - - k = 0; - num_active_edges = 0; - spans = NULL; - - for (y = y0; y <= y1; y++) - { - for (; (k < n) && (point[sorted_index[k]].y <= ((double)y + 0.5)); k++) - { - i = sorted_index[k]; - - if (i > 0) j = i - 1; - else j = n - 1; - if (point[j].y <= ((double)y - 0.5)) - { - POLY_EDGE_DEL(j) - } - else if (point[j].y > ((double)y + 0.5)) - { - POLY_EDGE_ADD(j, y) - } - if (i < (n - 1)) j = i + 1; - else j = 0; - if (point[j].y <= ((double)y - 0.5)) - { - POLY_EDGE_DEL(i) - } - else if (point[j].y > ((double)y + 0.5)) - { - POLY_EDGE_ADD(i, y) - } - } - - qsort(edges, num_active_edges, sizeof(RGBA_Edge), polygon_edge_sorter); - - for (j = 0; j < num_active_edges; j += 2) - { - int x0, x1; - - x0 = ceil(edges[j].x - 0.5); - if (j < (num_active_edges - 1)) - x1 = floor(edges[j + 1].x - 0.5); - else - x1 = x0; - if ((x1 >= cx) && (x0 < (cx + cw)) && (x0 <= x1)) - { - RGBA_Span *span; - - if (x0 < cx) x0 = cx; - if (x1 >= (cx + cw)) x1 = cx + cw - 1; - span = malloc(sizeof(RGBA_Span)); - spans = eina_inlist_append(spans, EINA_INLIST_GET(span)); - span->y = y; - span->x = x0; - span->w = (x1 - x0) + 1; - } - edges[j].x += edges[j].dx; - edges[j + 1].x += edges[j + 1].dx; - } - } - - free(edges); - free(point); - free(sorted_index); - - evas_common_draw_context_clip_clip(gc->dc, 0, 0, gc->w, gc->h); - - if (spans) - { - RGBA_Span *span; - - /* no cutouts - cut right to the chase */ - if (!gc->dc->cutout.rects) - { - EINA_INLIST_FOREACH(spans, span) - { - x = span->x; - y = span->y; - w = span->w; - h = 1; - evas_gl_common_context_rectangle_push(gc, x, y, w, h, cr, cg, cb, ca); - } - } - else - { - evas_common_draw_context_clip_clip(gc->dc, x, y, w, h); - /* our clip is 0 size.. abort */ - if ((gc->dc->clip.w > 0) && (gc->dc->clip.h > 0)) - { - rects = evas_common_draw_context_apply_cutouts(gc->dc); - for (i = 0; i < rects->active; ++i) - { - r = rects->rects + i; - if ((r->w > 0) && (r->h > 0)) - { - EINA_INLIST_FOREACH(spans, span) - { - x = span->x; - y = span->y; - w = span->w; - h = 1; - RECTS_CLIP_TO_RECT(x, y, w, h, r->x, r->y, r->w, r->h); - if ((w > 0) && (h > 0)) - evas_gl_common_context_rectangle_push(gc, x, y, w, h, cr, cg, cb, ca); - } - } - } - evas_common_draw_context_apply_clear_cutouts(rects); - } - } - while (spans) - { - span = (RGBA_Span *)spans; - spans = eina_inlist_remove(spans, spans); - free(span); - } - } - - /* restore clip info */ - gc->dc->clip.use = c; gc->dc->clip.x = cx; gc->dc->clip.y = cy; gc->dc->clip.w = cw; gc->dc->clip.h = ch; - -} diff --git a/libraries/evas/src/modules/engines/gl_common/evas_gl_private.h b/libraries/evas/src/modules/engines/gl_common/evas_gl_private.h deleted file mode 100644 index a178823..0000000 --- a/libraries/evas/src/modules/engines/gl_common/evas_gl_private.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef _EVAS_GL_PRIVATE_H -#define _EVAS_GL_PRIVATE_H -#include "evas_gl_common.h" - -extern int _evas_engine_GL_common_log_dom; - -#ifdef ERR -# undef ERR -#endif -#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_GL_common_log_dom, __VA_ARGS__) - -#ifdef DBG -# undef DBG -#endif -#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_GL_common_log_dom, __VA_ARGS__) - -#ifdef INF -# undef INF -#endif -#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_GL_common_log_dom, __VA_ARGS__) - -#ifdef WRN -# undef WRN -#endif -#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_GL_common_log_dom, __VA_ARGS__) - -#ifdef CRIT -# undef CRIT -#endif -#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_GL_common_log_dom, __VA_ARGS__) - -#endif diff --git a/libraries/evas/src/modules/engines/gl_common/evas_gl_rectangle.c b/libraries/evas/src/modules/engines/gl_common/evas_gl_rectangle.c deleted file mode 100644 index 1903314..0000000 --- a/libraries/evas/src/modules/engines/gl_common/evas_gl_rectangle.c +++ /dev/null @@ -1,53 +0,0 @@ -#include "evas_gl_private.h" - -void -evas_gl_common_rect_draw(Evas_Engine_GL_Context *gc, int x, int y, int w, int h) -{ - Cutout_Rects *rects; - Cutout_Rect *r; - int c, cx, cy, cw, ch, cr, cg, cb, ca, i; - - if ((w <= 0) || (h <= 0)) return; - if (!(RECTS_INTERSECT(x, y, w, h, 0, 0, gc->w, gc->h))) return; - /* save out clip info */ - c = gc->dc->clip.use; cx = gc->dc->clip.x; cy = gc->dc->clip.y; cw = gc->dc->clip.w; ch = gc->dc->clip.h; - - ca = (gc->dc->col.col >> 24) & 0xff; - if ((gc->dc->render_op != EVAS_RENDER_COPY) && (ca <= 0)) return; - cr = (gc->dc->col.col >> 16) & 0xff; - cg = (gc->dc->col.col >> 8 ) & 0xff; - cb = (gc->dc->col.col ) & 0xff; - evas_common_draw_context_clip_clip(gc->dc, 0, 0, gc->w, gc->h); - /* no cutouts - cut right to the chase */ - if ((gc->dc) && (gc->dc->clip.use)) - { - RECTS_CLIP_TO_RECT(x, y, w, h, - gc->dc->clip.x, gc->dc->clip.y, - gc->dc->clip.w, gc->dc->clip.h); - } - - if (!gc->dc->cutout.rects) - { - evas_gl_common_context_rectangle_push(gc, x, y, w, h, cr, cg, cb, ca); - } - else - { - evas_common_draw_context_clip_clip(gc->dc, x, y, w, h); - /* our clip is 0 size.. abort */ - if ((gc->dc->clip.w > 0) && (gc->dc->clip.h > 0)) - { - rects = evas_common_draw_context_apply_cutouts(gc->dc); - for (i = 0; i < rects->active; ++i) - { - r = rects->rects + i; - if ((r->w > 0) && (r->h > 0)) - { - evas_gl_common_context_rectangle_push(gc, r->x, r->y, r->w, r->h, cr, cg, cb, ca); - } - } - evas_common_draw_context_apply_clear_cutouts(rects); - } - } - /* restore clip info */ - gc->dc->clip.use = c; gc->dc->clip.x = cx; gc->dc->clip.y = cy; gc->dc->clip.w = cw; gc->dc->clip.h = ch; -} diff --git a/libraries/evas/src/modules/engines/gl_common/evas_gl_shader.c b/libraries/evas/src/modules/engines/gl_common/evas_gl_shader.c deleted file mode 100644 index 6666ac5..0000000 --- a/libraries/evas/src/modules/engines/gl_common/evas_gl_shader.c +++ /dev/null @@ -1,1262 +0,0 @@ -#include "evas_gl_private.h" - -///////////////////////////////////////////// -#if defined (GLES_VARIETY_S3C6410) -const unsigned int rect_frag_bin[] = -{ -# include "shader/rect_frag_bin_s3c6410.h" -}; -#endif - -const char rect_frag_glsl[] = -#include "shader/rect_frag.h" - ; -Evas_GL_Program_Source shader_rect_frag_src = -{ - rect_frag_glsl, -#if defined (GLES_VARIETY_S3C6410) - rect_frag_bin, sizeof(rect_frag_bin) -#else - NULL, 0 -#endif -}; - -#if defined (GLES_VARIETY_S3C6410) -const unsigned int rect_vert_bin[] = -{ -# include "shader/rect_vert_bin_s3c6410.h" -}; -#endif -const char rect_vert_glsl[] = -#include "shader/rect_vert.h" - ; -Evas_GL_Program_Source shader_rect_vert_src = -{ - rect_vert_glsl, -#if defined (GLES_VARIETY_S3C6410) - rect_vert_bin, sizeof(rect_vert_bin) -#else - NULL, 0 -#endif -}; - -///////////////////////////////////////////// -#if defined (GLES_VARIETY_S3C6410) -const unsigned int font_frag_bin[] = -{ -# include "shader/font_frag_bin_s3c6410.h" -}; -#endif - -const char font_frag_glsl[] = -#include "shader/font_frag.h" - ; -Evas_GL_Program_Source shader_font_frag_src = -{ - font_frag_glsl, -#if defined (GLES_VARIETY_S3C6410) - font_frag_bin, sizeof(font_frag_bin) -#else - NULL, 0 -#endif -}; - -#if defined (GLES_VARIETY_S3C6410) -const unsigned int font_vert_bin[] = -{ -# include "shader/font_vert_bin_s3c6410.h" -}; -#endif -const char font_vert_glsl[] = -#include "shader/font_vert.h" - ; -Evas_GL_Program_Source shader_font_vert_src = -{ - font_vert_glsl, -#if defined (GLES_VARIETY_S3C6410) - font_vert_bin, sizeof(font_vert_bin) -#else - NULL, 0 -#endif -}; - -///////////////////////////////////////////// -#if defined (GLES_VARIETY_S3C6410) -const unsigned int yuv_frag_bin[] = -{ -# include "shader/yuv_frag_bin_s3c6410.h" -}; -#endif - -const char yuv_frag_glsl[] = -#include "shader/yuv_frag.h" - ; -Evas_GL_Program_Source shader_yuv_frag_src = -{ - yuv_frag_glsl, -#if defined (GLES_VARIETY_S3C6410) - yuv_frag_bin, sizeof(yuv_frag_bin) -#else - NULL, 0 -#endif -}; - -#if defined (GLES_VARIETY_S3C6410) -const unsigned int yuv_vert_bin[] = -{ -# include "shader/yuv_vert_bin_s3c6410.h" -}; -#endif -const char yuv_vert_glsl[] = -#include "shader/yuv_vert.h" - ; -Evas_GL_Program_Source shader_yuv_vert_src = -{ - yuv_vert_glsl, -#if defined (GLES_VARIETY_S3C6410) - yuv_vert_bin, sizeof(yuv_vert_bin) -#else - NULL, 0 -#endif -}; - -///////////////////////////////////////////// -#if defined (GLES_VARIETY_S3C6410) -const unsigned int yuy2_frag_bin[] = -{ -# include "shader/yuy2_frag_bin_s3c6410.h" -}; -#endif - -const char yuy2_frag_glsl[] = -#include "shader/yuy2_frag.h" - ; -Evas_GL_Program_Source shader_yuy2_frag_src = -{ - yuy2_frag_glsl, -#if defined (GLES_VARIETY_S3C6410) - yuy2_frag_bin, sizeof(yuy2_frag_bin) -#else - NULL, 0 -#endif -}; - -#if defined (GLES_VARIETY_S3C6410) -const unsigned int yuy2_vert_bin[] = -{ -# include "shader/yuy2_vert_bin_s3c6410.h" -}; -#endif -const char yuy2_vert_glsl[] = -#include "shader/yuy2_vert.h" - ; -Evas_GL_Program_Source shader_yuy2_vert_src = -{ - yuy2_vert_glsl, -#if defined (GLES_VARIETY_S3C6410) - yuy2_vert_bin, sizeof(yuy2_vert_bin) -#else - NULL, 0 -#endif -}; - -///////////////////////////////////////////// -#if defined (GLES_VARIETY_S3C6410) -const unsigned int yuy2_nomul_frag_bin[] = -{ -# include "shader/yuy2_nomul_frag_bin_s3c6410.h" -}; -#endif - -const char yuy2_nomul_frag_glsl[] = -#include "shader/yuy2_nomul_frag.h" - ; -Evas_GL_Program_Source shader_yuy2_nomul_frag_src = -{ - yuy2_nomul_frag_glsl, -#if defined (GLES_VARIETY_S3C6410) - yuy2_nomul_frag_bin, sizeof(yuy2_nomul_frag_bin) -#else - NULL, 0 -#endif -}; - -#if defined (GLES_VARIETY_S3C6410) -const unsigned int yuy2_nomul_vert_bin[] = -{ -# include "shader/yuy2_nomul_vert_bin_s3c6410.h" -}; -#endif -const char yuy2_nomul_vert_glsl[] = -#include "shader/yuy2_nomul_vert.h" - ; -Evas_GL_Program_Source shader_yuy2_nomul_vert_src = -{ - yuy2_nomul_vert_glsl, -#if defined (GLES_VARIETY_S3C6410) - yuy2_nomul_vert_bin, sizeof(yuy2_nomul_vert_bin) -#else - NULL, 0 -#endif -}; - -///////////////////////////////////////////// -#if defined (GLES_VARIETY_S3C6410) -const unsigned int nv12_nomul_vert_bin[] = -{ -# include "shader/nv12_nomul_vert_bin_s3c6410.h" -}; -#endif -const char nv12_nomul_vert_glsl[] = -#include "shader/nv12_nomul_vert.h" - ; -Evas_GL_Program_Source shader_nv12_nomul_vert_src = -{ - nv12_nomul_vert_glsl, -#if defined (GLES_VARIETY_S3C6410) - nv12_nomul_vert_bin, sizeof(nv12_nomul_vert_bin) -#else - NULL, 0 -#endif -}; - -#if defined (GLES_VARIETY_S3C6410) -const unsigned int nv12_vert_bin[] = -{ -# include "shader/nv12_vert_bin_s3c6410.h" -}; -#endif -const char nv12_vert_glsl[] = -#include "shader/nv12_vert.h" - ; -Evas_GL_Program_Source shader_nv12_vert_src = -{ - nv12_vert_glsl, -#if defined (GLES_VARIETY_S3C6410) - nv12_vert_bin, sizeof(nv12_vert_bin) -#else - NULL, 0 -#endif -}; - -#if defined (GLES_VARIETY_S3C6410) -const unsigned int nv12_nomul_frag_bin[] = -{ -# include "shader/nv12_nomul_frag_bin_s3c6410.h" -}; -#endif - -const char nv12_frag_glsl[] = -#include "shader/nv12_frag.h" - ; -Evas_GL_Program_Source shader_nv12_frag_src = -{ - nv12_frag_glsl, -#if defined (GLES_VARIETY_S3C6410) - nv12_frag_bin, sizeof(nv12_frag_bin) -#else - NULL, 0 -#endif -}; - -#if defined (GLES_VARIETY_S3C6410) -const unsigned int nv12_nomul_frag_bin[] = -{ -# include "shader/nv12_nomul_frag_bin_s3c6410.h" -}; -#endif - -const char nv12_nomul_frag_glsl[] = -#include "shader/nv12_nomul_frag.h" - ; -Evas_GL_Program_Source shader_nv12_nomul_frag_src = -{ - nv12_nomul_frag_glsl, -#if defined (GLES_VARIETY_S3C6410) - nv12_nomul_frag_bin, sizeof(nv12_nomul_frag_bin) -#else - NULL, 0 -#endif -}; - -///////////////////////////////////////////// -#if defined (GLES_VARIETY_S3C6410) -const unsigned int yuv_nomul_frag_bin[] = -{ -# include "shader/yuv_nomul_frag_bin_s3c6410.h" -}; -#endif - -const char yuv_nomul_frag_glsl[] = -#include "shader/yuv_nomul_frag.h" - ; -Evas_GL_Program_Source shader_yuv_nomul_frag_src = -{ - yuv_nomul_frag_glsl, -#if defined (GLES_VARIETY_S3C6410) - yuv_nomul_frag_bin, sizeof(yuv_nomul_frag_bin) -#else - NULL, 0 -#endif -}; - -#if defined (GLES_VARIETY_S3C6410) -const unsigned int yuv_nomul_vert_bin[] = -{ -# include "shader/yuv_nomul_vert_bin_s3c6410.h" -}; -#endif -const char yuv_nomul_vert_glsl[] = -#include "shader/yuv_nomul_vert.h" - ; -Evas_GL_Program_Source shader_yuv_nomul_vert_src = -{ - yuv_nomul_vert_glsl, -#if defined (GLES_VARIETY_S3C6410) - yuv_nomul_vert_bin, sizeof(yuv_nomul_vert_bin) -#else - NULL, 0 -#endif -}; - -///////////////////////////////////////////// -#if defined (GLES_VARIETY_S3C6410) -const unsigned int tex_frag_bin[] = -{ -# include "shader/tex_frag_bin_s3c6410.h" -}; -#endif - -const char tex_frag_glsl[] = -#include "shader/tex_frag.h" - ; -Evas_GL_Program_Source shader_tex_frag_src = -{ - tex_frag_glsl, -#if defined (GLES_VARIETY_S3C6410) - tex_frag_bin, sizeof(tex_frag_bin) -#else - NULL, 0 -#endif -}; - -#if defined (GLES_VARIETY_S3C6410) -const unsigned int tex_vert_bin[] = -{ -# include "shader/tex_vert_bin_s3c6410.h" -}; -#endif -const char tex_vert_glsl[] = -#include "shader/tex_vert.h" - ; -Evas_GL_Program_Source shader_tex_vert_src = -{ - tex_vert_glsl, -#if defined (GLES_VARIETY_S3C6410) - tex_vert_bin, sizeof(tex_vert_bin) -#else - NULL, 0 -#endif -}; - -///////////////////////////////////////////// -#if defined (GLES_VARIETY_S3C6410) -const unsigned int tex_nomul_frag_bin[] = -{ -# include "shader/tex_nomul_frag_bin_s3c6410.h" -}; -#endif - -const char tex_nomul_frag_glsl[] = -#include "shader/tex_nomul_frag.h" - ; -Evas_GL_Program_Source shader_tex_nomul_frag_src = -{ - tex_nomul_frag_glsl, -#if defined (GLES_VARIETY_S3C6410) - tex_nomul_frag_bin, sizeof(tex_nomul_frag_bin) -#else - NULL, 0 -#endif -}; - -#if defined (GLES_VARIETY_S3C6410) -const unsigned int tex_nomul_vert_bin[] = -{ -# include "shader/tex_nomul_vert_bin_s3c6410.h" -}; -#endif -const char tex_nomul_vert_glsl[] = -#include "shader/tex_nomul_vert.h" - ; -Evas_GL_Program_Source shader_tex_nomul_vert_src = -{ - tex_nomul_vert_glsl, -#if defined (GLES_VARIETY_S3C6410) - tex_nomul_vert_bin, sizeof(tex_nomul_vert_bin) -#else - NULL, 0 -#endif -}; - -///////////////////////////////////////////// -#if defined (GLES_VARIETY_S3C6410) -const unsigned int img_frag_bin[] = -{ -# include "shader/img_frag_bin_s3c6410.h" -}; -#endif - -const char img_frag_glsl[] = -#include "shader/img_frag.h" - ; -Evas_GL_Program_Source shader_img_frag_src = -{ - img_frag_glsl, -#if defined (GLES_VARIETY_S3C6410) - img_frag_bin, sizeof(img_frag_bin) -#else - NULL, 0 -#endif -}; - -#if defined (GLES_VARIETY_S3C6410) -const unsigned int img_vert_bin[] = -{ -# include "shader/img_vert_bin_s3c6410.h" -}; -#endif -const char img_vert_glsl[] = -#include "shader/img_vert.h" - ; -Evas_GL_Program_Source shader_img_vert_src = -{ - img_vert_glsl, -#if defined (GLES_VARIETY_S3C6410) - img_vert_bin, sizeof(img_vert_bin) -#else - NULL, 0 -#endif -}; - -///////////////////////////////////////////// -#if defined (GLES_VARIETY_S3C6410) -const unsigned int img_nomul_frag_bin[] = -{ -# include "shader/img_nomul_frag_bin_s3c6410.h" -}; -#endif - -const char img_nomul_frag_glsl[] = -#include "shader/img_nomul_frag.h" - ; -Evas_GL_Program_Source shader_img_nomul_frag_src = -{ - img_nomul_frag_glsl, -#if defined (GLES_VARIETY_S3C6410) - img_nomul_frag_bin, sizeof(img_nomul_frag_bin) -#else - NULL, 0 -#endif -}; - -#if defined (GLES_VARIETY_S3C6410) -const unsigned int img_nomul_vert_bin[] = -{ -# include "shader/img_nomul_vert_bin_s3c6410.h" -}; -#endif -const char img_nomul_vert_glsl[] = -#include "shader/img_nomul_vert.h" - ; -Evas_GL_Program_Source shader_img_nomul_vert_src = -{ - img_nomul_vert_glsl, -#if defined (GLES_VARIETY_S3C6410) - img_nomul_vert_bin, sizeof(img_nomul_vert_bin) -#else - NULL, 0 -#endif -}; - -///////////////////////////////////////////// -#if defined (GLES_VARIETY_S3C6410) -const unsigned int img_bgra_frag_bin[] = -{ -# include "shader/img_bgra_frag_bin_s3c6410.h" -}; -#endif - -const char img_bgra_frag_glsl[] = -#include "shader/img_bgra_frag.h" - ; -Evas_GL_Program_Source shader_img_bgra_frag_src = -{ - img_bgra_frag_glsl, -#if defined (GLES_VARIETY_S3C6410) - img_bgra_frag_bin, sizeof(img_bgra_frag_bin) -#else - NULL, 0 -#endif -}; - -#if defined (GLES_VARIETY_S3C6410) -const unsigned int img_bgra_vert_bin[] = -{ -# include "shader/img_bgra_vert_bin_s3c6410.h" -}; -#endif -const char img_bgra_vert_glsl[] = -#include "shader/img_bgra_vert.h" - ; -Evas_GL_Program_Source shader_img_bgra_vert_src = -{ - img_bgra_vert_glsl, -#if defined (GLES_VARIETY_S3C6410) - img_bgra_vert_bin, sizeof(img_bgra_vert_bin) -#else - NULL, 0 -#endif -}; - - -///////////////////////////////////////////// -#if defined (GLES_VARIETY_S3C6410) -const unsigned int img_mask_frag_bin[] = -{ -# include "shader/img_mask_frag_bin_s3c6410.h" -}; -#endif - -const char img_mask_frag_glsl[] = -#include "shader/img_mask_frag.h" - ; -Evas_GL_Program_Source shader_img_mask_frag_src = -{ - img_mask_frag_glsl, -#if defined (GLES_VARIETY_S3C6410) - img_mask_frag_bin, sizeof(img_mask_frag_bin) -#else - NULL, 0 -#endif -}; - -#if defined (GLES_VARIETY_S3C6410) -const unsigned int img_mask_vert_bin[] = -{ -# include "shader/img_mask_vert_bin_s3c6410.h" -}; -#endif -const char img_mask_vert_glsl[] = -#include "shader/img_mask_vert.h" - ; -Evas_GL_Program_Source shader_img_mask_vert_src = -{ - img_mask_vert_glsl, -#if defined (GLES_VARIETY_S3C6410) - img_mask_vert_bin, sizeof(img_mask_vert_bin) -#else - NULL, 0 -#endif -}; - - -///////////////////////////////////////////// -#if defined (GLES_VARIETY_S3C6410) -const unsigned int img_bgra_nomul_frag_bin[] = -{ -# include "shader/img_bgra_nomul_frag_bin_s3c6410.h" -}; -#endif - -const char img_bgra_nomul_frag_glsl[] = -#include "shader/img_bgra_nomul_frag.h" - ; -Evas_GL_Program_Source shader_img_bgra_nomul_frag_src = -{ - img_bgra_nomul_frag_glsl, -#if defined (GLES_VARIETY_S3C6410) - img_bgra_nomul_frag_bin, sizeof(img_bgra_nomul_frag_bin) -#else - NULL, 0 -#endif -}; - -#if defined (GLES_VARIETY_S3C6410) -const unsigned int img_bgra_nomul_vert_bin[] = -{ -# include "shader/img_bgra_nomul_vert_bin_s3c6410.h" -}; -#endif -const char img_bgra_nomul_vert_glsl[] = -#include "shader/img_bgra_nomul_vert.h" - ; -Evas_GL_Program_Source shader_img_bgra_nomul_vert_src = -{ - img_bgra_nomul_vert_glsl, -#if defined (GLES_VARIETY_S3C6410) - img_bgra_nomul_vert_bin, sizeof(img_bgra_nomul_vert_bin) -#else - NULL, 0 -#endif -}; - -///////////////////////////////////////////// -const char filter_invert_frag_glsl[] = -#include "shader/filter_invert.h" - ; -Evas_GL_Program_Source shader_filter_invert_frag_src = -{ - filter_invert_frag_glsl, - NULL, 0 -}; - -const char filter_invert_nomul_frag_glsl[] = -#include "shader/filter_invert_nomul.h" - ; -Evas_GL_Program_Source shader_filter_invert_nomul_frag_src = -{ - filter_invert_nomul_frag_glsl, - NULL, 0 -}; - -const char filter_invert_bgra_frag_glsl[] = -#include "shader/filter_invert_bgra.h" - ; -Evas_GL_Program_Source shader_filter_invert_bgra_frag_src = -{ - filter_invert_bgra_frag_glsl, - NULL, 0 -}; -const char filter_invert_bgra_nomul_frag_glsl[] = -#include "shader/filter_invert_bgra_nomul.h" - ; -Evas_GL_Program_Source shader_filter_invert_bgra_nomul_frag_src = -{ - filter_invert_bgra_nomul_frag_glsl, - NULL, 0 -}; - -///////////////////////////////////////////// -const char filter_greyscale_frag_glsl[] = -#include "shader/filter_greyscale.h" - ; -Evas_GL_Program_Source shader_filter_greyscale_frag_src = -{ - filter_greyscale_frag_glsl, - NULL, 0 -}; - -const char filter_greyscale_nomul_frag_glsl[] = -#include "shader/filter_greyscale_nomul.h" - ; -Evas_GL_Program_Source shader_filter_greyscale_nomul_frag_src = -{ - filter_greyscale_nomul_frag_glsl, - NULL, 0 -}; - -const char filter_greyscale_bgra_frag_glsl[] = -#include "shader/filter_greyscale_bgra.h" - ; -Evas_GL_Program_Source shader_filter_greyscale_bgra_frag_src = -{ - filter_greyscale_bgra_frag_glsl, - NULL, 0 -}; -const char filter_greyscale_bgra_nomul_frag_glsl[] = -#include "shader/filter_greyscale_bgra_nomul.h" - ; -Evas_GL_Program_Source shader_filter_greyscale_bgra_nomul_frag_src = -{ - filter_greyscale_bgra_nomul_frag_glsl, - NULL, 0 -}; - -///////////////////////////////////////////// -const char filter_sepia_frag_glsl[] = -#include "shader/filter_sepia.h" - ; -Evas_GL_Program_Source shader_filter_sepia_frag_src = -{ - filter_sepia_frag_glsl, - NULL, 0 -}; - -const char filter_sepia_nomul_frag_glsl[] = -#include "shader/filter_sepia_nomul.h" - ; -Evas_GL_Program_Source shader_filter_sepia_nomul_frag_src = -{ - filter_sepia_nomul_frag_glsl, - NULL, 0 -}; - -const char filter_sepia_bgra_frag_glsl[] = -#include "shader/filter_sepia_bgra.h" - ; -Evas_GL_Program_Source shader_filter_sepia_bgra_frag_src = -{ - filter_sepia_bgra_frag_glsl, - NULL, 0 -}; -const char filter_sepia_bgra_nomul_frag_glsl[] = -#include "shader/filter_sepia_bgra_nomul.h" - ; -Evas_GL_Program_Source shader_filter_sepia_bgra_nomul_frag_src = -{ - filter_sepia_bgra_nomul_frag_glsl, - NULL, 0 -}; - -///////////////////////////////////////////// -#if 0 - Blur is a work in progress currently. - Mostly because GPUs are so hopeless. -const char filter_blur_vert_glsl[] = -#include "shader/filter_blur_vert.h" - ; - -Evas_GL_Program_Source shader_filter_blur_vert_src = -{ - filter_blur_vert_glsl, - NULL, 0 -}; - -const char filter_blur_frag_glsl[] = -#include "shader/filter_blur.h" - ; -Evas_GL_Program_Source shader_filter_blur_frag_src = -{ - filter_blur_frag_glsl, - NULL, 0 -}; - -const char filter_blur_nomul_frag_glsl[] = -#include "shader/filter_blur_nomul.h" - ; -Evas_GL_Program_Source shader_filter_blur_nomul_frag_src = -{ - filter_blur_nomul_frag_glsl, - NULL, 0 -}; - -const char filter_blur_bgra_frag_glsl[] = -#include "shader/filter_blur_bgra.h" - ; -Evas_GL_Program_Source shader_filter_blur_bgra_frag_src = -{ - filter_blur_bgra_frag_glsl, - NULL, 0 -}; -const char filter_blur_bgra_nomul_frag_glsl[] = -#include "shader/filter_blur_bgra_nomul.h" - ; -Evas_GL_Program_Source shader_filter_blur_bgra_nomul_frag_src = -{ - filter_blur_bgra_nomul_frag_glsl, - NULL, 0 -}; - -#endif - - - -///////////////////////////////////////////// -static void -gl_compile_link_error(GLuint target, const char *action) -{ - int loglen = 0, chars = 0; - char *logtxt; - - /* Shader info log */ - glGetShaderiv(target, GL_INFO_LOG_LENGTH, &loglen); - if (loglen > 0) - { - logtxt = calloc(loglen, sizeof(char)); - if (logtxt) - { - glGetShaderInfoLog(target, loglen, &chars, logtxt); - ERR("Failed to %s: %s", action, logtxt); - free(logtxt); - } - } - - /* Program info log */ - glGetProgramiv(target, GL_INFO_LOG_LENGTH, &loglen); - if (loglen > 0) - { - logtxt = calloc(loglen, sizeof(char)); - if (logtxt) - { - glGetProgramInfoLog(target, loglen, &chars, logtxt); - ERR("Failed to %s: %s", action, logtxt); - free(logtxt); - } - } -} - -static mode_t default_mode = S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH; - -static Eina_Bool -_evas_gl_shader_file_is_dir(const char *file) -{ - struct stat st; - - if (stat(file, &st) < 0) return EINA_FALSE; - if (S_ISDIR(st.st_mode)) return EINA_TRUE; - return EINA_FALSE; -} - -static Eina_Bool -_evas_gl_shader_file_mkdir(const char *dir) -{ - /* evas gl shader only call this function when the dir is not exist */ - if (mkdir(dir, default_mode) < 0) return EINA_FALSE; - return EINA_TRUE; -} - -static Eina_Bool -_evas_gl_shader_file_exists(const char *file) -{ - struct stat st; - if (!file) return EINA_FALSE; - if (stat(file, &st) < 0) return EINA_FALSE; - return EINA_TRUE; -} - -static inline Eina_Bool -_evas_gl_shader_file_mkpath_if_not_exists(const char *path) -{ - struct stat st; - - if (stat(path, &st) < 0) - return _evas_gl_shader_file_mkdir(path); - else if (!S_ISDIR(st.st_mode)) - return EINA_FALSE; - else - return EINA_TRUE; -} - -static Eina_Bool -_evas_gl_shader_file_mkpath(const char *path) -{ - char ss[PATH_MAX]; - unsigned int i; - - if (_evas_gl_shader_file_is_dir(path)) return EINA_TRUE; - - for (i = 0; path[i]; ss[i] = path[i], i++) - { - if (i == sizeof(ss) - 1) return EINA_FALSE; - if ((path[i] == '/') && (i > 0)) - { - ss[i] = 0; - if (!_evas_gl_shader_file_mkpath_if_not_exists(ss)) - return EINA_FALSE; - } - } - ss[i] = 0; - return _evas_gl_shader_file_mkpath_if_not_exists(ss); -} - -static int -_evas_gl_shader_dir_check(char *bin_shader_dir, int num) -{ - char *home = NULL; - char *subdir = ".cache/evas_gl_common_shaders"; - - home = getenv("HOME"); - if ((!home) || (!home[0])) return 0; - - snprintf(bin_shader_dir, num, "%s/%s", home, subdir); - return _evas_gl_shader_file_exists(bin_shader_dir); -} - -static int -_evas_gl_shader_file_check(const char *bin_shader_dir, char *bin_shader_file, int dir_num) -{ - char before_name[PATH_MAX]; - char after_name[PATH_MAX]; - int new_path_len = 0; - int i = 0, j = 0; - - char *vendor = NULL; - char *driver = NULL; - char *version = NULL; - - vendor = (char *)glGetString(GL_VENDOR); - driver = (char *)glGetString(GL_RENDERER); - version = (char *)glGetString(GL_VERSION); - - new_path_len = snprintf(before_name, sizeof(before_name), "%s::%s::%s::%s::binary_shader.eet", vendor, version, driver, MODULE_ARCH); - - /* remove '/' from file name */ - for (i = 0; i < new_path_len; i++) - { - if (before_name[i] != '/') - { - after_name[j] = before_name[i]; - j++; - } - } - after_name[j] = 0; - - snprintf(bin_shader_file, dir_num, "%s/%s", bin_shader_dir, after_name); - - return _evas_gl_shader_file_exists(bin_shader_file); -} - -static int -_evas_gl_common_shader_program_binary_init(Evas_GL_Program *p, - const char *pname, - Eet_File *ef) -{ - int res = 0, num = 0, length = 0; - int *formats = NULL; - void *data = NULL; - GLint ok = 0; - - if (!ef) return res; - - data = eet_read(ef, pname, &length); - if ((!data) || (length <= 0)) goto finish; - - glGetIntegerv(GL_NUM_PROGRAM_BINARY_FORMATS, &num); - if (num <= 0) goto finish; - - formats = calloc(num, sizeof(int)); - if (!formats) goto finish; - - glGetIntegerv(GL_PROGRAM_BINARY_FORMATS, formats); - if (!formats[0]) goto finish; - - p->prog = glCreateProgram(); - - glsym_glProgramBinary(p->prog, formats[0], data, length); - - glBindAttribLocation(p->prog, SHAD_VERTEX, "vertex"); - glBindAttribLocation(p->prog, SHAD_COLOR, "color"); - glBindAttribLocation(p->prog, SHAD_TEXUV, "tex_coord"); - glBindAttribLocation(p->prog, SHAD_TEXUV2, "tex_coord2"); - glBindAttribLocation(p->prog, SHAD_TEXUV3, "tex_coord3"); - glBindAttribLocation(p->prog, SHAD_TEXM, "tex_coordm"); - - glGetProgramiv(p->prog, GL_LINK_STATUS, &ok); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - if (!ok) - { - gl_compile_link_error(p->prog, "load a program object"); - ERR("Abort load of program (%s)", pname); - goto finish; - } - - res = 1; - -finish: - if (formats) free(formats); - if (data) free(data); - if ((!res) && (p->prog)) - { - glDeleteProgram(p->prog); - p->prog = 0; - } - return res; -} - -static int -_evas_gl_common_shader_program_binary_save(Evas_GL_Program *p, - const char *pname, - Eet_File *ef) -{ - void* data = NULL; - GLenum format; - int length = 0, size = 0; - - if (!glsym_glGetProgramBinary) return 0; - - glGetProgramiv(p->prog, GL_PROGRAM_BINARY_LENGTH, &length); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - if (length <= 0) return 0; - - data = malloc(length); - if (!data) return 0; - - glsym_glGetProgramBinary(p->prog, length, &size, &format, data); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - - if (length != size) - { - free(data); - return 0; - } - - if (eet_write(ef, pname, data, length, 0) < 0) - { - if (data) free(data); - return 0; - } - if (data) free(data); - return 1; -} - -static int -_evas_gl_common_shader_program_source_init(Evas_GL_Program *p, - Evas_GL_Program_Source *vert, - Evas_GL_Program_Source *frag, - const char *name) -{ - GLint ok; - - p->vert = glCreateShader(GL_VERTEX_SHADER); - p->frag = glCreateShader(GL_FRAGMENT_SHADER); -#if defined (GLES_VARIETY_S3C6410) - glShaderBinary(1, &(p->vert), 0, vert->bin, vert->bin_size); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glShaderBinary(1, &(p->frag), 0, frag->bin, frag->bin_size); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); -#else - glShaderSource(p->vert, 1, - (const char **)&(vert->src), NULL); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glCompileShader(p->vert); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - ok = 0; - glGetShaderiv(p->vert, GL_COMPILE_STATUS, &ok); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - if (!ok) - { - gl_compile_link_error(p->vert, "compile vertex shader"); - ERR("Abort compile of shader vert (%s): %s", name, vert->src); - return 0; - } - glShaderSource(p->frag, 1, - (const char **)&(frag->src), NULL); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glCompileShader(p->frag); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - ok = 0; - glGetShaderiv(p->frag, GL_COMPILE_STATUS, &ok); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - if (!ok) - { - gl_compile_link_error(p->frag, "compile fragment shader"); - ERR("Abort compile of shader frag (%s): %s", name, frag->src); - return 0; - } -#endif - p->prog = glCreateProgram(); -#if defined(GLES_VARIETY_S3C6410) || defined(GLES_VARIETY_SGX) -#else - if ((glsym_glGetProgramBinary) && (glsym_glProgramParameteri)) - glsym_glProgramParameteri(p->prog, GL_PROGRAM_BINARY_RETRIEVABLE_HINT, - GL_TRUE); -#endif - glAttachShader(p->prog, p->vert); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glAttachShader(p->prog, p->frag); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - - glBindAttribLocation(p->prog, SHAD_VERTEX, "vertex"); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glBindAttribLocation(p->prog, SHAD_COLOR, "color"); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glBindAttribLocation(p->prog, SHAD_TEXUV, "tex_coord"); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glBindAttribLocation(p->prog, SHAD_TEXUV2, "tex_coord2"); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glBindAttribLocation(p->prog, SHAD_TEXUV3, "tex_coord3"); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glBindAttribLocation(p->prog, SHAD_TEXM, "tex_coordm"); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - - glLinkProgram(p->prog); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - ok = 0; - glGetProgramiv(p->prog, GL_LINK_STATUS, &ok); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - if (!ok) - { - gl_compile_link_error(p->prog, "link fragment and vertex shaders"); - ERR("Abort compile of shader frag (%s): %s", name, frag->src); - ERR("Abort compile of shader vert (%s): %s", name, vert->src); - return 0; - } - return 1; -} - -#define SHADER_SOURCE_LINE(Big, Small) \ - { SHADER_##Big, &(shader_##Small##_vert_src), &(shader_##Small##_frag_src), #Small } - -#define SHADER_SOURCE_FILTER_LINE(Big, Small) \ - { SHADER_##Big, &(shader_img_vert_src), &(shader_##Small##_frag_src), #Small } - -static const struct { - Evas_GL_Shader id; - Evas_GL_Program_Source *vert; - Evas_GL_Program_Source *frag; - const char *name; -} _shaders_source[] = { - SHADER_SOURCE_LINE(RECT, rect), - SHADER_SOURCE_LINE(FONT, font), - SHADER_SOURCE_LINE(IMG, img), - SHADER_SOURCE_LINE(IMG_NOMUL, img_nomul), - SHADER_SOURCE_LINE(IMG_BGRA, img_bgra), - SHADER_SOURCE_LINE(IMG_BGRA_NOMUL, img_bgra_nomul), - SHADER_SOURCE_LINE(IMG_MASK, img_mask), - SHADER_SOURCE_LINE(YUV, yuv), - SHADER_SOURCE_LINE(YUV_NOMUL, yuv_nomul), - SHADER_SOURCE_LINE(YUY2, yuy2), - SHADER_SOURCE_LINE(YUY2_NOMUL, yuy2_nomul), - SHADER_SOURCE_LINE(NV12, nv12), - SHADER_SOURCE_LINE(NV12_NOMUL, nv12_nomul), - SHADER_SOURCE_LINE(TEX, tex), - SHADER_SOURCE_LINE(TEX_NOMUL, tex_nomul), - /* Most of the filters use the image fragment shader */ - SHADER_SOURCE_FILTER_LINE(FILTER_INVERT, filter_invert), - SHADER_SOURCE_FILTER_LINE(FILTER_INVERT_NOMUL, filter_invert_nomul), - SHADER_SOURCE_FILTER_LINE(FILTER_INVERT_BGRA, filter_invert_bgra), - SHADER_SOURCE_FILTER_LINE(FILTER_INVERT_BGRA_NOMUL, filter_invert_bgra_nomul), - SHADER_SOURCE_FILTER_LINE(FILTER_GREYSCALE, filter_greyscale), - SHADER_SOURCE_FILTER_LINE(FILTER_GREYSCALE_NOMUL, filter_greyscale_nomul), - SHADER_SOURCE_FILTER_LINE(FILTER_GREYSCALE_BGRA, filter_greyscale_bgra), - SHADER_SOURCE_FILTER_LINE(FILTER_GREYSCALE_BGRA_NOMUL, filter_greyscale_bgra_nomul), - SHADER_SOURCE_FILTER_LINE(FILTER_SEPIA, filter_sepia), - SHADER_SOURCE_FILTER_LINE(FILTER_SEPIA_NOMUL, filter_sepia_nomul), - SHADER_SOURCE_FILTER_LINE(FILTER_SEPIA_BGRA, filter_sepia_bgra), - SHADER_SOURCE_FILTER_LINE(FILTER_SEPIA_BGRA_NOMUL, filter_sepia_bgra_nomul)/* , */ - /* SHADER_SOURCE_LINE(FILTER_BLUR, filter_blur), */ - /* SHADER_SOURCE_LINE(FILTER_BLUR_NOMUL, filter_blur_nomul), */ - /* SHADER_SOURCE_LINE(FILTER_BLUR_BGRA, filter_blur_bgra), */ - /* SHADER_SOURCE_LINE(FILTER_BLUR_BGRA_NOMUL, filter_blur_bgra_nomul) */ -}; - -static int -_evas_gl_common_shader_source_init(Evas_GL_Shared *shared) -{ - unsigned int i; - - for (i = 0; i < sizeof (_shaders_source) / sizeof (_shaders_source[0]); ++i) - if (!_evas_gl_common_shader_program_source_init(&(shared->shader[_shaders_source[i].id]), - _shaders_source[i].vert, - _shaders_source[i].frag, - _shaders_source[i].name)) - return 0; - - return 1; -} - -static int -_evas_gl_common_shader_binary_init(Evas_GL_Shared *shared) -{ - /* check eet */ - Eet_File *et = NULL; - char bin_dir_path[PATH_MAX]; - char bin_file_path[PATH_MAX]; - unsigned int i; - - if (!_evas_gl_shader_dir_check(bin_dir_path, sizeof(bin_dir_path))) - return 0; - - if (!_evas_gl_shader_file_check(bin_dir_path, bin_file_path, - sizeof(bin_dir_path))) - return 0; - - /* use eet */ - if (!eet_init()) return 0; - et = eet_open(bin_file_path, EET_FILE_MODE_READ); - if (!et) goto error; - - for (i = 0; i < sizeof (_shaders_source) / sizeof (_shaders_source[0]); ++i) - if (!_evas_gl_common_shader_program_binary_init(&(shared->shader[_shaders_source[i].id]), - _shaders_source[i].name, - et)) - goto error; - - if (et) eet_close(et); - eet_shutdown(); - return 1; - -error: - if (et) eet_close(et); - eet_shutdown(); - return 0; -} - -static int -_evas_gl_common_shader_binary_save(Evas_GL_Shared *shared) -{ - /* check eet */ - Eet_File *et = NULL; //check eet file - int tmpfd; - int res = 0; - char bin_dir_path[PATH_MAX]; - char bin_file_path[PATH_MAX]; - char tmp_file[PATH_MAX]; - unsigned int i; - - if (!_evas_gl_shader_dir_check(bin_dir_path, sizeof(bin_dir_path))) - res = _evas_gl_shader_file_mkpath(bin_dir_path); - if (!res) return 0; /* we can't make directory */ - - _evas_gl_shader_file_check(bin_dir_path, bin_file_path, - sizeof(bin_dir_path)); - - /* use mkstemp for writing */ - snprintf(tmp_file, sizeof(tmp_file), "%s.XXXXXX", bin_file_path); - tmpfd = mkstemp(tmp_file); - if (tmpfd < 0) goto error; - close(tmpfd); - - /* use eet */ - if (!eet_init()) goto error; - - et = eet_open(tmp_file, EET_FILE_MODE_WRITE); - if (!et) goto error; - - for (i = 0; i < sizeof (_shaders_source) / sizeof (_shaders_source[0]); ++i) - if (!_evas_gl_common_shader_program_binary_save(&(shared->shader[_shaders_source[i].id]), - _shaders_source[i].name, - et)) - goto error; - - if (eet_close(et) != EET_ERROR_NONE) goto error; - if (rename(tmp_file,bin_file_path) < 0) goto error; - eet_shutdown(); - return 1; - -error: - if (et) eet_close(et); - if (_evas_gl_shader_file_exists(tmp_file)) unlink(tmp_file); - eet_shutdown(); - return 0; -} - -int -evas_gl_common_shader_program_init(Evas_GL_Shared *shared) -{ - // gl support binary shader and get env of binary shader path - if (shared->info.bin_program && - _evas_gl_common_shader_binary_init(shared)) return 1; - /* compile all shader.*/ - if (!_evas_gl_common_shader_source_init(shared)) return 0; - /* success compile all shader. if gl support binary shader, we need to save */ - if (shared->info.bin_program) _evas_gl_common_shader_binary_save(shared); - return 1; -} - -void -evas_gl_common_shader_program_init_done(void) -{ -#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) - glReleaseShaderCompiler(); -#endif -} - -void -evas_gl_common_shader_program_shutdown(Evas_GL_Program *p) -{ - if (p->vert) glDeleteShader(p->vert); - if (p->frag) glDeleteShader(p->frag); - if (p->prog) glDeleteProgram(p->prog); -} diff --git a/libraries/evas/src/modules/engines/gl_common/evas_gl_texture.c b/libraries/evas/src/modules/engines/gl_common/evas_gl_texture.c deleted file mode 100644 index 8162cd1..0000000 --- a/libraries/evas/src/modules/engines/gl_common/evas_gl_texture.c +++ /dev/null @@ -1,1669 +0,0 @@ -#include "evas_gl_private.h" - -static const GLenum rgba_fmt = GL_RGBA; -static const GLenum rgba_ifmt = GL_RGBA; -//#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) -//static const GLenum rgb_fmt = GL_RGBA; -//static const GLenum rgb_ifmt = GL_RGBA; -//#else -static const GLenum rgb_fmt = GL_RGBA; -static const GLenum rgb_ifmt = GL_RGB; -//#endif -#ifdef GL_BGRA -# if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) -static const GLenum bgra_fmt = GL_BGRA; -static const GLenum bgra_ifmt = GL_BGRA; -static const GLenum bgr_fmt = GL_BGRA; -static const GLenum bgr_ifmt = GL_BGRA; -# else -static const GLenum bgra_fmt = GL_BGRA; -static const GLenum bgra_ifmt = GL_RGBA; -static const GLenum bgr_fmt = GL_BGRA; -static const GLenum bgr_ifmt = GL_RGB; -# endif -#endif -static const GLenum alpha_fmt = GL_ALPHA; -static const GLenum alpha_ifmt = GL_ALPHA; -static const GLenum lum_fmt = GL_LUMINANCE; -static const GLenum lum_ifmt = GL_LUMINANCE; -static const GLenum lum_alpha_fmt = GL_LUMINANCE_ALPHA; -static const GLenum lum_alpha_ifmt = GL_LUMINANCE_ALPHA; -static const GLenum rgba8_ifmt = GL_RGBA; -static const GLenum rgba8_fmt = GL_BGRA; - -static struct { - struct { - int num, pix; - } c, a, v, r, n, d; -} texinfo = {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}; - -static void -_print_tex_count(void) -{ - if (getenv("EVAS_GL_MEMINFO")) - { - fprintf(stderr, - "T: c:%i/%ik | a:%i/%ik | v:%i/%ik | r:%i/%ik | n:%i/%ik | d:%i/%ik\n", - texinfo.c.num, (texinfo.c.pix * 4) / 1024, - texinfo.a.num, (texinfo.a.pix ) / 1024, - texinfo.v.num, (texinfo.v.pix ) / 1024, - texinfo.r.num, (texinfo.r.pix * 4) / 1024, - texinfo.n.num, (texinfo.n.pix * 4) / 1024, - texinfo.d.num, (texinfo.d.pix * 4) / 1024 - ); - } -} - -static int -_nearest_pow2(int num) -{ - unsigned int n = num - 1; - n |= n >> 1; - n |= n >> 2; - n |= n >> 4; - n |= n >> 8; - n |= n >> 16; - return n + 1; -} - -static void -_tex_adjust(Evas_Engine_GL_Context *gc, int *w, int *h) -{ - if (gc->shared->info.tex_npo2) return; - /*if (gc->shared->info.tex_rect) return;*/ - *w = _nearest_pow2(*w); - *h = _nearest_pow2(*h); -} - -static int -_tex_round_slot(Evas_Engine_GL_Context *gc, int h) -{ - if (!gc->shared->info.tex_npo2) - h = _nearest_pow2(h); - return (h + gc->shared->info.tune.atlas.slot_size - 1) / - gc->shared->info.tune.atlas.slot_size; -} - -static int -_tex_format_index(GLuint format) -{ - switch (format) - { - case GL_RGBA: -#ifdef GL_BGRA - case GL_BGRA: -#endif - return 0; - case GL_RGB: - return 1; - case GL_ALPHA: - return 2; - case GL_LUMINANCE: // never used in atlas - return 3; - default: - return 0; - } - return 0; -} - -static void -_tex_2d(int intfmt, int w, int h, int fmt, int type) -{ -#ifdef GL_TEXTURE_INTERNAL_FORMAT - int intfmtret = -1; -#endif - glTexImage2D(GL_TEXTURE_2D, 0, intfmt, w, h, 0, fmt, type, NULL); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); -#ifdef GL_TEXTURE_INTERNAL_FORMAT -// this is not in opengles!!! hrrrm - glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, - GL_TEXTURE_INTERNAL_FORMAT, &intfmtret); - if (intfmtret != intfmt) - { - ERR("Fail tex alloc %ix%i", w, h); -// XXX send async err to evas - } -#endif -} - -static void -_tex_sub_2d(int x, int y, int w, int h, int fmt, int type, const void *pix) -{ - glTexSubImage2D(GL_TEXTURE_2D, 0, x, y, w, h, fmt, type, pix); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); -} - -static Evas_GL_Texture_Pool * -_pool_tex_new(Evas_Engine_GL_Context *gc, int w, int h, int intformat, GLenum format) -{ - Evas_GL_Texture_Pool *pt; - - pt = calloc(1, sizeof(Evas_GL_Texture_Pool)); - if (!pt) return NULL; - h = _tex_round_slot(gc, h) * gc->shared->info.tune.atlas.slot_size; - _tex_adjust(gc, &w, &h); - pt->gc = gc; - pt->w = w; - pt->h = h; - pt->intformat = intformat; - pt->format = format; - pt->dataformat = GL_UNSIGNED_BYTE; - pt->references = 0; - - if (format == alpha_fmt) - { - texinfo.a.num++; - texinfo.a.pix += pt->w * pt->h; - } - else if (format == lum_fmt) - { - texinfo.v.num++; - texinfo.v.pix += pt->w * pt->h; - } - else - { - texinfo.c.num++; - texinfo.c.pix += pt->w * pt->h; - } - - _print_tex_count(); - - glGenTextures(1, &(pt->texture)); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glBindTexture(GL_TEXTURE_2D, pt->texture); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - _tex_2d(pt->intformat, w, h, pt->format, pt->dataformat); - glBindTexture(GL_TEXTURE_2D, gc->pipe[0].shader.cur_tex); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - return pt; -} - -static int -_pool_tex_alloc(Evas_GL_Texture_Pool *pt, int w, int h __UNUSED__, int *u, int *v, Eina_List **l_after) -{ - Eina_List *l; - Evas_GL_Texture *tex, *tex2; - int nx, d, b; - - if (pt->allocations) - { - tex = pt->allocations->data; - // if firest tex is not at left edge... - if (tex->x > (0 + 1)) - { - if ((tex->x - 1) >= w) - { - *u = 0; - *v = 0; - *l_after = NULL; - return 1; - } - } - } - EINA_LIST_FOREACH(pt->allocations, l, tex) - { - b = tex->x + tex->w + 2; - if (l->next) - { - tex2 = l->next->data; - nx = tex2->x - 1; - } - else - nx = pt->w - 1; - d = nx - b; - if (d >= w) - { - *u = b; - *v = 0; - *l_after = l; - return 1; - } - } - *l_after = NULL; - return 0; -} - -static Evas_GL_Texture_Pool * -_pool_tex_find(Evas_Engine_GL_Context *gc, int w, int h, - int intformat, int format, int *u, int *v, - Eina_List **l_after, int atlas_w) -{ - Evas_GL_Texture_Pool *pt = NULL; - Eina_List *l; - int th, th2; - - if (atlas_w > gc->shared->info.max_texture_size) - atlas_w = gc->shared->info.max_texture_size; - if ((w > gc->shared->info.tune.atlas.max_w) || - (h > gc->shared->info.tune.atlas.max_h)) - { - pt = _pool_tex_new(gc, w, h, intformat, format); - gc->shared->tex.whole = eina_list_prepend(gc->shared->tex.whole, pt); - pt->slot = -1; - pt->fslot = -1; - pt->whole = 1; - *u = 0; - *v = 0; - *l_after = NULL; - return pt; - } - - th = _tex_round_slot(gc, h); - th2 = _tex_format_index(intformat); - EINA_LIST_FOREACH(gc->shared->tex.atlas[th][th2], l, pt) - { - if (_pool_tex_alloc(pt, w, h, u, v, l_after)) - { - gc->shared->tex.atlas[th][th2] = - eina_list_remove_list(gc->shared->tex.atlas[th][th2], l); - gc->shared->tex.atlas[th][th2] = - eina_list_prepend(gc->shared->tex.atlas[th][th2], pt); - return pt; - } - } - pt = _pool_tex_new(gc, atlas_w, h, intformat, format); - gc->shared->tex.atlas[th][th2] = - eina_list_prepend(gc->shared->tex.atlas[th][th2], pt); - pt->slot = th; - pt->fslot = th2; - *u = 0; - *v = 0; - *l_after = NULL; - return pt; -} - -Evas_GL_Texture * -evas_gl_common_texture_new(Evas_Engine_GL_Context *gc, RGBA_Image *im) -{ - Evas_GL_Texture *tex; - Eina_List *l_after = NULL; - int u = 0, v = 0; - - tex = calloc(1, sizeof(Evas_GL_Texture)); - if (!tex) return NULL; - - tex->gc = gc; - tex->references = 1; - - if (im->cache_entry.flags.alpha) - { - if (gc->shared->info.bgra) - tex->pt = _pool_tex_find(gc, im->cache_entry.w + 2, - im->cache_entry.h + 1, bgra_ifmt, bgra_fmt, - &u, &v, &l_after, - gc->shared->info.tune.atlas.max_alloc_size); - else - tex->pt = _pool_tex_find(gc, im->cache_entry.w + 2, - im->cache_entry.h + 1, rgba_ifmt, rgba_fmt, - &u, &v, &l_after, - gc->shared->info.tune.atlas.max_alloc_size); - tex->alpha = 1; - } - else - { - if (gc->shared->info.bgra) - tex->pt = _pool_tex_find(gc, im->cache_entry.w + 3, - im->cache_entry.h + 1, bgr_ifmt, bgr_fmt, - &u, &v, &l_after, - gc->shared->info.tune.atlas.max_alloc_size); - else -#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) - tex->pt = _pool_tex_find(gc, im->cache_entry.w + 3, - im->cache_entry.h + 1, rgba_ifmt, rgba_fmt, - &u, &v, &l_after, - gc->shared->info.tune.atlas.max_alloc_size); -#else - tex->pt = _pool_tex_find(gc, im->cache_entry.w + 3, - im->cache_entry.h + 1, rgb_ifmt, rgb_fmt, - &u, &v, &l_after, - gc->shared->info.tune.atlas.max_alloc_size); -#endif - } - if (!tex->pt) - { - free(tex); - return NULL; - } - tex->x = u + 1; - tex->y = v; - tex->w = im->cache_entry.w; - tex->h = im->cache_entry.h; - if (l_after) - tex->pt->allocations = - eina_list_append_relative_list(tex->pt->allocations, tex, l_after); - else - tex->pt->allocations = - eina_list_prepend(tex->pt->allocations, tex); - tex->pt->references++; - evas_gl_common_texture_update(tex, im); - return tex; -} - -static Evas_GL_Texture_Pool * -_pool_tex_render_new(Evas_Engine_GL_Context *gc, int w, int h, int intformat, int format) -{ - Evas_GL_Texture_Pool *pt; - - pt = calloc(1, sizeof(Evas_GL_Texture_Pool)); - if (!pt) return NULL; - h = _tex_round_slot(gc, h) * gc->shared->info.tune.atlas.slot_size; - _tex_adjust(gc, &w, &h); - pt->gc = gc; - pt->w = w; - pt->h = h; - pt->intformat = intformat; - pt->format = format; - pt->dataformat = GL_UNSIGNED_BYTE; - pt->render = 1; - pt->references = 0; -#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) -# ifndef GL_FRAMEBUFFER -# define GL_FRAMEBUFFER GL_FRAMEBUFFER_OES -# endif -# ifndef GL_COLOR_ATTACHMENT0 -# define GL_COLOR_ATTACHMENT0 GL_COLOR_ATTACHMENT0_OES -# endif -#else -# ifndef GL_FRAMEBUFFER -# define GL_FRAMEBUFFER GL_FRAMEBUFFER_EXT -# endif -# ifndef GL_COLOR_ATTACHMENT0 -# define GL_COLOR_ATTACHMENT0 GL_COLOR_ATTACHMENT0_EXT -# endif -#endif - texinfo.r.num++; - texinfo.r.pix += pt->w * pt->h; - - _print_tex_count(); - - glGenTextures(1, &(pt->texture)); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glBindTexture(GL_TEXTURE_2D, pt->texture); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - _tex_2d(pt->intformat, w, h, pt->format, pt->dataformat); - - glsym_glGenFramebuffers(1, &(pt->fb)); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glsym_glBindFramebuffer(GL_FRAMEBUFFER, pt->fb); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glsym_glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, pt->texture, 0); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glsym_glBindFramebuffer(GL_FRAMEBUFFER, 0); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - - glBindTexture(GL_TEXTURE_2D, gc->pipe[0].shader.cur_tex); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - return pt; -} - -static Evas_GL_Texture_Pool * -_pool_tex_native_new(Evas_Engine_GL_Context *gc, int w, int h, int intformat, int format, Evas_GL_Image *im) -{ - Evas_GL_Texture_Pool *pt; - - pt = calloc(1, sizeof(Evas_GL_Texture_Pool)); - if (!pt) return NULL; - pt->gc = gc; -#ifdef GL_TEXTURE_RECTANGLE_ARB - if (im->native.target == GL_TEXTURE_RECTANGLE_ARB) - { - printf("REEEEEEEEECT\n"); - pt->w = w; - pt->h = h; - } - else -#endif - { - // FIXME: handle po2 only textures - pt->w = w; - pt->h = h; - } - pt->intformat = intformat; - pt->format = format; - pt->dataformat = GL_UNSIGNED_BYTE; - pt->references = 0; - pt->native = 1; - texinfo.n.num++; - texinfo.n.pix += pt->w * pt->h; - - _print_tex_count(); - - glGenTextures(1, &(pt->texture)); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glBindTexture(im->native.target, pt->texture); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - -#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) -#else - if (im->native.loose) - { - if (im->native.func.bind) - im->native.func.bind(im->native.func.data, im); - } -#endif - - glTexParameteri(im->native.target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glTexParameteri(im->native.target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glTexParameteri(im->native.target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glTexParameteri(im->native.target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glBindTexture(im->native.target, 0); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glBindTexture(im->native.target, gc->pipe[0].shader.cur_tex); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - return pt; -} - -static Evas_GL_Texture_Pool * -_pool_tex_dynamic_new(Evas_Engine_GL_Context *gc, int w, int h, int intformat, int format) -{ - Evas_GL_Texture_Pool *pt = NULL; - -#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) - int fmt; // EGL_MAP_GL_TEXTURE_RGBA_SEC or EGL_MAP_GL_TEXTURE_RGB_SEC or bust - int pixtype; // EGL_MAP_GL_TEXTURE_UNSIGNED_BYTE_SEC or bust - int attr[] = - { - EGL_MAP_GL_TEXTURE_WIDTH_SEC, 32, - EGL_MAP_GL_TEXTURE_HEIGHT_SEC, 32, - EGL_MAP_GL_TEXTURE_FORMAT_SEC, EGL_MAP_GL_TEXTURE_RGBA_SEC, - EGL_MAP_GL_TEXTURE_PIXEL_TYPE_SEC, EGL_MAP_GL_TEXTURE_UNSIGNED_BYTE_SEC, - EGL_NONE - }; - void *egldisplay; - - if (intformat != format) return NULL; - - switch (intformat) - { -#ifdef EGL_MAP_GL_TEXTURE_LUMINANCE_SEC - case GL_LUMINANCE: attr[5] = EGL_MAP_GL_TEXTURE_LUMINANCE_SEC; break; -#endif -#ifdef EGL_MAP_GL_TEXTURE_LUMINANCE_ALPHA_SEC - case GL_LUMINANCE_ALPHA: attr[5] = EGL_MAP_GL_TEXTURE_LUMINANCE_ALPHA_SEC; break; -#endif - case GL_RGBA: attr[5] = EGL_MAP_GL_TEXTURE_RGBA_SEC; break; - case GL_BGRA: attr[5] = EGL_MAP_GL_TEXTURE_BGRA_SEC; break; - default: fprintf(stderr, "unknown format\n"); return NULL; - } - - pt = calloc(1, sizeof(Evas_GL_Texture_Pool)); - if (!pt) return NULL; - h = _tex_round_slot(gc, h) * gc->shared->info.tune.atlas.slot_size; - _tex_adjust(gc, &w, &h); - pt->gc = gc; - pt->w = w; - pt->h = h; - pt->intformat = intformat; - pt->format = format; - pt->dataformat = GL_UNSIGNED_BYTE; - pt->render = 1; - pt->references = 0; - texinfo.d.num++; - texinfo.d.pix += pt->w * pt->h; - - _print_tex_count(); - - glGenTextures(1, &(pt->texture)); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glBindTexture(GL_TEXTURE_2D, pt->texture); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - - egldisplay = pt->gc->egldisp; - - attr[1] = pt->w; - attr[3] = pt->h; - - // FIXME: seems a bit slower than i'd like - maybe too many flushes? - // FIXME: YCbCr no support as yet - pt->dyn.img = secsym_eglCreateImage(egldisplay, - EGL_NO_CONTEXT, - EGL_MAP_GL_TEXTURE_2D_SEC, - 0, attr); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - if (!pt->dyn.img) - { - glBindTexture(GL_TEXTURE_2D, 0); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glDeleteTextures(1, &(pt->texture)); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - free(pt); - return NULL; - } - if (secsym_eglGetImageAttribSEC(egldisplay, - pt->dyn.img, - EGL_MAP_GL_TEXTURE_WIDTH_SEC, - &(pt->dyn.w)) != EGL_TRUE) goto error; - if (secsym_eglGetImageAttribSEC(egldisplay, - pt->dyn.img, - EGL_MAP_GL_TEXTURE_HEIGHT_SEC, - &(pt->dyn.h)) != EGL_TRUE) goto error; - if (secsym_eglGetImageAttribSEC(egldisplay, - pt->dyn.img, - EGL_MAP_GL_TEXTURE_STRIDE_IN_BYTES_SEC, - &(pt->dyn.stride)) != EGL_TRUE) goto error; - if (secsym_eglGetImageAttribSEC(egldisplay, - pt->dyn.img, - EGL_MAP_GL_TEXTURE_FORMAT_SEC, - &(fmt)) != EGL_TRUE) goto error; - - if (secsym_eglGetImageAttribSEC(egldisplay, - pt->dyn.img, - EGL_MAP_GL_TEXTURE_PIXEL_TYPE_SEC, - &(pixtype)) != EGL_TRUE) goto error; - - if (pixtype != EGL_MAP_GL_TEXTURE_UNSIGNED_BYTE_SEC) goto error; - - glBindTexture(GL_TEXTURE_2D, gc->pipe[0].shader.cur_tex); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); -#else - gc = NULL; - w = 0; - h = 0; - intformat = 0; - format = 0; -#endif - return pt; - -/* ERROR HANDLING */ -#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) -error: - secsym_eglDestroyImage(egldisplay, pt->dyn.img); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - pt->dyn.img = NULL; - glBindTexture(GL_TEXTURE_2D, 0); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glDeleteTextures(1, &(pt->texture)); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - free(pt); - return NULL; -#endif -} - -void -evas_gl_texture_pool_empty(Evas_GL_Texture_Pool *pt) -{ - if (!pt->gc) return; - - if (pt->format == alpha_fmt) - { - texinfo.a.num--; - texinfo.a.pix -= pt->w * pt->h; - } - else if (pt->format == lum_fmt) - { - texinfo.v.num--; - texinfo.v.pix -= pt->w * pt->h; - } - else if (pt->dyn.img) - { - texinfo.d.num--; - texinfo.d.pix -= pt->w * pt->h; - } - else if (pt->render) - { - texinfo.r.num--; - texinfo.r.pix -= pt->w * pt->h; - } - else if (pt->native) - { - texinfo.n.num--; - texinfo.n.pix -= pt->w * pt->h; - } - else - { - texinfo.c.num--; - texinfo.c.pix -= pt->w * pt->h; - } - - _print_tex_count(); - -#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) - if (pt->dyn.img) - { - if (pt->dyn.checked_out > 0) - secsym_eglUnmapImageSEC(pt->gc->egldisp, pt->dyn.img); - secsym_eglDestroyImage(pt->gc->egldisp, pt->dyn.img); - pt->dyn.img = NULL; - pt->dyn.data = NULL; - pt->dyn.w = 0; - pt->dyn.h = 0; - pt->dyn.stride = 0; - pt->dyn.checked_out = 0; - } -#endif - - glDeleteTextures(1, &(pt->texture)); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - if (pt->fb) - { - glsym_glDeleteFramebuffers(1, &(pt->fb)); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - pt->fb = 0; - } - while (pt->allocations) - pt->allocations = - eina_list_remove_list(pt->allocations, pt->allocations); - pt->texture = 0; - pt->gc = NULL; - pt->w = 0; - pt->h = 0; -} - -static void -pt_unref(Evas_GL_Texture_Pool *pt) -{ - if (!pt) return; - if (!pt->gc) return; - pt->references--; - if (pt->references != 0) return; - - if (!((pt->render) || (pt->native))) - { - if (pt->whole) - pt->gc->shared->tex.whole = - eina_list_remove(pt->gc->shared->tex.whole, pt); - else - pt->gc->shared->tex.atlas [pt->slot][pt->fslot] = - eina_list_remove(pt->gc->shared->tex.atlas[pt->slot][pt->fslot], pt); - } - evas_gl_texture_pool_empty(pt); - free(pt); -} - -static void -pt_link(Evas_Engine_GL_Context *gc, Evas_GL_Texture *tex, Evas_GL_Texture_Pool *pt) -{ - gc->shared->tex.whole = eina_list_prepend(gc->shared->tex.whole, pt); - pt->slot = -1; - pt->fslot = -1; - pt->whole = 1; - pt->allocations = eina_list_prepend(pt->allocations, tex); - pt->references++; -} - -Evas_GL_Texture * -evas_gl_common_texture_native_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha, Evas_GL_Image *im) -{ - Evas_GL_Texture *tex; - - tex = calloc(1, sizeof(Evas_GL_Texture)); - if (!tex) return NULL; - - tex->gc = gc; - tex->references = 1; - tex->alpha = alpha; - if (alpha) - { - if (gc->shared->info.bgra) - tex->pt = _pool_tex_native_new(gc, w, h, rgba_ifmt, rgba_fmt, im); - else - tex->pt = _pool_tex_native_new(gc, w, h, rgba_ifmt, rgba_fmt, im); - } - else - { - if (gc->shared->info.bgra) - tex->pt = _pool_tex_native_new(gc, w, h, rgb_ifmt, rgb_fmt, im); - else - tex->pt = _pool_tex_native_new(gc, w, h, rgb_ifmt, rgb_fmt, im); - } - if (!tex->pt) - { - free(tex); - return NULL; - } - tex->x = 0; - tex->y = 0; - tex->w = w; - tex->h = h; - tex->pt->references++; - return tex; -} - -Evas_GL_Texture * -evas_gl_common_texture_render_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha) -{ - Evas_GL_Texture *tex; - - tex = calloc(1, sizeof(Evas_GL_Texture)); - if (!tex) return NULL; - - tex->gc = gc; - tex->references = 1; - tex->alpha = alpha; - if (alpha) - { - if (gc->shared->info.bgra) - tex->pt = _pool_tex_render_new(gc, w, h, rgba_ifmt, rgba_fmt); - else - tex->pt = _pool_tex_render_new(gc, w, h, rgba_ifmt, rgba_fmt); - } - else - { - if (gc->shared->info.bgra) - tex->pt = _pool_tex_render_new(gc, w, h, rgb_ifmt, rgb_fmt); - else - tex->pt = _pool_tex_render_new(gc, w, h, rgb_ifmt, rgb_fmt); - } - if (!tex->pt) - { - free(tex); - return NULL; - } - tex->x = 0; - tex->y = 0; - tex->w = w; - tex->h = h; - tex->pt->references++; - return tex; -} - -Evas_GL_Texture * -evas_gl_common_texture_dynamic_new(Evas_Engine_GL_Context *gc, Evas_GL_Image *im) -{ - Evas_GL_Texture *tex; - - tex = calloc(1, sizeof(Evas_GL_Texture)); - if (!tex) return NULL; - - tex->gc = gc; - tex->references = 1; - tex->alpha = im->alpha; - tex->x = 0; - tex->y = 0; - tex->w = im->w; - tex->h = im->h; - if (tex->alpha) - { - if (gc->shared->info.bgra) - tex->pt = _pool_tex_dynamic_new(gc, tex->w, tex->h, bgra_ifmt, bgra_fmt); - else - tex->pt = _pool_tex_dynamic_new(gc, tex->w, tex->h, bgra_ifmt, bgra_fmt); - } - else - { - if (gc->shared->info.bgra) - tex->pt = _pool_tex_dynamic_new(gc, tex->w, tex->h, bgra_ifmt, bgra_fmt); - else - tex->pt = _pool_tex_dynamic_new(gc, tex->w, tex->h, bgra_ifmt, bgra_fmt); - } - if (!tex->pt) - { - free(tex); - return NULL; - } - tex->pt->references++; - return tex; -} - -void -evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im) -{ - GLuint fmt; - - if (tex->alpha != im->cache_entry.flags.alpha) - { - tex->pt->allocations = eina_list_remove(tex->pt->allocations, tex); - pt_unref(tex->pt); - tex->alpha = im->cache_entry.flags.alpha; - if (tex->alpha) - { - if (tex->gc->shared->info.bgra) - tex->pt = _pool_tex_render_new(tex->gc, tex->w, tex->h, bgra_ifmt, bgra_fmt); - else - tex->pt = _pool_tex_render_new(tex->gc, tex->w, tex->h, rgba_ifmt, rgba_fmt); - } - else - { - if (tex->gc->shared->info.bgra) - tex->pt = _pool_tex_render_new(tex->gc, tex->w, tex->h, bgr_ifmt, bgr_fmt); - else - tex->pt = _pool_tex_render_new(tex->gc, tex->w, tex->h, rgb_ifmt, rgb_fmt); - } - } - if (!tex->pt) return; - if (!im->image.data) return; - - fmt = tex->pt->format; - glBindTexture(GL_TEXTURE_2D, tex->pt->texture); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); -#ifdef GL_UNPACK_ROW_LENGTH - glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); -#endif - glPixelStorei(GL_UNPACK_ALIGNMENT, 4); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - -// printf("tex upload %ix%i\n", im->cache_entry.w, im->cache_entry.h); - // +-+ - // +-+ - // - _tex_sub_2d(tex->x, tex->y, - im->cache_entry.w, im->cache_entry.h, - fmt, tex->pt->dataformat, - im->image.data); - // xxx - // xxx - // --- - _tex_sub_2d(tex->x, tex->y + im->cache_entry.h, - im->cache_entry.w, 1, - fmt, tex->pt->dataformat, - im->image.data + ((im->cache_entry.h - 1) * im->cache_entry.w)); - // xxx - // xxx - // o - _tex_sub_2d(tex->x - 1, tex->y + im->cache_entry.h, - 1, 1, - fmt, tex->pt->dataformat, - im->image.data + ((im->cache_entry.h - 1) * im->cache_entry.w)); - // xxx - // xxx - // o - _tex_sub_2d(tex->x + im->cache_entry.w, tex->y + im->cache_entry.h, - 1, 1, - fmt, tex->pt->dataformat, - im->image.data + ((im->cache_entry.h - 1) * im->cache_entry.w) + (im->cache_entry.w - 1)); -#ifdef GL_UNPACK_ROW_LENGTH - glPixelStorei(GL_UNPACK_ROW_LENGTH, im->cache_entry.w); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - // |xxx - // |xxx - // - _tex_sub_2d(tex->x - 1, tex->y, - 1, im->cache_entry.h, - fmt, tex->pt->dataformat, - im->image.data); - // xxx| - // xxx| - // - _tex_sub_2d(tex->x + im->cache_entry.w, tex->y, - 1, im->cache_entry.h, - fmt, tex->pt->dataformat, - im->image.data + (im->cache_entry.w - 1)); -#else - { - DATA32 *tpix, *ps, *pd; - int i; - - tpix = alloca(im->cache_entry.h * sizeof(DATA32)); - pd = tpix; - ps = im->image.data; - for (i = 0; i < (int)im->cache_entry.h; i++) - { - *pd = *ps; - pd++; - ps += im->cache_entry.w; - } - // |xxx - // |xxx - // - _tex_sub_2d(tex->x - 1, tex->y, - 1, im->cache_entry.h, - fmt, tex->pt->dataformat, - tpix); - pd = tpix; - ps = im->image.data + (im->cache_entry.w - 1); - for (i = 0; i < (int)im->cache_entry.h; i++) - { - *pd = *ps; - pd++; - ps += im->cache_entry.w; - } - // xxx| - // xxx| - // - _tex_sub_2d(tex->x + im->cache_entry.w, tex->y, - 1, im->cache_entry.h, - fmt, tex->pt->dataformat, - tpix); - } -#endif - if (tex->pt->texture != tex->gc->pipe[0].shader.cur_tex) - { - glBindTexture(GL_TEXTURE_2D, tex->gc->pipe[0].shader.cur_tex); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } -} - -void -evas_gl_common_texture_free(Evas_GL_Texture *tex) -{ - if (!tex) return; - tex->references--; - if (tex->references != 0) return; - if (tex->double_buffer.pt[0]) - { - tex->double_buffer.pt[0]->allocations = eina_list_remove(tex->double_buffer.pt[0]->allocations, tex); - tex->double_buffer.pt[1]->allocations = eina_list_remove(tex->double_buffer.pt[1]->allocations, tex); - tex->double_buffer.ptuv[0]->allocations = eina_list_remove(tex->double_buffer.ptuv[0]->allocations, tex); - tex->double_buffer.ptuv[1]->allocations = eina_list_remove(tex->double_buffer.ptuv[1]->allocations, tex); - } - else - { - if (tex->pt) - { - tex->pt->allocations = eina_list_remove(tex->pt->allocations, tex); - pt_unref(tex->pt); - } - if (tex->ptu) - { - tex->ptu->allocations = eina_list_remove(tex->ptu->allocations, tex); - pt_unref(tex->ptu); - } - if (tex->ptv) - { - tex->ptv->allocations = eina_list_remove(tex->ptv->allocations, tex); - pt_unref(tex->ptv); - } - if (tex->ptuv) - { - tex->ptuv->allocations = eina_list_remove(tex->ptuv->allocations, tex); - pt_unref(tex->ptuv); - } - } - free(tex); -} - -Evas_GL_Texture * -evas_gl_common_texture_alpha_new(Evas_Engine_GL_Context *gc, DATA8 *pixels, - unsigned int w, unsigned int h, int fh) -{ - Evas_GL_Texture *tex; - Eina_List *l_after = NULL; - int u = 0, v = 0; - - tex = calloc(1, sizeof(Evas_GL_Texture)); - if (!tex) return NULL; - - tex->gc = gc; - tex->references = 1; - tex->pt = _pool_tex_find(gc, w + 3, fh, alpha_ifmt, alpha_fmt, &u, &v, - &l_after, - gc->shared->info.tune.atlas.max_alloc_alpha_size); - if (!tex->pt) - { - free(tex); - return NULL; - } - tex->x = u + 1; - tex->y = v; - tex->w = w; - tex->h = h; - if (l_after) - tex->pt->allocations = - eina_list_append_relative_list(tex->pt->allocations, tex, l_after); - else - tex->pt->allocations = eina_list_prepend(tex->pt->allocations, tex); - tex->pt->references++; - evas_gl_common_texture_alpha_update(tex, pixels, w, h, fh); - return tex; -} - -void -evas_gl_common_texture_alpha_update(Evas_GL_Texture *tex, DATA8 *pixels, - unsigned int w, unsigned int h, int fh __UNUSED__) -{ - if (!tex->pt) return; - glBindTexture(GL_TEXTURE_2D, tex->pt->texture); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); -#ifdef GL_UNPACK_ROW_LENGTH - glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); -#endif - glPixelStorei(GL_UNPACK_ALIGNMENT, 4); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - _tex_sub_2d(tex->x, tex->y, w, h, tex->pt->format, tex->pt->dataformat, - pixels); - if (tex->pt->texture != tex->gc->pipe[0].shader.cur_tex) - { - glBindTexture(GL_TEXTURE_2D, tex->gc->pipe[0].shader.cur_tex); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } -} - -Evas_GL_Texture * -evas_gl_common_texture_yuv_new(Evas_Engine_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h) -{ - Evas_GL_Texture *tex; - - tex = calloc(1, sizeof(Evas_GL_Texture)); - if (!tex) return NULL; - - tex->gc = gc; - tex->references = 1; - tex->ptu = _pool_tex_new(gc, w / 2 + 1, h / 2 + 1, lum_ifmt, lum_fmt); - if (!tex->ptu) - { - free(tex); - return NULL; - } - gc->shared->tex.whole = eina_list_prepend(gc->shared->tex.whole, tex->ptu); - tex->ptu->slot = -1; - tex->ptu->fslot = -1; - tex->ptu->whole = 1; - tex->ptv = _pool_tex_new(gc, tex->ptu->w, tex->ptu->h, lum_ifmt, lum_fmt); - if (!tex->ptv) - { - pt_unref(tex->pt); - pt_unref(tex->ptu); - free(tex); - return NULL; - } - gc->shared->tex.whole = eina_list_prepend(gc->shared->tex.whole, tex->ptv); - tex->ptv->slot = -1; - tex->ptv->fslot = -1; - tex->ptv->whole = 1; - tex->pt = _pool_tex_new(gc, tex->ptu->w * 2, tex->ptu->h * 2, lum_ifmt, lum_fmt); - if (!tex->pt) - { - free(tex); - return NULL; - } - gc->shared->tex.whole = eina_list_prepend(gc->shared->tex.whole, tex->pt); - tex->pt->slot = -1; - tex->pt->fslot = -1; - tex->pt->whole = 1; - tex->x = 0; - tex->y = 0; - tex->w = w; - tex->h = h; - tex->pt->allocations = eina_list_prepend(tex->pt->allocations, tex); - tex->ptu->allocations = eina_list_prepend(tex->ptu->allocations, tex); - tex->ptv->allocations = eina_list_prepend(tex->ptv->allocations, tex); - tex->pt->references++; - tex->ptu->references++; - tex->ptv->references++; - evas_gl_common_texture_yuv_update(tex, rows, w, h); - return tex; -} - -void -evas_gl_common_texture_yuv_update(Evas_GL_Texture *tex, DATA8 **rows, unsigned int w, unsigned int h) -{ - if (!tex->pt) return; - // FIXME: works on lowest size 4 pixel high buffers. must also be multiple of 2 -#ifdef GL_UNPACK_ROW_LENGTH - glPixelStorei(GL_UNPACK_ROW_LENGTH, rows[1] - rows[0]); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glBindTexture(GL_TEXTURE_2D, tex->pt->texture); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - _tex_2d(tex->pt->intformat, w, h, tex->pt->format, tex->pt->dataformat); - _tex_sub_2d(0, 0, w, h, tex->pt->format, tex->pt->dataformat, rows[0]); - glBindTexture(GL_TEXTURE_2D, tex->ptu->texture); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glPixelStorei(GL_UNPACK_ROW_LENGTH, rows[h + 1] - rows[h]); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - _tex_2d(tex->ptu->intformat, w / 2, h / 2, tex->ptu->format, tex->ptu->dataformat); - _tex_sub_2d(0, 0, w / 2, h / 2, tex->ptu->format, tex->ptu->dataformat, rows[h]); - glBindTexture(GL_TEXTURE_2D, tex->ptv->texture); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glPixelStorei(GL_UNPACK_ROW_LENGTH, rows[h + (h / 2) + 1] - rows[h + (h / 2)]); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - _tex_2d(tex->ptv->intformat, w / 2, h / 2, tex->ptv->format, tex->ptv->dataformat); - _tex_sub_2d(0, 0, w / 2, h / 2, tex->ptv->format, tex->ptv->dataformat, rows[h + (h / 2)]); -#else - unsigned int y; - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glBindTexture(GL_TEXTURE_2D, tex->pt->texture); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - _tex_2d(tex->pt->intformat, w, h, tex->pt->format, tex->pt->dataformat); - if ((rows[1] - rows[0]) == (int)w) - _tex_sub_2d(0, 0, w, h, tex->pt->format, tex->pt->dataformat, rows[0]); - else - { - for (y = 0; y < h; y++) - _tex_sub_2d(0, y, w, 1, tex->pt->format, tex->pt->dataformat, rows[y]); - } - - glBindTexture(GL_TEXTURE_2D, tex->ptu->texture); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - _tex_2d(tex->ptu->intformat, w / 2, h / 2, tex->ptu->format, tex->ptu->dataformat); - if ((rows[h + 1] - rows[h]) == (int)(w / 2)) - _tex_sub_2d(0, 0, w / 2, h / 2, tex->ptu->format, tex->ptu->dataformat, rows[h]); - else - { - for (y = 0; y < (h / 2); y++) - _tex_sub_2d(0, y, w / 2, 1, tex->ptu->format, tex->ptu->dataformat, rows[h + y]); - } - - glBindTexture(GL_TEXTURE_2D, tex->ptv->texture); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - _tex_2d(tex->ptv->intformat, w / 2, h / 2, tex->ptv->format, tex->ptv->dataformat); - if ((rows[h + (h / 2) + 1] - rows[h + (h / 2)]) == (int)(w / 2)) - _tex_sub_2d(0, 0, w / 2, h / 2, tex->ptv->format, tex->ptv->dataformat, rows[h + (h / 2)]); - else - { - for (y = 0; y < (h / 2); y++) - _tex_sub_2d(0, y, w / 2, 1, tex->ptv->format, tex->ptv->dataformat, rows[h + (h / 2) + y]); - } -#endif - if (tex->pt->texture != tex->gc->pipe[0].shader.cur_tex) - { - glBindTexture(GL_TEXTURE_2D, tex->gc->pipe[0].shader.cur_tex); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } -} - -static Evas_GL_Texture * -_evas_gl_common_texture_y2uv_new(Evas_Engine_GL_Context *gc, - unsigned int yw, unsigned int yh, - Eina_Bool uv2w, Eina_Bool uv2h, - GLenum y_ifmt, GLenum y_fmt, - GLenum uv_ifmt, GLenum uv_fmt, - Eina_Bool dynamic) -{ - Evas_GL_Texture_Pool *pt[2] = { NULL, NULL }; - Evas_GL_Texture_Pool *ptuv[2] = { NULL, NULL }; - Evas_GL_Texture *tex; - unsigned int uvw, uvh; - - uvw = uv2w ? yw / 2 + 1 : yw + 1; - uvh = uv2h ? yh / 2 + 1 : yh + 1; - - if (!dynamic) - { - ptuv[0] = _pool_tex_new(gc, uvw, uvh, uv_ifmt, uv_fmt); - ptuv[1] = _pool_tex_new(gc, uvw, uvh, uv_ifmt, uv_fmt); - - if (ptuv[0] && ptuv[1]) - { - pt[0] = _pool_tex_new(gc, - ptuv[0]->w * (uv2w ? 2 : 1), - ptuv[0]->h * (uv2h ? 2 : 1), - y_ifmt, y_fmt); - pt[1] = _pool_tex_new(gc, - ptuv[1]->w * (uv2w ? 2 : 1), - ptuv[1]->h * (uv2h ? 2 : 1), - y_ifmt, y_fmt); - } - } - else - { - ptuv[0] = _pool_tex_dynamic_new(gc, uvw, uvh, uv_ifmt, uv_fmt); - ptuv[1] = _pool_tex_dynamic_new(gc, uvw, uvh, uv_ifmt, uv_fmt); - - if (ptuv[0] && ptuv[1]) - { - pt[0] = _pool_tex_dynamic_new(gc, - ptuv[0]->w * (uv2w ? 2 : 1), - ptuv[0]->h * (uv2h ? 2 : 1), - y_ifmt, y_fmt); - pt[1] = _pool_tex_dynamic_new(gc, - ptuv[1]->w * (uv2w ? 2 : 1), - ptuv[1]->h * (uv2h ? 2 : 1), - y_ifmt, y_fmt); - } - } - - if (!pt[0] || !pt[1] || !ptuv[0] || !ptuv[1]) - goto on_error; - - INF("YUV [%i, %i] => Y[%i, %i], UV[%i, %i]", - yw, yh, - pt[0]->w, pt[0]->h, - ptuv[0]->w, ptuv[0]->h); - tex = calloc(1, sizeof(Evas_GL_Texture)); - if (!tex) - goto on_error; - - tex->gc = gc; - tex->references = 1; - tex->pt = pt[0]; - tex->ptuv = ptuv[0]; - tex->dyn = dynamic; - - pt_link(gc, tex, pt[0]); - pt_link(gc, tex, pt[1]); - pt_link(gc, tex, ptuv[0]); - pt_link(gc, tex, ptuv[1]); - - tex->x = 0; - tex->y = 0; - tex->w = yw; - tex->h = yh; - tex->double_buffer.source = 0; - memcpy(tex->double_buffer.pt, pt, sizeof (Evas_GL_Texture_Pool *) * 2); - memcpy(tex->double_buffer.ptuv, ptuv, sizeof (Evas_GL_Texture_Pool *) * 2); - - return tex; - - on_error: - pt_unref(pt[0]); - pt_unref(pt[1]); - pt_unref(ptuv[0]); - pt_unref(ptuv[1]); - return NULL; -} - -Evas_GL_Texture * -evas_gl_common_texture_yuy2_new(Evas_Engine_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h) -{ - Evas_GL_Texture *tex; - - tex = _evas_gl_common_texture_y2uv_new(gc, w, h, EINA_TRUE, EINA_FALSE, lum_alpha_ifmt, lum_alpha_fmt, rgba8_ifmt, rgba8_fmt, 0); - evas_gl_common_texture_yuy2_update(tex, rows, w, h); - return tex; -} - -Evas_GL_Texture * -evas_gl_common_texture_nv12_new(Evas_Engine_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h) -{ - Evas_GL_Texture *tex; - -#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) - tex = _evas_gl_common_texture_y2uv_new(gc, w, h, EINA_TRUE, EINA_TRUE, lum_ifmt, lum_fmt, lum_alpha_ifmt, lum_alpha_fmt, 1); - if (!tex) -#endif - tex = _evas_gl_common_texture_y2uv_new(gc, w, h, EINA_TRUE, EINA_TRUE, lum_ifmt, lum_fmt, lum_alpha_ifmt, lum_alpha_fmt, 0); - - evas_gl_common_texture_nv12_update(tex, rows, w, h); - return tex; -} - -Evas_GL_Texture * -evas_gl_common_texture_nv12tiled_new(Evas_Engine_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h) -{ - Evas_GL_Texture *tex = NULL; - -#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) - tex = _evas_gl_common_texture_y2uv_new(gc, w, h, EINA_TRUE, EINA_TRUE, lum_ifmt, lum_fmt, lum_alpha_ifmt, lum_alpha_fmt, 1); - if (!tex) -#endif - tex = _evas_gl_common_texture_y2uv_new(gc, w, h, EINA_TRUE, EINA_TRUE, lum_ifmt, lum_fmt, lum_alpha_ifmt, lum_alpha_fmt, 0); - - evas_gl_common_texture_nv12tiled_update(tex, rows, w, h); - return tex; -} - -void -evas_gl_common_texture_yuy2_update(Evas_GL_Texture *tex, DATA8 **rows, unsigned int w, unsigned int h) -{ - if (!tex->pt) return; - // FIXME: works on lowest size 4 pixel high buffers. must also be multiple of 2 - unsigned int y; - - tex->double_buffer.source = 1 - tex->double_buffer.source; - tex->pt = tex->double_buffer.pt[tex->double_buffer.source]; - tex->ptuv = tex->double_buffer.ptuv[tex->double_buffer.source]; - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glBindTexture(GL_TEXTURE_2D, tex->pt->texture); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - _tex_2d(tex->pt->intformat, w, h, tex->pt->format, tex->pt->dataformat); - if ((rows[1] - rows[0]) == (int)w * 4) - _tex_sub_2d(0, 0, w, h, tex->pt->format, tex->pt->dataformat, rows[0]); - else - { - for (y = 0; y < h; y++) - _tex_sub_2d(0, y, w, 1, tex->pt->format, tex->pt->dataformat, rows[y]); - } - - glBindTexture(GL_TEXTURE_2D, tex->ptuv->texture); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - _tex_2d(tex->ptuv->intformat, w / 2, h, tex->ptuv->format, tex->ptuv->dataformat); -#if 0 - /* - FIXME: this piece of code doesn't work anymore since texture width - is not anymore exactly w / 2. I don't understand why. - */ - if ((rows[1] - rows[0]) == (int)(w * 2)) - _tex_sub_2d(0, 0, w / 2, h, tex->ptuv->format, tex->ptuv->dataformat, rows[0]); - else -#endif - { - for (y = 0; y < h; y++) - _tex_sub_2d(0, y, w / 2, 1, tex->ptuv->format, tex->ptuv->dataformat, rows[y]); - } - - if (tex->pt->texture != tex->gc->pipe[0].shader.cur_tex) - { - glBindTexture(GL_TEXTURE_2D, tex->gc->pipe[0].shader.cur_tex); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } -} - -void -evas_gl_common_texture_nv12_update(Evas_GL_Texture *tex, DATA8 **rows, unsigned int w, unsigned int h) -{ - if (!tex->pt) return; - - tex->double_buffer.source = 1 - tex->double_buffer.source; - tex->pt = tex->double_buffer.pt[tex->double_buffer.source]; - tex->ptuv = tex->double_buffer.ptuv[tex->double_buffer.source]; - - // FIXME: works on lowest size 4 pixel high buffers. must also be multiple of 2 -#ifdef GL_UNPACK_ROW_LENGTH - glPixelStorei(GL_UNPACK_ROW_LENGTH, rows[1] - rows[0]); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glBindTexture(GL_TEXTURE_2D, tex->pt->texture); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - _tex_2d(tex->pt->intformat, w, h, tex->pt->format, tex->pt->dataformat); - _tex_sub_2d(0, 0, w, h, tex->pt->format, tex->pt->dataformat, rows[0]); - glBindTexture(GL_TEXTURE_2D, tex->ptuv->texture); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glPixelStorei(GL_UNPACK_ROW_LENGTH, rows[h + 1] - rows[h]); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - _tex_2d(tex->ptuv->intformat, w / 2, h / 2, tex->ptuv->format, tex->ptuv->dataformat); - _tex_sub_2d(0, 0, w / 2, h / 2, tex->ptuv->format, tex->ptuv->dataformat, rows[h]); -#else - unsigned int y; - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - glBindTexture(GL_TEXTURE_2D, tex->pt->texture); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - _tex_2d(tex->pt->intformat, w, h, tex->pt->format, tex->pt->dataformat); - if ((rows[1] - rows[0]) == (int)w) - _tex_sub_2d(0, 0, w, h, tex->pt->format, tex->pt->dataformat, rows[0]); - else - { - for (y = 0; y < h; y++) - _tex_sub_2d(0, y, w, 1, tex->pt->format, tex->pt->dataformat, rows[y]); - } - - glBindTexture(GL_TEXTURE_2D, tex->ptuv->texture); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - _tex_2d(tex->ptuv->intformat, w / 2, h / 2, tex->ptuv->format, tex->ptuv->dataformat); - if ((rows[h + 1] - rows[h]) == (int)(w / 2)) - _tex_sub_2d(0, 0, w / 2, h / 2, tex->ptuv->format, tex->ptuv->dataformat, rows[h]); - else - { - for (y = 0; y < (h / 2); y++) - _tex_sub_2d(0, y, w / 2, 1, tex->ptuv->format, tex->ptuv->dataformat, rows[h + y]); - } -#endif - if (tex->pt->texture != tex->gc->pipe[0].shader.cur_tex) - { - glBindTexture(GL_TEXTURE_2D, tex->gc->pipe[0].shader.cur_tex); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } -} - -void -evas_gl_common_texture_nv12tiled_update(Evas_GL_Texture *tex, DATA8 **rows, unsigned int w, unsigned int h) -{ - unsigned int mb_x, mb_y, mb_w, mb_h; - unsigned int base_h; - - if (!tex->pt) return; - - tex->double_buffer.source = 1 - tex->double_buffer.source; - tex->pt = tex->double_buffer.pt[tex->double_buffer.source]; - tex->ptuv = tex->double_buffer.ptuv[tex->double_buffer.source]; - - mb_w = w / 64 + (w % 64 ? 1 : 0); - mb_h = h / 32 + (h % 32 ? 1 : 0); - -#if ( defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) ) - if (tex->dyn) - { - char *texture_addr; - char *tmp; - - texture_addr = secsym_eglMapImageSEC(tex->gc->egldisp, tex->pt->dyn.img); - - /* Iterate each Y macroblock like we do in evas_convert_yuv.c */ - for (mb_y = 0; mb_y < (mb_h >> 1); mb_y++) - { - int step = 2; - int offset = 0; - int x = 0; - int rmb_x = 0; - int ry[2]; - - ry[0] = mb_y * 2 * 32 * tex->pt->dyn.stride; - ry[1] = ry[0] + 32 * tex->pt->dyn.stride; - - for (mb_x = 0; mb_x < mb_w * 2; mb_x++, rmb_x += 64 * 32) - { - unsigned int i; - - tmp = texture_addr + x + ry[offset]; - - for (i = 0; i < 32 * 64; i += 64, tmp += tex->pt->dyn.stride) - memcpy(tmp, rows[mb_y] + rmb_x + i, 64); - - step++; - if ((step & 0x3) == 0) - { - offset = 1 - offset; - x -= 64; - } - else - { - x += 64; - } - } - } - - if (mb_h & 0x1) - { - int rmb_x = 0; - int x = 0; - int ry; - - ry = mb_y * 2 * 32 * tex->pt->dyn.stride; - - for (mb_x = 0; mb_x < mb_w; mb_x++, x += 64, rmb_x += 64 * 32) - { - unsigned int i; - - tmp = texture_addr + x + ry; - - for (i = 0; i < 32 * 64; i += 64, tmp += tex->pt->dyn.stride) - memcpy(tmp, rows[mb_y] + rmb_x + i, 64); - } - } - - secsym_eglUnmapImageSEC(tex->gc->egldisp, tex->pt->dyn.img); - - texture_addr = secsym_eglMapImageSEC(tex->gc->egldisp, tex->ptuv->dyn.img); - - /* Iterate each UV macroblock like we do in evas_convert_yuv.c */ - base_h = (mb_h >> 1) + (mb_h & 0x1); - - /* h is always a multiple of 32 */ - mb_h = h / 2; - mb_h = (mb_h / 32 + (mb_h % 32 ? 1 : 0)); - - mb_w = w / 2; - mb_w = (mb_w / 32 + (mb_w % 32 ? 1 : 0)); - - for (mb_y = 0; mb_y < (mb_h >> 1); mb_y++) - { - int step = 2; - int offset = 0; - int x = 0; - int rmb_x = 0; - int ry[2]; - - ry[0] = mb_y * 2 * 32 * tex->ptuv->dyn.stride; - ry[1] = ry[0] + 32 * tex->ptuv->dyn.stride; - - for (mb_x = 0; mb_x < mb_w * 4; mb_x++, rmb_x += 64 * 32) - { - unsigned int i = 0; - - tmp = texture_addr + x + ry[offset]; - - for (i = 0; i < 32 * 64; i += 64, tmp += tex->ptuv->dyn.stride) - memcpy(tmp, rows[mb_y + base_h] + rmb_x + i, 64); - - step++; - if ((step & 0x3) == 0) - { - offset = 1 - offset; - x -= 64; - } - else - { - x += 64; - } - } - } - - if (mb_h & 0x1) - { - int rmb_x = 0; - int x = 0; - int ry; - - ry = mb_y * 2 * 32 * tex->ptuv->dyn.stride; - - for (mb_x = 0; mb_x < mb_w * 2; mb_x++, x += 64, rmb_x += 64 * 32) - { - unsigned int i; - - tmp = texture_addr + x + ry; - - /* It has horizontaly half the pixels, but they are double the size*/ - for (i = 0; i < 32 * 64; i += 64, tmp += tex->ptuv->dyn.stride) - memcpy(tmp, rows[mb_y + base_h] + rmb_x + i, 64); - } - } - - secsym_eglUnmapImageSEC(tex->gc->egldisp, tex->ptuv->dyn.img); - return ; - } -#endif - - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - - glBindTexture(GL_TEXTURE_2D, tex->pt->texture); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - - // We are telling the driver to not swizzle back the buffer as we are going to replace all pixel - _tex_2d(tex->pt->intformat, w, h, tex->pt->format, tex->pt->dataformat); - - /* Iterate each Y macroblock like we do in evas_convert_yuv.c */ - for (mb_y = 0; mb_y < (mb_h >> 1); mb_y++) - { - int step = 2; - int offset = 0; - int x = 0; - int rmb_x = 0; - int ry[2]; - - ry[0] = mb_y * 2 * 32; - ry[1] = ry[0] + 32; - - for (mb_x = 0; mb_x < mb_w * 2; mb_x++, rmb_x += 64 * 32) - { - _tex_sub_2d(x, ry[offset], 64, 32, tex->pt->format, tex->pt->dataformat, rows[mb_y] + rmb_x); - - step++; - if ((step & 0x3) == 0) - { - offset = 1 - offset; - x -= 64; - } - else - { - x += 64; - } - } - } - - if (mb_h & 0x1) - { - int rmb_x = 0; - int x = 0; - int ry; - - ry = mb_y * 2 * 32; - - for (mb_x = 0; mb_x < mb_w; mb_x++, x += 64, rmb_x += 64 * 32) - _tex_sub_2d(x, ry, 64, 32, tex->pt->format, tex->pt->dataformat, rows[mb_y] + rmb_x); - } - - glBindTexture(GL_TEXTURE_2D, tex->ptuv->texture); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - - _tex_2d(tex->ptuv->intformat, w, h, tex->ptuv->format, tex->ptuv->dataformat); - - /* Iterate each UV macroblock like we do in evas_convert_yuv.c */ - base_h = (mb_h >> 1) + (mb_h & 0x1); - - /* h is always a multiple of 32 */ - mb_h = h / 2; - mb_h = (mb_h / 32 + (mb_h % 32 ? 1 : 0)); - - mb_w = w / 2; - mb_w = (mb_w / 32 + (mb_w % 32 ? 1 : 0)); - - for (mb_y = 0; mb_y < (mb_h >> 1); mb_y++) - { - int step = 2; - int offset = 0; - int x = 0; - int rmb_x = 0; - int ry[2]; - - ry[0] = mb_y * 2 * 32; - ry[1] = ry[0] + 32; - - for (mb_x = 0; mb_x < mb_w * 2; mb_x++, rmb_x += 64 * 32) - { - _tex_sub_2d(x, ry[offset], 32, 32, - tex->ptuv->format, tex->ptuv->dataformat, - rows[mb_y + base_h] + rmb_x); - step++; - if ((step & 0x3) == 0) - { - offset = 1 - offset; - x -= 32; - } - else - { - x += 32; - } - } - } - - if (mb_h & 0x1) - { - int rmb_x = 0; - int x = 0; - int ry; - - ry = mb_y * 2 * 32; - - for (mb_x = 0; mb_x < mb_w; mb_x++, x += 32, rmb_x += 64 * 32) - _tex_sub_2d(x, ry, 64, 32, tex->ptuv->format, tex->ptuv->dataformat, rows[mb_y + base_h] + rmb_x); - } -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/compile-s3c6410.sh b/libraries/evas/src/modules/engines/gl_common/shader/compile-s3c6410.sh deleted file mode 100755 index 450e5de..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/compile-s3c6410.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -ORIONEXE=/home/raster/Data/orion/orion.exe -OPTS="-O --nolodcalc -lp" - -function compile() -{ - F=$1 - - make-c-str.sh $F"_frag.shd" > $F"_frag.h" - if test -f $F"_frag_s3c6410.asm"; then - wine $ORIONEXE -a $OPTS -f $F"_frag_s3c6410.asm" - make-c-bin.sh $F"_frag_s3c6410.bin" > $F"_frag_bin_s3c6410.h" - rm -f $F"_frag_s3c6410.bin" $F"_frag_s3c6410.h" - else - wine $ORIONEXE $OPTS -f $F"_frag.shd" - make-c-bin.sh $F"_frag.shd.bin" > $F"_frag_bin_s3c6410.h" - rm -f $F"_frag.shd.bin" $F"_frag.shd.asm" $F"_frag.shd.h" - fi - - make-c-str.sh $F"_vert.shd" > $F"_vert.h" - if test -f $F"_vert_s3c6410.asm"; then - wine $ORIONEXE -a $OPTS -v $F"_vert_s3c6410.asm" - make-c-bin.sh $F"_vert_s3c6410.bin" > $F"_vert_bin_s3c6410.h" - rm -f $F"_vert_s3c6410.bin" $F"_vert_s3c6410.h" - else - wine $ORIONEXE $OPTS -v $F"_vert.shd" - make-c-bin.sh $F"_vert.shd.bin" > $F"_vert_bin_s3c6410.h" - rm -f $F"_vert.shd.bin" $F"_vert.shd.asm" $F"_vert.shd.h" - fi -} - -compile rect -compile font -compile img -compile img_nomul -compile img_bgra -compile img_bgra_nomul -compile img_mask -compile yuv -compile yuv_nomul -compile tex -compile tex_nomul -compile nv12 -compile nv12_nomul -compile yuy2 -compile yuy2_nomul -## FIXME: compile filter_* diff --git a/libraries/evas/src/modules/engines/gl_common/shader/compile-sgx.sh b/libraries/evas/src/modules/engines/gl_common/shader/compile-sgx.sh deleted file mode 100755 index a96b58c..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/compile-sgx.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -function compile() -{ - F=$1 - - if [ -f $F".shd" ]; then - make-c-str.sh $F".shd" > $F".h" - fi - if [ -f $F"_frag.shd" ]; then - make-c-str.sh $F"_frag.shd" > $F"_frag.h" - fi - if [ -f $F"_vert.shd" ]; then - make-c-str.sh $F"_vert.shd" > $F"_vert.h" - fi -} - -compile rect -compile font -compile img -compile img_nomul -compile img_bgra -compile img_bgra_nomul -compile img_mask -compile yuv -compile yuv_nomul -compile tex -compile tex_nomul -compile filter_blur_bgra -compile filter_blur_bgra_nomul -compile filter_blur -compile filter_blur_nomul -compile filter_greyscale_bgra -compile filter_greyscale_bgra_nomul -compile filter_greyscale -compile filter_greyscale_nomul -compile filter_invert_bgra -compile filter_invert_bgra_nomul -compile filter_invert -compile filter_invert_nomul -compile filter_sepia_bgra -compile filter_sepia_bgra_nomul -compile filter_sepia -compile filter_sepia_nomul -compile nv12 -compile nv12_nomul -compile yuy2 -compile yuy2_nomul - diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_blur.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_blur.h deleted file mode 100644 index 7c3a369..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_blur.h +++ /dev/null @@ -1,24 +0,0 @@ -"#ifdef GL_ES\n" -"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" -"precision highp float;\n" -"#else\n" -"precision mediump float;\n" -"#endif\n" -"#endif\n" -"uniform sampler2D tex;\n" -"uniform sampler1D gaussian;\n" -"varying vec4 col;\n" -"varying vec2 tex_c;\n" -"varying weight;\n" -"uniform radius;\n" -"void main()\n" -"{\n" -" int i;\n" -" vec4 fc = vec4(0,0,0,0);\n" -" \n" -" for (i = 0 ; i < radius ; i ++){\n" -" fc += texture2D(tex, tex_c.xy).rgba *\n" -" texture1D(gaussian,i/radius).aaaa;\n" -" }\n" -" gl_FragColor = fc / 4 * col;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_blur.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_blur.shd deleted file mode 100644 index 5f13a47..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_blur.shd +++ /dev/null @@ -1,24 +0,0 @@ -#ifdef GL_ES -#ifdef GL_FRAGMENT_PRECISION_HIGH -precision highp float; -#else -precision mediump float; -#endif -#endif -uniform sampler2D tex; -uniform sampler1D gaussian; -varying vec4 col; -varying vec2 tex_c; -varying weight; -uniform radius; -void main() -{ - int i; - vec4 fc = vec4(0,0,0,0); - - for (i = 0 ; i < radius ; i ++){ - fc += texture2D(tex, tex_c.xy).rgba * - texture1D(gaussian,i/radius).aaaa; - } - gl_FragColor = fc / 4 * col; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra.h deleted file mode 100644 index 0862e4f..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra.h +++ /dev/null @@ -1,24 +0,0 @@ -"#ifdef GL_ES\n" -"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" -"precision highp float;\n" -"#else\n" -"precision mediump float;\n" -"#endif\n" -"#endif\n" -"uniform sampler2D tex;\n" -"uniform sampler1D gaussian;\n" -"varying vec4 col;\n" -"varying vec2 tex_c;\n" -"varying weight;\n" -"uniform radius;\n" -"void main()\n" -"{\n" -" int i;\n" -" vec4 fc = vec4(0,0,0,0);\n" -" \n" -" for (i = 0 ; i < radius ; i ++){\n" -" fc += texture2D(tex, tex_c.xy).rgba *\n" -" texture1D(gaussian,i/radius).aaaa;\n" -" }\n" -" gl_FragColor = fc / 4;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra.shd deleted file mode 100644 index a9134df..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra.shd +++ /dev/null @@ -1,24 +0,0 @@ -#ifdef GL_ES -#ifdef GL_FRAGMENT_PRECISION_HIGH -precision highp float; -#else -precision mediump float; -#endif -#endif -uniform sampler2D tex; -uniform sampler1D gaussian; -varying vec4 col; -varying vec2 tex_c; -varying weight; -uniform radius; -void main() -{ - int i; - vec4 fc = vec4(0,0,0,0); - - for (i = 0 ; i < radius ; i ++){ - fc += texture2D(tex, tex_c.xy).rgba * - texture1D(gaussian,i/radius).aaaa; - } - gl_FragColor = fc / 4; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra_nomul.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra_nomul.h deleted file mode 100644 index 0862e4f..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra_nomul.h +++ /dev/null @@ -1,24 +0,0 @@ -"#ifdef GL_ES\n" -"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" -"precision highp float;\n" -"#else\n" -"precision mediump float;\n" -"#endif\n" -"#endif\n" -"uniform sampler2D tex;\n" -"uniform sampler1D gaussian;\n" -"varying vec4 col;\n" -"varying vec2 tex_c;\n" -"varying weight;\n" -"uniform radius;\n" -"void main()\n" -"{\n" -" int i;\n" -" vec4 fc = vec4(0,0,0,0);\n" -" \n" -" for (i = 0 ; i < radius ; i ++){\n" -" fc += texture2D(tex, tex_c.xy).rgba *\n" -" texture1D(gaussian,i/radius).aaaa;\n" -" }\n" -" gl_FragColor = fc / 4;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra_nomul.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra_nomul.shd deleted file mode 100644 index a9134df..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_bgra_nomul.shd +++ /dev/null @@ -1,24 +0,0 @@ -#ifdef GL_ES -#ifdef GL_FRAGMENT_PRECISION_HIGH -precision highp float; -#else -precision mediump float; -#endif -#endif -uniform sampler2D tex; -uniform sampler1D gaussian; -varying vec4 col; -varying vec2 tex_c; -varying weight; -uniform radius; -void main() -{ - int i; - vec4 fc = vec4(0,0,0,0); - - for (i = 0 ; i < radius ; i ++){ - fc += texture2D(tex, tex_c.xy).rgba * - texture1D(gaussian,i/radius).aaaa; - } - gl_FragColor = fc / 4; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_nomul.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_nomul.h deleted file mode 100644 index 0862e4f..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_nomul.h +++ /dev/null @@ -1,24 +0,0 @@ -"#ifdef GL_ES\n" -"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" -"precision highp float;\n" -"#else\n" -"precision mediump float;\n" -"#endif\n" -"#endif\n" -"uniform sampler2D tex;\n" -"uniform sampler1D gaussian;\n" -"varying vec4 col;\n" -"varying vec2 tex_c;\n" -"varying weight;\n" -"uniform radius;\n" -"void main()\n" -"{\n" -" int i;\n" -" vec4 fc = vec4(0,0,0,0);\n" -" \n" -" for (i = 0 ; i < radius ; i ++){\n" -" fc += texture2D(tex, tex_c.xy).rgba *\n" -" texture1D(gaussian,i/radius).aaaa;\n" -" }\n" -" gl_FragColor = fc / 4;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_nomul.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_nomul.shd deleted file mode 100644 index a9134df..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_blur_nomul.shd +++ /dev/null @@ -1,24 +0,0 @@ -#ifdef GL_ES -#ifdef GL_FRAGMENT_PRECISION_HIGH -precision highp float; -#else -precision mediump float; -#endif -#endif -uniform sampler2D tex; -uniform sampler1D gaussian; -varying vec4 col; -varying vec2 tex_c; -varying weight; -uniform radius; -void main() -{ - int i; - vec4 fc = vec4(0,0,0,0); - - for (i = 0 ; i < radius ; i ++){ - fc += texture2D(tex, tex_c.xy).rgba * - texture1D(gaussian,i/radius).aaaa; - } - gl_FragColor = fc / 4; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale.h deleted file mode 100644 index 850538a..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale.h +++ /dev/null @@ -1,15 +0,0 @@ -"#ifdef GL_ES\n" -"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" -"precision highp float;\n" -"#else\n" -"precision mediump float;\n" -"#endif\n" -"#endif\n" -"uniform sampler2D tex;\n" -"varying vec4 col;\n" -"varying vec2 tex_c;\n" -"void main()\n" -"{\n" -" float inten = dot(texture2D(tex,tex_c.xy).agb,vec3(.3, .59, .11));\n" -" gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).r) * col;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale.shd deleted file mode 100644 index 78ecf08..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale.shd +++ /dev/null @@ -1,15 +0,0 @@ -#ifdef GL_ES -#ifdef GL_FRAGMENT_PRECISION_HIGH -precision highp float; -#else -precision mediump float; -#endif -#endif -uniform sampler2D tex; -varying vec4 col; -varying vec2 tex_c; -void main() -{ - float inten = dot(texture2D(tex,tex_c.xy).agb,vec3(.3, .59, .11)); - gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).r) * col; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra.h deleted file mode 100644 index 3caef35..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra.h +++ /dev/null @@ -1,15 +0,0 @@ -"#ifdef GL_ES\n" -"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" -"precision highp float;\n" -"#else\n" -"precision mediump float;\n" -"#endif\n" -"#endif\n" -"uniform sampler2D tex;\n" -"varying vec4 col;\n" -"varying vec2 tex_c;\n" -"void main()\n" -"{\n" -" float inten = dot(texture2D(tex,tex_c.xy).rgb,vec3(.3, .59, .11));\n" -" gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).a) * col;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra.shd deleted file mode 100644 index 5dca381..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra.shd +++ /dev/null @@ -1,15 +0,0 @@ -#ifdef GL_ES -#ifdef GL_FRAGMENT_PRECISION_HIGH -precision highp float; -#else -precision mediump float; -#endif -#endif -uniform sampler2D tex; -varying vec4 col; -varying vec2 tex_c; -void main() -{ - float inten = dot(texture2D(tex,tex_c.xy).rgb,vec3(.3, .59, .11)); - gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).a) * col; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra_nomul.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra_nomul.h deleted file mode 100644 index 4cb36a8..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra_nomul.h +++ /dev/null @@ -1,14 +0,0 @@ -"#ifdef GL_ES\n" -"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" -"precision highp float;\n" -"#else\n" -"precision mediump float;\n" -"#endif\n" -"#endif\n" -"uniform sampler2D tex;\n" -"varying vec2 tex_c;\n" -"void main()\n" -"{\n" -" float inten = dot(texture2D(tex,tex_c.xy).rgb,vec3(.3, .59, .11));\n" -" gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).a);\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra_nomul.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra_nomul.shd deleted file mode 100644 index a077eea..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_bgra_nomul.shd +++ /dev/null @@ -1,14 +0,0 @@ -#ifdef GL_ES -#ifdef GL_FRAGMENT_PRECISION_HIGH -precision highp float; -#else -precision mediump float; -#endif -#endif -uniform sampler2D tex; -varying vec2 tex_c; -void main() -{ - float inten = dot(texture2D(tex,tex_c.xy).rgb,vec3(.3, .59, .11)); - gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).a); -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_nomul.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_nomul.h deleted file mode 100644 index f501a02..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_nomul.h +++ /dev/null @@ -1,14 +0,0 @@ -"#ifdef GL_ES\n" -"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" -"precision highp float;\n" -"#else\n" -"precision mediump float;\n" -"#endif\n" -"#endif\n" -"uniform sampler2D tex;\n" -"varying vec2 tex_c;\n" -"void main()\n" -"{\n" -" float inten = dot(texture2D(tex,tex_c.xy).abg,vec3(.3, .59, .11));\n" -" gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).r);\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_nomul.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_nomul.shd deleted file mode 100644 index b5b8ec6..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_greyscale_nomul.shd +++ /dev/null @@ -1,14 +0,0 @@ -#ifdef GL_ES -#ifdef GL_FRAGMENT_PRECISION_HIGH -precision highp float; -#else -precision mediump float; -#endif -#endif -uniform sampler2D tex; -varying vec2 tex_c; -void main() -{ - float inten = dot(texture2D(tex,tex_c.xy).abg,vec3(.3, .59, .11)); - gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).r); -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_invert.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_invert.h deleted file mode 100644 index 46373e0..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_invert.h +++ /dev/null @@ -1,14 +0,0 @@ -"#ifdef GL_ES\n" -"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" -"precision highp float;\n" -"#else\n" -"precision mediump float;\n" -"#endif\n" -"#endif\n" -"uniform sampler2D tex;\n" -"varying vec4 col;\n" -"varying vec2 tex_c;\n" -"void main()\n" -"{\n" -" gl_FragColor = (vec4(0, 1.0, 1.0, 1.0) - texture2D(tex, tex_c.xy).bgra)*col;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_invert.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_invert.shd deleted file mode 100644 index a75b058..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_invert.shd +++ /dev/null @@ -1,14 +0,0 @@ -#ifdef GL_ES -#ifdef GL_FRAGMENT_PRECISION_HIGH -precision highp float; -#else -precision mediump float; -#endif -#endif -uniform sampler2D tex; -varying vec4 col; -varying vec2 tex_c; -void main() -{ - gl_FragColor = (vec4(0, 1.0, 1.0, 1.0) - texture2D(tex, tex_c.xy).bgra)*col; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra.h deleted file mode 100644 index 3e3011d..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra.h +++ /dev/null @@ -1,14 +0,0 @@ -"#ifdef GL_ES\n" -"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" -"precision highp float;\n" -"#else\n" -"precision mediump float;\n" -"#endif\n" -"#endif\n" -"uniform sampler2D tex;\n" -"varying vec4 col;\n" -"varying vec2 tex_c;\n" -"void main()\n" -"{\n" -" gl_FragColor = (vec4(1.0, 1.0, 1.0, 1.0) - texture2D(tex, tex_c.xy))*col;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra.shd deleted file mode 100644 index 8d7df2d..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra.shd +++ /dev/null @@ -1,14 +0,0 @@ -#ifdef GL_ES -#ifdef GL_FRAGMENT_PRECISION_HIGH -precision highp float; -#else -precision mediump float; -#endif -#endif -uniform sampler2D tex; -varying vec4 col; -varying vec2 tex_c; -void main() -{ - gl_FragColor = (vec4(1.0, 1.0, 1.0, 1.0) - texture2D(tex, tex_c.xy))*col; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra_nomul.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra_nomul.h deleted file mode 100644 index b9f1e25..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra_nomul.h +++ /dev/null @@ -1,15 +0,0 @@ -"#ifdef GL_ES\n" -"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" -"precision highp float;\n" -"#else\n" -"precision mediump float;\n" -"#endif\n" -"#endif\n" -"uniform sampler2D tex;\n" -"varying vec4 col;\n" -"varying vec2 tex_c;\n" -"void main()\n" -"{\n" -" vec3 inv = vec3(1.0, 1.0, 1.0) - texture2D(tex,tex_c.xy).rgb;\n" -" gl_FragColor = vec4(inv.r, inv.g, inv.b, 1.0);\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra_nomul.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra_nomul.shd deleted file mode 100644 index 682acb2..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_bgra_nomul.shd +++ /dev/null @@ -1,15 +0,0 @@ -#ifdef GL_ES -#ifdef GL_FRAGMENT_PRECISION_HIGH -precision highp float; -#else -precision mediump float; -#endif -#endif -uniform sampler2D tex; -varying vec4 col; -varying vec2 tex_c; -void main() -{ - vec3 inv = vec3(1.0, 1.0, 1.0) - texture2D(tex,tex_c.xy).rgb; - gl_FragColor = vec4(inv.r, inv.g, inv.b, 1.0); -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_nomul.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_nomul.h deleted file mode 100644 index 46373e0..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_nomul.h +++ /dev/null @@ -1,14 +0,0 @@ -"#ifdef GL_ES\n" -"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" -"precision highp float;\n" -"#else\n" -"precision mediump float;\n" -"#endif\n" -"#endif\n" -"uniform sampler2D tex;\n" -"varying vec4 col;\n" -"varying vec2 tex_c;\n" -"void main()\n" -"{\n" -" gl_FragColor = (vec4(0, 1.0, 1.0, 1.0) - texture2D(tex, tex_c.xy).bgra)*col;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_nomul.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_nomul.shd deleted file mode 100644 index a75b058..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_invert_nomul.shd +++ /dev/null @@ -1,14 +0,0 @@ -#ifdef GL_ES -#ifdef GL_FRAGMENT_PRECISION_HIGH -precision highp float; -#else -precision mediump float; -#endif -#endif -uniform sampler2D tex; -varying vec4 col; -varying vec2 tex_c; -void main() -{ - gl_FragColor = (vec4(0, 1.0, 1.0, 1.0) - texture2D(tex, tex_c.xy).bgra)*col; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia.h deleted file mode 100644 index 50fbf12..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia.h +++ /dev/null @@ -1,20 +0,0 @@ -"#ifdef GL_ES\n" -"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" -"precision highp float;\n" -"#else\n" -"precision mediump float;\n" -"#endif\n" -"#endif\n" -"uniform sampler2D tex;\n" -"varying vec4 col;\n" -"varying vec2 tex_c;\n" -"void main()\n" -"{\n" -" vec3 inp = texture2D(tex,tex_c.xy).abg;\n" -" vec4 sep;\n" -" sep.r = dot(inp, vec3(.393, .769, .189));\n" -" sep.g = dot(inp, vec3(.349, .686, .168));\n" -" sep.b = dot(inp, vec3(.272, .534, .131));\n" -" sep.a = texture2D(tex,tex_c.xy).r;\n" -" gl_FragColor = sep * col;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia.shd deleted file mode 100644 index 027ecfb..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia.shd +++ /dev/null @@ -1,20 +0,0 @@ -#ifdef GL_ES -#ifdef GL_FRAGMENT_PRECISION_HIGH -precision highp float; -#else -precision mediump float; -#endif -#endif -uniform sampler2D tex; -varying vec4 col; -varying vec2 tex_c; -void main() -{ - vec3 inp = texture2D(tex,tex_c.xy).abg; - vec4 sep; - sep.r = dot(inp, vec3(.393, .769, .189)); - sep.g = dot(inp, vec3(.349, .686, .168)); - sep.b = dot(inp, vec3(.272, .534, .131)); - sep.a = texture2D(tex,tex_c.xy).r; - gl_FragColor = sep * col; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra.h deleted file mode 100644 index 41e4283..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra.h +++ /dev/null @@ -1,20 +0,0 @@ -"#ifdef GL_ES\n" -"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" -"precision highp float;\n" -"#else\n" -"precision mediump float;\n" -"#endif\n" -"#endif\n" -"uniform sampler2D tex;\n" -"varying vec4 col;\n" -"varying vec2 tex_c;\n" -"void main()\n" -"{\n" -" vec3 inp = texture2D(tex,tex_c.xy).rgb;\n" -" vec4 sep;\n" -" sep.r = dot(inp, vec3(.393, .769, .189));\n" -" sep.g = dot(inp, vec3(.349, .686, .168));\n" -" sep.b = dot(inp, vec3(.272, .534, .131));\n" -" sep.a = texture2D(tex,tex_c.xy).a;\n" -" gl_FragColor = sep * col;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra.shd deleted file mode 100644 index caed378..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra.shd +++ /dev/null @@ -1,20 +0,0 @@ -#ifdef GL_ES -#ifdef GL_FRAGMENT_PRECISION_HIGH -precision highp float; -#else -precision mediump float; -#endif -#endif -uniform sampler2D tex; -varying vec4 col; -varying vec2 tex_c; -void main() -{ - vec3 inp = texture2D(tex,tex_c.xy).rgb; - vec4 sep; - sep.r = dot(inp, vec3(.393, .769, .189)); - sep.g = dot(inp, vec3(.349, .686, .168)); - sep.b = dot(inp, vec3(.272, .534, .131)); - sep.a = texture2D(tex,tex_c.xy).a; - gl_FragColor = sep * col; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra_nomul.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra_nomul.h deleted file mode 100644 index 0c4fe1b..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra_nomul.h +++ /dev/null @@ -1,18 +0,0 @@ -"#ifdef GL_ES\n" -"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" -"precision highp float;\n" -"#else\n" -"precision mediump float;\n" -"#endif\n" -"#endif\n" -"uniform sampler2D tex;\n" -"varying vec4 col;\n" -"varying vec2 tex_c;\n" -"void main()\n" -"{\n" -" vec3 inp = texture2D(tex,tex_c.xy).rgb;\n" -" gl_FragColor.r = dot(inp, vec3(.393, .769, .189));\n" -" gl_FragColor.g = dot(inp, vec3(.349, .686, .168));\n" -" gl_FragColor.b = dot(inp, vec3(.272, .534, .131));\n" -" gl_FragColor.a = texture2D(tex,tex_c.xy).a;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra_nomul.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra_nomul.shd deleted file mode 100644 index 9c6c1d4..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_bgra_nomul.shd +++ /dev/null @@ -1,18 +0,0 @@ -#ifdef GL_ES -#ifdef GL_FRAGMENT_PRECISION_HIGH -precision highp float; -#else -precision mediump float; -#endif -#endif -uniform sampler2D tex; -varying vec4 col; -varying vec2 tex_c; -void main() -{ - vec3 inp = texture2D(tex,tex_c.xy).rgb; - gl_FragColor.r = dot(inp, vec3(.393, .769, .189)); - gl_FragColor.g = dot(inp, vec3(.349, .686, .168)); - gl_FragColor.b = dot(inp, vec3(.272, .534, .131)); - gl_FragColor.a = texture2D(tex,tex_c.xy).a; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_nomul.h b/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_nomul.h deleted file mode 100644 index 23af9ec..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_nomul.h +++ /dev/null @@ -1,18 +0,0 @@ -"#ifdef GL_ES\n" -"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" -"precision highp float;\n" -"#else\n" -"precision mediump float;\n" -"#endif\n" -"#endif\n" -"uniform sampler2D tex;\n" -"varying vec4 col;\n" -"varying vec2 tex_c;\n" -"void main()\n" -"{\n" -" vec3 inp = texture2D(tex,tex_c.xy).abg;\n" -" gl_FragColor.r = dot(inp, vec3(.393, .769, .189));\n" -" gl_FragColor.g = dot(inp, vec3(.349, .686, .168));\n" -" gl_FragColor.b = dot(inp, vec3(.272, .534, .131));\n" -" gl_FragColor.a = texture2D(tex,tex_c.xy).r;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_nomul.shd b/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_nomul.shd deleted file mode 100644 index f9871bd..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/filter_sepia_nomul.shd +++ /dev/null @@ -1,18 +0,0 @@ -#ifdef GL_ES -#ifdef GL_FRAGMENT_PRECISION_HIGH -precision highp float; -#else -precision mediump float; -#endif -#endif -uniform sampler2D tex; -varying vec4 col; -varying vec2 tex_c; -void main() -{ - vec3 inp = texture2D(tex,tex_c.xy).abg; - gl_FragColor.r = dot(inp, vec3(.393, .769, .189)); - gl_FragColor.g = dot(inp, vec3(.349, .686, .168)); - gl_FragColor.b = dot(inp, vec3(.272, .534, .131)); - gl_FragColor.a = texture2D(tex,tex_c.xy).r; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/font_frag.h b/libraries/evas/src/modules/engines/gl_common/shader/font_frag.h deleted file mode 100644 index f27dcdc..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/font_frag.h +++ /dev/null @@ -1,14 +0,0 @@ -"#ifdef GL_ES\n" -"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" -"precision highp float;\n" -"#else\n" -"precision mediump float;\n" -"#endif\n" -"#endif\n" -"uniform sampler2D tex;\n" -"varying vec4 col;\n" -"varying vec2 tex_c;\n" -"void main()\n" -"{\n" -" gl_FragColor = texture2D(tex, tex_c.xy).aaaa * col;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/font_frag.shd b/libraries/evas/src/modules/engines/gl_common/shader/font_frag.shd deleted file mode 100644 index a8eb9b7..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/font_frag.shd +++ /dev/null @@ -1,14 +0,0 @@ -#ifdef GL_ES -#ifdef GL_FRAGMENT_PRECISION_HIGH -precision highp float; -#else -precision mediump float; -#endif -#endif -uniform sampler2D tex; -varying vec4 col; -varying vec2 tex_c; -void main() -{ - gl_FragColor = texture2D(tex, tex_c.xy).aaaa * col; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/font_frag_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/font_frag_bin_s3c6410.h deleted file mode 100644 index daca692..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/font_frag_bin_s3c6410.h +++ /dev/null @@ -1,9 +0,0 @@ -0x20205350, 0xffff0008, 0x00000048, 0x01020000, 0x00000003, 0x00000000, -0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000001, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000e, 0x00000000, -0x00000000, 0x0000e407, 0x307820e4, 0x00000000, 0x01000000, 0x0100e400, -0x237a10ff, 0x00000000, 0x00000000, 0x00000000, 0x1e000000, 0x00000000, -0x00000004, 0x00000003, 0x00000009, 0x00000000, 0x00000004, 0x00000008, -0x00000005, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000003, -0x0000000f, 0x00030005, 0x00000000, 0x00786574, 0x006c6f63, 0x5f786574, -0x00000063, \ No newline at end of file diff --git a/libraries/evas/src/modules/engines/gl_common/shader/font_frag_s3c6410.asm b/libraries/evas/src/modules/engines/gl_common/shader/font_frag_s3c6410.asm deleted file mode 100644 index 4ed116f..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/font_frag_s3c6410.asm +++ /dev/null @@ -1,26 +0,0 @@ -#------------------------------------------------- -# ORION - OpenGL ES 2.0 Shading Language Compiler -# SAMSUNG INDIA SOFTWARE OPERATIONS PVT. LTD. -# Compiler Version : v04.00.09 -# Release Date : 19.01.2009 -# FIMG VERSION : FIMGv1.5 -# Optimizer Options : -O --nolodcalc -#------------------------------------------------- - -# hand optimised - removed useless ops - -ps_3_0 - -fimg_version 0x01020000 - -dcl_s2_tex s0 -dcl_f4_col v1.x -dcl_f2_tex_c v0.x - -label start -label main_ -texld r0.xyzw, v0.xyzw, s0 # tex=s0 -mul_sat oColor.xyzw, r0.wwww, v1.xyzw # gl_FragColor=oColor.xyzw, col=v1.xyzw -label main_end -ret -# 4 instructions, 4 C regs, 1 R regs diff --git a/libraries/evas/src/modules/engines/gl_common/shader/font_vert.h b/libraries/evas/src/modules/engines/gl_common/shader/font_vert.h deleted file mode 100644 index 8921d9d..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/font_vert.h +++ /dev/null @@ -1,15 +0,0 @@ -"#ifdef GL_ES\n" -"precision highp float;\n" -"#endif\n" -"attribute vec4 vertex;\n" -"attribute vec4 color;\n" -"attribute vec2 tex_coord;\n" -"uniform mat4 mvp;\n" -"varying vec4 col;\n" -"varying vec2 tex_c;\n" -"void main()\n" -"{\n" -" gl_Position = mvp * vertex;\n" -" col = color;\n" -" tex_c = tex_coord;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/font_vert.shd b/libraries/evas/src/modules/engines/gl_common/shader/font_vert.shd deleted file mode 100644 index 606c297..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/font_vert.shd +++ /dev/null @@ -1,15 +0,0 @@ -#ifdef GL_ES -precision highp float; -#endif -attribute vec4 vertex; -attribute vec4 color; -attribute vec2 tex_coord; -uniform mat4 mvp; -varying vec4 col; -varying vec2 tex_c; -void main() -{ - gl_Position = mvp * vertex; - col = color; - tex_c = tex_coord; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/font_vert_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/font_vert_bin_s3c6410.h deleted file mode 100644 index 1402448..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/font_vert_bin_s3c6410.h +++ /dev/null @@ -1,20 +0,0 @@ -0x20205356, 0xffff0008, 0x00000048, 0x01020000, 0x00000007, 0x00000006, -0x00000000, 0x00000000, 0x00000003, 0x00000003, 0x00000001, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000031, 0x00000000, -0x00000000, 0x02020000, 0x237820e4, 0x00000000, 0x00e40100, 0x02035500, -0x2ef820e4, 0x00000000, 0x00e40100, 0x0204aa00, 0x2ef820e4, 0x00000000, -0x00e40100, 0x0205ff00, 0x2ef800e4, 0x00000000, 0x00000000, 0x00010000, -0x20f801e4, 0x00000000, 0x00000000, 0x00020000, 0x20980254, 0x00000000, -0x00000000, 0x00000000, 0x1e000000, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000c, 0x00000006, -0x00000009, 0x00000000, 0x00000000, 0x00000013, 0x00000005, 0x00000009, -0x00000000, 0x00000004, 0x00000019, 0x00000009, 0x00000003, 0x00000000, -0x00000008, 0x00000000, 0x0000000b, 0x00000009, 0x00010004, 0x00000000, -0x00000027, 0x00000003, 0x00000009, 0x00010004, 0x00000004, 0x0000002b, -0x00000005, 0x00000003, 0x00010004, 0x00000008, 0x00000023, 0x00000003, -0x0000000e, 0x00020001, 0x00000008, 0x505f6c67, 0x7469736f, 0x006e6f69, -0x74726576, 0x63007865, 0x726f6c6f, 0x78657400, 0x6f6f635f, 0x6d006472, -0x63007076, 0x74006c6f, 0x635f7865, 0x00000000, \ No newline at end of file diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_frag.h b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_frag.h deleted file mode 100644 index 1ced5e0..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_frag.h +++ /dev/null @@ -1,14 +0,0 @@ -"#ifdef GL_ES\n" -"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" -"precision highp float;\n" -"#else\n" -"precision mediump float;\n" -"#endif\n" -"#endif\n" -"uniform sampler2D tex;\n" -"varying vec4 col;\n" -"varying vec2 tex_c;\n" -"void main()\n" -"{\n" -" gl_FragColor = texture2D(tex, tex_c.xy) * col;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_frag.shd b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_frag.shd deleted file mode 100644 index 2bc8d79..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_frag.shd +++ /dev/null @@ -1,14 +0,0 @@ -#ifdef GL_ES -#ifdef GL_FRAGMENT_PRECISION_HIGH -precision highp float; -#else -precision mediump float; -#endif -#endif -uniform sampler2D tex; -varying vec4 col; -varying vec2 tex_c; -void main() -{ - gl_FragColor = texture2D(tex, tex_c.xy) * col; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_frag_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_frag_bin_s3c6410.h deleted file mode 100644 index feb5bf5..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_frag_bin_s3c6410.h +++ /dev/null @@ -1,11 +0,0 @@ -0x20205350, 0xffff0008, 0x00000048, 0x01020000, 0x00000004, 0x00000003, -0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000001, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000e, 0x00000000, -0x00000000, 0x02025400, 0x23782050, 0x00000000, 0x00000000, 0x0100e407, -0x307820e4, 0x00000000, 0x01000000, 0x0100e400, 0x237a10e4, 0x00000000, -0x00000000, 0x00000000, 0x1e000000, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, -0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000004, 0x00000003, -0x00000009, 0x00000000, 0x00000004, 0x00000008, 0x00000005, 0x00000003, -0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x0000000f, 0x00030005, -0x00000000, 0x00786574, 0x006c6f63, 0x5f786574, 0x00000063, diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_frag.h b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_frag.h deleted file mode 100644 index 459611f..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_frag.h +++ /dev/null @@ -1,13 +0,0 @@ -"#ifdef GL_ES\n" -"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" -"precision highp float;\n" -"#else\n" -"precision mediump float;\n" -"#endif\n" -"#endif\n" -"uniform sampler2D tex;\n" -"varying vec2 tex_c;\n" -"void main()\n" -"{\n" -" gl_FragColor = texture2D(tex, tex_c.xy);\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_frag.shd b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_frag.shd deleted file mode 100644 index 877df62..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_frag.shd +++ /dev/null @@ -1,13 +0,0 @@ -#ifdef GL_ES -#ifdef GL_FRAGMENT_PRECISION_HIGH -precision highp float; -#else -precision mediump float; -#endif -#endif -uniform sampler2D tex; -varying vec2 tex_c; -void main() -{ - gl_FragColor = texture2D(tex, tex_c.xy); -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_frag_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_frag_bin_s3c6410.h deleted file mode 100644 index b89eeb1..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_frag_bin_s3c6410.h +++ /dev/null @@ -1,10 +0,0 @@ -0x20205350, 0xffff0008, 0x00000048, 0x01020000, 0x00000003, 0x00000003, -0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000001, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000a, 0x00000000, -0x00000000, 0x02025400, 0x23782050, 0x00000000, 0x00000000, 0x0100e407, -0x307a10e4, 0x00000000, 0x00000000, 0x00000000, 0x1e000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, -0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, -0x00000004, 0x00000005, 0x00000003, 0x00000000, 0x00000000, 0x00000000, -0x00000003, 0x0000000f, 0x00030005, 0x00000000, 0x00786574, 0x5f786574, -0x00000063, \ No newline at end of file diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_vert.h b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_vert.h deleted file mode 100644 index 13d5edd..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_vert.h +++ /dev/null @@ -1,12 +0,0 @@ -"#ifdef GL_ES\n" -"precision highp float;\n" -"#endif\n" -"attribute vec4 vertex;\n" -"attribute vec2 tex_coord;\n" -"uniform mat4 mvp;\n" -"varying vec2 tex_c;\n" -"void main()\n" -"{\n" -" gl_Position = mvp * vertex;\n" -" tex_c = tex_coord;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_vert.shd b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_vert.shd deleted file mode 100644 index 74f3207..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_vert.shd +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef GL_ES -precision highp float; -#endif -attribute vec4 vertex; -attribute vec2 tex_coord; -uniform mat4 mvp; -varying vec2 tex_c; -void main() -{ - gl_Position = mvp * vertex; - tex_c = tex_coord; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_vert_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_vert_bin_s3c6410.h deleted file mode 100644 index 314b5f3..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_nomul_vert_bin_s3c6410.h +++ /dev/null @@ -1,17 +0,0 @@ -0x20205356, 0xffff0008, 0x00000048, 0x01020000, 0x00000006, 0x00000006, -0x00000000, 0x00000000, 0x00000002, 0x00000002, 0x00000001, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000027, 0x00000000, -0x00000000, 0x02020000, 0x237820e4, 0x00000000, 0x00e40100, 0x02035500, -0x2ef820e4, 0x00000000, 0x00e40100, 0x0204aa00, 0x2ef820e4, 0x00000000, -0x00e40100, 0x0205ff00, 0x2ef800e4, 0x00000000, 0x00000000, 0x00010000, -0x20980154, 0x00000000, 0x00000000, 0x00000000, 0x1e000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, -0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x0000000c, 0x00000006, 0x00000009, 0x00000000, 0x00000000, 0x00000013, -0x00000009, 0x00000003, 0x00000000, 0x00000004, 0x00000000, 0x0000000b, -0x00000009, 0x00010004, 0x00000000, 0x00000021, 0x00000005, 0x00000003, -0x00010004, 0x00000004, 0x0000001d, 0x00000003, 0x0000000e, 0x00020001, -0x00000008, 0x505f6c67, 0x7469736f, 0x006e6f69, 0x74726576, 0x74007865, -0x635f7865, 0x64726f6f, 0x70766d00, 0x78657400, 0x0000635f, diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_vert.h b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_vert.h deleted file mode 100644 index 8921d9d..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_vert.h +++ /dev/null @@ -1,15 +0,0 @@ -"#ifdef GL_ES\n" -"precision highp float;\n" -"#endif\n" -"attribute vec4 vertex;\n" -"attribute vec4 color;\n" -"attribute vec2 tex_coord;\n" -"uniform mat4 mvp;\n" -"varying vec4 col;\n" -"varying vec2 tex_c;\n" -"void main()\n" -"{\n" -" gl_Position = mvp * vertex;\n" -" col = color;\n" -" tex_c = tex_coord;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_vert.shd b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_vert.shd deleted file mode 100644 index 606c297..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_vert.shd +++ /dev/null @@ -1,15 +0,0 @@ -#ifdef GL_ES -precision highp float; -#endif -attribute vec4 vertex; -attribute vec4 color; -attribute vec2 tex_coord; -uniform mat4 mvp; -varying vec4 col; -varying vec2 tex_c; -void main() -{ - gl_Position = mvp * vertex; - col = color; - tex_c = tex_coord; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_vert_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_vert_bin_s3c6410.h deleted file mode 100644 index 1402448..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/img_bgra_vert_bin_s3c6410.h +++ /dev/null @@ -1,20 +0,0 @@ -0x20205356, 0xffff0008, 0x00000048, 0x01020000, 0x00000007, 0x00000006, -0x00000000, 0x00000000, 0x00000003, 0x00000003, 0x00000001, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000031, 0x00000000, -0x00000000, 0x02020000, 0x237820e4, 0x00000000, 0x00e40100, 0x02035500, -0x2ef820e4, 0x00000000, 0x00e40100, 0x0204aa00, 0x2ef820e4, 0x00000000, -0x00e40100, 0x0205ff00, 0x2ef800e4, 0x00000000, 0x00000000, 0x00010000, -0x20f801e4, 0x00000000, 0x00000000, 0x00020000, 0x20980254, 0x00000000, -0x00000000, 0x00000000, 0x1e000000, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000c, 0x00000006, -0x00000009, 0x00000000, 0x00000000, 0x00000013, 0x00000005, 0x00000009, -0x00000000, 0x00000004, 0x00000019, 0x00000009, 0x00000003, 0x00000000, -0x00000008, 0x00000000, 0x0000000b, 0x00000009, 0x00010004, 0x00000000, -0x00000027, 0x00000003, 0x00000009, 0x00010004, 0x00000004, 0x0000002b, -0x00000005, 0x00000003, 0x00010004, 0x00000008, 0x00000023, 0x00000003, -0x0000000e, 0x00020001, 0x00000008, 0x505f6c67, 0x7469736f, 0x006e6f69, -0x74726576, 0x63007865, 0x726f6c6f, 0x78657400, 0x6f6f635f, 0x6d006472, -0x63007076, 0x74006c6f, 0x635f7865, 0x00000000, \ No newline at end of file diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_frag.h b/libraries/evas/src/modules/engines/gl_common/shader/img_frag.h deleted file mode 100644 index 0a95502..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/img_frag.h +++ /dev/null @@ -1,14 +0,0 @@ -"#ifdef GL_ES\n" -"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" -"precision highp float;\n" -"#else\n" -"precision mediump float;\n" -"#endif\n" -"#endif\n" -"uniform sampler2D tex;\n" -"varying vec4 col;\n" -"varying vec2 tex_c;\n" -"void main()\n" -"{\n" -" gl_FragColor = texture2D(tex, tex_c.xy).bgra * col;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_frag.shd b/libraries/evas/src/modules/engines/gl_common/shader/img_frag.shd deleted file mode 100644 index 9faa414..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/img_frag.shd +++ /dev/null @@ -1,14 +0,0 @@ -#ifdef GL_ES -#ifdef GL_FRAGMENT_PRECISION_HIGH -precision highp float; -#else -precision mediump float; -#endif -#endif -uniform sampler2D tex; -varying vec4 col; -varying vec2 tex_c; -void main() -{ - gl_FragColor = texture2D(tex, tex_c.xy).bgra * col; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_frag_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/img_frag_bin_s3c6410.h deleted file mode 100644 index 3518e8d..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/img_frag_bin_s3c6410.h +++ /dev/null @@ -1,9 +0,0 @@ -0x20205350, 0xffff0008, 0x00000048, 0x01020000, 0x00000003, 0x00000000, -0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000001, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000e, 0x00000000, -0x00000000, 0x0000e407, 0x307820e4, 0x00000000, 0x01000000, 0x0100e400, -0x237a10c6, 0x00000000, 0x00000000, 0x00000000, 0x1e000000, 0x00000000, -0x00000004, 0x00000003, 0x00000009, 0x00000000, 0x00000004, 0x00000008, -0x00000005, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000003, -0x0000000f, 0x00030005, 0x00000000, 0x00786574, 0x006c6f63, 0x5f786574, -0x00000063, \ No newline at end of file diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_frag_s3c6410.asm b/libraries/evas/src/modules/engines/gl_common/shader/img_frag_s3c6410.asm deleted file mode 100644 index 3716bce..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/img_frag_s3c6410.asm +++ /dev/null @@ -1,26 +0,0 @@ - -#------------------------------------------------- -# ORION - OpenGL ES 2.0 Shading Language Compiler -# SAMSUNG INDIA SOFTWARE OPERATIONS PVT. LTD. -# Compiler Version : v04.00.09 -# Release Date : 19.01.2009 -# FIMG VERSION : FIMGv1.5 -# Optimizer Options : -O --nolodcalc -#------------------------------------------------- - -# hand optimised - removed useless ops - -ps_3_0 - -fimg_version 0x01020000 - -dcl_s2_tex s0 -dcl_f4_col v1.x -dcl_f2_tex_c v0.x - -label start -label main_ -texld r0.xyzw, v0.xyzw, s0 # tex=s0 -mul_sat oColor.xyzw, r0.zyxw, v1.xyzw # gl_FragColor=oColor.xyzw, col=v1.xyzw -label main_end -ret diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_mask_frag.h b/libraries/evas/src/modules/engines/gl_common/shader/img_mask_frag.h deleted file mode 100644 index 1b28128..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/img_mask_frag.h +++ /dev/null @@ -1,15 +0,0 @@ -"#ifdef GL_ES\n" -"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" -"precision highp float;\n" -"#else\n" -"precision mediump float;\n" -"#endif\n" -"#endif\n" -"uniform sampler2D tex, texm;\n" -"varying vec4 col;\n" -"varying vec2 tex_c, tex_cm;\n" -"void main()\n" -"{\n" -" gl_FragColor = texture2D(texm, tex_cm.xy).aaaa * texture2D(tex, tex_c.xy).rgba * col;\n" -"}\n" -"\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_mask_vert.h b/libraries/evas/src/modules/engines/gl_common/shader/img_mask_vert.h deleted file mode 100644 index 7508c98..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/img_mask_vert.h +++ /dev/null @@ -1,16 +0,0 @@ -"#ifdef GL_ES\n" -"precision highp float;\n" -"#endif\n" -"attribute vec4 vertex;\n" -"attribute vec4 color;\n" -"attribute vec2 tex_coord, tex_coordm;\n" -"uniform mat4 mvp;\n" -"varying vec4 col;\n" -"varying vec2 tex_c, tex_cm;\n" -"void main()\n" -"{\n" -" gl_Position = mvp * vertex;\n" -" col = color;\n" -" tex_c = tex_coord;\n" -" tex_cm = tex_coordm;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_frag.h b/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_frag.h deleted file mode 100644 index 0343b34..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_frag.h +++ /dev/null @@ -1,13 +0,0 @@ -"#ifdef GL_ES\n" -"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" -"precision highp float;\n" -"#else\n" -"precision mediump float;\n" -"#endif\n" -"#endif\n" -"uniform sampler2D tex;\n" -"varying vec2 tex_c;\n" -"void main()\n" -"{\n" -" gl_FragColor = texture2D(tex, tex_c.xy).bgra;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_frag.shd b/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_frag.shd deleted file mode 100644 index 222d635..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_frag.shd +++ /dev/null @@ -1,13 +0,0 @@ -#ifdef GL_ES -#ifdef GL_FRAGMENT_PRECISION_HIGH -precision highp float; -#else -precision mediump float; -#endif -#endif -uniform sampler2D tex; -varying vec2 tex_c; -void main() -{ - gl_FragColor = texture2D(tex, tex_c.xy).bgra; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_frag_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_frag_bin_s3c6410.h deleted file mode 100644 index 61662c8..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_frag_bin_s3c6410.h +++ /dev/null @@ -1,10 +0,0 @@ -0x20205350, 0xffff0008, 0x00000048, 0x01020000, 0x00000003, 0x00000003, -0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000001, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000a, 0x00000000, -0x00000000, 0x02025400, 0x23782050, 0x00000000, 0x00000000, 0x0100e407, -0x307a10c6, 0x00000000, 0x00000000, 0x00000000, 0x1e000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, -0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, -0x00000004, 0x00000005, 0x00000003, 0x00000000, 0x00000000, 0x00000000, -0x00000003, 0x0000000f, 0x00030005, 0x00000000, 0x00786574, 0x5f786574, -0x00000063, \ No newline at end of file diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_vert.h b/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_vert.h deleted file mode 100644 index 13d5edd..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_vert.h +++ /dev/null @@ -1,12 +0,0 @@ -"#ifdef GL_ES\n" -"precision highp float;\n" -"#endif\n" -"attribute vec4 vertex;\n" -"attribute vec2 tex_coord;\n" -"uniform mat4 mvp;\n" -"varying vec2 tex_c;\n" -"void main()\n" -"{\n" -" gl_Position = mvp * vertex;\n" -" tex_c = tex_coord;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_vert.shd b/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_vert.shd deleted file mode 100644 index 74f3207..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_vert.shd +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef GL_ES -precision highp float; -#endif -attribute vec4 vertex; -attribute vec2 tex_coord; -uniform mat4 mvp; -varying vec2 tex_c; -void main() -{ - gl_Position = mvp * vertex; - tex_c = tex_coord; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_vert_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_vert_bin_s3c6410.h deleted file mode 100644 index 314b5f3..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/img_nomul_vert_bin_s3c6410.h +++ /dev/null @@ -1,17 +0,0 @@ -0x20205356, 0xffff0008, 0x00000048, 0x01020000, 0x00000006, 0x00000006, -0x00000000, 0x00000000, 0x00000002, 0x00000002, 0x00000001, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000027, 0x00000000, -0x00000000, 0x02020000, 0x237820e4, 0x00000000, 0x00e40100, 0x02035500, -0x2ef820e4, 0x00000000, 0x00e40100, 0x0204aa00, 0x2ef820e4, 0x00000000, -0x00e40100, 0x0205ff00, 0x2ef800e4, 0x00000000, 0x00000000, 0x00010000, -0x20980154, 0x00000000, 0x00000000, 0x00000000, 0x1e000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, -0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x0000000c, 0x00000006, 0x00000009, 0x00000000, 0x00000000, 0x00000013, -0x00000009, 0x00000003, 0x00000000, 0x00000004, 0x00000000, 0x0000000b, -0x00000009, 0x00010004, 0x00000000, 0x00000021, 0x00000005, 0x00000003, -0x00010004, 0x00000004, 0x0000001d, 0x00000003, 0x0000000e, 0x00020001, -0x00000008, 0x505f6c67, 0x7469736f, 0x006e6f69, 0x74726576, 0x74007865, -0x635f7865, 0x64726f6f, 0x70766d00, 0x78657400, 0x0000635f, diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_vert.h b/libraries/evas/src/modules/engines/gl_common/shader/img_vert.h deleted file mode 100644 index 8921d9d..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/img_vert.h +++ /dev/null @@ -1,15 +0,0 @@ -"#ifdef GL_ES\n" -"precision highp float;\n" -"#endif\n" -"attribute vec4 vertex;\n" -"attribute vec4 color;\n" -"attribute vec2 tex_coord;\n" -"uniform mat4 mvp;\n" -"varying vec4 col;\n" -"varying vec2 tex_c;\n" -"void main()\n" -"{\n" -" gl_Position = mvp * vertex;\n" -" col = color;\n" -" tex_c = tex_coord;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_vert.shd b/libraries/evas/src/modules/engines/gl_common/shader/img_vert.shd deleted file mode 100644 index 606c297..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/img_vert.shd +++ /dev/null @@ -1,15 +0,0 @@ -#ifdef GL_ES -precision highp float; -#endif -attribute vec4 vertex; -attribute vec4 color; -attribute vec2 tex_coord; -uniform mat4 mvp; -varying vec4 col; -varying vec2 tex_c; -void main() -{ - gl_Position = mvp * vertex; - col = color; - tex_c = tex_coord; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/img_vert_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/img_vert_bin_s3c6410.h deleted file mode 100644 index 1402448..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/img_vert_bin_s3c6410.h +++ /dev/null @@ -1,20 +0,0 @@ -0x20205356, 0xffff0008, 0x00000048, 0x01020000, 0x00000007, 0x00000006, -0x00000000, 0x00000000, 0x00000003, 0x00000003, 0x00000001, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000031, 0x00000000, -0x00000000, 0x02020000, 0x237820e4, 0x00000000, 0x00e40100, 0x02035500, -0x2ef820e4, 0x00000000, 0x00e40100, 0x0204aa00, 0x2ef820e4, 0x00000000, -0x00e40100, 0x0205ff00, 0x2ef800e4, 0x00000000, 0x00000000, 0x00010000, -0x20f801e4, 0x00000000, 0x00000000, 0x00020000, 0x20980254, 0x00000000, -0x00000000, 0x00000000, 0x1e000000, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000c, 0x00000006, -0x00000009, 0x00000000, 0x00000000, 0x00000013, 0x00000005, 0x00000009, -0x00000000, 0x00000004, 0x00000019, 0x00000009, 0x00000003, 0x00000000, -0x00000008, 0x00000000, 0x0000000b, 0x00000009, 0x00010004, 0x00000000, -0x00000027, 0x00000003, 0x00000009, 0x00010004, 0x00000004, 0x0000002b, -0x00000005, 0x00000003, 0x00010004, 0x00000008, 0x00000023, 0x00000003, -0x0000000e, 0x00020001, 0x00000008, 0x505f6c67, 0x7469736f, 0x006e6f69, -0x74726576, 0x63007865, 0x726f6c6f, 0x78657400, 0x6f6f635f, 0x6d006472, -0x63007076, 0x74006c6f, 0x635f7865, 0x00000000, \ No newline at end of file diff --git a/libraries/evas/src/modules/engines/gl_common/shader/make-c-bin.sh b/libraries/evas/src/modules/engines/gl_common/shader/make-c-bin.sh deleted file mode 100755 index 2902df6..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/make-c-bin.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -od --width=4 -t x4 -v $1 | \ -awk '{ if (NF > 1) printf("0x%s, ", $2); L = L + 1; if (L > 5) { L = 0; printf("\n");}}' diff --git a/libraries/evas/src/modules/engines/gl_common/shader/make-c-str.sh b/libraries/evas/src/modules/engines/gl_common/shader/make-c-str.sh deleted file mode 100755 index fe7e80a..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/make-c-str.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -awk '{printf("\"%s\\n\"\n", $0);}' $1 diff --git a/libraries/evas/src/modules/engines/gl_common/shader/nv12_frag.h b/libraries/evas/src/modules/engines/gl_common/shader/nv12_frag.h deleted file mode 100644 index fec4b23..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/nv12_frag.h +++ /dev/null @@ -1,31 +0,0 @@ -"#ifdef GL_ES\n" -"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" -"precision highp float;\n" -"#else\n" -"precision mediump float;\n" -"#endif\n" -"#endif\n" -"uniform sampler2D tex, texuv;\n" -"varying vec4 col;\n" -"varying vec2 tex_c, tex_cuv;\n" -"void main()\n" -"{\n" -" float y,u,v,vmu,r,g,b;\n" -" y=texture2D(tex,tex_c).g;\n" -" u=texture2D(texuv,tex_cuv).g;\n" -" v=texture2D(texuv,tex_cuv).a;\n" -"\n" -" u=u-0.5;\n" -" v=v-0.5;\n" -" vmu=v*0.813+u*0.391;\n" -" u=u*2.018;\n" -" v=v*1.596;\n" -" y=(y-0.062)*1.164;\n" -"\n" -" r=y+v;\n" -" g=y-vmu;\n" -" b=y+u;\n" -"\n" -" gl_FragColor=vec4(r,g,b,1.0) * col;\n" -"}\n" -"\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/nv12_frag.shd b/libraries/evas/src/modules/engines/gl_common/shader/nv12_frag.shd deleted file mode 100644 index 34748fc..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/nv12_frag.shd +++ /dev/null @@ -1,31 +0,0 @@ -#ifdef GL_ES -#ifdef GL_FRAGMENT_PRECISION_HIGH -precision highp float; -#else -precision mediump float; -#endif -#endif -uniform sampler2D tex, texuv; -varying vec4 col; -varying vec2 tex_c, tex_cuv; -void main() -{ - float y,u,v,vmu,r,g,b; - y=texture2D(tex,tex_c).g; - u=texture2D(texuv,tex_cuv).g; - v=texture2D(texuv,tex_cuv).a; - - u=u-0.5; - v=v-0.5; - vmu=v*0.813+u*0.391; - u=u*2.018; - v=v*1.596; - y=(y-0.062)*1.164; - - r=y+v; - g=y-vmu; - b=y+u; - - gl_FragColor=vec4(r,g,b,1.0) * col; -} - diff --git a/libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_frag.h b/libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_frag.h deleted file mode 100644 index df52d19..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_frag.h +++ /dev/null @@ -1,31 +0,0 @@ -"#ifdef GL_ES\n" -"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" -"precision highp float;\n" -"#else\n" -"precision mediump float;\n" -"#endif\n" -"#endif\n" -"uniform sampler2D tex, texuv;\n" -"varying vec2 tex_c, tex_cuv;\n" -"void main()\n" -"{\n" -" float y,u,v,vmu,r,g,b;\n" -" y=texture2D(tex,tex_c).g;\n" -" u=texture2D(texuv,tex_cuv).g;\n" -" v=texture2D(texuv,tex_cuv).a;\n" -"\n" -" u=u-0.5;\n" -" v=v-0.5;\n" -" vmu=v*0.813+u*0.391;\n" -" u=u*2.018;\n" -" v=v*1.596;\n" -" y=(y-0.062)*1.164;\n" -"\n" -" r=y+v;\n" -" g=y-vmu;\n" -" b=y+u;\n" -"\n" -" gl_FragColor=vec4(r,g,b,1.0);\n" -"}\n" -"\n" -"\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_frag.shd b/libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_frag.shd deleted file mode 100644 index 6910933..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_frag.shd +++ /dev/null @@ -1,31 +0,0 @@ -#ifdef GL_ES -#ifdef GL_FRAGMENT_PRECISION_HIGH -precision highp float; -#else -precision mediump float; -#endif -#endif -uniform sampler2D tex, texuv; -varying vec2 tex_c, tex_cuv; -void main() -{ - float y,u,v,vmu,r,g,b; - y=texture2D(tex,tex_c).g; - u=texture2D(texuv,tex_cuv).g; - v=texture2D(texuv,tex_cuv).a; - - u=u-0.5; - v=v-0.5; - vmu=v*0.813+u*0.391; - u=u*2.018; - v=v*1.596; - y=(y-0.062)*1.164; - - r=y+v; - g=y-vmu; - b=y+u; - - gl_FragColor=vec4(r,g,b,1.0); -} - - diff --git a/libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_vert.h b/libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_vert.h deleted file mode 100644 index 6ff1040..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_vert.h +++ /dev/null @@ -1,14 +0,0 @@ -"#ifdef GL_ES\n" -"precision highp float;\n" -"#endif\n" -"attribute vec4 vertex;\n" -"attribute vec4 color;\n" -"attribute vec2 tex_coord, tex_coord2;\n" -"uniform mat4 mvp;\n" -"varying vec2 tex_c, tex_cuv;\n" -"void main()\n" -"{\n" -" gl_Position = mvp * vertex;\n" -" tex_c = tex_coord;\n" -" tex_cuv = tex_coord2 * 0.25;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_vert.shd b/libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_vert.shd deleted file mode 100644 index 994f5e6..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/nv12_nomul_vert.shd +++ /dev/null @@ -1,14 +0,0 @@ -#ifdef GL_ES -precision highp float; -#endif -attribute vec4 vertex; -attribute vec4 color; -attribute vec2 tex_coord, tex_coord2; -uniform mat4 mvp; -varying vec2 tex_c, tex_cuv; -void main() -{ - gl_Position = mvp * vertex; - tex_c = tex_coord; - tex_cuv = tex_coord2 * 0.25; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/nv12_vert.h b/libraries/evas/src/modules/engines/gl_common/shader/nv12_vert.h deleted file mode 100644 index 38d6d9e..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/nv12_vert.h +++ /dev/null @@ -1,16 +0,0 @@ -"#ifdef GL_ES\n" -"precision highp float;\n" -"#endif\n" -"attribute vec4 vertex;\n" -"attribute vec4 color;\n" -"attribute vec2 tex_coord, tex_coord2;\n" -"uniform mat4 mvp;\n" -"varying vec4 col;\n" -"varying vec2 tex_c, tex_cuv;\n" -"void main()\n" -"{\n" -" gl_Position = mvp * vertex;\n" -" col = color;\n" -" tex_c = tex_coord;\n" -" tex_cuv = tex_coord2 * 0.25;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/nv12_vert.shd b/libraries/evas/src/modules/engines/gl_common/shader/nv12_vert.shd deleted file mode 100644 index eb7cc36..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/nv12_vert.shd +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef GL_ES -precision highp float; -#endif -attribute vec4 vertex; -attribute vec4 color; -attribute vec2 tex_coord, tex_coord2; -uniform mat4 mvp; -varying vec4 col; -varying vec2 tex_c, tex_cuv; -void main() -{ - gl_Position = mvp * vertex; - col = color; - tex_c = tex_coord; - tex_cuv = tex_coord2 * 0.25; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/rect_frag.h b/libraries/evas/src/modules/engines/gl_common/shader/rect_frag.h deleted file mode 100644 index 4a102a4..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/rect_frag.h +++ /dev/null @@ -1,13 +0,0 @@ -"#ifdef GL_ES\n" -"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" -"precision highp float;\n" -"#else\n" -"precision mediump float;\n" -"#endif\n" -"#endif\n" -"uniform sampler2D tex;\n" -"varying vec4 col;\n" -"void main()\n" -"{\n" -" gl_FragColor = col;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/rect_frag.shd b/libraries/evas/src/modules/engines/gl_common/shader/rect_frag.shd deleted file mode 100644 index 02251ee..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/rect_frag.shd +++ /dev/null @@ -1,13 +0,0 @@ -#ifdef GL_ES -#ifdef GL_FRAGMENT_PRECISION_HIGH -precision highp float; -#else -precision mediump float; -#endif -#endif -uniform sampler2D tex; -varying vec4 col; -void main() -{ - gl_FragColor = col; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/rect_frag_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/rect_frag_bin_s3c6410.h deleted file mode 100644 index ee94467..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/rect_frag_bin_s3c6410.h +++ /dev/null @@ -1,6 +0,0 @@ -0x20205350, 0xffff0008, 0x00000048, 0x01020000, 0x00000002, 0x00000000, -0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000004, 0x00000000, -0x00000000, 0x00000000, 0x20fa10e4, 0x00000000, 0x00000000, 0x00000000, -0x1e000000, 0x00000000, 0x00000000, 0x00000003, 0x00000009, 0x00000000, -0x00000000, 0x006c6f63, \ No newline at end of file diff --git a/libraries/evas/src/modules/engines/gl_common/shader/rect_frag_s3c6410.asm b/libraries/evas/src/modules/engines/gl_common/shader/rect_frag_s3c6410.asm deleted file mode 100644 index 24c47ac..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/rect_frag_s3c6410.asm +++ /dev/null @@ -1,24 +0,0 @@ - -#------------------------------------------------- -# ORION - OpenGL ES 2.0 Shading Language Compiler -# SAMSUNG INDIA SOFTWARE OPERATIONS PVT. LTD. -# Compiler Version : v04.00.09 -# Release Date : 19.01.2009 -# FIMG VERSION : FIMGv1.5 -# Optimizer Options : -O --nolodcalc -#------------------------------------------------- - -# hand optimised - removed useless ops - -ps_3_0 - -fimg_version 0x01020000 - -dcl_f4_col v0.x - -label start -label main_ -label main_end -mov_sat oColor.xyzw, v0.xyzw -ret - diff --git a/libraries/evas/src/modules/engines/gl_common/shader/rect_vert.h b/libraries/evas/src/modules/engines/gl_common/shader/rect_vert.h deleted file mode 100644 index 51d41aa..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/rect_vert.h +++ /dev/null @@ -1,12 +0,0 @@ -"#ifdef GL_ES\n" -"precision highp float;\n" -"#endif\n" -"attribute vec4 vertex;\n" -"attribute vec4 color;\n" -"uniform mat4 mvp;\n" -"varying vec4 col;\n" -"void main()\n" -"{\n" -" gl_Position = mvp * vertex;\n" -" col = color;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/rect_vert.shd b/libraries/evas/src/modules/engines/gl_common/shader/rect_vert.shd deleted file mode 100644 index 63fea5d..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/rect_vert.shd +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef GL_ES -precision highp float; -#endif -attribute vec4 vertex; -attribute vec4 color; -uniform mat4 mvp; -varying vec4 col; -void main() -{ - gl_Position = mvp * vertex; - col = color; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/rect_vert_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/rect_vert_bin_s3c6410.h deleted file mode 100644 index 3130684..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/rect_vert_bin_s3c6410.h +++ /dev/null @@ -1,17 +0,0 @@ -0x20205356, 0xffff0008, 0x00000048, 0x01020000, 0x00000006, 0x00000006, -0x00000000, 0x00000000, 0x00000002, 0x00000002, 0x00000001, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000021, 0x00000000, -0x00000000, 0x02020000, 0x237820e4, 0x00000000, 0x00e40100, 0x02035500, -0x2ef820e4, 0x00000000, 0x00e40100, 0x0204aa00, 0x2ef820e4, 0x00000000, -0x00e40100, 0x0205ff00, 0x2ef800e4, 0x00000000, 0x00000000, 0x00010000, -0x20f801e4, 0x00000000, 0x00000000, 0x00000000, 0x1e000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, -0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x0000000c, 0x00000006, 0x00000009, 0x00000000, 0x00000000, 0x00000013, -0x00000005, 0x00000009, 0x00000000, 0x00000004, 0x00000000, 0x0000000b, -0x00000009, 0x00010004, 0x00000000, 0x0000001d, 0x00000003, 0x00000009, -0x00010004, 0x00000004, 0x00000019, 0x00000003, 0x0000000e, 0x00020001, -0x00000008, 0x505f6c67, 0x7469736f, 0x006e6f69, 0x74726576, 0x63007865, -0x726f6c6f, 0x70766d00, 0x6c6f6300, 0x00000000, \ No newline at end of file diff --git a/libraries/evas/src/modules/engines/gl_common/shader/tex_frag.h b/libraries/evas/src/modules/engines/gl_common/shader/tex_frag.h deleted file mode 100644 index 1ced5e0..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/tex_frag.h +++ /dev/null @@ -1,14 +0,0 @@ -"#ifdef GL_ES\n" -"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" -"precision highp float;\n" -"#else\n" -"precision mediump float;\n" -"#endif\n" -"#endif\n" -"uniform sampler2D tex;\n" -"varying vec4 col;\n" -"varying vec2 tex_c;\n" -"void main()\n" -"{\n" -" gl_FragColor = texture2D(tex, tex_c.xy) * col;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/tex_frag.shd b/libraries/evas/src/modules/engines/gl_common/shader/tex_frag.shd deleted file mode 100644 index 2bc8d79..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/tex_frag.shd +++ /dev/null @@ -1,14 +0,0 @@ -#ifdef GL_ES -#ifdef GL_FRAGMENT_PRECISION_HIGH -precision highp float; -#else -precision mediump float; -#endif -#endif -uniform sampler2D tex; -varying vec4 col; -varying vec2 tex_c; -void main() -{ - gl_FragColor = texture2D(tex, tex_c.xy) * col; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/tex_frag_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/tex_frag_bin_s3c6410.h deleted file mode 100644 index 24af537..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/tex_frag_bin_s3c6410.h +++ /dev/null @@ -1,9 +0,0 @@ -0x20205350, 0xffff0008, 0x00000048, 0x01020000, 0x00000003, 0x00000000, -0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000001, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000e, 0x00000000, -0x00000000, 0x0000e407, 0x307820e4, 0x00000000, 0x01000000, 0x0100e400, -0x237a10e4, 0x00000000, 0x00000000, 0x00000000, 0x1e000000, 0x00000000, -0x00000004, 0x00000003, 0x00000009, 0x00000000, 0x00000004, 0x00000008, -0x00000005, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000003, -0x0000000f, 0x00030005, 0x00000000, 0x00786574, 0x006c6f63, 0x5f786574, -0x00000063, \ No newline at end of file diff --git a/libraries/evas/src/modules/engines/gl_common/shader/tex_frag_s3c6410.asm b/libraries/evas/src/modules/engines/gl_common/shader/tex_frag_s3c6410.asm deleted file mode 100644 index 14bbfa1..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/tex_frag_s3c6410.asm +++ /dev/null @@ -1,26 +0,0 @@ - -#------------------------------------------------- -# ORION - OpenGL ES 2.0 Shading Language Compiler -# SAMSUNG INDIA SOFTWARE OPERATIONS PVT. LTD. -# Compiler Version : v04.00.09 -# Release Date : 19.01.2009 -# FIMG VERSION : FIMGv1.5 -# Optimizer Options : -O --nolodcalc -#------------------------------------------------- - -# hand optimised - removed useless ops - -ps_3_0 - -fimg_version 0x01020000 - -dcl_s2_tex s0 -dcl_f4_col v1.x -dcl_f2_tex_c v0.x - -label start -label main_ -texld r0.xyzw, v0.xyzw, s0 # tex=s0 -mul_sat oColor.xyzw, r0.xyzw, v1.xyzw # gl_FragColor=oColor.xyzw, col=v1.xyzw -label main_end -ret diff --git a/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_frag.h b/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_frag.h deleted file mode 100644 index 459611f..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_frag.h +++ /dev/null @@ -1,13 +0,0 @@ -"#ifdef GL_ES\n" -"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" -"precision highp float;\n" -"#else\n" -"precision mediump float;\n" -"#endif\n" -"#endif\n" -"uniform sampler2D tex;\n" -"varying vec2 tex_c;\n" -"void main()\n" -"{\n" -" gl_FragColor = texture2D(tex, tex_c.xy);\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_frag.shd b/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_frag.shd deleted file mode 100644 index 877df62..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_frag.shd +++ /dev/null @@ -1,13 +0,0 @@ -#ifdef GL_ES -#ifdef GL_FRAGMENT_PRECISION_HIGH -precision highp float; -#else -precision mediump float; -#endif -#endif -uniform sampler2D tex; -varying vec2 tex_c; -void main() -{ - gl_FragColor = texture2D(tex, tex_c.xy); -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_frag_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_frag_bin_s3c6410.h deleted file mode 100644 index b89eeb1..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_frag_bin_s3c6410.h +++ /dev/null @@ -1,10 +0,0 @@ -0x20205350, 0xffff0008, 0x00000048, 0x01020000, 0x00000003, 0x00000003, -0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000001, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000a, 0x00000000, -0x00000000, 0x02025400, 0x23782050, 0x00000000, 0x00000000, 0x0100e407, -0x307a10e4, 0x00000000, 0x00000000, 0x00000000, 0x1e000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, -0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, -0x00000004, 0x00000005, 0x00000003, 0x00000000, 0x00000000, 0x00000000, -0x00000003, 0x0000000f, 0x00030005, 0x00000000, 0x00786574, 0x5f786574, -0x00000063, \ No newline at end of file diff --git a/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_vert.h b/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_vert.h deleted file mode 100644 index 13d5edd..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_vert.h +++ /dev/null @@ -1,12 +0,0 @@ -"#ifdef GL_ES\n" -"precision highp float;\n" -"#endif\n" -"attribute vec4 vertex;\n" -"attribute vec2 tex_coord;\n" -"uniform mat4 mvp;\n" -"varying vec2 tex_c;\n" -"void main()\n" -"{\n" -" gl_Position = mvp * vertex;\n" -" tex_c = tex_coord;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_vert.shd b/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_vert.shd deleted file mode 100644 index 74f3207..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_vert.shd +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef GL_ES -precision highp float; -#endif -attribute vec4 vertex; -attribute vec2 tex_coord; -uniform mat4 mvp; -varying vec2 tex_c; -void main() -{ - gl_Position = mvp * vertex; - tex_c = tex_coord; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_vert_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_vert_bin_s3c6410.h deleted file mode 100644 index 314b5f3..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/tex_nomul_vert_bin_s3c6410.h +++ /dev/null @@ -1,17 +0,0 @@ -0x20205356, 0xffff0008, 0x00000048, 0x01020000, 0x00000006, 0x00000006, -0x00000000, 0x00000000, 0x00000002, 0x00000002, 0x00000001, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000027, 0x00000000, -0x00000000, 0x02020000, 0x237820e4, 0x00000000, 0x00e40100, 0x02035500, -0x2ef820e4, 0x00000000, 0x00e40100, 0x0204aa00, 0x2ef820e4, 0x00000000, -0x00e40100, 0x0205ff00, 0x2ef800e4, 0x00000000, 0x00000000, 0x00010000, -0x20980154, 0x00000000, 0x00000000, 0x00000000, 0x1e000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, -0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x0000000c, 0x00000006, 0x00000009, 0x00000000, 0x00000000, 0x00000013, -0x00000009, 0x00000003, 0x00000000, 0x00000004, 0x00000000, 0x0000000b, -0x00000009, 0x00010004, 0x00000000, 0x00000021, 0x00000005, 0x00000003, -0x00010004, 0x00000004, 0x0000001d, 0x00000003, 0x0000000e, 0x00020001, -0x00000008, 0x505f6c67, 0x7469736f, 0x006e6f69, 0x74726576, 0x74007865, -0x635f7865, 0x64726f6f, 0x70766d00, 0x78657400, 0x0000635f, diff --git a/libraries/evas/src/modules/engines/gl_common/shader/tex_vert.h b/libraries/evas/src/modules/engines/gl_common/shader/tex_vert.h deleted file mode 100644 index 8921d9d..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/tex_vert.h +++ /dev/null @@ -1,15 +0,0 @@ -"#ifdef GL_ES\n" -"precision highp float;\n" -"#endif\n" -"attribute vec4 vertex;\n" -"attribute vec4 color;\n" -"attribute vec2 tex_coord;\n" -"uniform mat4 mvp;\n" -"varying vec4 col;\n" -"varying vec2 tex_c;\n" -"void main()\n" -"{\n" -" gl_Position = mvp * vertex;\n" -" col = color;\n" -" tex_c = tex_coord;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/tex_vert.shd b/libraries/evas/src/modules/engines/gl_common/shader/tex_vert.shd deleted file mode 100644 index 606c297..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/tex_vert.shd +++ /dev/null @@ -1,15 +0,0 @@ -#ifdef GL_ES -precision highp float; -#endif -attribute vec4 vertex; -attribute vec4 color; -attribute vec2 tex_coord; -uniform mat4 mvp; -varying vec4 col; -varying vec2 tex_c; -void main() -{ - gl_Position = mvp * vertex; - col = color; - tex_c = tex_coord; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/tex_vert_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/tex_vert_bin_s3c6410.h deleted file mode 100644 index 1402448..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/tex_vert_bin_s3c6410.h +++ /dev/null @@ -1,20 +0,0 @@ -0x20205356, 0xffff0008, 0x00000048, 0x01020000, 0x00000007, 0x00000006, -0x00000000, 0x00000000, 0x00000003, 0x00000003, 0x00000001, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000031, 0x00000000, -0x00000000, 0x02020000, 0x237820e4, 0x00000000, 0x00e40100, 0x02035500, -0x2ef820e4, 0x00000000, 0x00e40100, 0x0204aa00, 0x2ef820e4, 0x00000000, -0x00e40100, 0x0205ff00, 0x2ef800e4, 0x00000000, 0x00000000, 0x00010000, -0x20f801e4, 0x00000000, 0x00000000, 0x00020000, 0x20980254, 0x00000000, -0x00000000, 0x00000000, 0x1e000000, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000c, 0x00000006, -0x00000009, 0x00000000, 0x00000000, 0x00000013, 0x00000005, 0x00000009, -0x00000000, 0x00000004, 0x00000019, 0x00000009, 0x00000003, 0x00000000, -0x00000008, 0x00000000, 0x0000000b, 0x00000009, 0x00010004, 0x00000000, -0x00000027, 0x00000003, 0x00000009, 0x00010004, 0x00000004, 0x0000002b, -0x00000005, 0x00000003, 0x00010004, 0x00000008, 0x00000023, 0x00000003, -0x0000000e, 0x00020001, 0x00000008, 0x505f6c67, 0x7469736f, 0x006e6f69, -0x74726576, 0x63007865, 0x726f6c6f, 0x78657400, 0x6f6f635f, 0x6d006472, -0x63007076, 0x74006c6f, 0x635f7865, 0x00000000, \ No newline at end of file diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuv_frag.h b/libraries/evas/src/modules/engines/gl_common/shader/yuv_frag.h deleted file mode 100644 index 87f4095..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/yuv_frag.h +++ /dev/null @@ -1,24 +0,0 @@ -"#ifdef GL_ES\n" -"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" -"precision highp float;\n" -"#else\n" -"precision mediump float;\n" -"#endif\n" -"#endif\n" -"uniform sampler2D tex, texu, texv;\n" -"varying vec4 col;\n" -"varying vec2 tex_c, tex_c2, tex_c3;\n" -"void main()\n" -"{\n" -" float r, g, b, y, u, v;\n" -" y = texture2D(tex, tex_c.xy).r;\n" -" u = texture2D(texu, tex_c2.xy).r;\n" -" v = texture2D(texv, tex_c3.xy).r;\n" -" y = (y - 0.0625) * 1.164;\n" -" u = u - 0.5;\n" -" v = v - 0.5;\n" -" r = y + (1.402 * v);\n" -" g = y - (0.34414 * u) - (0.71414 * v);\n" -" b = y + (1.772 * u);\n" -" gl_FragColor = vec4(r, g, b, 1.0) * col;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuv_frag.shd b/libraries/evas/src/modules/engines/gl_common/shader/yuv_frag.shd deleted file mode 100644 index 367fb55..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/yuv_frag.shd +++ /dev/null @@ -1,24 +0,0 @@ -#ifdef GL_ES -#ifdef GL_FRAGMENT_PRECISION_HIGH -precision highp float; -#else -precision mediump float; -#endif -#endif -uniform sampler2D tex, texu, texv; -varying vec4 col; -varying vec2 tex_c, tex_c2, tex_c3; -void main() -{ - float r, g, b, y, u, v; - y = texture2D(tex, tex_c.xy).r; - u = texture2D(texu, tex_c2.xy).r; - v = texture2D(texv, tex_c3.xy).r; - y = (y - 0.0625) * 1.164; - u = u - 0.5; - v = v - 0.5; - r = y + (1.402 * v); - g = y - (0.34414 * u) - (0.71414 * v); - b = y + (1.772 * u); - gl_FragColor = vec4(r, g, b, 1.0) * col; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuv_frag_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/yuv_frag_bin_s3c6410.h deleted file mode 100644 index cd301dc..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/yuv_frag_bin_s3c6410.h +++ /dev/null @@ -1,24 +0,0 @@ -0x20205350, 0xffff0008, 0x00000048, 0x01020000, 0x0000000d, 0x00000007, -0x00000000, 0x00000000, 0x00000004, 0x00000000, 0x00000000, 0x00000003, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000026, 0x00000000, -0x00000000, 0x02065400, 0x23782050, 0x00000000, 0x00000000, 0x0100e407, -0x307820e4, 0x00000000, 0x01000000, 0x02065400, 0x23782150, 0x00000000, -0x01000000, 0x0101e407, 0x307821e4, 0x00000000, 0x02000000, 0x02065400, -0x23782250, 0x00000000, 0x02000000, 0x0102e407, 0x307822e4, 0x00000000, -0x00000000, 0x02020001, 0x237823e4, 0x00000000, 0x01e40103, 0x02030001, -0x2ef823e4, 0x00000000, 0x02e40103, 0x02040001, 0x2ef823e4, 0x00000000, -0x00000000, 0x02050000, 0x20f824e4, 0x00000000, 0x06e40103, 0x01040002, -0x2ef823e4, 0x00000000, 0x03000000, 0x0103e400, 0x237a10e4, 0x00000000, -0x00000000, 0x00000000, 0x1e000000, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x3f94fdf4, 0x3f94fdf4, 0x3f94fdf4, 0x00000000, 0x00000000, 0xbeb02de0, -0x3fe2d0e5, 0x00000000, 0x3fb374bc, 0xbf36cf42, 0x00000000, 0x00000000, -0xbf4617c2, 0x3ee9a027, 0xbf7573eb, 0x3f800000, 0x3f800000, 0x00000000, -0x00000000, 0x00000000, 0x0000000e, 0x00000003, 0x00000009, 0x00000000, -0x0000000c, 0x00000012, 0x00000005, 0x00000003, 0x00000000, 0x00000000, -0x00000018, 0x00000006, 0x00000003, 0x00000000, 0x00000004, 0x0000001f, -0x00000006, 0x00000003, 0x00000000, 0x00000008, 0x00000000, 0x00000003, -0x0000000f, 0x00030005, 0x00000000, 0x00000004, 0x00000004, 0x0000000f, -0x00030005, 0x00000004, 0x00000009, 0x00000004, 0x0000000f, 0x00030005, -0x00000008, 0x00786574, 0x75786574, 0x78657400, 0x6f630076, 0x6574006c, -0x00635f78, 0x5f786574, 0x74003263, 0x635f7865, 0x00000033, diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuv_frag_s3c6410.asm b/libraries/evas/src/modules/engines/gl_common/shader/yuv_frag_s3c6410.asm deleted file mode 100644 index 9a10bf0..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/yuv_frag_s3c6410.asm +++ /dev/null @@ -1,46 +0,0 @@ - -#------------------------------------------------- -# ORION - OpenGL ES 2.0 Shading Language Compiler -# SAMSUNG INDIA SOFTWARE OPERATIONS PVT. LTD. -# Compiler Version : v04.00.09 -# Release Date : 19.01.2009 -# FIMG VERSION : FIMGv1.5 -# Optimizer Options : -O --nolodcalc -#------------------------------------------------- - -# hand optimised - removed useless ops - -ps_3_0 - -fimg_version 0x01020000 - -dcl_s2_tex s0 -dcl_s2_texu s1 -dcl_s2_texv s2 -dcl_f4_col v3.x -dcl_f2_tex_c v0.x -dcl_f2_tex_c2 v1.x -dcl_f2_tex_c3 v2.x - -def c2, 1.164000, 1.164000, 1.164000, 0.000000 -def c3, 0.000000, -0.344100, 1.772000, 0.000000 -def c4, 1.402000, -0.714100, 0.000000, 0.000000 -def c5, -0.773800, 0.456300, -0.958800, 1.000000 -def c6, 1.000000, 0.000000, 0.000000, 0.000000 - -label start -label main_ -mul r0.xyzw, c6.xxyy, v0.xyyy # tex_c=v0.xyyy -texld r0.xyzw, r0.xyzw, s0 # tex=s0 -mul r1.xyzw, c6.xxyy, v1.xyyy # tex_c2=v1.xyyy -texld r1.xyzw, r1.xyzw, s1 # texu=s1 -mul r2.xyzw, c6.xxyy, v2.xyyy # tex_c3=v2.xyyy -texld r2.xyzw, r2.xyzw, s2 # texv=s2 -mul r3.xyzw, c2.xyzw, r0.xxxx # yuv=r0.xxxx -mad r3.xyzw, c3.xyzw, r1.xxxx, r3.xyzw # yuv=r1.xxxx -mad r3.xyzw, c4.xyzw, r2.xxxx, r3.xyzw # yuv=r2.xxxx -mov r4.xyzw, c5.xyzw -mad r3.xyzw, r4.xyzw, c6.xxxx, r3.xyzw # yuv=c6.xxxx -mul_sat oColor.xyzw, r3.xyzw, v3.xyzw # gl_FragColor=oColor.xyzw, col=v3.xyzw -label main_end -ret diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_frag.h b/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_frag.h deleted file mode 100644 index 0df4b97..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_frag.h +++ /dev/null @@ -1,23 +0,0 @@ -"#ifdef GL_ES\n" -"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" -"precision highp float;\n" -"#else\n" -"precision mediump float;\n" -"#endif\n" -"#endif\n" -"uniform sampler2D tex, texu, texv;\n" -"varying vec2 tex_c, tex_c2, tex_c3;\n" -"void main()\n" -"{\n" -" float r, g, b, y, u, v;\n" -" y = texture2D(tex, tex_c.xy).r;\n" -" u = texture2D(texu, tex_c2.xy).r;\n" -" v = texture2D(texv, tex_c3.xy).r;\n" -" y = (y - 0.0625) * 1.164;\n" -" u = u - 0.5;\n" -" v = v - 0.5;\n" -" r = y + (1.402 * v);\n" -" g = y - (0.34414 * u) - (0.71414 * v);\n" -" b = y + (1.772 * u);\n" -" gl_FragColor = vec4(r, g, b, 1.0);\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_frag.shd b/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_frag.shd deleted file mode 100644 index ce24622..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_frag.shd +++ /dev/null @@ -1,23 +0,0 @@ -#ifdef GL_ES -#ifdef GL_FRAGMENT_PRECISION_HIGH -precision highp float; -#else -precision mediump float; -#endif -#endif -uniform sampler2D tex, texu, texv; -varying vec2 tex_c, tex_c2, tex_c3; -void main() -{ - float r, g, b, y, u, v; - y = texture2D(tex, tex_c.xy).r; - u = texture2D(texu, tex_c2.xy).r; - v = texture2D(texv, tex_c3.xy).r; - y = (y - 0.0625) * 1.164; - u = u - 0.5; - v = v - 0.5; - r = y + (1.402 * v); - g = y - (0.34414 * u) - (0.71414 * v); - b = y + (1.772 * u); - gl_FragColor = vec4(r, g, b, 1.0); -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_frag_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_frag_bin_s3c6410.h deleted file mode 100644 index 45aa66d..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_frag_bin_s3c6410.h +++ /dev/null @@ -1,23 +0,0 @@ -0x20205350, 0xffff0008, 0x00000048, 0x01020000, 0x0000000c, 0x00000007, -0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000000, 0x00000003, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000022, 0x00000000, -0x00000000, 0x02065400, 0x23782050, 0x00000000, 0x00000000, 0x0100e407, -0x307820e4, 0x00000000, 0x01000000, 0x02065400, 0x23782150, 0x00000000, -0x01000000, 0x0101e407, 0x307821e4, 0x00000000, 0x02000000, 0x02065400, -0x23782250, 0x00000000, 0x02000000, 0x0102e407, 0x307822e4, 0x00000000, -0x00000000, 0x02020001, 0x237823e4, 0x00000000, 0x01e40103, 0x02030001, -0x2ef823e4, 0x00000000, 0x02e40103, 0x02040001, 0x2ef823e4, 0x00000000, -0x00000000, 0x02050000, 0x20f824e4, 0x00000000, 0x06e40103, 0x01040002, -0x2efa10e4, 0x00000000, 0x00000000, 0x00000000, 0x1e000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, -0x3f800000, 0x3f800000, 0x3f94fdf4, 0x3f94fdf4, 0x3f94fdf4, 0x00000000, -0x00000000, 0xbeb02de0, 0x3fe2d0e5, 0x00000000, 0x3fb374bc, 0xbf36cf42, -0x00000000, 0x00000000, 0xbf4617c2, 0x3ee9a027, 0xbf7573eb, 0x3f800000, -0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x0000000e, 0x00000005, -0x00000003, 0x00000000, 0x00000000, 0x00000014, 0x00000006, 0x00000003, -0x00000000, 0x00000004, 0x0000001b, 0x00000006, 0x00000003, 0x00000000, -0x00000008, 0x00000000, 0x00000003, 0x0000000f, 0x00030005, 0x00000000, -0x00000004, 0x00000004, 0x0000000f, 0x00030005, 0x00000004, 0x00000009, -0x00000004, 0x0000000f, 0x00030005, 0x00000008, 0x00786574, 0x75786574, -0x78657400, 0x65740076, 0x00635f78, 0x5f786574, 0x74003263, 0x635f7865, -0x00000033, \ No newline at end of file diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_vert.h b/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_vert.h deleted file mode 100644 index c3f585f..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_vert.h +++ /dev/null @@ -1,14 +0,0 @@ -"#ifdef GL_ES\n" -"precision highp float;\n" -"#endif\n" -"attribute vec4 vertex;\n" -"attribute vec2 tex_coord, tex_coord2, tex_coord3;\n" -"uniform mat4 mvp;\n" -"varying vec2 tex_c, tex_c2, tex_c3;\n" -"void main()\n" -"{\n" -" gl_Position = mvp * vertex;\n" -" tex_c = tex_coord;\n" -" tex_c2 = tex_coord2;\n" -" tex_c3 = tex_coord3;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_vert.shd b/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_vert.shd deleted file mode 100644 index a83d505..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_vert.shd +++ /dev/null @@ -1,14 +0,0 @@ -#ifdef GL_ES -precision highp float; -#endif -attribute vec4 vertex; -attribute vec2 tex_coord, tex_coord2, tex_coord3; -uniform mat4 mvp; -varying vec2 tex_c, tex_c2, tex_c3; -void main() -{ - gl_Position = mvp * vertex; - tex_c = tex_coord; - tex_c2 = tex_coord2; - tex_c3 = tex_coord3; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_vert_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_vert_bin_s3c6410.h deleted file mode 100644 index 5942b4b..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/yuv_nomul_vert_bin_s3c6410.h +++ /dev/null @@ -1,23 +0,0 @@ -0x20205356, 0xffff0008, 0x00000048, 0x01020000, 0x00000008, 0x00000006, -0x00000000, 0x00000000, 0x00000004, 0x00000004, 0x00000001, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000004b, 0x00000000, -0x00000000, 0x02020000, 0x237820e4, 0x00000000, 0x00e40100, 0x02035500, -0x2ef820e4, 0x00000000, 0x00e40100, 0x0204aa00, 0x2ef820e4, 0x00000000, -0x00e40100, 0x0205ff00, 0x2ef800e4, 0x00000000, 0x00000000, 0x00010000, -0x20980154, 0x00000000, 0x00000000, 0x00020000, 0x20980254, 0x00000000, -0x00000000, 0x00030000, 0x20980354, 0x00000000, 0x00000000, 0x00000000, -0x1e000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x0000000c, 0x00000006, 0x00000009, 0x00000000, -0x00000000, 0x00000013, 0x00000009, 0x00000003, 0x00000000, 0x00000004, -0x0000001d, 0x0000000a, 0x00000003, 0x00000000, 0x00000008, 0x00000028, -0x0000000a, 0x00000003, 0x00000000, 0x0000000c, 0x00000000, 0x0000000b, -0x00000009, 0x00010004, 0x00000000, 0x00000037, 0x00000005, 0x00000003, -0x00010004, 0x00000004, 0x0000003d, 0x00000006, 0x00000003, 0x00010004, -0x00000008, 0x00000044, 0x00000006, 0x00000003, 0x00010004, 0x0000000c, -0x00000033, 0x00000003, 0x0000000e, 0x00020001, 0x00000008, 0x505f6c67, -0x7469736f, 0x006e6f69, 0x74726576, 0x74007865, 0x635f7865, 0x64726f6f, -0x78657400, 0x6f6f635f, 0x00326472, 0x5f786574, 0x726f6f63, 0x6d003364, -0x74007076, 0x635f7865, 0x78657400, 0x0032635f, 0x5f786574, 0x00003363, diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuv_vert.h b/libraries/evas/src/modules/engines/gl_common/shader/yuv_vert.h deleted file mode 100644 index 6ccf06d..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/yuv_vert.h +++ /dev/null @@ -1,17 +0,0 @@ -"#ifdef GL_ES\n" -"precision highp float;\n" -"#endif\n" -"attribute vec4 vertex;\n" -"attribute vec4 color;\n" -"attribute vec2 tex_coord, tex_coord2, tex_coord3;\n" -"uniform mat4 mvp;\n" -"varying vec4 col;\n" -"varying vec2 tex_c, tex_c2, tex_c3;\n" -"void main()\n" -"{\n" -" gl_Position = mvp * vertex;\n" -" col = color;\n" -" tex_c = tex_coord;\n" -" tex_c2 = tex_coord2;\n" -" tex_c3 = tex_coord3;\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuv_vert.shd b/libraries/evas/src/modules/engines/gl_common/shader/yuv_vert.shd deleted file mode 100644 index 0ea0b2f..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/yuv_vert.shd +++ /dev/null @@ -1,17 +0,0 @@ -#ifdef GL_ES -precision highp float; -#endif -attribute vec4 vertex; -attribute vec4 color; -attribute vec2 tex_coord, tex_coord2, tex_coord3; -uniform mat4 mvp; -varying vec4 col; -varying vec2 tex_c, tex_c2, tex_c3; -void main() -{ - gl_Position = mvp * vertex; - col = color; - tex_c = tex_coord; - tex_c2 = tex_coord2; - tex_c3 = tex_coord3; -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuv_vert_bin_s3c6410.h b/libraries/evas/src/modules/engines/gl_common/shader/yuv_vert_bin_s3c6410.h deleted file mode 100644 index e757b6d..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/yuv_vert_bin_s3c6410.h +++ /dev/null @@ -1,26 +0,0 @@ -0x20205356, 0xffff0008, 0x00000048, 0x01020000, 0x00000009, 0x00000006, -0x00000000, 0x00000000, 0x00000005, 0x00000005, 0x00000001, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000055, 0x00000000, -0x00000000, 0x02020000, 0x237820e4, 0x00000000, 0x00e40100, 0x02035500, -0x2ef820e4, 0x00000000, 0x00e40100, 0x0204aa00, 0x2ef820e4, 0x00000000, -0x00e40100, 0x0205ff00, 0x2ef800e4, 0x00000000, 0x00000000, 0x00010000, -0x20f801e4, 0x00000000, 0x00000000, 0x00020000, 0x20980254, 0x00000000, -0x00000000, 0x00030000, 0x20980354, 0x00000000, 0x00000000, 0x00040000, -0x20980454, 0x00000000, 0x00000000, 0x00000000, 0x1e000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, -0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x0000000c, 0x00000006, 0x00000009, 0x00000000, 0x00000000, 0x00000013, -0x00000005, 0x00000009, 0x00000000, 0x00000004, 0x00000019, 0x00000009, -0x00000003, 0x00000000, 0x00000008, 0x00000023, 0x0000000a, 0x00000003, -0x00000000, 0x0000000c, 0x0000002e, 0x0000000a, 0x00000003, 0x00000000, -0x00000010, 0x00000000, 0x0000000b, 0x00000009, 0x00010004, 0x00000000, -0x0000003d, 0x00000003, 0x00000009, 0x00010004, 0x00000004, 0x00000041, -0x00000005, 0x00000003, 0x00010004, 0x00000008, 0x00000047, 0x00000006, -0x00000003, 0x00010004, 0x0000000c, 0x0000004e, 0x00000006, 0x00000003, -0x00010004, 0x00000010, 0x00000039, 0x00000003, 0x0000000e, 0x00020001, -0x00000008, 0x505f6c67, 0x7469736f, 0x006e6f69, 0x74726576, 0x63007865, -0x726f6c6f, 0x78657400, 0x6f6f635f, 0x74006472, 0x635f7865, 0x64726f6f, -0x65740032, 0x6f635f78, 0x3364726f, 0x70766d00, 0x6c6f6300, 0x78657400, -0x7400635f, 0x635f7865, 0x65740032, 0x33635f78, 0x00000000, diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuy2_frag.h b/libraries/evas/src/modules/engines/gl_common/shader/yuy2_frag.h deleted file mode 100644 index abe4b03..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/yuy2_frag.h +++ /dev/null @@ -1,30 +0,0 @@ -"#ifdef GL_ES\n" -"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" -"precision highp float;\n" -"#else\n" -"precision mediump float;\n" -"#endif\n" -"#endif\n" -"uniform sampler2D tex, texuv;\n" -"varying vec4 col;\n" -"varying vec2 tex_c, tex_cuv;\n" -"void main()\n" -"{\n" -" float y,u,v,vmu,r,g,b;\n" -" y=texture2D(tex,tex_c).r;\n" -" u=texture2D(texuv,tex_cuv).g;\n" -" v=texture2D(texuv,tex_cuv).a;\n" -"\n" -" u=u-0.5;\n" -" v=v-0.5;\n" -" vmu=v*0.813+u*0.391;\n" -" u=u*2.018;\n" -" v=v*1.596;\n" -"\n" -" r=y+v;\n" -" g=y-vmu;\n" -" b=y+u;\n" -"\n" -" gl_FragColor=vec4(r,g,b,1.0) * col;\n" -"}\n" -"\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuy2_frag.shd b/libraries/evas/src/modules/engines/gl_common/shader/yuy2_frag.shd deleted file mode 100644 index 98dd91b..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/yuy2_frag.shd +++ /dev/null @@ -1,30 +0,0 @@ -#ifdef GL_ES -#ifdef GL_FRAGMENT_PRECISION_HIGH -precision highp float; -#else -precision mediump float; -#endif -#endif -uniform sampler2D tex, texuv; -varying vec4 col; -varying vec2 tex_c, tex_cuv; -void main() -{ - float y,u,v,vmu,r,g,b; - y=texture2D(tex,tex_c).r; - u=texture2D(texuv,tex_cuv).g; - v=texture2D(texuv,tex_cuv).a; - - u=u-0.5; - v=v-0.5; - vmu=v*0.813+u*0.391; - u=u*2.018; - v=v*1.596; - - r=y+v; - g=y-vmu; - b=y+u; - - gl_FragColor=vec4(r,g,b,1.0) * col; -} - diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_frag.h b/libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_frag.h deleted file mode 100644 index 618fa50..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_frag.h +++ /dev/null @@ -1,30 +0,0 @@ -"#ifdef GL_ES\n" -"#ifdef GL_FRAGMENT_PRECISION_HIGH\n" -"precision highp float;\n" -"#else\n" -"precision mediump float;\n" -"#endif\n" -"#endif\n" -"uniform sampler2D tex, texuv;\n" -"varying vec2 tex_c, tex_cuv;\n" -"void main()\n" -"{\n" -" float y,u,v,vmu,r,g,b;\n" -" y=texture2D(tex,tex_c).r;\n" -" u=texture2D(texuv,tex_cuv).g;\n" -" v=texture2D(texuv,tex_cuv).a;\n" -"\n" -" u=u-0.5;\n" -" v=v-0.5;\n" -" vmu=v*0.813+u*0.391;\n" -" u=u*2.018;\n" -" v=v*1.596;\n" -" y=(y-0.062)*1.164;\n" -"\n" -" r=y+v;\n" -" g=y-vmu;\n" -" b=y+u;\n" -"\n" -" gl_FragColor=vec4(r,g,b,1.0);\n" -"}\n" -"\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_frag.shd b/libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_frag.shd deleted file mode 100644 index fd82e2a..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_frag.shd +++ /dev/null @@ -1,30 +0,0 @@ -#ifdef GL_ES -#ifdef GL_FRAGMENT_PRECISION_HIGH -precision highp float; -#else -precision mediump float; -#endif -#endif -uniform sampler2D tex, texuv; -varying vec2 tex_c, tex_cuv; -void main() -{ - float y,u,v,vmu,r,g,b; - y=texture2D(tex,tex_c).r; - u=texture2D(texuv,tex_cuv).g; - v=texture2D(texuv,tex_cuv).a; - - u=u-0.5; - v=v-0.5; - vmu=v*0.813+u*0.391; - u=u*2.018; - v=v*1.596; - y=(y-0.062)*1.164; - - r=y+v; - g=y-vmu; - b=y+u; - - gl_FragColor=vec4(r,g,b,1.0); -} - diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_vert.h b/libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_vert.h deleted file mode 100644 index 4620b66..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_vert.h +++ /dev/null @@ -1,13 +0,0 @@ -"#ifdef GL_ES\n" -"precision highp float;\n" -"#endif\n" -"attribute vec4 vertex;\n" -"attribute vec2 tex_coord, tex_coord2;\n" -"uniform mat4 mvp;\n" -"varying vec2 tex_c, tex_cuv;\n" -"void main()\n" -"{\n" -" gl_Position = mvp * vertex;\n" -" tex_c = tex_coord;\n" -" tex_cuv = vec2(tex_coord2.x * 0.5, tex_coord2.y);\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_vert.shd b/libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_vert.shd deleted file mode 100644 index 05acc9c..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/yuy2_nomul_vert.shd +++ /dev/null @@ -1,13 +0,0 @@ -#ifdef GL_ES -precision highp float; -#endif -attribute vec4 vertex; -attribute vec2 tex_coord, tex_coord2; -uniform mat4 mvp; -varying vec2 tex_c, tex_cuv; -void main() -{ - gl_Position = mvp * vertex; - tex_c = tex_coord; - tex_cuv = vec2(tex_coord2.x * 0.5, tex_coord2.y); -} diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuy2_vert.h b/libraries/evas/src/modules/engines/gl_common/shader/yuy2_vert.h deleted file mode 100644 index 1e49018..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/yuy2_vert.h +++ /dev/null @@ -1,16 +0,0 @@ -"#ifdef GL_ES\n" -"precision highp float;\n" -"#endif\n" -"attribute vec4 vertex;\n" -"attribute vec4 color;\n" -"attribute vec2 tex_coord, tex_coord2;\n" -"uniform mat4 mvp;\n" -"varying vec4 col;\n" -"varying vec2 tex_c, tex_cuv;\n" -"void main()\n" -"{\n" -" gl_Position = mvp * vertex;\n" -" col = color;\n" -" tex_c = tex_coord;\n" -" tex_cuv = vec2(tex_coord2.x * 0.5, tex_coord2.y);\n" -"}\n" diff --git a/libraries/evas/src/modules/engines/gl_common/shader/yuy2_vert.shd b/libraries/evas/src/modules/engines/gl_common/shader/yuy2_vert.shd deleted file mode 100644 index 54efb1e..0000000 --- a/libraries/evas/src/modules/engines/gl_common/shader/yuy2_vert.shd +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef GL_ES -precision highp float; -#endif -attribute vec4 vertex; -attribute vec4 color; -attribute vec2 tex_coord, tex_coord2; -uniform mat4 mvp; -varying vec4 col; -varying vec2 tex_c, tex_cuv; -void main() -{ - gl_Position = mvp * vertex; - col = color; - tex_c = tex_coord; - tex_cuv = vec2(tex_coord2.x * 0.5, tex_coord2.y); -} -- cgit v1.1