forked from enlightenment/efl
ecore_evas: Ecore_Evas_X - Fix broken rendering during rotation with resize
Summary: When ee is trying to do rotation, ee should check whether given rotation value is portrait or not. Then it sets output size of evas canvas according to rotation value. But, ECORE_EVAS_PORTRAIT macro used in ee x engine only checks ee's rotation value, even if ee's rotation value is not updated yet. Thus we should change the logic to compare with given rotation value, not ee's rotation, before setting output size of evas. This fixes T1371 problem. @fix Test Plan: 1. run elementary_test -to "window states" 2. check resize 3. rotation 0 ~ 270 Reviewers: jpeg, raster, cedric, zmike, devilhorns, Hermet Reviewed By: Hermet Subscribers: cedric Maniphest Tasks: T1371 Differential Revision: https://phab.enlightenment.org/D1351
This commit is contained in:
parent
e4ed80dc1e
commit
a9a7ed6c52
|
@ -33,8 +33,11 @@ EAPI extern int _ecore_evas_log_dom;
|
|||
#endif
|
||||
#define CRI(...) EINA_LOG_DOM_CRIT(_ecore_evas_log_dom, __VA_ARGS__)
|
||||
|
||||
#define PORTRAIT_CHECK(r) \
|
||||
((r == 0) || (r == 180))
|
||||
|
||||
#define ECORE_EVAS_PORTRAIT(ee) \
|
||||
((ee->rotation == 0) || (ee->rotation == 180))
|
||||
(PORTRAIT_CHECK(ee->rotation))
|
||||
|
||||
|
||||
#define IDLE_FLUSH_TIME 0.5
|
||||
|
|
|
@ -2197,7 +2197,7 @@ _ecore_evas_x_rotation_set_internal(Ecore_Evas *ee, int rotation, int resize,
|
|||
|
||||
ecore_x_window_size_get(ee->prop.window, &w, &h);
|
||||
ecore_x_window_resize(ee->prop.window, h, w);
|
||||
if (ECORE_EVAS_PORTRAIT(ee))
|
||||
if (PORTRAIT_CHECK(rotation))
|
||||
{
|
||||
evas_output_size_set(ee->evas, ee->req.w, ee->req.h);
|
||||
evas_output_viewport_set(ee->evas, 0, 0, ee->req.w, ee->req.h);
|
||||
|
@ -2209,7 +2209,7 @@ _ecore_evas_x_rotation_set_internal(Ecore_Evas *ee, int rotation, int resize,
|
|||
}
|
||||
if (ee->func.fn_resize) ee->func.fn_resize(ee);
|
||||
}
|
||||
if (ECORE_EVAS_PORTRAIT(ee))
|
||||
if (PORTRAIT_CHECK(rotation))
|
||||
evas_damage_rectangle_add(ee->evas, 0, 0, ee->req.w, ee->req.h);
|
||||
else
|
||||
evas_damage_rectangle_add(ee->evas, 0, 0, ee->req.h, ee->req.w);
|
||||
|
@ -2219,7 +2219,7 @@ _ecore_evas_x_rotation_set_internal(Ecore_Evas *ee, int rotation, int resize,
|
|||
/* int w, h; */
|
||||
|
||||
/* ecore_x_window_size_get(ee->prop.window, &w, &h); */
|
||||
if (ECORE_EVAS_PORTRAIT(ee))
|
||||
if (PORTRAIT_CHECK(rotation))
|
||||
{
|
||||
evas_output_size_set(ee->evas, ee->w, ee->h);
|
||||
evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
|
||||
|
@ -2230,7 +2230,7 @@ _ecore_evas_x_rotation_set_internal(Ecore_Evas *ee, int rotation, int resize,
|
|||
evas_output_viewport_set(ee->evas, 0, 0, ee->h, ee->w);
|
||||
}
|
||||
if (ee->func.fn_resize) ee->func.fn_resize(ee);
|
||||
if (ECORE_EVAS_PORTRAIT(ee))
|
||||
if (PORTRAIT_CHECK(rotation))
|
||||
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
|
||||
else
|
||||
evas_damage_rectangle_add(ee->evas, 0, 0, ee->h, ee->w);
|
||||
|
|
Loading…
Reference in New Issue