aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-02-26 22:05:19 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-02-26 22:07:30 +0900
commit683e5d7d0848b0b044eca151c61ad2254dac2e63 (patch)
treec30f745ce96bdddbbec9899d2fd313ee9e97bf5e
parentb726563a9e127963c0df0058525aff636e876a9d (diff)
downloadefl-683e5d7d0848b0b044eca151c61ad2254dac2e63.tar.gz
efl-683e5d7d0848b0b044eca151c61ad2254dac2e63.tar.xz
efl-683e5d7d0848b0b044eca151c61ad2254dac2e63.zip
Fix evas GL common engine to have a shader to do oversampling on
downscaling. This makes quality much better and "at best" equates to a 16 point sample (2x2 linear interpolation samples, where a linear interpolation sample equates to a 2x2 sample). This will have perfomance impact, but the quality is worth it and makes it closer to software downscaling in quality. It supports 2x2, 2x1 and 1x2 oversampling. YUV not done, nor image mask (font shaders not needed).
-rw-r--r--ChangeLog11
-rw-r--r--NEWS1
-rw-r--r--src/Makefile_Evas.am147
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_common.h35
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_context.c225
-rw-r--r--[-rwxr-xr-x]src/modules/evas/engines/gl_common/evas_gl_core.c0
-rw-r--r--[-rwxr-xr-x]src/modules/evas/engines/gl_common/evas_gl_core.h0
-rw-r--r--[-rwxr-xr-x]src/modules/evas/engines/gl_common/evas_gl_core_private.h0
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_shader.c601
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_texture.c23
-rwxr-xr-xsrc/modules/evas/engines/gl_common/shader/compile.sh42
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_bgra_frag.h18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_bgra_frag.shd18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_frag.h17
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_frag.shd17
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_vert.h18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_vert.shd18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_bgra_vert.h21
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_bgra_vert.shd21
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_frag.h18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_frag.shd18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_nomul_frag.h17
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_nomul_frag.shd17
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_nomul_vert.h18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_nomul_vert.shd18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_vert.h21
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_12_vert.shd21
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_bgra_frag.h18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_bgra_frag.shd18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_frag.h17
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_frag.shd17
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_vert.h18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_vert.shd18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_bgra_vert.h21
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_bgra_vert.shd21
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_frag.h18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_frag.shd18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_nomul_frag.h17
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_nomul_frag.shd17
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_nomul_vert.h18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_nomul_vert.shd18
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_vert.h21
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_21_vert.shd21
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_bgra_frag.h20
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_bgra_frag.shd20
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_frag.h19
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_frag.shd19
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_vert.h20
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_vert.shd20
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_bgra_vert.h23
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_bgra_vert.shd23
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_frag.h20
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_frag.shd20
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_nomul_frag.h19
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_nomul_frag.shd19
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_nomul_vert.h20
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_nomul_vert.shd20
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_vert.h23
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_22_vert.shd23
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_12_frag.h18
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_12_frag.shd18
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_12_nomul_frag.h17
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_12_nomul_frag.shd17
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_12_nomul_vert.h18
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_12_nomul_vert.shd18
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_12_vert.h21
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_12_vert.shd21
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_21_frag.h18
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_21_frag.shd18
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_21_nomul_frag.h17
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_21_nomul_frag.shd17
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_21_nomul_vert.h18
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_21_nomul_vert.shd18
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_21_vert.h21
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_21_vert.shd21
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_22_frag.h20
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_22_frag.shd20
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_22_nomul_frag.h19
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_22_nomul_frag.shd19
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_22_nomul_vert.h20
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_22_nomul_vert.shd20
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_22_vert.h23
-rw-r--r--src/modules/evas/engines/gl_common/shader/tex_22_vert.shd23
83 files changed, 2262 insertions, 203 deletions
diff --git a/ChangeLog b/ChangeLog
index 3504de1cd..69be09eb6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2013-02-26 Carsten Haitzler (The Rasterman)
+
+ * Fix evas GL common engine to have a shader to do oversampling on
+ downscaling. This makes quality much better and "at best"
+ equates to a 16 point sample (2x2 linear interpolation samples,
+ where a linear interpolation sample equates to a 2x2 sample). This
+ will have perfomance impact, but the quality is worth it and
+ makes it closer to software downscaling in quality. It supports
+ 2x2, 2x1 and 1x2 oversampling. YUV not done, nor image mask
+ (font shaders not needed).
+
2013-02-23 ChunEon Park (Hermet)
* Evas cache: remove the freed worker from the pthread worker list when it's failed to create a new thread so as not to access it if a thread is working newly.
diff --git a/NEWS b/NEWS
index 88792906c..2bfd3763a 100644
--- a/NEWS
+++ b/NEWS
@@ -113,6 +113,7 @@ Improvements:
* eina: Eina_Tiler now take tile size into account.
* edje: reduce memory consumption of Edje program handler.
* eina, evas: improved support for 64bits system.
+ * Evas GL engine downscale quality in smooth mode much improved with multisampling up to effectively 16x16 via shaders.
Fixes:
* Fix a memory leak in ecore_con_dns when using ecore_con_server_connect
diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am
index 0a72fef71..b1bc1b0c5 100644
--- a/src/Makefile_Evas.am
+++ b/src/Makefile_Evas.am
@@ -442,80 +442,143 @@ modules/evas/engines/gl_common/evas_gl_core.h \
modules/evas/engines/gl_common/evas_gl_core_private.h \
modules/evas/engines/gl_common/evas_gl_api.c \
modules/evas/engines/gl_common/evas_gl_api_ext.c \
-modules/evas/engines/gl_common/shader/rect_frag.h \
-modules/evas/engines/gl_common/shader/rect_vert.h \
modules/evas/engines/gl_common/shader/font_frag.h \
modules/evas/engines/gl_common/shader/font_vert.h \
-modules/evas/engines/gl_common/shader/img_frag.h \
-modules/evas/engines/gl_common/shader/img_vert.h \
-modules/evas/engines/gl_common/shader/img_nomul_frag.h \
-modules/evas/engines/gl_common/shader/img_nomul_vert.h \
+modules/evas/engines/gl_common/shader/img_12_bgra_frag.h \
+modules/evas/engines/gl_common/shader/img_12_bgra_nomul_frag.h \
+modules/evas/engines/gl_common/shader/img_12_bgra_nomul_vert.h \
+modules/evas/engines/gl_common/shader/img_12_bgra_vert.h \
+modules/evas/engines/gl_common/shader/img_12_frag.h \
+modules/evas/engines/gl_common/shader/img_12_nomul_frag.h \
+modules/evas/engines/gl_common/shader/img_12_nomul_vert.h \
+modules/evas/engines/gl_common/shader/img_12_vert.h \
+modules/evas/engines/gl_common/shader/img_21_bgra_frag.h \
+modules/evas/engines/gl_common/shader/img_21_bgra_nomul_frag.h \
+modules/evas/engines/gl_common/shader/img_21_bgra_nomul_vert.h \
+modules/evas/engines/gl_common/shader/img_21_bgra_vert.h \
+modules/evas/engines/gl_common/shader/img_21_frag.h \
+modules/evas/engines/gl_common/shader/img_21_nomul_frag.h \
+modules/evas/engines/gl_common/shader/img_21_nomul_vert.h \
+modules/evas/engines/gl_common/shader/img_21_vert.h \
+modules/evas/engines/gl_common/shader/img_22_bgra_frag.h \
+modules/evas/engines/gl_common/shader/img_22_bgra_nomul_frag.h \
+modules/evas/engines/gl_common/shader/img_22_bgra_nomul_vert.h \
+modules/evas/engines/gl_common/shader/img_22_bgra_vert.h \
+modules/evas/engines/gl_common/shader/img_22_frag.h \
+modules/evas/engines/gl_common/shader/img_22_nomul_frag.h \
+modules/evas/engines/gl_common/shader/img_22_nomul_vert.h \
+modules/evas/engines/gl_common/shader/img_22_vert.h \
modules/evas/engines/gl_common/shader/img_bgra_frag.h \
-modules/evas/engines/gl_common/shader/img_bgra_vert.h \
modules/evas/engines/gl_common/shader/img_bgra_nomul_frag.h \
modules/evas/engines/gl_common/shader/img_bgra_nomul_vert.h \
+modules/evas/engines/gl_common/shader/img_bgra_vert.h \
+modules/evas/engines/gl_common/shader/img_frag.h \
modules/evas/engines/gl_common/shader/img_mask_frag.h \
modules/evas/engines/gl_common/shader/img_mask_vert.h \
+modules/evas/engines/gl_common/shader/img_nomul_frag.h \
+modules/evas/engines/gl_common/shader/img_nomul_vert.h \
+modules/evas/engines/gl_common/shader/img_vert.h \
+modules/evas/engines/gl_common/shader/nv12_frag.h \
+modules/evas/engines/gl_common/shader/nv12_nomul_frag.h \
modules/evas/engines/gl_common/shader/nv12_nomul_vert.h \
modules/evas/engines/gl_common/shader/nv12_vert.h \
-modules/evas/engines/gl_common/shader/nv12_nomul_frag.h \
-modules/evas/engines/gl_common/shader/nv12_frag.h \
-modules/evas/engines/gl_common/shader/yuv_frag.h \
-modules/evas/engines/gl_common/shader/yuv_vert.h \
-modules/evas/engines/gl_common/shader/yuv_nomul_frag.h \
-modules/evas/engines/gl_common/shader/yuv_nomul_vert.h \
+modules/evas/engines/gl_common/shader/rect_frag.h \
+modules/evas/engines/gl_common/shader/rect_vert.h \
+modules/evas/engines/gl_common/shader/tex_12_frag.h \
+modules/evas/engines/gl_common/shader/tex_12_nomul_frag.h \
+modules/evas/engines/gl_common/shader/tex_12_nomul_vert.h \
+modules/evas/engines/gl_common/shader/tex_12_vert.h \
+modules/evas/engines/gl_common/shader/tex_21_frag.h \
+modules/evas/engines/gl_common/shader/tex_21_nomul_frag.h \
+modules/evas/engines/gl_common/shader/tex_21_nomul_vert.h \
+modules/evas/engines/gl_common/shader/tex_21_vert.h \
+modules/evas/engines/gl_common/shader/tex_22_frag.h \
+modules/evas/engines/gl_common/shader/tex_22_nomul_frag.h \
+modules/evas/engines/gl_common/shader/tex_22_nomul_vert.h \
+modules/evas/engines/gl_common/shader/tex_22_vert.h \
modules/evas/engines/gl_common/shader/tex_frag.h \
-modules/evas/engines/gl_common/shader/tex_vert.h \
modules/evas/engines/gl_common/shader/tex_nomul_frag.h \
modules/evas/engines/gl_common/shader/tex_nomul_vert.h \
+modules/evas/engines/gl_common/shader/tex_vert.h \
+modules/evas/engines/gl_common/shader/yuv_frag.h \
+modules/evas/engines/gl_common/shader/yuv_nomul_frag.h \
+modules/evas/engines/gl_common/shader/yuv_nomul_vert.h \
+modules/evas/engines/gl_common/shader/yuv_vert.h \
modules/evas/engines/gl_common/shader/yuy2_frag.h \
-modules/evas/engines/gl_common/shader/yuy2_vert.h \
modules/evas/engines/gl_common/shader/yuy2_nomul_frag.h \
-modules/evas/engines/gl_common/shader/yuy2_nomul_vert.h
+modules/evas/engines/gl_common/shader/yuy2_nomul_vert.h \
+modules/evas/engines/gl_common/shader/yuy2_vert.h
+
EXTRA_DIST += \
modules/evas/engines/gl_common/shader/compile.sh \
modules/evas/engines/gl_common/shader/make-c-str.sh \
-modules/evas/engines/gl_common/shader/rect_frag.shd \
-modules/evas/engines/gl_common/shader/rect_vert.shd \
modules/evas/engines/gl_common/shader/font_frag.shd \
modules/evas/engines/gl_common/shader/font_vert.shd \
-modules/evas/engines/gl_common/shader/img_frag.shd \
-modules/evas/engines/gl_common/shader/img_vert.shd \
-modules/evas/engines/gl_common/shader/img_nomul_frag.shd \
-modules/evas/engines/gl_common/shader/img_nomul_vert.shd \
-modules/evas/engines/gl_common/shader/img_bgra_vert.shd \
+modules/evas/engines/gl_common/shader/img_12_bgra_frag.shd \
+modules/evas/engines/gl_common/shader/img_12_bgra_nomul_frag.shd \
+modules/evas/engines/gl_common/shader/img_12_bgra_nomul_vert.shd \
+modules/evas/engines/gl_common/shader/img_12_bgra_vert.shd \
+modules/evas/engines/gl_common/shader/img_12_frag.shd \
+modules/evas/engines/gl_common/shader/img_12_nomul_frag.shd \
+modules/evas/engines/gl_common/shader/img_12_nomul_vert.shd \
+modules/evas/engines/gl_common/shader/img_12_vert.shd \
+modules/evas/engines/gl_common/shader/img_21_bgra_frag.shd \
+modules/evas/engines/gl_common/shader/img_21_bgra_nomul_frag.shd \
+modules/evas/engines/gl_common/shader/img_21_bgra_nomul_vert.shd \
+modules/evas/engines/gl_common/shader/img_21_bgra_vert.shd \
+modules/evas/engines/gl_common/shader/img_21_frag.shd \
+modules/evas/engines/gl_common/shader/img_21_nomul_frag.shd \
+modules/evas/engines/gl_common/shader/img_21_nomul_vert.shd \
+modules/evas/engines/gl_common/shader/img_21_vert.shd \
+modules/evas/engines/gl_common/shader/img_22_bgra_frag.shd \
+modules/evas/engines/gl_common/shader/img_22_bgra_nomul_frag.shd \
+modules/evas/engines/gl_common/shader/img_22_bgra_nomul_vert.shd \
+modules/evas/engines/gl_common/shader/img_22_bgra_vert.shd \
+modules/evas/engines/gl_common/shader/img_22_frag.shd \
+modules/evas/engines/gl_common/shader/img_22_nomul_frag.shd \
+modules/evas/engines/gl_common/shader/img_22_nomul_vert.shd \
+modules/evas/engines/gl_common/shader/img_22_vert.shd \
modules/evas/engines/gl_common/shader/img_bgra_frag.shd \
-modules/evas/engines/gl_common/shader/img_bgra_vert.shd \
modules/evas/engines/gl_common/shader/img_bgra_nomul_frag.shd \
modules/evas/engines/gl_common/shader/img_bgra_nomul_vert.shd \
-modules/evas/engines/gl_common/shader/img_mask_frag.h \
+modules/evas/engines/gl_common/shader/img_bgra_vert.shd \
+modules/evas/engines/gl_common/shader/img_frag.shd \
modules/evas/engines/gl_common/shader/img_mask_frag.shd \
-modules/evas/engines/gl_common/shader/img_mask_vert.h \
modules/evas/engines/gl_common/shader/img_mask_vert.shd \
-modules/evas/engines/gl_common/shader/yuv_frag.shd \
-modules/evas/engines/gl_common/shader/yuv_vert.shd \
-modules/evas/engines/gl_common/shader/yuv_nomul_frag.shd \
-modules/evas/engines/gl_common/shader/yuv_nomul_vert.shd \
-modules/evas/engines/gl_common/shader/tex_frag.shd \
-modules/evas/engines/gl_common/shader/tex_vert.shd \
-modules/evas/engines/gl_common/shader/tex_nomul_frag.shd \
-modules/evas/engines/gl_common/shader/tex_nomul_vert.shd \
-modules/evas/engines/gl_common/shader/nv12_frag.h \
+modules/evas/engines/gl_common/shader/img_nomul_frag.shd \
+modules/evas/engines/gl_common/shader/img_nomul_vert.shd \
+modules/evas/engines/gl_common/shader/img_vert.shd \
modules/evas/engines/gl_common/shader/nv12_frag.shd \
-modules/evas/engines/gl_common/shader/nv12_nomul_frag.h \
modules/evas/engines/gl_common/shader/nv12_nomul_frag.shd \
-modules/evas/engines/gl_common/shader/nv12_nomul_vert.h \
modules/evas/engines/gl_common/shader/nv12_nomul_vert.shd \
-modules/evas/engines/gl_common/shader/nv12_vert.h \
modules/evas/engines/gl_common/shader/nv12_vert.shd \
-modules/evas/engines/gl_common/shader/yuy2_frag.h \
+modules/evas/engines/gl_common/shader/rect_frag.shd \
+modules/evas/engines/gl_common/shader/rect_vert.shd \
+modules/evas/engines/gl_common/shader/tex_12_frag.shd \
+modules/evas/engines/gl_common/shader/tex_12_nomul_frag.shd \
+modules/evas/engines/gl_common/shader/tex_12_nomul_vert.shd \
+modules/evas/engines/gl_common/shader/tex_12_vert.shd \
+modules/evas/engines/gl_common/shader/tex_21_frag.shd \
+modules/evas/engines/gl_common/shader/tex_21_nomul_frag.shd \
+modules/evas/engines/gl_common/shader/tex_21_nomul_vert.shd \
+modules/evas/engines/gl_common/shader/tex_21_vert.shd \
+modules/evas/engines/gl_common/shader/tex_22_frag.shd \
+modules/evas/engines/gl_common/shader/tex_22_nomul_frag.shd \
+modules/evas/engines/gl_common/shader/tex_22_nomul_vert.shd \
+modules/evas/engines/gl_common/shader/tex_22_vert.shd \
+modules/evas/engines/gl_common/shader/tex_frag.shd \
+modules/evas/engines/gl_common/shader/tex_nomul_frag.shd \
+modules/evas/engines/gl_common/shader/tex_nomul_vert.shd \
+modules/evas/engines/gl_common/shader/tex_vert.shd \
+modules/evas/engines/gl_common/shader/yuv_frag.shd \
+modules/evas/engines/gl_common/shader/yuv_nomul_frag.shd \
+modules/evas/engines/gl_common/shader/yuv_nomul_vert.shd \
+modules/evas/engines/gl_common/shader/yuv_vert.shd \
modules/evas/engines/gl_common/shader/yuy2_frag.shd \
-modules/evas/engines/gl_common/shader/yuy2_nomul_frag.h \
modules/evas/engines/gl_common/shader/yuy2_nomul_frag.shd \
-modules/evas/engines/gl_common/shader/yuy2_nomul_vert.h \
modules/evas/engines/gl_common/shader/yuy2_nomul_vert.shd \
-modules/evas/engines/gl_common/shader/yuy2_vert.h \
modules/evas/engines/gl_common/shader/yuy2_vert.shd
+
if EVAS_STATIC_BUILD_GL_COMMON
lib_evas_libevas_la_SOURCES += $(GL_COMMON_SOURCES)
lib_evas_libevas_la_LIBADD += @evas_engine_gl_common_libs@
diff --git a/src/modules/evas/engines/gl_common/evas_gl_common.h b/src/modules/evas/engines/gl_common/evas_gl_common.h
index 1910a463d..01f06c2b7 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_common.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_common.h
@@ -117,6 +117,7 @@
#define SHAD_TEXUV2 3
#define SHAD_TEXUV3 4
#define SHAD_TEXM 5
+#define SHAD_TEXSAM 6
typedef struct _Evas_GL_Program Evas_GL_Program;
typedef struct _Evas_GL_Program_Source Evas_GL_Program_Source;
@@ -132,19 +133,44 @@ typedef struct _Evas_GL_Polygon_Point Evas_GL_Polygon_Point;
typedef enum {
SHADER_RECT,
SHADER_FONT,
+
+ SHADER_IMG_MASK,
+
SHADER_IMG,
SHADER_IMG_NOMUL,
SHADER_IMG_BGRA,
SHADER_IMG_BGRA_NOMUL,
- SHADER_IMG_MASK,
+ SHADER_TEX,
+ SHADER_TEX_NOMUL,
+
+ SHADER_IMG_21,
+ SHADER_IMG_21_NOMUL,
+ SHADER_IMG_21_BGRA,
+ SHADER_IMG_21_BGRA_NOMUL,
+ SHADER_TEX_21,
+ SHADER_TEX_21_NOMUL,
+
+ SHADER_IMG_12,
+ SHADER_IMG_12_NOMUL,
+ SHADER_IMG_12_BGRA,
+ SHADER_IMG_12_BGRA_NOMUL,
+ SHADER_TEX_12,
+ SHADER_TEX_12_NOMUL,
+
+ SHADER_IMG_22,
+ SHADER_IMG_22_NOMUL,
+ SHADER_IMG_22_BGRA,
+ SHADER_IMG_22_BGRA_NOMUL,
+ SHADER_TEX_22,
+ SHADER_TEX_22_NOMUL,
+
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,
@@ -157,6 +183,7 @@ typedef enum {
SHADER_FILTER_SEPIA_NOMUL,
SHADER_FILTER_SEPIA_BGRA,
SHADER_FILTER_SEPIA_BGRA_NOMUL,
+ */
/* SHADER_FILTER_BLUR, */
/* SHADER_FILTER_BLUR_NOMUL, */
/* SHADER_FILTER_BLUR_BGRA, */
@@ -328,6 +355,7 @@ struct _Evas_Engine_GL_Context
GLfloat *texuv2;
GLfloat *texuv3;
GLfloat *texm;
+ GLfloat *texsam;
Eina_Bool line: 1;
Eina_Bool use_vertex : 1;
Eina_Bool use_color : 1;
@@ -335,6 +363,7 @@ struct _Evas_Engine_GL_Context
Eina_Bool use_texuv2 : 1;
Eina_Bool use_texuv3 : 1;
Eina_Bool use_texm : 1;
+ Eina_Bool use_texsam : 1;
Evas_GL_Image *im;
GLuint buffer;
int buffer_alloc;
diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c b/src/modules/evas/engines/gl_common/evas_gl_context.c
index ba75a43c0..dc0c4be42 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_context.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_context.c
@@ -812,6 +812,7 @@ evas_gl_common_context_free(Evas_Engine_GL_Context *gc)
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->pipe[i].array.texsam) free(gc->pipe[i].array.texsam);
}
}
@@ -1047,32 +1048,43 @@ evas_gl_common_context_target_surface_set(Evas_Engine_GL_Context *gc,
#define PUSH_TEXM(n, u, v) \
gc->pipe[n].array.texm[nm++] = u; \
gc->pipe[n].array.texm[nm++] = v
+#define PUSH_TEXSAM(n, x, y) \
+ gc->pipe[n].array.texsam[ns++] = x; \
+ gc->pipe[n].array.texsam[ns++] = y
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;
+ if (gc->pipe[n].array.num <= gc->pipe[n].array.alloc)
+ {
+#define ALOC(field, type, size) \
+ if ((gc->pipe[n].array.use_##field) && (!gc->pipe[n].array.field)) \
+ gc->pipe[n].array.field = \
+ malloc(gc->pipe[n].array.alloc * sizeof(type) * size)
+ ALOC(vertex, GLshort, 3);
+ ALOC(color, GLubyte, 4);
+ ALOC(texuv, GLfloat, 2);
+ ALOC(texm, GLfloat, 2);
+ ALOC(texuv2, GLfloat, 2);
+ ALOC(texuv3, GLfloat, 2);
+ ALOC(texsam, GLfloat, 2);
+ 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);
+#define RALOC(field, type, size) \
+ if (gc->pipe[n].array.use_##field) \
+ gc->pipe[n].array.field = realloc \
+ (gc->pipe[n].array.field, \
+ gc->pipe[n].array.alloc * sizeof(type) * size)
+ RALOC(vertex, GLshort, 3);
+ RALOC(color, GLubyte, 4);
+ RALOC(texuv, GLfloat, 2);
+ RALOC(texm, GLfloat, 2);
+ RALOC(texuv2, GLfloat, 2);
+ RALOC(texuv3, GLfloat, 2);
+ RALOC(texsam, GLfloat, 2);
}
#ifdef GLPIPES
@@ -1304,6 +1316,8 @@ evas_gl_common_context_line_push(Evas_Engine_GL_Context *gc,
gc->pipe[pn].array.use_texuv = 0;
gc->pipe[pn].array.use_texuv2 = 0;
gc->pipe[pn].array.use_texuv3 = 0;
+ gc->pipe[pn].array.use_texm = 0;
+ gc->pipe[pn].array.use_texsam = 0;
pnum = gc->pipe[pn].array.num;
nv = pnum * 3; nc = pnum * 4;
@@ -1325,6 +1339,8 @@ evas_gl_common_context_line_push(Evas_Engine_GL_Context *gc,
gc->pipe[pn].array.use_texuv = 0;
gc->pipe[pn].array.use_texuv2 = 0;
gc->pipe[pn].array.use_texuv3 = 0;
+ gc->pipe[pn].array.use_texm = 0;
+ gc->pipe[pn].array.use_texsam = 0;
}
void
@@ -1362,6 +1378,8 @@ again:
gc->pipe[pn].array.use_texuv = 0;
gc->pipe[pn].array.use_texuv2 = 0;
gc->pipe[pn].array.use_texuv3 = 0;
+ gc->pipe[pn].array.use_texm = 0;
+ gc->pipe[pn].array.use_texsam = 0;
}
else
{
@@ -1408,6 +1426,8 @@ again:
gc->pipe[pn].array.use_texuv = 0;
gc->pipe[pn].array.use_texuv2 = 0;
gc->pipe[pn].array.use_texuv3 = 0;
+ gc->pipe[pn].array.use_texm = 0;
+ gc->pipe[pn].array.use_texsam = 0;
}
}
#else
@@ -1438,6 +1458,8 @@ again:
gc->pipe[pn].array.use_texuv = 0;
gc->pipe[pn].array.use_texuv2 = 0;
gc->pipe[pn].array.use_texuv3 = 0;
+ gc->pipe[pn].array.use_texm = 0;
+ gc->pipe[pn].array.use_texsam = 0;
#endif
pipe_region_expand(gc, pn, x, y, w, h);
@@ -1469,11 +1491,11 @@ evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc,
int r, int g, int b, int a,
Eina_Bool smooth, Eina_Bool tex_only)
{
- int pnum, nv, nc, nu, i;
+ int pnum, nv, nc, nu, ns, i;
GLfloat tx1, tx2, ty1, ty2;
Eina_Bool blend = 1;
GLuint prog = gc->shared->shader[SHADER_IMG].prog;
- int pn = 0;
+ int pn = 0, sam = 0;
if (!tex->alpha) blend = 0;
if (a < 255) blend = 1;
@@ -1486,26 +1508,110 @@ evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc,
{
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;
+ if ((smooth) && ((sw >= (w * 2)) && (sh >= (h * 2))))
+ {
+ prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a,
+ SHADER_IMG_22_BGRA_NOMUL, SHADER_IMG_22_BGRA)].prog;
+ sam = 1;
+ }
+ else if ((smooth) && (sw >= (w * 2)))
+ {
+ prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a,
+ SHADER_IMG_21_BGRA_NOMUL, SHADER_IMG_21_BGRA)].prog;
+ sam = 1;
+ }
+ else if ((smooth) && (sh >= (h * 2)))
+ {
+ prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a,
+ SHADER_IMG_12_BGRA_NOMUL, SHADER_IMG_12_BGRA)].prog;
+ sam = 1;
+ }
+ else
+ {
+ 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;
+ if ((smooth) && ((sw >= (w * 2)) && (sh >= (h * 2))))
+ {
+ prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a,
+ SHADER_TEX_22_NOMUL, SHADER_TEX_22)].prog;
+ sam = 1;
+ }
+ else if ((smooth) && (sw >= (w * 2)))
+ {
+ prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a,
+ SHADER_TEX_21_NOMUL, SHADER_TEX_21)].prog;
+ sam = 1;
+ }
+ else if ((smooth) && (sh >= (h * 2)))
+ {
+ prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a,
+ SHADER_TEX_12_NOMUL, SHADER_TEX_12)].prog;
+ sam = 1;
+ }
+ 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;
+ if ((smooth) && ((sw >= (w * 2)) && (sh >= (h * 2))))
+ {
+ prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a,
+ SHADER_IMG_22_BGRA_NOMUL, SHADER_IMG_22_BGRA)].prog;
+ sam = 1;
+ }
+ else if ((smooth) && (sw >= (w * 2)))
+ {
+ prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a,
+ SHADER_IMG_21_BGRA_NOMUL, SHADER_IMG_21_BGRA)].prog;
+ sam = 1;
+ }
+ else if ((smooth) && (sh >= (h * 2)))
+ {
+ prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a,
+ SHADER_IMG_12_BGRA_NOMUL, SHADER_IMG_12_BGRA)].prog;
+ sam = 1;
+ }
+ else
+ {
+ 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;
+ if ((smooth) && ((sw >= (w * 2)) && (sh >= (h * 2))))
+ {
+ prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a,
+ SHADER_IMG_22_NOMUL, SHADER_IMG_22)].prog;
+ sam = 1;
+ }
+ else if ((smooth) && (sw >= (w * 2)))
+ {
+ prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a,
+ SHADER_IMG_21_NOMUL, SHADER_IMG_21)].prog;
+ sam = 1;
+ }
+ else if ((smooth) && (sh >= (h * 2)))
+ {
+ prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a,
+ SHADER_IMG_12_NOMUL, SHADER_IMG_12)].prog;
+ sam = 1;
+ }
+ else
+ {
+ prog = gc->shared->shader[evas_gl_common_shader_choice(0, NULL, r, g, b, a,
+ SHADER_IMG_NOMUL, SHADER_IMG)].prog;
+ }
}
}
@@ -1535,11 +1641,13 @@ evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc,
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 = 0;
+ gc->pipe[pn].array.use_texsam = sam;
pipe_region_expand(gc, pn, x, y, w, h);
pnum = gc->pipe[pn].array.num;
- nv = pnum * 3; nc = pnum * 4; nu = pnum * 2;
+ nv = pnum * 3; nc = pnum * 4; nu = pnum * 2; ns = pnum * 2;
gc->pipe[pn].array.num += 6;
array_alloc(gc, pn);
@@ -1574,6 +1682,20 @@ evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc,
PUSH_TEXUV(pn, tx2, ty2);
PUSH_TEXUV(pn, tx1, ty2);
+ if (sam)
+ {
+ double samx = (double)(sw) / (double)(tex->pt->w * w * 4);
+ double samy = (double)(sh) / (double)(tex->pt->h * h * 4);
+
+ PUSH_TEXSAM(pn, samx, samy);
+ PUSH_TEXSAM(pn, samx, samy);
+ PUSH_TEXSAM(pn, samx, samy);
+
+ PUSH_TEXSAM(pn, samx, samy);
+ PUSH_TEXSAM(pn, samx, samy);
+ PUSH_TEXSAM(pn, samx, samy);
+ }
+
// if nomul... dont need this
for (i = 0; i < 6; i++)
{
@@ -1639,6 +1761,7 @@ evas_gl_common_context_image_mask_push(Evas_Engine_GL_Context *gc,
gc->pipe[pn].array.use_texuv2 = 0;
gc->pipe[pn].array.use_texuv3 = 0;
gc->pipe[pn].array.use_texm = 1;
+ gc->pipe[pn].array.use_texsam = 0;
pipe_region_expand(gc, pn, x, y, w, h);
@@ -1745,6 +1868,8 @@ evas_gl_common_context_font_push(Evas_Engine_GL_Context *gc,
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 = 0;
+ gc->pipe[pn].array.use_texsam = 0;
pipe_region_expand(gc, pn, x, y, w, h);
@@ -1836,6 +1961,8 @@ evas_gl_common_context_yuv_push(Evas_Engine_GL_Context *gc,
gc->pipe[pn].array.use_texuv = 1;
gc->pipe[pn].array.use_texuv2 = 1;
gc->pipe[pn].array.use_texuv3 = 1;
+ gc->pipe[pn].array.use_texm = 0;
+ gc->pipe[pn].array.use_texsam = 0;
pipe_region_expand(gc, pn, x, y, w, h);
@@ -1938,6 +2065,8 @@ evas_gl_common_context_yuy2_push(Evas_Engine_GL_Context *gc,
gc->pipe[pn].array.use_texuv = 1;
gc->pipe[pn].array.use_texuv2 = 1;
gc->pipe[pn].array.use_texuv3 = 0;
+ gc->pipe[pn].array.use_texm = 0;
+ gc->pipe[pn].array.use_texsam = 0;
pipe_region_expand(gc, pn, x, y, w, h);
@@ -2034,6 +2163,8 @@ evas_gl_common_context_nv12_push(Evas_Engine_GL_Context *gc,
gc->pipe[pn].array.use_texuv = 1;
gc->pipe[pn].array.use_texuv2 = 1;
gc->pipe[pn].array.use_texuv3 = 0;
+ gc->pipe[pn].array.use_texm = 0;
+ gc->pipe[pn].array.use_texsam = 0;
pipe_region_expand(gc, pn, x, y, w, h);
@@ -2276,6 +2407,8 @@ evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc,
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;
+ gc->pipe[pn].array.use_texm = 0;
+ gc->pipe[pn].array.use_texsam = 0;
pipe_region_expand(gc, pn, x, y, w, h);
@@ -2582,6 +2715,7 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
unsigned char *texuv2_ptr = NULL;
unsigned char *texuv3_ptr = NULL;
unsigned char *texm_ptr = NULL;
+ unsigned char *texsam_ptr = NULL;
if (glsym_glMapBuffer && glsym_glUnmapBuffer)
{
@@ -2596,11 +2730,11 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
texuv2_ptr = texuv_ptr + TEX_SIZE;
texuv3_ptr = texuv2_ptr + TEX_SIZE;
texm_ptr = texuv3_ptr + TEX_SIZE;
-# define END_POINTER (texm_ptr + TEX_SIZE)
+ texsam_ptr = texm_ptr + TEX_SIZE;
+# define END_POINTER (texsam_ptr + TEX_SIZE)
glBindBuffer(GL_ARRAY_BUFFER, gc->pipe[i].array.buffer);
if ((gc->pipe[i].array.buffer_alloc < (long)END_POINTER) ||
-
(gc->pipe[i].array.buffer_use >= (ARRAY_BUFFER_USE + ARRAY_BUFFER_USE_SHIFT * i)))
{
glBufferData(GL_ARRAY_BUFFER, (long)END_POINTER, NULL, GL_STATIC_DRAW);
@@ -2624,6 +2758,8 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
memcpy(x + (unsigned long)texuv3_ptr, gc->pipe[i].array.texuv3, TEX_SIZE);
if (gc->pipe[i].array.use_texm)
memcpy(x + (unsigned long)texm_ptr, gc->pipe[i].array.texm, TEX_SIZE);
+ if (gc->pipe[i].array.use_texsam)
+ memcpy(x + (unsigned long)texsam_ptr, gc->pipe[i].array.texsam, TEX_SIZE);
glsym_glUnmapBuffer(GL_ARRAY_BUFFER);
}
}
@@ -2635,6 +2771,7 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
texuv2_ptr = (unsigned char *)gc->pipe[i].array.texuv2;
texuv3_ptr = (unsigned char *)gc->pipe[i].array.texuv3;
texm_ptr = (unsigned char *)gc->pipe[i].array.texm;
+ texsam_ptr = (unsigned char *)gc->pipe[i].array.texsam;
}
glVertexAttribPointer(SHAD_VERTEX, 3, GL_SHORT, GL_FALSE, 0, (void *)vertex_ptr);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
@@ -2685,6 +2822,17 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
{
glDisableVertexAttribArray(SHAD_TEXM);
}
+ if (gc->pipe[i].array.use_texsam)
+ {
+ glEnableVertexAttribArray(SHAD_TEXSAM);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ glVertexAttribPointer(SHAD_TEXSAM, 2, GL_FLOAT, GL_FALSE, 0, (void *)texsam_ptr);
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ }
+ else
+ {
+ glDisableVertexAttribArray(SHAD_TEXSAM);
+ }
if ((gc->pipe[i].array.use_texuv2) && (gc->pipe[i].array.use_texuv3))
{
glEnableVertexAttribArray(SHAD_TEXUV2);
@@ -2788,13 +2936,24 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
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->pipe[i].array.texsam) free(gc->pipe[i].array.texsam);
+
+ gc->pipe[i].array.line = 0;
+ gc->pipe[i].array.use_vertex = 0;
+ gc->pipe[i].array.use_color = 0;
+ gc->pipe[i].array.use_texuv = 0;
+ gc->pipe[i].array.use_texuv2 = 0;
+ gc->pipe[i].array.use_texuv3 = 0;
+ gc->pipe[i].array.use_texm = 0;
+ gc->pipe[i].array.use_texsam = 0;
+
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.texsam = NULL;
gc->pipe[i].array.num = 0;
gc->pipe[i].array.alloc = 0;
diff --git a/src/modules/evas/engines/gl_common/evas_gl_core.c b/src/modules/evas/engines/gl_common/evas_gl_core.c
index 125a9be82..125a9be82 100755..100644
--- a/src/modules/evas/engines/gl_common/evas_gl_core.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_core.c
diff --git a/src/modules/evas/engines/gl_common/evas_gl_core.h b/src/modules/evas/engines/gl_common/evas_gl_core.h
index 369b3c323..369b3c323 100755..100644
--- a/src/modules/evas/engines/gl_common/evas_gl_core.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_core.h
diff --git a/src/modules/evas/engines/gl_common/evas_gl_core_private.h b/src/modules/evas/engines/gl_common/evas_gl_core_private.h
index 62c1da47e..62c1da47e 100755..100644
--- a/src/modules/evas/engines/gl_common/evas_gl_core_private.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_core_private.h
diff --git a/src/modules/evas/engines/gl_common/evas_gl_shader.c b/src/modules/evas/engines/gl_common/evas_gl_shader.c
index af258d28e..76402fc53 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_shader.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_shader.c
@@ -38,116 +38,104 @@ Evas_GL_Program_Source shader_font_vert_src =
NULL, 0
};
-/////////////////////////////////////////////
-const char yuv_frag_glsl[] =
-#include "shader/yuv_frag.h"
- ;
-Evas_GL_Program_Source shader_yuv_frag_src =
-{
- yuv_frag_glsl,
- NULL, 0
-};
-const char yuv_vert_glsl[] =
-#include "shader/yuv_vert.h"
- ;
-Evas_GL_Program_Source shader_yuv_vert_src =
-{
- yuv_vert_glsl,
- NULL, 0
-};
+
/////////////////////////////////////////////
-const char yuy2_frag_glsl[] =
-#include "shader/yuy2_frag.h"
+const char img_mask_frag_glsl[] =
+#include "shader/img_mask_frag.h"
;
-Evas_GL_Program_Source shader_yuy2_frag_src =
+Evas_GL_Program_Source shader_img_mask_frag_src =
{
- yuy2_frag_glsl,
+ img_mask_frag_glsl,
NULL, 0
};
-const char yuy2_vert_glsl[] =
-#include "shader/yuy2_vert.h"
+const char img_mask_vert_glsl[] =
+#include "shader/img_mask_vert.h"
;
-Evas_GL_Program_Source shader_yuy2_vert_src =
+Evas_GL_Program_Source shader_img_mask_vert_src =
{
- yuy2_vert_glsl,
+ img_mask_vert_glsl,
NULL, 0
};
+
+
+
/////////////////////////////////////////////
-const char yuy2_nomul_frag_glsl[] =
-#include "shader/yuy2_nomul_frag.h"
+const char img_frag_glsl[] =
+#include "shader/img_frag.h"
;
-Evas_GL_Program_Source shader_yuy2_nomul_frag_src =
+Evas_GL_Program_Source shader_img_frag_src =
{
- yuy2_nomul_frag_glsl,
+ img_frag_glsl,
NULL, 0
};
-const char yuy2_nomul_vert_glsl[] =
-#include "shader/yuy2_nomul_vert.h"
+const char img_vert_glsl[] =
+#include "shader/img_vert.h"
;
-Evas_GL_Program_Source shader_yuy2_nomul_vert_src =
+Evas_GL_Program_Source shader_img_vert_src =
{
- yuy2_nomul_vert_glsl,
+ img_vert_glsl,
NULL, 0
};
/////////////////////////////////////////////
-const char nv12_nomul_vert_glsl[] =
-#include "shader/nv12_nomul_vert.h"
+const char img_nomul_frag_glsl[] =
+#include "shader/img_nomul_frag.h"
;
-Evas_GL_Program_Source shader_nv12_nomul_vert_src =
+Evas_GL_Program_Source shader_img_nomul_frag_src =
{
- nv12_nomul_vert_glsl,
+ img_nomul_frag_glsl,
NULL, 0
};
-const char nv12_vert_glsl[] =
-#include "shader/nv12_vert.h"
+const char img_nomul_vert_glsl[] =
+#include "shader/img_nomul_vert.h"
;
-Evas_GL_Program_Source shader_nv12_vert_src =
+Evas_GL_Program_Source shader_img_nomul_vert_src =
{
- nv12_vert_glsl,
+ img_nomul_vert_glsl,
NULL, 0
};
-const char nv12_frag_glsl[] =
-#include "shader/nv12_frag.h"
+/////////////////////////////////////////////
+const char img_bgra_frag_glsl[] =
+#include "shader/img_bgra_frag.h"
;
-Evas_GL_Program_Source shader_nv12_frag_src =
+Evas_GL_Program_Source shader_img_bgra_frag_src =
{
- nv12_frag_glsl,
+ img_bgra_frag_glsl,
NULL, 0
};
-const char nv12_nomul_frag_glsl[] =
-#include "shader/nv12_nomul_frag.h"
+const char img_bgra_vert_glsl[] =
+#include "shader/img_bgra_vert.h"
;
-Evas_GL_Program_Source shader_nv12_nomul_frag_src =
+Evas_GL_Program_Source shader_img_bgra_vert_src =
{
- nv12_nomul_frag_glsl,
+ img_bgra_vert_glsl,
NULL, 0
};
/////////////////////////////////////////////
-const char yuv_nomul_frag_glsl[] =
-#include "shader/yuv_nomul_frag.h"
+const char img_bgra_nomul_frag_glsl[] =
+#include "shader/img_bgra_nomul_frag.h"
;
-Evas_GL_Program_Source shader_yuv_nomul_frag_src =
+Evas_GL_Program_Source shader_img_bgra_nomul_frag_src =
{
- yuv_nomul_frag_glsl,
+ img_bgra_nomul_frag_glsl,
NULL, 0
};
-const char yuv_nomul_vert_glsl[] =
-#include "shader/yuv_nomul_vert.h"
+const char img_bgra_nomul_vert_glsl[] =
+#include "shader/img_bgra_nomul_vert.h"
;
-Evas_GL_Program_Source shader_yuv_nomul_vert_src =
+Evas_GL_Program_Source shader_img_bgra_nomul_vert_src =
{
- yuv_nomul_vert_glsl,
+ img_bgra_nomul_vert_glsl,
NULL, 0
};
@@ -189,100 +177,470 @@ Evas_GL_Program_Source shader_tex_nomul_vert_src =
NULL, 0
};
+
+
+
+/////////////////////////////////////////////
+const char img_21_frag_glsl[] =
+#include "shader/img_21_frag.h"
+ ;
+Evas_GL_Program_Source shader_img_21_frag_src =
+{
+ img_21_frag_glsl,
+ NULL, 0
+};
+
+const char img_21_vert_glsl[] =
+#include "shader/img_21_vert.h"
+ ;
+Evas_GL_Program_Source shader_img_21_vert_src =
+{
+ img_21_vert_glsl,
+ NULL, 0
+};
+
/////////////////////////////////////////////
-const char img_frag_glsl[] =
-#include "shader/img_frag.h"
+const char img_21_nomul_frag_glsl[] =
+#include "shader/img_21_nomul_frag.h"
;
-Evas_GL_Program_Source shader_img_frag_src =
+Evas_GL_Program_Source shader_img_21_nomul_frag_src =
{
- img_frag_glsl,
+ img_21_nomul_frag_glsl,
NULL, 0
};
-const char img_vert_glsl[] =
-#include "shader/img_vert.h"
+const char img_21_nomul_vert_glsl[] =
+#include "shader/img_21_nomul_vert.h"
;
-Evas_GL_Program_Source shader_img_vert_src =
+Evas_GL_Program_Source shader_img_21_nomul_vert_src =
{
- img_vert_glsl,
+ img_21_nomul_vert_glsl,
NULL, 0
};
/////////////////////////////////////////////
-const char img_nomul_frag_glsl[] =
-#include "shader/img_nomul_frag.h"
+const char img_21_bgra_frag_glsl[] =
+#include "shader/img_21_bgra_frag.h"
;
-Evas_GL_Program_Source shader_img_nomul_frag_src =
+Evas_GL_Program_Source shader_img_21_bgra_frag_src =
{
- img_nomul_frag_glsl,
+ img_21_bgra_frag_glsl,
NULL, 0
};
-const char img_nomul_vert_glsl[] =
-#include "shader/img_nomul_vert.h"
+const char img_21_bgra_vert_glsl[] =
+#include "shader/img_21_bgra_vert.h"
;
-Evas_GL_Program_Source shader_img_nomul_vert_src =
+Evas_GL_Program_Source shader_img_21_bgra_vert_src =
{
- img_nomul_vert_glsl,
+ img_21_bgra_vert_glsl,
NULL, 0
};
/////////////////////////////////////////////
-const char img_bgra_frag_glsl[] =
-#include "shader/img_bgra_frag.h"
+const char img_21_bgra_nomul_frag_glsl[] =
+#include "shader/img_21_bgra_nomul_frag.h"
;
-Evas_GL_Program_Source shader_img_bgra_frag_src =
+Evas_GL_Program_Source shader_img_21_bgra_nomul_frag_src =
{
- img_bgra_frag_glsl,
+ img_21_bgra_nomul_frag_glsl,
NULL, 0
};
-const char img_bgra_vert_glsl[] =
-#include "shader/img_bgra_vert.h"
+const char img_21_bgra_nomul_vert_glsl[] =
+#include "shader/img_21_bgra_nomul_vert.h"
;
-Evas_GL_Program_Source shader_img_bgra_vert_src =
+Evas_GL_Program_Source shader_img_21_bgra_nomul_vert_src =
{
- img_bgra_vert_glsl,
+ img_21_bgra_nomul_vert_glsl,
+ NULL, 0
+};
+
+/////////////////////////////////////////////
+const char tex_21_frag_glsl[] =
+#include "shader/tex_21_frag.h"
+ ;
+Evas_GL_Program_Source shader_tex_21_frag_src =
+{
+ tex_21_frag_glsl,
NULL, 0
};
+const char tex_21_vert_glsl[] =
+#include "shader/tex_21_vert.h"
+ ;
+Evas_GL_Program_Source shader_tex_21_vert_src =
+{
+ tex_21_vert_glsl,
+ NULL, 0
+};
/////////////////////////////////////////////
-const char img_mask_frag_glsl[] =
-#include "shader/img_mask_frag.h"
+const char tex_21_nomul_frag_glsl[] =
+#include "shader/tex_21_nomul_frag.h"
;
-Evas_GL_Program_Source shader_img_mask_frag_src =
+Evas_GL_Program_Source shader_tex_21_nomul_frag_src =
{
- img_mask_frag_glsl,
+ tex_21_nomul_frag_glsl,
NULL, 0
};
-const char img_mask_vert_glsl[] =
-#include "shader/img_mask_vert.h"
+const char tex_21_nomul_vert_glsl[] =
+#include "shader/tex_21_nomul_vert.h"
;
-Evas_GL_Program_Source shader_img_mask_vert_src =
+Evas_GL_Program_Source shader_tex_21_nomul_vert_src =
{
- img_mask_vert_glsl,
+ tex_21_nomul_vert_glsl,
NULL, 0
};
+
+
/////////////////////////////////////////////
-const char img_bgra_nomul_frag_glsl[] =
-#include "shader/img_bgra_nomul_frag.h"
+const char img_12_frag_glsl[] =
+#include "shader/img_12_frag.h"
;
-Evas_GL_Program_Source shader_img_bgra_nomul_frag_src =
+Evas_GL_Program_Source shader_img_12_frag_src =
{
- img_bgra_nomul_frag_glsl,
+ img_12_frag_glsl,
NULL, 0
};
-const char img_bgra_nomul_vert_glsl[] =
-#include "shader/img_bgra_nomul_vert.h"
+const char img_12_vert_glsl[] =
+#include "shader/img_12_vert.h"
;
-Evas_GL_Program_Source shader_img_bgra_nomul_vert_src =
+Evas_GL_Program_Source shader_img_12_vert_src =
{
- img_bgra_nomul_vert_glsl,
+ img_12_vert_glsl,
+ NULL, 0
+};
+
+/////////////////////////////////////////////
+const char img_12_nomul_frag_glsl[] =
+#include "shader/img_12_nomul_frag.h"
+ ;
+Evas_GL_Program_Source shader_img_12_nomul_frag_src =
+{
+ img_12_nomul_frag_glsl,
+ NULL, 0
+};
+
+const char img_12_nomul_vert_glsl[] =
+#include "shader/img_12_nomul_vert.h"
+ ;
+Evas_GL_Program_Source shader_img_12_nomul_vert_src =
+{
+ img_12_nomul_vert_glsl,
+ NULL, 0
+};
+
+/////////////////////////////////////////////
+const char img_12_bgra_frag_glsl[] =
+#include "shader/img_12_bgra_frag.h"
+ ;
+Evas_GL_Program_Source shader_img_12_bgra_frag_src =
+{
+ img_12_bgra_frag_glsl,
+ NULL, 0
+};
+
+const char img_12_bgra_vert_glsl[] =
+#include "shader/img_12_bgra_vert.h"
+ ;
+Evas_GL_Program_Source shader_img_12_bgra_vert_src =
+{
+ img_12_bgra_vert_glsl,
+ NULL, 0
+};
+
+/////////////////////////////////////////////
+const char img_12_bgra_nomul_frag_glsl[] =
+#include "shader/img_12_bgra_nomul_frag.h"
+ ;
+Evas_GL_Program_Source shader_img_12_bgra_nomul_frag_src =
+{
+ img_12_bgra_nomul_frag_glsl,
+ NULL, 0
+};
+
+const char img_12_bgra_nomul_vert_glsl[] =
+#include "shader/img_12_bgra_nomul_vert.h"
+ ;
+Evas_GL_Program_Source shader_img_12_bgra_nomul_vert_src =
+{
+ img_12_bgra_nomul_vert_glsl,
+ NULL, 0
+};
+
+/////////////////////////////////////////////
+const char tex_12_frag_glsl[] =
+#include "shader/tex_12_frag.h"
+ ;
+Evas_GL_Program_Source shader_tex_12_frag_src =
+{
+ tex_12_frag_glsl,
+ NULL, 0
+};
+
+const char tex_12_vert_glsl[] =
+#include "shader/tex_12_vert.h"
+ ;
+Evas_GL_Program_Source shader_tex_12_vert_src =
+{
+ tex_12_vert_glsl,
+ NULL, 0
+};
+
+/////////////////////////////////////////////
+const char tex_12_nomul_frag_glsl[] =
+#include "shader/tex_12_nomul_frag.h"
+ ;
+Evas_GL_Program_Source shader_tex_12_nomul_frag_src =
+{
+ tex_12_nomul_frag_glsl,
+ NULL, 0
+};
+
+const char tex_12_nomul_vert_glsl[] =
+#include "shader/tex_12_nomul_vert.h"
+ ;
+Evas_GL_Program_Source shader_tex_12_nomul_vert_src =
+{
+ tex_12_nomul_vert_glsl,
+ NULL, 0
+};
+
+
+
+
+/////////////////////////////////////////////
+const char img_22_frag_glsl[] =
+#include "shader/img_22_frag.h"
+ ;
+Evas_GL_Program_Source shader_img_22_frag_src =
+{
+ img_22_frag_glsl,
+ NULL, 0
+};
+
+const char img_22_vert_glsl[] =
+#include "shader/img_22_vert.h"
+ ;
+Evas_GL_Program_Source shader_img_22_vert_src =
+{
+ img_22_vert_glsl,
+ NULL, 0
+};
+
+/////////////////////////////////////////////
+const char img_22_nomul_frag_glsl[] =
+#include "shader/img_22_nomul_frag.h"
+ ;
+Evas_GL_Program_Source shader_img_22_nomul_frag_src =
+{
+ img_22_nomul_frag_glsl,
+ NULL, 0
+};
+
+const char img_22_nomul_vert_glsl[] =
+#include "shader/img_22_nomul_vert.h"
+ ;
+Evas_GL_Program_Source shader_img_22_nomul_vert_src =
+{
+ img_22_nomul_vert_glsl,
+ NULL, 0
+};
+
+/////////////////////////////////////////////
+const char img_22_bgra_frag_glsl[] =
+#include "shader/img_22_bgra_frag.h"
+ ;
+Evas_GL_Program_Source shader_img_22_bgra_frag_src =
+{
+ img_22_bgra_frag_glsl,
+ NULL, 0
+};
+
+const char img_22_bgra_vert_glsl[] =
+#include "shader/img_22_bgra_vert.h"
+ ;
+Evas_GL_Program_Source shader_img_22_bgra_vert_src =
+{
+ img_22_bgra_vert_glsl,
+ NULL, 0
+};
+
+/////////////////////////////////////////////
+const char img_22_bgra_nomul_frag_glsl[] =
+#include "shader/img_22_bgra_nomul_frag.h"
+ ;
+Evas_GL_Program_Source shader_img_22_bgra_nomul_frag_src =
+{
+ img_22_bgra_nomul_frag_glsl,
+ NULL, 0
+};
+
+const char img_22_bgra_nomul_vert_glsl[] =
+#include "shader/img_22_bgra_nomul_vert.h"
+ ;
+Evas_GL_Program_Source shader_img_22_bgra_nomul_vert_src =
+{
+ img_22_bgra_nomul_vert_glsl,
+ NULL, 0
+};
+
+/////////////////////////////////////////////
+const char tex_22_frag_glsl[] =
+#include "shader/tex_22_frag.h"
+ ;
+Evas_GL_Program_Source shader_tex_22_frag_src =
+{
+ tex_22_frag_glsl,
+ NULL, 0
+};
+
+const char tex_22_vert_glsl[] =
+#include "shader/tex_22_vert.h"
+ ;
+Evas_GL_Program_Source shader_tex_22_vert_src =
+{
+ tex_22_vert_glsl,
+ NULL, 0
+};
+
+/////////////////////////////////////////////
+const char tex_22_nomul_frag_glsl[] =
+#include "shader/tex_22_nomul_frag.h"
+ ;
+Evas_GL_Program_Source shader_tex_22_nomul_frag_src =
+{
+ tex_22_nomul_frag_glsl,
+ NULL, 0
+};
+
+const char tex_22_nomul_vert_glsl[] =
+#include "shader/tex_22_nomul_vert.h"
+ ;
+Evas_GL_Program_Source shader_tex_22_nomul_vert_src =
+{
+ tex_22_nomul_vert_glsl,
+ NULL, 0
+};
+
+
+
+
+/////////////////////////////////////////////
+const char yuv_frag_glsl[] =
+#include "shader/yuv_frag.h"
+ ;
+Evas_GL_Program_Source shader_yuv_frag_src =
+{
+ yuv_frag_glsl,
+ NULL, 0
+};
+
+const char yuv_vert_glsl[] =
+#include "shader/yuv_vert.h"
+ ;
+Evas_GL_Program_Source shader_yuv_vert_src =
+{
+ yuv_vert_glsl,
+ NULL, 0
+};
+
+/////////////////////////////////////////////
+const char yuy2_frag_glsl[] =
+#include "shader/yuy2_frag.h"
+ ;
+Evas_GL_Program_Source shader_yuy2_frag_src =
+{
+ yuy2_frag_glsl,
+ NULL, 0
+};
+
+const char yuy2_vert_glsl[] =
+#include "shader/yuy2_vert.h"
+ ;
+Evas_GL_Program_Source shader_yuy2_vert_src =
+{
+ yuy2_vert_glsl,
+ NULL, 0
+};
+
+/////////////////////////////////////////////
+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,
+ NULL, 0
+};
+
+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,
+ NULL, 0
+};
+
+/////////////////////////////////////////////
+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,
+ NULL, 0
+};
+
+const char nv12_vert_glsl[] =
+#include "shader/nv12_vert.h"
+ ;
+Evas_GL_Program_Source shader_nv12_vert_src =
+{
+ nv12_vert_glsl,
+ NULL, 0
+};
+
+const char nv12_frag_glsl[] =
+#include "shader/nv12_frag.h"
+ ;
+Evas_GL_Program_Source shader_nv12_frag_src =
+{
+ nv12_frag_glsl,
+ NULL, 0
+};
+
+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,
+ NULL, 0
+};
+
+/////////////////////////////////////////////
+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,
+ NULL, 0
+};
+
+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,
NULL, 0
};
@@ -364,6 +722,7 @@ _evas_gl_common_shader_program_binary_init(Evas_GL_Program *p,
glBindAttribLocation(p->prog, SHAD_TEXUV2, "tex_coord2");
glBindAttribLocation(p->prog, SHAD_TEXUV3, "tex_coord3");
glBindAttribLocation(p->prog, SHAD_TEXM, "tex_coordm");
+ glBindAttribLocation(p->prog, SHAD_TEXSAM, "tex_sample");
glGetProgramiv(p->prog, GL_LINK_STATUS, &ok);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
@@ -487,6 +846,8 @@ _evas_gl_common_shader_program_source_init(Evas_GL_Program *p,
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glBindAttribLocation(p->prog, SHAD_TEXM, "tex_coordm");
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+ glBindAttribLocation(p->prog, SHAD_TEXSAM, "tex_sample");
+ GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glLinkProgram(p->prog);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
@@ -517,19 +878,43 @@ static const struct {
} _shaders_source[] = {
SHADER_SOURCE_LINE(RECT, rect),
SHADER_SOURCE_LINE(FONT, font),
+
+ SHADER_SOURCE_LINE(IMG_MASK, img_mask),
+
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(TEX, tex),
+ SHADER_SOURCE_LINE(TEX_NOMUL, tex_nomul),
+
+ SHADER_SOURCE_LINE(IMG_21, img_21),
+ SHADER_SOURCE_LINE(IMG_21_NOMUL, img_21_nomul),
+ SHADER_SOURCE_LINE(IMG_21_BGRA, img_21_bgra),
+ SHADER_SOURCE_LINE(IMG_21_BGRA_NOMUL, img_21_bgra_nomul),
+ SHADER_SOURCE_LINE(TEX_21, tex_21),
+ SHADER_SOURCE_LINE(TEX_21_NOMUL, tex_21_nomul),
+
+ SHADER_SOURCE_LINE(IMG_12, img_12),
+ SHADER_SOURCE_LINE(IMG_12_NOMUL, img_12_nomul),
+ SHADER_SOURCE_LINE(IMG_12_BGRA, img_12_bgra),
+ SHADER_SOURCE_LINE(IMG_12_BGRA_NOMUL, img_12_bgra_nomul),
+ SHADER_SOURCE_LINE(TEX_12, tex_12),
+ SHADER_SOURCE_LINE(TEX_12_NOMUL, tex_12_nomul),
+
+ SHADER_SOURCE_LINE(IMG_22, img_22),
+ SHADER_SOURCE_LINE(IMG_22_NOMUL, img_22_nomul),
+ SHADER_SOURCE_LINE(IMG_22_BGRA, img_22_bgra),
+ SHADER_SOURCE_LINE(IMG_22_BGRA_NOMUL, img_22_bgra_nomul),
+ SHADER_SOURCE_LINE(TEX_22, tex_22),
+ SHADER_SOURCE_LINE(TEX_22_NOMUL, tex_22_nomul),
+
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),
};
static int
@@ -537,13 +922,15 @@ _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;
-
+ 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;
}
diff --git a/src/modules/evas/engines/gl_common/evas_gl_texture.c b/src/modules/evas/engines/gl_common/evas_gl_texture.c
index 11dc274ee..633c8b643 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_texture.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_texture.c
@@ -302,16 +302,19 @@ evas_gl_common_texture_new(Evas_Engine_GL_Context *gc, RGBA_Image *im)
tex->gc = gc;
tex->references = 1;
+#define TEX_HREP 1
+#define TEX_VREP 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,
+ tex->pt = _pool_tex_find(gc, im->cache_entry.w + TEX_HREP + 2,
+ im->cache_entry.h + TEX_VREP, 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,
+ tex->pt = _pool_tex_find(gc, im->cache_entry.w + TEX_HREP + 2,
+ im->cache_entry.h + TEX_VREP, rgba_ifmt, rgba_fmt,
&u, &v, &l_after,
gc->shared->info.tune.atlas.max_alloc_size);
tex->alpha = 1;
@@ -319,19 +322,19 @@ evas_gl_common_texture_new(Evas_Engine_GL_Context *gc, RGBA_Image *im)
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,
+ tex->pt = _pool_tex_find(gc, im->cache_entry.w + TEX_HREP + 2,
+ im->cache_entry.h + TEX_VREP, bgr_ifmt, bgr_fmt,
&u, &v, &l_after,
gc->shared->info.tune.atlas.max_alloc_size);
else
#ifdef GL_GLES
- tex->pt = _pool_tex_find(gc, im->cache_entry.w + 3,
- im->cache_entry.h + 1, rgba_ifmt, rgba_fmt,
+ tex->pt = _pool_tex_find(gc, im->cache_entry.w + TEX_HREP + 2,
+ im->cache_entry.h + TEX_VREP, 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,
+ tex->pt = _pool_tex_find(gc, im->cache_entry.w + TEX_HREP + 2,
+ im->cache_entry.h + TEX_VREP, rgb_ifmt, rgb_fmt,
&u, &v, &l_after,
gc->shared->info.tune.atlas.max_alloc_size);
#endif
diff --git a/src/modules/evas/engines/gl_common/shader/compile.sh b/src/modules/evas/engines/gl_common/shader/compile.sh
index a96b58c9e..beb424d62 100755
--- a/src/modules/evas/engines/gl_common/shader/compile.sh
+++ b/src/modules/evas/engines/gl_common/shader/compile.sh
@@ -16,15 +16,46 @@ function compile()
compile rect
compile font
+
+compile img_mask
+
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 img_21
+compile img_21_nomul
+compile img_21_bgra
+compile img_21_bgra_nomul
+compile tex_21
+compile tex_21_nomul
+
+compile img_12
+compile img_12_nomul
+compile img_12_bgra
+compile img_12_bgra_nomul
+compile tex_12
+compile tex_12_nomul
+
+compile img_22
+compile img_22_nomul
+compile img_22_bgra
+compile img_22_bgra_nomul
+compile tex_22
+compile tex_22_nomul
+
+## above section must have 21, 22 and 12 versions
+
+compile yuv
+compile yuv_nomul
+compile nv12
+compile nv12_nomul
+compile yuy2
+compile yuy2_nomul
+
compile filter_blur_bgra
compile filter_blur_bgra_nomul
compile filter_blur
@@ -41,8 +72,3 @@ 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/src/modules/evas/engines/gl_common/shader/img_12_bgra_frag.h b/src/modules/evas/engines/gl_common/shader/img_12_bgra_frag.h
new file mode 100644
index 000000000..a076fb58f
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_bgra_frag.h
@@ -0,0 +1,18 @@
+"#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"
+"varying vec2 tex_s[2];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
+" vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
+" gl_FragColor = ((col00 + col01) / div_s) * col;\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_12_bgra_frag.shd b/src/modules/evas/engines/gl_common/shader/img_12_bgra_frag.shd
new file mode 100644
index 000000000..d23e17b35
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_bgra_frag.shd
@@ -0,0 +1,18 @@
+#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;
+varying vec2 tex_s[2];
+varying vec4 div_s;
+void main()
+{
+ vec4 col00 = texture2D(tex, tex_c + tex_s[0]);
+ vec4 col01 = texture2D(tex, tex_c + tex_s[1]);
+ gl_FragColor = ((col00 + col01) / div_s) * col;
+}
diff --git a/src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_frag.h b/src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_frag.h
new file mode 100644
index 000000000..0be15b330
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_frag.h
@@ -0,0 +1,17 @@
+"#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"
+"varying vec2 tex_s[2];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
+" vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
+" gl_FragColor = (col00 + col01) / div_s;\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_frag.shd b/src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_frag.shd
new file mode 100644
index 000000000..4d29510d4
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_frag.shd
@@ -0,0 +1,17 @@
+#ifdef GL_ES
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+#endif
+uniform sampler2D tex;
+varying vec2 tex_c;
+varying vec2 tex_s[2];
+varying vec4 div_s;
+void main()
+{
+ vec4 col00 = texture2D(tex, tex_c + tex_s[0]);
+ vec4 col01 = texture2D(tex, tex_c + tex_s[1]);
+ gl_FragColor = (col00 + col01) / div_s;
+}
diff --git a/src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_vert.h b/src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_vert.h
new file mode 100644
index 000000000..cee10eaf6
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_vert.h
@@ -0,0 +1,18 @@
+"#ifdef GL_ES\n"
+"precision highp float;\n"
+"#endif\n"
+"attribute vec4 vertex;\n"
+"attribute vec2 tex_coord;\n"
+"attribute vec2 tex_sample;\n"
+"uniform mat4 mvp;\n"
+"varying vec2 tex_c;\n"
+"varying vec2 tex_s[2];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" gl_Position = mvp * vertex;\n"
+" tex_c = tex_coord;\n"
+" tex_s[0] = vec2(0, -tex_sample.y);\n"
+" tex_s[1] = vec2(0, tex_sample.y);\n"
+" div_s = vec4(2, 2, 2, 2);\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_vert.shd b/src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_vert.shd
new file mode 100644
index 000000000..40144aae0
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_bgra_nomul_vert.shd
@@ -0,0 +1,18 @@
+#ifdef GL_ES
+precision highp float;
+#endif
+attribute vec4 vertex;
+attribute vec2 tex_coord;
+attribute vec2 tex_sample;
+uniform mat4 mvp;
+varying vec2 tex_c;
+varying vec2 tex_s[2];
+varying vec4 div_s;
+void main()
+{
+ gl_Position = mvp * vertex;
+ tex_c = tex_coord;
+ tex_s[0] = vec2(0, -tex_sample.y);
+ tex_s[1] = vec2(0, tex_sample.y);
+ div_s = vec4(2, 2, 2, 2);
+}
diff --git a/src/modules/evas/engines/gl_common/shader/img_12_bgra_vert.h b/src/modules/evas/engines/gl_common/shader/img_12_bgra_vert.h
new file mode 100644
index 000000000..56cd0643a
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_bgra_vert.h
@@ -0,0 +1,21 @@
+"#ifdef GL_ES\n"
+"precision highp float;\n"
+"#endif\n"
+"attribute vec4 vertex;\n"
+"attribute vec4 color;\n"
+"attribute vec2 tex_coord;\n"
+"attribute vec2 tex_sample;\n"
+"uniform mat4 mvp;\n"
+"varying vec4 col;\n"
+"varying vec2 tex_c;\n"
+"varying vec2 tex_s[2];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" gl_Position = mvp * vertex;\n"
+" col = color;\n"
+" tex_c = tex_coord;\n"
+" tex_s[0] = vec2(0, -tex_sample.y);\n"
+" tex_s[1] = vec2(0, tex_sample.y);\n"
+" div_s = vec4(2, 2, 2, 2);\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_12_bgra_vert.shd b/src/modules/evas/engines/gl_common/shader/img_12_bgra_vert.shd
new file mode 100644
index 000000000..810d73aaa
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_bgra_vert.shd
@@ -0,0 +1,21 @@
+#ifdef GL_ES
+precision highp float;
+#endif
+attribute vec4 vertex;
+attribute vec4 color;
+attribute vec2 tex_coord;
+attribute vec2 tex_sample;
+uniform mat4 mvp;
+varying vec4 col;
+varying vec2 tex_c;
+varying vec2 tex_s[2];
+varying vec4 div_s;
+void main()
+{
+ gl_Position = mvp * vertex;
+ col = color;
+ tex_c = tex_coord;
+ tex_s[0] = vec2(0, -tex_sample.y);
+ tex_s[1] = vec2(0, tex_sample.y);
+ div_s = vec4(2, 2, 2, 2);
+}
diff --git a/src/modules/evas/engines/gl_common/shader/img_12_frag.h b/src/modules/evas/engines/gl_common/shader/img_12_frag.h
new file mode 100644
index 000000000..2cc449308
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_frag.h
@@ -0,0 +1,18 @@
+"#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"
+"varying vec2 tex_s[2];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;\n"
+" vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;\n"
+" gl_FragColor = ((col00 + col01) / div_s) * col;\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_12_frag.shd b/src/modules/evas/engines/gl_common/shader/img_12_frag.shd
new file mode 100644
index 000000000..2647ab2b8
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_frag.shd
@@ -0,0 +1,18 @@
+#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;
+varying vec2 tex_s[2];
+varying vec4 div_s;
+void main()
+{
+ vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;
+ vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;
+ gl_FragColor = ((col00 + col01) / div_s) * col;
+}
diff --git a/src/modules/evas/engines/gl_common/shader/img_12_nomul_frag.h b/src/modules/evas/engines/gl_common/shader/img_12_nomul_frag.h
new file mode 100644
index 000000000..9ff8813aa
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_nomul_frag.h
@@ -0,0 +1,17 @@
+"#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"
+"varying vec2 tex_s[2];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;\n"
+" vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;\n"
+" gl_FragColor = (col00 + col01) / div_s;\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_12_nomul_frag.shd b/src/modules/evas/engines/gl_common/shader/img_12_nomul_frag.shd
new file mode 100644
index 000000000..49872cfb4
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_nomul_frag.shd
@@ -0,0 +1,17 @@
+#ifdef GL_ES
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+#endif
+uniform sampler2D tex;
+varying vec2 tex_c;
+varying vec2 tex_s[2];
+varying vec4 div_s;
+void main()
+{
+ vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;
+ vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;
+ gl_FragColor = (col00 + col01) / div_s;
+}
diff --git a/src/modules/evas/engines/gl_common/shader/img_12_nomul_vert.h b/src/modules/evas/engines/gl_common/shader/img_12_nomul_vert.h
new file mode 100644
index 000000000..cee10eaf6
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_nomul_vert.h
@@ -0,0 +1,18 @@
+"#ifdef GL_ES\n"
+"precision highp float;\n"
+"#endif\n"
+"attribute vec4 vertex;\n"
+"attribute vec2 tex_coord;\n"
+"attribute vec2 tex_sample;\n"
+"uniform mat4 mvp;\n"
+"varying vec2 tex_c;\n"
+"varying vec2 tex_s[2];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" gl_Position = mvp * vertex;\n"
+" tex_c = tex_coord;\n"
+" tex_s[0] = vec2(0, -tex_sample.y);\n"
+" tex_s[1] = vec2(0, tex_sample.y);\n"
+" div_s = vec4(2, 2, 2, 2);\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_12_nomul_vert.shd b/src/modules/evas/engines/gl_common/shader/img_12_nomul_vert.shd
new file mode 100644
index 000000000..40144aae0
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_nomul_vert.shd
@@ -0,0 +1,18 @@
+#ifdef GL_ES
+precision highp float;
+#endif
+attribute vec4 vertex;
+attribute vec2 tex_coord;
+attribute vec2 tex_sample;
+uniform mat4 mvp;
+varying vec2 tex_c;
+varying vec2 tex_s[2];
+varying vec4 div_s;
+void main()
+{
+ gl_Position = mvp * vertex;
+ tex_c = tex_coord;
+ tex_s[0] = vec2(0, -tex_sample.y);
+ tex_s[1] = vec2(0, tex_sample.y);
+ div_s = vec4(2, 2, 2, 2);
+}
diff --git a/src/modules/evas/engines/gl_common/shader/img_12_vert.h b/src/modules/evas/engines/gl_common/shader/img_12_vert.h
new file mode 100644
index 000000000..56cd0643a
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_vert.h
@@ -0,0 +1,21 @@
+"#ifdef GL_ES\n"
+"precision highp float;\n"
+"#endif\n"
+"attribute vec4 vertex;\n"
+"attribute vec4 color;\n"
+"attribute vec2 tex_coord;\n"
+"attribute vec2 tex_sample;\n"
+"uniform mat4 mvp;\n"
+"varying vec4 col;\n"
+"varying vec2 tex_c;\n"
+"varying vec2 tex_s[2];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" gl_Position = mvp * vertex;\n"
+" col = color;\n"
+" tex_c = tex_coord;\n"
+" tex_s[0] = vec2(0, -tex_sample.y);\n"
+" tex_s[1] = vec2(0, tex_sample.y);\n"
+" div_s = vec4(2, 2, 2, 2);\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_12_vert.shd b/src/modules/evas/engines/gl_common/shader/img_12_vert.shd
new file mode 100644
index 000000000..810d73aaa
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_12_vert.shd
@@ -0,0 +1,21 @@
+#ifdef GL_ES
+precision highp float;
+#endif
+attribute vec4 vertex;
+attribute vec4 color;
+attribute vec2 tex_coord;
+attribute vec2 tex_sample;
+uniform mat4 mvp;
+varying vec4 col;
+varying vec2 tex_c;
+varying vec2 tex_s[2];
+varying vec4 div_s;
+void main()
+{
+ gl_Position = mvp * vertex;
+ col = color;
+ tex_c = tex_coord;
+ tex_s[0] = vec2(0, -tex_sample.y);
+ tex_s[1] = vec2(0, tex_sample.y);
+ div_s = vec4(2, 2, 2, 2);
+}
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_bgra_frag.h b/src/modules/evas/engines/gl_common/shader/img_21_bgra_frag.h
new file mode 100644
index 000000000..a076fb58f
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_bgra_frag.h
@@ -0,0 +1,18 @@
+"#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"
+"varying vec2 tex_s[2];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
+" vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
+" gl_FragColor = ((col00 + col01) / div_s) * col;\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_bgra_frag.shd b/src/modules/evas/engines/gl_common/shader/img_21_bgra_frag.shd
new file mode 100644
index 000000000..d23e17b35
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_bgra_frag.shd
@@ -0,0 +1,18 @@
+#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;
+varying vec2 tex_s[2];
+varying vec4 div_s;
+void main()
+{
+ vec4 col00 = texture2D(tex, tex_c + tex_s[0]);
+ vec4 col01 = texture2D(tex, tex_c + tex_s[1]);
+ gl_FragColor = ((col00 + col01) / div_s) * col;
+}
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_frag.h b/src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_frag.h
new file mode 100644
index 000000000..0be15b330
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_frag.h
@@ -0,0 +1,17 @@
+"#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"
+"varying vec2 tex_s[2];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
+" vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
+" gl_FragColor = (col00 + col01) / div_s;\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_frag.shd b/src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_frag.shd
new file mode 100644
index 000000000..4d29510d4
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_frag.shd
@@ -0,0 +1,17 @@
+#ifdef GL_ES
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+#endif
+uniform sampler2D tex;
+varying vec2 tex_c;
+varying vec2 tex_s[2];
+varying vec4 div_s;
+void main()
+{
+ vec4 col00 = texture2D(tex, tex_c + tex_s[0]);
+ vec4 col01 = texture2D(tex, tex_c + tex_s[1]);
+ gl_FragColor = (col00 + col01) / div_s;
+}
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_vert.h b/src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_vert.h
new file mode 100644
index 000000000..7c7d7db63
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_vert.h
@@ -0,0 +1,18 @@
+"#ifdef GL_ES\n"
+"precision highp float;\n"
+"#endif\n"
+"attribute vec4 vertex;\n"
+"attribute vec2 tex_coord;\n"
+"attribute vec2 tex_sample;\n"
+"uniform mat4 mvp;\n"
+"varying vec2 tex_c;\n"
+"varying vec2 tex_s[2];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" gl_Position = mvp * vertex;\n"
+" tex_c = tex_coord;\n"
+" tex_s[0] = vec2(-tex_sample.x, 0);\n"
+" tex_s[1] = vec2( tex_sample.x, 0);\n"
+" div_s = vec4(2, 2, 2, 2);\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_vert.shd b/src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_vert.shd
new file mode 100644
index 000000000..a6b149f5c
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_bgra_nomul_vert.shd
@@ -0,0 +1,18 @@
+#ifdef GL_ES
+precision highp float;
+#endif
+attribute vec4 vertex;
+attribute vec2 tex_coord;
+attribute vec2 tex_sample;
+uniform mat4 mvp;
+varying vec2 tex_c;
+varying vec2 tex_s[2];
+varying vec4 div_s;
+void main()
+{
+ gl_Position = mvp * vertex;
+ tex_c = tex_coord;
+ tex_s[0] = vec2(-tex_sample.x, 0);
+ tex_s[1] = vec2( tex_sample.x, 0);
+ div_s = vec4(2, 2, 2, 2);
+}
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_bgra_vert.h b/src/modules/evas/engines/gl_common/shader/img_21_bgra_vert.h
new file mode 100644
index 000000000..88d1470f2
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_bgra_vert.h
@@ -0,0 +1,21 @@
+"#ifdef GL_ES\n"
+"precision highp float;\n"
+"#endif\n"
+"attribute vec4 vertex;\n"
+"attribute vec4 color;\n"
+"attribute vec2 tex_coord;\n"
+"attribute vec2 tex_sample;\n"
+"uniform mat4 mvp;\n"
+"varying vec4 col;\n"
+"varying vec2 tex_c;\n"
+"varying vec2 tex_s[2];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" gl_Position = mvp * vertex;\n"
+" col = color;\n"
+" tex_c = tex_coord;\n"
+" tex_s[0] = vec2(-tex_sample.x, 0);\n"
+" tex_s[1] = vec2( tex_sample.x, 0);\n"
+" div_s = vec4(2, 2, 2, 2);\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_bgra_vert.shd b/src/modules/evas/engines/gl_common/shader/img_21_bgra_vert.shd
new file mode 100644
index 000000000..98d9154a7
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_bgra_vert.shd
@@ -0,0 +1,21 @@
+#ifdef GL_ES
+precision highp float;
+#endif
+attribute vec4 vertex;
+attribute vec4 color;
+attribute vec2 tex_coord;
+attribute vec2 tex_sample;
+uniform mat4 mvp;
+varying vec4 col;
+varying vec2 tex_c;
+varying vec2 tex_s[2];
+varying vec4 div_s;
+void main()
+{
+ gl_Position = mvp * vertex;
+ col = color;
+ tex_c = tex_coord;
+ tex_s[0] = vec2(-tex_sample.x, 0);
+ tex_s[1] = vec2( tex_sample.x, 0);
+ div_s = vec4(2, 2, 2, 2);
+}
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_frag.h b/src/modules/evas/engines/gl_common/shader/img_21_frag.h
new file mode 100644
index 000000000..2cc449308
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_frag.h
@@ -0,0 +1,18 @@
+"#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"
+"varying vec2 tex_s[2];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;\n"
+" vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;\n"
+" gl_FragColor = ((col00 + col01) / div_s) * col;\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_frag.shd b/src/modules/evas/engines/gl_common/shader/img_21_frag.shd
new file mode 100644
index 000000000..2647ab2b8
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_frag.shd
@@ -0,0 +1,18 @@
+#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;
+varying vec2 tex_s[2];
+varying vec4 div_s;
+void main()
+{
+ vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;
+ vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;
+ gl_FragColor = ((col00 + col01) / div_s) * col;
+}
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_nomul_frag.h b/src/modules/evas/engines/gl_common/shader/img_21_nomul_frag.h
new file mode 100644
index 000000000..9ff8813aa
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_nomul_frag.h
@@ -0,0 +1,17 @@
+"#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"
+"varying vec2 tex_s[2];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;\n"
+" vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;\n"
+" gl_FragColor = (col00 + col01) / div_s;\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_nomul_frag.shd b/src/modules/evas/engines/gl_common/shader/img_21_nomul_frag.shd
new file mode 100644
index 000000000..49872cfb4
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_nomul_frag.shd
@@ -0,0 +1,17 @@
+#ifdef GL_ES
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+#endif
+uniform sampler2D tex;
+varying vec2 tex_c;
+varying vec2 tex_s[2];
+varying vec4 div_s;
+void main()
+{
+ vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;
+ vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;
+ gl_FragColor = (col00 + col01) / div_s;
+}
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_nomul_vert.h b/src/modules/evas/engines/gl_common/shader/img_21_nomul_vert.h
new file mode 100644
index 000000000..7c7d7db63
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_nomul_vert.h
@@ -0,0 +1,18 @@
+"#ifdef GL_ES\n"
+"precision highp float;\n"
+"#endif\n"
+"attribute vec4 vertex;\n"
+"attribute vec2 tex_coord;\n"
+"attribute vec2 tex_sample;\n"
+"uniform mat4 mvp;\n"
+"varying vec2 tex_c;\n"
+"varying vec2 tex_s[2];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" gl_Position = mvp * vertex;\n"
+" tex_c = tex_coord;\n"
+" tex_s[0] = vec2(-tex_sample.x, 0);\n"
+" tex_s[1] = vec2( tex_sample.x, 0);\n"
+" div_s = vec4(2, 2, 2, 2);\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_nomul_vert.shd b/src/modules/evas/engines/gl_common/shader/img_21_nomul_vert.shd
new file mode 100644
index 000000000..a6b149f5c
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_nomul_vert.shd
@@ -0,0 +1,18 @@
+#ifdef GL_ES
+precision highp float;
+#endif
+attribute vec4 vertex;
+attribute vec2 tex_coord;
+attribute vec2 tex_sample;
+uniform mat4 mvp;
+varying vec2 tex_c;
+varying vec2 tex_s[2];
+varying vec4 div_s;
+void main()
+{
+ gl_Position = mvp * vertex;
+ tex_c = tex_coord;
+ tex_s[0] = vec2(-tex_sample.x, 0);
+ tex_s[1] = vec2( tex_sample.x, 0);
+ div_s = vec4(2, 2, 2, 2);
+}
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_vert.h b/src/modules/evas/engines/gl_common/shader/img_21_vert.h
new file mode 100644
index 000000000..88d1470f2
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_vert.h
@@ -0,0 +1,21 @@
+"#ifdef GL_ES\n"
+"precision highp float;\n"
+"#endif\n"
+"attribute vec4 vertex;\n"
+"attribute vec4 color;\n"
+"attribute vec2 tex_coord;\n"
+"attribute vec2 tex_sample;\n"
+"uniform mat4 mvp;\n"
+"varying vec4 col;\n"
+"varying vec2 tex_c;\n"
+"varying vec2 tex_s[2];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" gl_Position = mvp * vertex;\n"
+" col = color;\n"
+" tex_c = tex_coord;\n"
+" tex_s[0] = vec2(-tex_sample.x, 0);\n"
+" tex_s[1] = vec2( tex_sample.x, 0);\n"
+" div_s = vec4(2, 2, 2, 2);\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_21_vert.shd b/src/modules/evas/engines/gl_common/shader/img_21_vert.shd
new file mode 100644
index 000000000..98d9154a7
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_21_vert.shd
@@ -0,0 +1,21 @@
+#ifdef GL_ES
+precision highp float;
+#endif
+attribute vec4 vertex;
+attribute vec4 color;
+attribute vec2 tex_coord;
+attribute vec2 tex_sample;
+uniform mat4 mvp;
+varying vec4 col;
+varying vec2 tex_c;
+varying vec2 tex_s[2];
+varying vec4 div_s;
+void main()
+{
+ gl_Position = mvp * vertex;
+ col = color;
+ tex_c = tex_coord;
+ tex_s[0] = vec2(-tex_sample.x, 0);
+ tex_s[1] = vec2( tex_sample.x, 0);
+ div_s = vec4(2, 2, 2, 2);
+}
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_bgra_frag.h b/src/modules/evas/engines/gl_common/shader/img_22_bgra_frag.h
new file mode 100644
index 000000000..748a33a25
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_bgra_frag.h
@@ -0,0 +1,20 @@
+"#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"
+"varying vec2 tex_s[4];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
+" vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
+" vec4 col10 = texture2D(tex, tex_c + tex_s[2]);\n"
+" vec4 col11 = texture2D(tex, tex_c + tex_s[3]);\n"
+" gl_FragColor = ((col00 + col01 + col10 + col11) / div_s) * col;\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_bgra_frag.shd b/src/modules/evas/engines/gl_common/shader/img_22_bgra_frag.shd
new file mode 100644
index 000000000..ab1b12147
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_bgra_frag.shd
@@ -0,0 +1,20 @@
+#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;
+varying vec2 tex_s[4];
+varying vec4 div_s;
+void main()
+{
+ vec4 col00 = texture2D(tex, tex_c + tex_s[0]);
+ vec4 col01 = texture2D(tex, tex_c + tex_s[1]);
+ vec4 col10 = texture2D(tex, tex_c + tex_s[2]);
+ vec4 col11 = texture2D(tex, tex_c + tex_s[3]);
+ gl_FragColor = ((col00 + col01 + col10 + col11) / div_s) * col;
+}
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_frag.h b/src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_frag.h
new file mode 100644
index 000000000..4af85f9fa
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_frag.h
@@ -0,0 +1,19 @@
+"#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"
+"varying vec2 tex_s[4];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
+" vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
+" vec4 col10 = texture2D(tex, tex_c + tex_s[2]);\n"
+" vec4 col11 = texture2D(tex, tex_c + tex_s[3]);\n"
+" gl_FragColor = (col00 + col01 + col10 + col11) / div_s;\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_frag.shd b/src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_frag.shd
new file mode 100644
index 000000000..3f380ea55
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_frag.shd
@@ -0,0 +1,19 @@
+#ifdef GL_ES
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+#endif
+uniform sampler2D tex;
+varying vec2 tex_c;
+varying vec2 tex_s[4];
+varying vec4 div_s;
+void main()
+{
+ vec4 col00 = texture2D(tex, tex_c + tex_s[0]);
+ vec4 col01 = texture2D(tex, tex_c + tex_s[1]);
+ vec4 col10 = texture2D(tex, tex_c + tex_s[2]);
+ vec4 col11 = texture2D(tex, tex_c + tex_s[3]);
+ gl_FragColor = (col00 + col01 + col10 + col11) / div_s;
+}
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_vert.h b/src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_vert.h
new file mode 100644
index 000000000..c6fb270bf
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_vert.h
@@ -0,0 +1,20 @@
+"#ifdef GL_ES\n"
+"precision highp float;\n"
+"#endif\n"
+"attribute vec4 vertex;\n"
+"attribute vec2 tex_coord;\n"
+"attribute vec2 tex_sample;\n"
+"uniform mat4 mvp;\n"
+"varying vec2 tex_c;\n"
+"varying vec2 tex_s[4];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" gl_Position = mvp * vertex;\n"
+" tex_c = tex_coord;\n"
+" tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
+" tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
+" tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
+" tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
+" div_s = vec4(4, 4, 4, 4);\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_vert.shd b/src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_vert.shd
new file mode 100644
index 000000000..e6303d782
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_bgra_nomul_vert.shd
@@ -0,0 +1,20 @@
+#ifdef GL_ES
+precision highp float;
+#endif
+attribute vec4 vertex;
+attribute vec2 tex_coord;
+attribute vec2 tex_sample;
+uniform mat4 mvp;
+varying vec2 tex_c;
+varying vec2 tex_s[4];
+varying vec4 div_s;
+void main()
+{
+ gl_Position = mvp * vertex;
+ tex_c = tex_coord;
+ tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);
+ tex_s[1] = vec2( tex_sample.x, -tex_sample.y);
+ tex_s[2] = vec2( tex_sample.x, tex_sample.y);
+ tex_s[3] = vec2(-tex_sample.x, tex_sample.y);
+ div_s = vec4(4, 4, 4, 4);
+}
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_bgra_vert.h b/src/modules/evas/engines/gl_common/shader/img_22_bgra_vert.h
new file mode 100644
index 000000000..e1fc7f455
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_bgra_vert.h
@@ -0,0 +1,23 @@
+"#ifdef GL_ES\n"
+"precision highp float;\n"
+"#endif\n"
+"attribute vec4 vertex;\n"
+"attribute vec4 color;\n"
+"attribute vec2 tex_coord;\n"
+"attribute vec2 tex_sample;\n"
+"uniform mat4 mvp;\n"
+"varying vec4 col;\n"
+"varying vec2 tex_c;\n"
+"varying vec2 tex_s[4];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" gl_Position = mvp * vertex;\n"
+" col = color;\n"
+" tex_c = tex_coord;\n"
+" tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
+" tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
+" tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
+" tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
+" div_s = vec4(4, 4, 4, 4);\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_bgra_vert.shd b/src/modules/evas/engines/gl_common/shader/img_22_bgra_vert.shd
new file mode 100644
index 000000000..e964ea1e8
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_bgra_vert.shd
@@ -0,0 +1,23 @@
+#ifdef GL_ES
+precision highp float;
+#endif
+attribute vec4 vertex;
+attribute vec4 color;
+attribute vec2 tex_coord;
+attribute vec2 tex_sample;
+uniform mat4 mvp;
+varying vec4 col;
+varying vec2 tex_c;
+varying vec2 tex_s[4];
+varying vec4 div_s;
+void main()
+{
+ gl_Position = mvp * vertex;
+ col = color;
+ tex_c = tex_coord;
+ tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);
+ tex_s[1] = vec2( tex_sample.x, -tex_sample.y);
+ tex_s[2] = vec2( tex_sample.x, tex_sample.y);
+ tex_s[3] = vec2(-tex_sample.x, tex_sample.y);
+ div_s = vec4(4, 4, 4, 4);
+}
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_frag.h b/src/modules/evas/engines/gl_common/shader/img_22_frag.h
new file mode 100644
index 000000000..3d64e0754
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_frag.h
@@ -0,0 +1,20 @@
+"#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"
+"varying vec2 tex_s[4];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;\n"
+" vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;\n"
+" vec4 col10 = texture2D(tex, tex_c + tex_s[2]).bgra;\n"
+" vec4 col11 = texture2D(tex, tex_c + tex_s[3]).bgra;\n"
+" gl_FragColor = ((col00 + col01 + col10 + col11) / div_s) * col;\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_frag.shd b/src/modules/evas/engines/gl_common/shader/img_22_frag.shd
new file mode 100644
index 000000000..1ff5ccc7a
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_frag.shd
@@ -0,0 +1,20 @@
+#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;
+varying vec2 tex_s[4];
+varying vec4 div_s;
+void main()
+{
+ vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;
+ vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;
+ vec4 col10 = texture2D(tex, tex_c + tex_s[2]).bgra;
+ vec4 col11 = texture2D(tex, tex_c + tex_s[3]).bgra;
+ gl_FragColor = ((col00 + col01 + col10 + col11) / div_s) * col;
+}
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_nomul_frag.h b/src/modules/evas/engines/gl_common/shader/img_22_nomul_frag.h
new file mode 100644
index 000000000..2a7f073b0
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_nomul_frag.h
@@ -0,0 +1,19 @@
+"#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"
+"varying vec2 tex_s[4];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;\n"
+" vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;\n"
+" vec4 col10 = texture2D(tex, tex_c + tex_s[2]).bgra;\n"
+" vec4 col11 = texture2D(tex, tex_c + tex_s[3]).bgra;\n"
+" gl_FragColor = (col00 + col01 + col10 + col11) / div_s;\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_nomul_frag.shd b/src/modules/evas/engines/gl_common/shader/img_22_nomul_frag.shd
new file mode 100644
index 000000000..3b87c099e
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_nomul_frag.shd
@@ -0,0 +1,19 @@
+#ifdef GL_ES
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+#endif
+uniform sampler2D tex;
+varying vec2 tex_c;
+varying vec2 tex_s[4];
+varying vec4 div_s;
+void main()
+{
+ vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;
+ vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;
+ vec4 col10 = texture2D(tex, tex_c + tex_s[2]).bgra;
+ vec4 col11 = texture2D(tex, tex_c + tex_s[3]).bgra;
+ gl_FragColor = (col00 + col01 + col10 + col11) / div_s;
+}
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_nomul_vert.h b/src/modules/evas/engines/gl_common/shader/img_22_nomul_vert.h
new file mode 100644
index 000000000..c6fb270bf
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_nomul_vert.h
@@ -0,0 +1,20 @@
+"#ifdef GL_ES\n"
+"precision highp float;\n"
+"#endif\n"
+"attribute vec4 vertex;\n"
+"attribute vec2 tex_coord;\n"
+"attribute vec2 tex_sample;\n"
+"uniform mat4 mvp;\n"
+"varying vec2 tex_c;\n"
+"varying vec2 tex_s[4];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" gl_Position = mvp * vertex;\n"
+" tex_c = tex_coord;\n"
+" tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
+" tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
+" tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
+" tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
+" div_s = vec4(4, 4, 4, 4);\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_nomul_vert.shd b/src/modules/evas/engines/gl_common/shader/img_22_nomul_vert.shd
new file mode 100644
index 000000000..e6303d782
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_nomul_vert.shd
@@ -0,0 +1,20 @@
+#ifdef GL_ES
+precision highp float;
+#endif
+attribute vec4 vertex;
+attribute vec2 tex_coord;
+attribute vec2 tex_sample;
+uniform mat4 mvp;
+varying vec2 tex_c;
+varying vec2 tex_s[4];
+varying vec4 div_s;
+void main()
+{
+ gl_Position = mvp * vertex;
+ tex_c = tex_coord;
+ tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);
+ tex_s[1] = vec2( tex_sample.x, -tex_sample.y);
+ tex_s[2] = vec2( tex_sample.x, tex_sample.y);
+ tex_s[3] = vec2(-tex_sample.x, tex_sample.y);
+ div_s = vec4(4, 4, 4, 4);
+}
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_vert.h b/src/modules/evas/engines/gl_common/shader/img_22_vert.h
new file mode 100644
index 000000000..e1fc7f455
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_vert.h
@@ -0,0 +1,23 @@
+"#ifdef GL_ES\n"
+"precision highp float;\n"
+"#endif\n"
+"attribute vec4 vertex;\n"
+"attribute vec4 color;\n"
+"attribute vec2 tex_coord;\n"
+"attribute vec2 tex_sample;\n"
+"uniform mat4 mvp;\n"
+"varying vec4 col;\n"
+"varying vec2 tex_c;\n"
+"varying vec2 tex_s[4];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" gl_Position = mvp * vertex;\n"
+" col = color;\n"
+" tex_c = tex_coord;\n"
+" tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
+" tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
+" tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
+" tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
+" div_s = vec4(4, 4, 4, 4);\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/img_22_vert.shd b/src/modules/evas/engines/gl_common/shader/img_22_vert.shd
new file mode 100644
index 000000000..e964ea1e8
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/img_22_vert.shd
@@ -0,0 +1,23 @@
+#ifdef GL_ES
+precision highp float;
+#endif
+attribute vec4 vertex;
+attribute vec4 color;
+attribute vec2 tex_coord;
+attribute vec2 tex_sample;
+uniform mat4 mvp;
+varying vec4 col;
+varying vec2 tex_c;
+varying vec2 tex_s[4];
+varying vec4 div_s;
+void main()
+{
+ gl_Position = mvp * vertex;
+ col = color;
+ tex_c = tex_coord;
+ tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);
+ tex_s[1] = vec2( tex_sample.x, -tex_sample.y);
+ tex_s[2] = vec2( tex_sample.x, tex_sample.y);
+ tex_s[3] = vec2(-tex_sample.x, tex_sample.y);
+ div_s = vec4(4, 4, 4, 4);
+}
diff --git a/src/modules/evas/engines/gl_common/shader/tex_12_frag.h b/src/modules/evas/engines/gl_common/shader/tex_12_frag.h
new file mode 100644
index 000000000..a076fb58f
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_12_frag.h
@@ -0,0 +1,18 @@
+"#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"
+"varying vec2 tex_s[2];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
+" vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
+" gl_FragColor = ((col00 + col01) / div_s) * col;\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/tex_12_frag.shd b/src/modules/evas/engines/gl_common/shader/tex_12_frag.shd
new file mode 100644
index 000000000..d23e17b35
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_12_frag.shd
@@ -0,0 +1,18 @@
+#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;
+varying vec2 tex_s[2];
+varying vec4 div_s;
+void main()
+{
+ vec4 col00 = texture2D(tex, tex_c + tex_s[0]);
+ vec4 col01 = texture2D(tex, tex_c + tex_s[1]);
+ gl_FragColor = ((col00 + col01) / div_s) * col;
+}
diff --git a/src/modules/evas/engines/gl_common/shader/tex_12_nomul_frag.h b/src/modules/evas/engines/gl_common/shader/tex_12_nomul_frag.h
new file mode 100644
index 000000000..0be15b330
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_12_nomul_frag.h
@@ -0,0 +1,17 @@
+"#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"
+"varying vec2 tex_s[2];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
+" vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
+" gl_FragColor = (col00 + col01) / div_s;\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/tex_12_nomul_frag.shd b/src/modules/evas/engines/gl_common/shader/tex_12_nomul_frag.shd
new file mode 100644
index 000000000..4d29510d4
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_12_nomul_frag.shd
@@ -0,0 +1,17 @@
+#ifdef GL_ES
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+#endif
+uniform sampler2D tex;
+varying vec2 tex_c;
+varying vec2 tex_s[2];
+varying vec4 div_s;
+void main()
+{
+ vec4 col00 = texture2D(tex, tex_c + tex_s[0]);
+ vec4 col01 = texture2D(tex, tex_c + tex_s[1]);
+ gl_FragColor = (col00 + col01) / div_s;
+}
diff --git a/src/modules/evas/engines/gl_common/shader/tex_12_nomul_vert.h b/src/modules/evas/engines/gl_common/shader/tex_12_nomul_vert.h
new file mode 100644
index 000000000..cee10eaf6
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_12_nomul_vert.h
@@ -0,0 +1,18 @@
+"#ifdef GL_ES\n"
+"precision highp float;\n"
+"#endif\n"
+"attribute vec4 vertex;\n"
+"attribute vec2 tex_coord;\n"
+"attribute vec2 tex_sample;\n"
+"uniform mat4 mvp;\n"
+"varying vec2 tex_c;\n"
+"varying vec2 tex_s[2];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" gl_Position = mvp * vertex;\n"
+" tex_c = tex_coord;\n"
+" tex_s[0] = vec2(0, -tex_sample.y);\n"
+" tex_s[1] = vec2(0, tex_sample.y);\n"
+" div_s = vec4(2, 2, 2, 2);\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/tex_12_nomul_vert.shd b/src/modules/evas/engines/gl_common/shader/tex_12_nomul_vert.shd
new file mode 100644
index 000000000..40144aae0
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_12_nomul_vert.shd
@@ -0,0 +1,18 @@
+#ifdef GL_ES
+precision highp float;
+#endif
+attribute vec4 vertex;
+attribute vec2 tex_coord;
+attribute vec2 tex_sample;
+uniform mat4 mvp;
+varying vec2 tex_c;
+varying vec2 tex_s[2];
+varying vec4 div_s;
+void main()
+{
+ gl_Position = mvp * vertex;
+ tex_c = tex_coord;
+ tex_s[0] = vec2(0, -tex_sample.y);
+ tex_s[1] = vec2(0, tex_sample.y);
+ div_s = vec4(2, 2, 2, 2);
+}
diff --git a/src/modules/evas/engines/gl_common/shader/tex_12_vert.h b/src/modules/evas/engines/gl_common/shader/tex_12_vert.h
new file mode 100644
index 000000000..56cd0643a
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_12_vert.h
@@ -0,0 +1,21 @@
+"#ifdef GL_ES\n"
+"precision highp float;\n"
+"#endif\n"
+"attribute vec4 vertex;\n"
+"attribute vec4 color;\n"
+"attribute vec2 tex_coord;\n"
+"attribute vec2 tex_sample;\n"
+"uniform mat4 mvp;\n"
+"varying vec4 col;\n"
+"varying vec2 tex_c;\n"
+"varying vec2 tex_s[2];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" gl_Position = mvp * vertex;\n"
+" col = color;\n"
+" tex_c = tex_coord;\n"
+" tex_s[0] = vec2(0, -tex_sample.y);\n"
+" tex_s[1] = vec2(0, tex_sample.y);\n"
+" div_s = vec4(2, 2, 2, 2);\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/tex_12_vert.shd b/src/modules/evas/engines/gl_common/shader/tex_12_vert.shd
new file mode 100644
index 000000000..810d73aaa
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_12_vert.shd
@@ -0,0 +1,21 @@
+#ifdef GL_ES
+precision highp float;
+#endif
+attribute vec4 vertex;
+attribute vec4 color;
+attribute vec2 tex_coord;
+attribute vec2 tex_sample;
+uniform mat4 mvp;
+varying vec4 col;
+varying vec2 tex_c;
+varying vec2 tex_s[2];
+varying vec4 div_s;
+void main()
+{
+ gl_Position = mvp * vertex;
+ col = color;
+ tex_c = tex_coord;
+ tex_s[0] = vec2(0, -tex_sample.y);
+ tex_s[1] = vec2(0, tex_sample.y);
+ div_s = vec4(2, 2, 2, 2);
+}
diff --git a/src/modules/evas/engines/gl_common/shader/tex_21_frag.h b/src/modules/evas/engines/gl_common/shader/tex_21_frag.h
new file mode 100644
index 000000000..a076fb58f
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_21_frag.h
@@ -0,0 +1,18 @@
+"#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"
+"varying vec2 tex_s[2];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
+" vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
+" gl_FragColor = ((col00 + col01) / div_s) * col;\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/tex_21_frag.shd b/src/modules/evas/engines/gl_common/shader/tex_21_frag.shd
new file mode 100644
index 000000000..d23e17b35
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_21_frag.shd
@@ -0,0 +1,18 @@
+#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;
+varying vec2 tex_s[2];
+varying vec4 div_s;
+void main()
+{
+ vec4 col00 = texture2D(tex, tex_c + tex_s[0]);
+ vec4 col01 = texture2D(tex, tex_c + tex_s[1]);
+ gl_FragColor = ((col00 + col01) / div_s) * col;
+}
diff --git a/src/modules/evas/engines/gl_common/shader/tex_21_nomul_frag.h b/src/modules/evas/engines/gl_common/shader/tex_21_nomul_frag.h
new file mode 100644
index 000000000..0be15b330
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_21_nomul_frag.h
@@ -0,0 +1,17 @@
+"#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"
+"varying vec2 tex_s[2];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
+" vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
+" gl_FragColor = (col00 + col01) / div_s;\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/tex_21_nomul_frag.shd b/src/modules/evas/engines/gl_common/shader/tex_21_nomul_frag.shd
new file mode 100644
index 000000000..4d29510d4
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_21_nomul_frag.shd
@@ -0,0 +1,17 @@
+#ifdef GL_ES
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+#endif
+uniform sampler2D tex;
+varying vec2 tex_c;
+varying vec2 tex_s[2];
+varying vec4 div_s;
+void main()
+{
+ vec4 col00 = texture2D(tex, tex_c + tex_s[0]);
+ vec4 col01 = texture2D(tex, tex_c + tex_s[1]);
+ gl_FragColor = (col00 + col01) / div_s;
+}
diff --git a/src/modules/evas/engines/gl_common/shader/tex_21_nomul_vert.h b/src/modules/evas/engines/gl_common/shader/tex_21_nomul_vert.h
new file mode 100644
index 000000000..7c7d7db63
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_21_nomul_vert.h
@@ -0,0 +1,18 @@
+"#ifdef GL_ES\n"
+"precision highp float;\n"
+"#endif\n"
+"attribute vec4 vertex;\n"
+"attribute vec2 tex_coord;\n"
+"attribute vec2 tex_sample;\n"
+"uniform mat4 mvp;\n"
+"varying vec2 tex_c;\n"
+"varying vec2 tex_s[2];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" gl_Position = mvp * vertex;\n"
+" tex_c = tex_coord;\n"
+" tex_s[0] = vec2(-tex_sample.x, 0);\n"
+" tex_s[1] = vec2( tex_sample.x, 0);\n"
+" div_s = vec4(2, 2, 2, 2);\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/tex_21_nomul_vert.shd b/src/modules/evas/engines/gl_common/shader/tex_21_nomul_vert.shd
new file mode 100644
index 000000000..a6b149f5c
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_21_nomul_vert.shd
@@ -0,0 +1,18 @@
+#ifdef GL_ES
+precision highp float;
+#endif
+attribute vec4 vertex;
+attribute vec2 tex_coord;
+attribute vec2 tex_sample;
+uniform mat4 mvp;
+varying vec2 tex_c;
+varying vec2 tex_s[2];
+varying vec4 div_s;
+void main()
+{
+ gl_Position = mvp * vertex;
+ tex_c = tex_coord;
+ tex_s[0] = vec2(-tex_sample.x, 0);
+ tex_s[1] = vec2( tex_sample.x, 0);
+ div_s = vec4(2, 2, 2, 2);
+}
diff --git a/src/modules/evas/engines/gl_common/shader/tex_21_vert.h b/src/modules/evas/engines/gl_common/shader/tex_21_vert.h
new file mode 100644
index 000000000..88d1470f2
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_21_vert.h
@@ -0,0 +1,21 @@
+"#ifdef GL_ES\n"
+"precision highp float;\n"
+"#endif\n"
+"attribute vec4 vertex;\n"
+"attribute vec4 color;\n"
+"attribute vec2 tex_coord;\n"
+"attribute vec2 tex_sample;\n"
+"uniform mat4 mvp;\n"
+"varying vec4 col;\n"
+"varying vec2 tex_c;\n"
+"varying vec2 tex_s[2];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" gl_Position = mvp * vertex;\n"
+" col = color;\n"
+" tex_c = tex_coord;\n"
+" tex_s[0] = vec2(-tex_sample.x, 0);\n"
+" tex_s[1] = vec2( tex_sample.x, 0);\n"
+" div_s = vec4(2, 2, 2, 2);\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/tex_21_vert.shd b/src/modules/evas/engines/gl_common/shader/tex_21_vert.shd
new file mode 100644
index 000000000..98d9154a7
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_21_vert.shd
@@ -0,0 +1,21 @@
+#ifdef GL_ES
+precision highp float;
+#endif
+attribute vec4 vertex;
+attribute vec4 color;
+attribute vec2 tex_coord;
+attribute vec2 tex_sample;
+uniform mat4 mvp;
+varying vec4 col;
+varying vec2 tex_c;
+varying vec2 tex_s[2];
+varying vec4 div_s;
+void main()
+{
+ gl_Position = mvp * vertex;
+ col = color;
+ tex_c = tex_coord;
+ tex_s[0] = vec2(-tex_sample.x, 0);
+ tex_s[1] = vec2( tex_sample.x, 0);
+ div_s = vec4(2, 2, 2, 2);
+}
diff --git a/src/modules/evas/engines/gl_common/shader/tex_22_frag.h b/src/modules/evas/engines/gl_common/shader/tex_22_frag.h
new file mode 100644
index 000000000..748a33a25
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_22_frag.h
@@ -0,0 +1,20 @@
+"#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"
+"varying vec2 tex_s[4];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
+" vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
+" vec4 col10 = texture2D(tex, tex_c + tex_s[2]);\n"
+" vec4 col11 = texture2D(tex, tex_c + tex_s[3]);\n"
+" gl_FragColor = ((col00 + col01 + col10 + col11) / div_s) * col;\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/tex_22_frag.shd b/src/modules/evas/engines/gl_common/shader/tex_22_frag.shd
new file mode 100644
index 000000000..ab1b12147
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_22_frag.shd
@@ -0,0 +1,20 @@
+#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;
+varying vec2 tex_s[4];
+varying vec4 div_s;
+void main()
+{
+ vec4 col00 = texture2D(tex, tex_c + tex_s[0]);
+ vec4 col01 = texture2D(tex, tex_c + tex_s[1]);
+ vec4 col10 = texture2D(tex, tex_c + tex_s[2]);
+ vec4 col11 = texture2D(tex, tex_c + tex_s[3]);
+ gl_FragColor = ((col00 + col01 + col10 + col11) / div_s) * col;
+}
diff --git a/src/modules/evas/engines/gl_common/shader/tex_22_nomul_frag.h b/src/modules/evas/engines/gl_common/shader/tex_22_nomul_frag.h
new file mode 100644
index 000000000..4af85f9fa
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_22_nomul_frag.h
@@ -0,0 +1,19 @@
+"#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"
+"varying vec2 tex_s[4];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
+" vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
+" vec4 col10 = texture2D(tex, tex_c + tex_s[2]);\n"
+" vec4 col11 = texture2D(tex, tex_c + tex_s[3]);\n"
+" gl_FragColor = (col00 + col01 + col10 + col11) / div_s;\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/tex_22_nomul_frag.shd b/src/modules/evas/engines/gl_common/shader/tex_22_nomul_frag.shd
new file mode 100644
index 000000000..3f380ea55
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_22_nomul_frag.shd
@@ -0,0 +1,19 @@
+#ifdef GL_ES
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+#endif
+uniform sampler2D tex;
+varying vec2 tex_c;
+varying vec2 tex_s[4];
+varying vec4 div_s;
+void main()
+{
+ vec4 col00 = texture2D(tex, tex_c + tex_s[0]);
+ vec4 col01 = texture2D(tex, tex_c + tex_s[1]);
+ vec4 col10 = texture2D(tex, tex_c + tex_s[2]);
+ vec4 col11 = texture2D(tex, tex_c + tex_s[3]);
+ gl_FragColor = (col00 + col01 + col10 + col11) / div_s;
+}
diff --git a/src/modules/evas/engines/gl_common/shader/tex_22_nomul_vert.h b/src/modules/evas/engines/gl_common/shader/tex_22_nomul_vert.h
new file mode 100644
index 000000000..c6fb270bf
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_22_nomul_vert.h
@@ -0,0 +1,20 @@
+"#ifdef GL_ES\n"
+"precision highp float;\n"
+"#endif\n"
+"attribute vec4 vertex;\n"
+"attribute vec2 tex_coord;\n"
+"attribute vec2 tex_sample;\n"
+"uniform mat4 mvp;\n"
+"varying vec2 tex_c;\n"
+"varying vec2 tex_s[4];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" gl_Position = mvp * vertex;\n"
+" tex_c = tex_coord;\n"
+" tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
+" tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
+" tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
+" tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
+" div_s = vec4(4, 4, 4, 4);\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/tex_22_nomul_vert.shd b/src/modules/evas/engines/gl_common/shader/tex_22_nomul_vert.shd
new file mode 100644
index 000000000..e6303d782
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_22_nomul_vert.shd
@@ -0,0 +1,20 @@
+#ifdef GL_ES
+precision highp float;
+#endif
+attribute vec4 vertex;
+attribute vec2 tex_coord;
+attribute vec2 tex_sample;
+uniform mat4 mvp;
+varying vec2 tex_c;
+varying vec2 tex_s[4];
+varying vec4 div_s;
+void main()
+{
+ gl_Position = mvp * vertex;
+ tex_c = tex_coord;
+ tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);
+ tex_s[1] = vec2( tex_sample.x, -tex_sample.y);
+ tex_s[2] = vec2( tex_sample.x, tex_sample.y);
+ tex_s[3] = vec2(-tex_sample.x, tex_sample.y);
+ div_s = vec4(4, 4, 4, 4);
+}
diff --git a/src/modules/evas/engines/gl_common/shader/tex_22_vert.h b/src/modules/evas/engines/gl_common/shader/tex_22_vert.h
new file mode 100644
index 000000000..e1fc7f455
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_22_vert.h
@@ -0,0 +1,23 @@
+"#ifdef GL_ES\n"
+"precision highp float;\n"
+"#endif\n"
+"attribute vec4 vertex;\n"
+"attribute vec4 color;\n"
+"attribute vec2 tex_coord;\n"
+"attribute vec2 tex_sample;\n"
+"uniform mat4 mvp;\n"
+"varying vec4 col;\n"
+"varying vec2 tex_c;\n"
+"varying vec2 tex_s[4];\n"
+"varying vec4 div_s;\n"
+"void main()\n"
+"{\n"
+" gl_Position = mvp * vertex;\n"
+" col = color;\n"
+" tex_c = tex_coord;\n"
+" tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
+" tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
+" tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
+" tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
+" div_s = vec4(4, 4, 4, 4);\n"
+"}\n"
diff --git a/src/modules/evas/engines/gl_common/shader/tex_22_vert.shd b/src/modules/evas/engines/gl_common/shader/tex_22_vert.shd
new file mode 100644
index 000000000..e964ea1e8
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/tex_22_vert.shd
@@ -0,0 +1,23 @@
+#ifdef GL_ES
+precision highp float;
+#endif
+attribute vec4 vertex;
+attribute vec4 color;
+attribute vec2 tex_coord;
+attribute vec2 tex_sample;
+uniform mat4 mvp;
+varying vec4 col;
+varying vec2 tex_c;
+varying vec2 tex_s[4];
+varying vec4 div_s;
+void main()
+{
+ gl_Position = mvp * vertex;
+ col = color;
+ tex_c = tex_coord;
+ tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);
+ tex_s[1] = vec2( tex_sample.x, -tex_sample.y);
+ tex_s[2] = vec2( tex_sample.x, tex_sample.y);
+ tex_s[3] = vec2(-tex_sample.x, tex_sample.y);
+ div_s = vec4(4, 4, 4, 4);
+}