summaryrefslogtreecommitdiff
path: root/src/modules/evas
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-01-20 15:57:46 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-01-20 16:07:29 +0900
commit448720fed4da252fa5eefa02ae37c79c5fb63499 (patch)
treea7dd2083aa8744f72e5ef9512524ef8e00359ab0 /src/modules/evas
parent2ca99b8b68bd52ce187c2da54944144f12afb0b6 (diff)
Evas: Fix shader flag 'afill' (forcing alpha to 255)
Apparently the shaders refactor broke the afill select logic, and it no longer applied to objects where it should have (eg. opaque windows in E).
Diffstat (limited to 'src/modules/evas')
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_shader.c32
1 files changed, 15 insertions, 17 deletions
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 6156503bfd..0590e17a17 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_shader.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_shader.c
@@ -646,7 +646,7 @@ evas_gl_common_shader_flags_get(Evas_GL_Shared *shared, Shader_Type type,
646 Shader_Sampling *psam, int *pnomul, Shader_Sampling *pmasksam) 646 Shader_Sampling *psam, int *pnomul, Shader_Sampling *pmasksam)
647{ 647{
648 Shader_Sampling sam = SHD_SAM11, masksam = SHD_SAM11; 648 Shader_Sampling sam = SHD_SAM11, masksam = SHD_SAM11;
649 int nomul = 1, bgra = 0, afill = 0, k; 649 int nomul = 1, bgra = 0, k, noalpha = 1;
650 unsigned int flags = BASEFLAG; 650 unsigned int flags = BASEFLAG;
651 651
652 // image downscale sampling 652 // image downscale sampling
@@ -717,12 +717,17 @@ evas_gl_common_shader_flags_get(Evas_GL_Shared *shared, Shader_Type type,
717 if (map_points[k].col != 0xffffffff) 717 if (map_points[k].col != 0xffffffff)
718 { 718 {
719 nomul = 0; 719 nomul = 0;
720 break; 720 if (A_VAL(&map_points[k].col) < 255)
721 noalpha = 0;
721 } 722 }
722 } 723 }
723 } 724 }
724 else 725 else
725 nomul = 0; 726 {
727 if (a < 255)
728 noalpha = 0;
729 nomul = 0;
730 }
726 731
727 if (nomul) 732 if (nomul)
728 flags |= SHADER_FLAG_NOMUL; 733 flags |= SHADER_FLAG_NOMUL;
@@ -730,16 +735,8 @@ evas_gl_common_shader_flags_get(Evas_GL_Shared *shared, Shader_Type type,
730 // bgra 735 // bgra
731 if (tex_only) 736 if (tex_only)
732 { 737 {
733 if (tex->pt->dyn.img) 738 if (tex->im && tex->im->native.target == GL_TEXTURE_EXTERNAL_OES)
734 { 739 flags |= SHADER_FLAG_EXTERNAL;
735 afill = !tex->alpha;
736 bgra = 1;
737 }
738 else if (tex->im && tex->im->native.target == GL_TEXTURE_EXTERNAL_OES)
739 {
740 flags |= SHADER_FLAG_EXTERNAL;
741 afill = !tex->alpha;
742 }
743 else 740 else
744 bgra = 1; 741 bgra = 1;
745 } 742 }
@@ -747,14 +744,15 @@ evas_gl_common_shader_flags_get(Evas_GL_Shared *shared, Shader_Type type,
747 bgra = shared->info.bgra; 744 bgra = shared->info.bgra;
748 745
749 if (tex) 746 if (tex)
750 flags |= SHADER_FLAG_TEX; 747 {
748 flags |= SHADER_FLAG_TEX;
749 if (!tex->alpha && !mtex && noalpha)
750 flags |= SHADER_FLAG_AFILL;
751 }
751 752
752 if (mtex) 753 if (mtex)
753 flags |= SHADER_FLAG_MASK; 754 flags |= SHADER_FLAG_MASK;
754 755
755 if (afill)
756 flags |= SHADER_FLAG_AFILL;
757
758 if (bgra) 756 if (bgra)
759 flags |= SHADER_FLAG_BGRA; 757 flags |= SHADER_FLAG_BGRA;
760 758