summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorHermet Park <chuneon.park@samsung.com>2020-11-24 12:17:17 +0900
committerHermet Park <chuneon.park@samsung.com>2020-11-25 10:11:59 +0900
commit6b1f281f175a68dc50c788010f47bc4e256905d1 (patch)
treef7ad9fcdedfa07170e3dc78f7563b89bc8e5ff83 /src/lib
parent841ceced52f63a4a73bc68b4621733ae70ccd580 (diff)
ui transit: improve zoom effect smoothness by subpixel rendering.
Summary: evas image might have a better quaility if scaling/transform is not necessary, so we have a condition to check if image is axis-aligned transformed or not. On the other hand sub-pixel(floating point coordinates unit) rendering necessary if image has an effect such a zooming. This would result in a smoother effect than integer coodinate system. We need a more precise condition to confirm this, so we intrduce "anti-alias" option to decide the condition. now, anti-aliased objects will have a sub-pixel rendering always. Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12194
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/elementary/elm_transit.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_transit.c b/src/lib/elementary/elm_transit.c
index 6774e74589..a0813791f4 100644
--- a/src/lib/elementary/elm_transit.c
+++ b/src/lib/elementary/elm_transit.c
@@ -95,6 +95,7 @@ struct _Elm_Transit_Obj_Data
95 Eina_Bool map_enabled : 1; 95 Eina_Bool map_enabled : 1;
96 Eina_Bool visible : 1; 96 Eina_Bool visible : 1;
97 Eina_Bool freeze_events : 1; 97 Eina_Bool freeze_events : 1;
98 Eina_Bool anti_alias : 1;
98 } state; 99 } state;
99 int ref; 100 int ref;
100}; 101};
@@ -140,6 +141,7 @@ _transit_obj_data_save(Evas_Object *obj)
140 obj_data->state.visible = evas_object_visible_get(obj); 141 obj_data->state.visible = evas_object_visible_get(obj);
141 obj_data->state.freeze_events = evas_object_freeze_events_get(obj); 142 obj_data->state.freeze_events = evas_object_freeze_events_get(obj);
142 obj_data->state.map_enabled = evas_object_map_enable_get(obj); 143 obj_data->state.map_enabled = evas_object_map_enable_get(obj);
144 obj_data->state.anti_alias = evas_object_anti_alias_get(obj);
143 145
144 ELM_SAFE_FREE(obj_data->state.map, evas_map_free); 146 ELM_SAFE_FREE(obj_data->state.map, evas_map_free);
145 147
@@ -205,6 +207,7 @@ _transit_obj_data_recover(Elm_Transit *transit, Evas_Object *obj)
205 obj_data->state.b, obj_data->state.a); 207 obj_data->state.b, obj_data->state.a);
206 if (obj_data->state.visible) evas_object_show(obj); 208 if (obj_data->state.visible) evas_object_show(obj);
207 else evas_object_hide(obj); 209 else evas_object_hide(obj);
210 evas_object_anti_alias_set(obj, obj_data->state.anti_alias);
208 evas_object_map_enable_set(obj, obj_data->state.map_enabled); 211 evas_object_map_enable_set(obj, obj_data->state.map_enabled);
209 evas_object_map_set(obj, obj_data->state.map); 212 evas_object_map_set(obj, obj_data->state.map);
210 } 213 }
@@ -1282,6 +1285,9 @@ _transit_effect_zoom_op(Elm_Transit_Effect *effect, Elm_Transit *transit , doubl
1282 1285
1283 EINA_LIST_FOREACH(transit->objs, elist, obj) 1286 EINA_LIST_FOREACH(transit->objs, elist, obj)
1284 { 1287 {
1288 //Turn on for fixing jiggling by sub-pixel rendering
1289 evas_object_anti_alias_set(obj, EINA_TRUE);
1290
1285 obj_data = evas_object_data_get(obj, _transit_key); 1291 obj_data = evas_object_data_get(obj, _transit_key);
1286 if (obj_data && obj_data->state.map_enabled) 1292 if (obj_data && obj_data->state.map_enabled)
1287 { 1293 {