e_comp: Added skip_first_damage 54/37054/1
authorMinJeong Kim <minjjj.kim@samsung.com>
Wed, 18 Mar 2015 12:06:40 +0000 (21:06 +0900)
committerMinJeong Kim <minjjj.kim@samsung.com>
Wed, 18 Mar 2015 12:50:56 +0000 (21:50 +0900)
For supporting the case that X doesn't send DamageNotify event of
damage creation, added skip_first_damage value.
This skip_first_damage will be used for determining skip of first DamageNotify.

Change-Id: I5d4c616110b9a0ed53a0b1781c02c0300481fede
Signed-off-by: MinJeong Kim <minjjj.kim@samsung.com>
src/bin/e_comp_cfdata.c
src/bin/e_comp_cfdata.h
src/bin/e_comp_object.c
src/bin/e_comp_x.c

index f5d2555a7e8d7b3248f0391992c4e3b6703d80a3..bf50ec5780f9dd2f298517f7cfc883e90a827a5f 100644 (file)
@@ -54,6 +54,7 @@ e_comp_cfdata_edd_init(E_Config_DD **conf_edd, E_Config_DD **match_edd)
    E_CONFIG_VAL(D, T, nofade, UCHAR);
    E_CONFIG_VAL(D, T, smooth_windows, UCHAR);
    E_CONFIG_VAL(D, T, first_draw_delay, DOUBLE);
+   E_CONFIG_VAL(D, T, skip_first_damage, UCHAR);
    E_CONFIG_VAL(D, T, disable_screen_effects, UCHAR);
    E_CONFIG_VAL(D, T, enable_advanced_features, UCHAR);
    E_CONFIG_VAL(D, T, fast_popups, UCHAR);
@@ -107,6 +108,7 @@ e_comp_cfdata_config_new(void)
    cfg->nofade = 0;
    cfg->smooth_windows = 0; // 1 if gl, 0 if not
    cfg->first_draw_delay = 0.15;
+   cfg->skip_first_damage = 1;
 
    cfg->match.popups = NULL;
 
index b3c18ed5f49736a1194b1244535478c8ca548d1f..ba992cf386950cfb41f2687f137d9db60b0846b5 100644 (file)
@@ -32,6 +32,7 @@ struct _E_Comp_Config
    unsigned char smooth_windows;
    unsigned char nofade;
    double        first_draw_delay;
+   Eina_Bool skip_first_damage;
    Eina_Bool disable_screen_effects;
    Eina_Bool enable_advanced_features;
    // the following options add the "/fast" suffix to the normal groups
index 4a6b28bf5782c6408fe019c7c21894c58b0601f7..a76fea0d619774032a5b5302b5c4d60782a78e7c 100644 (file)
@@ -1427,7 +1427,7 @@ _e_comp_intercept_show_helper(E_Comp_Object *cw)
 
         if (!cw->update_count || !(e_pixmap_validate_check(cw->ec->pixmap))
 #ifndef HAVE_WAYLAND_ONLY
-            || (cd->damage_count < 2))
+            || (cd->damage_count < (e_comp_config_get()->skip_first_damage + 1))
 #else
             )
 #endif
index 81c0d61ebd1f32929a05ebb85ba0f1ce32c40c8e..ae946d9ac9e1164739260680681cf49a2670465f 100644 (file)
@@ -2574,7 +2574,9 @@ _e_comp_x_damage(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Dam
      e_comp_object_damage(ec->frame, 0, 0, ev->area.width, ev->area.height);
    else
      e_comp_object_damage(ec->frame, ev->area.x, ev->area.y, ev->area.width, ev->area.height);
-   if ((!ec->re_manage) && (!ec->override) && (!ec->comp_data->first_damage))
+
+   if ((e_comp_config_get()->skip_first_damage) &&
+       (!ec->re_manage) && (!ec->override) && (!ec->comp_data->first_damage))
      e_comp_object_render_update_del(ec->frame);
    else
      E_FREE_FUNC(ec->comp_data->first_draw_delay, ecore_timer_del);