forked from enlightenment/efl
evas: Fix a rare issue with GL and map and mask
The things you learn to love... The situation was: - An object is mapped (naviframe in an animation) - One of its children has a mask - The window is rotated by 90 or 270 degrees (landscape) The mask glsl code to invert the x,y coordinate depends on the screen rotation and this somehow was wrong. Tested on Tizen and in elm_test "Masking", made with @jiin.moon. @fix
This commit is contained in:
parent
2c0b850f57
commit
2787f0fe5d
|
@ -95,6 +95,18 @@ _toggle_map(void *data, const Efl_Event *ev EINA_UNUSED)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_rotate_win(void *data, const Efl_Event *ev EINA_UNUSED)
|
||||||
|
{
|
||||||
|
//Efl_Orient orient;
|
||||||
|
Eo *win = data;
|
||||||
|
|
||||||
|
// FIXME: This is not implemented???
|
||||||
|
//orient = efl_orientation_get(win);
|
||||||
|
//efl_orientation_set(win, (orient + 90) % 360);
|
||||||
|
elm_win_rotation_set(win, (elm_win_rotation_get(win) + 90) % 360);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
test_evas_mask(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
test_evas_mask(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||||
{
|
{
|
||||||
|
@ -170,6 +182,12 @@ test_evas_mask(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
|
||||||
efl_pack(box2, efl_added),
|
efl_pack(box2, efl_added),
|
||||||
efl_gfx_visible_set(efl_added, 1));
|
efl_gfx_visible_set(efl_added, 1));
|
||||||
|
|
||||||
|
efl_add(ELM_BUTTON_CLASS, win,
|
||||||
|
efl_text_set(efl_added, "Rotate Window"),
|
||||||
|
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _rotate_win, win),
|
||||||
|
efl_pack(box2, efl_added),
|
||||||
|
efl_gfx_visible_set(efl_added, 1));
|
||||||
|
|
||||||
efl_gfx_size_set(win, 500, 600);
|
efl_gfx_size_set(win, 500, 600);
|
||||||
efl_gfx_visible_set(win, 1);
|
efl_gfx_visible_set(win, 1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3202,7 +3202,7 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
|
||||||
glUseProgram(prog->prog);
|
glUseProgram(prog->prog);
|
||||||
if (prog->reset)
|
if (prog->reset)
|
||||||
{
|
{
|
||||||
glUniform1i(prog->uniform.rotation_id, gc->rot / 90);
|
glUniform1i(prog->uniform.rotation_id, fbo ? 0 : gc->rot / 90);
|
||||||
glUniformMatrix4fv(prog->uniform.mvp, 1, GL_FALSE, gc->shared->proj);
|
glUniformMatrix4fv(prog->uniform.mvp, 1, GL_FALSE, gc->shared->proj);
|
||||||
prog->reset = EINA_FALSE;
|
prog->reset = EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue