evas: Fix masking with window rotation, take 2
authorJaeun Choi <jaeun12.choi@samsung.com>
Tue, 8 Nov 2016 05:58:02 +0000 (14:58 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Thu, 17 Nov 2016 07:54:17 +0000 (16:54 +0900)
commit400f3388c362c4fa99b4d5f05efb281a7886d3f0
treefc9cafe5de616c625d0f75f4b5fe35fafbb2ae15
parent1b0d398e91a343e12d611c50efe8d8ab40a45233
evas: Fix masking with window rotation, take 2

The first patch did not work for maps. This explains why the
original code was so weird. But it actually made sense.

After struggling a bit I realized that we really just need
to shuffle around the pixel position on the window to map that
of the position in the canvas (unrotate it).

Note that compatibility with GLSL-ES (for OpenGL ES) implies
we can not use an array initializer like:
  vec2 pos[4] = vec2[4](a,b,c,d);
So the code could probably be optimized. But at least this works.

This patch also avoids calling glGetUniformLocation again and
again.

Change-Id: I90de310eb82d478ba66809d2c0b3e73facd2c3b6
Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
src/modules/evas/engines/gl_common/evas_gl_common.h
src/modules/evas/engines/gl_common/evas_gl_context.c
src/modules/evas/engines/gl_common/evas_gl_shader.c
src/modules/evas/engines/gl_common/shader/evas_gl_shaders.x [changed mode: 0755->0644]
src/modules/evas/engines/gl_common/shader/fragment.glsl [changed mode: 0755->0644]
src/modules/evas/engines/gl_common/shader/vertex.glsl