hermet pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=6b1f281f175a68dc50c788010f47bc4e256905d1

commit 6b1f281f175a68dc50c788010f47bc4e256905d1
Author: Hermet Park <chuneon.p...@samsung.com>
Date:   Tue Nov 24 12:17:17 2020 +0900

    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
---
 src/lib/elementary/elm_transit.c                  | 6 ++++++
 src/modules/evas/engines/gl_generic/evas_engine.c | 3 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)

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
       Eina_Bool map_enabled : 1;
       Eina_Bool visible : 1;
       Eina_Bool freeze_events : 1;
+      Eina_Bool anti_alias : 1;
    } state;
    int ref;
 };
@@ -140,6 +141,7 @@ _transit_obj_data_save(Evas_Object *obj)
    obj_data->state.visible = evas_object_visible_get(obj);
    obj_data->state.freeze_events = evas_object_freeze_events_get(obj);
    obj_data->state.map_enabled = evas_object_map_enable_get(obj);
+   obj_data->state.anti_alias = evas_object_anti_alias_get(obj);
 
    ELM_SAFE_FREE(obj_data->state.map, evas_map_free);
 
@@ -205,6 +207,7 @@ _transit_obj_data_recover(Elm_Transit *transit, Evas_Object 
*obj)
                               obj_data->state.b, obj_data->state.a);
         if (obj_data->state.visible) evas_object_show(obj);
         else evas_object_hide(obj);
+        evas_object_anti_alias_set(obj, obj_data->state.anti_alias);
         evas_object_map_enable_set(obj, obj_data->state.map_enabled);
         evas_object_map_set(obj, obj_data->state.map);
      }
@@ -1282,6 +1285,9 @@ _transit_effect_zoom_op(Elm_Transit_Effect *effect, 
Elm_Transit *transit , doubl
 
    EINA_LIST_FOREACH(transit->objs, elist, obj)
      {
+        //Turn on for fixing jiggling by sub-pixel rendering
+        evas_object_anti_alias_set(obj, EINA_TRUE);
+
         obj_data = evas_object_data_get(obj, _transit_key);
         if (obj_data && obj_data->state.map_enabled)
           {
diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c 
b/src/modules/evas/engines/gl_generic/evas_engine.c
index 46f927e28e..a1c48ae451 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -1318,7 +1318,8 @@ eng_image_map_draw(void *engine EINA_UNUSED, void *data, 
void *context, void *su
    evas_gl_common_context_target_surface_set(gl_context, surface);
    gl_context->dc = context;
 
-   if (fabsf(m->pts[0].fx - m->pts[3].fx) < FLT_EPSILON &&
+   if (!((RGBA_Draw_Context*) context)->anti_alias &&
+       fabsf(m->pts[0].fx - m->pts[3].fx) < FLT_EPSILON &&
        fabsf(m->pts[1].fx - m->pts[2].fx) < FLT_EPSILON &&
        fabsf(m->pts[0].fy - m->pts[1].fy) < FLT_EPSILON &&
        fabsf(m->pts[3].fy - m->pts[2].fy) < FLT_EPSILON &&

-- 


Reply via email to