zoom: add e_config's flag for pp zoom(use_pp_zoom) 03/137103/1
authorJunkyeong Kim <jk0430.kim@samsung.com>
Tue, 4 Jul 2017 10:31:46 +0000 (19:31 +0900)
committerJunkyeong Kim <jk0430.kim@samsung.com>
Tue, 4 Jul 2017 10:32:24 +0000 (19:32 +0900)
delete HAVE_ZOOM_PP define

Change-Id: Ide5b4484a1efafce001d79b52803ba204eac2cde
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
configure.ac
src/bin/e_config.c
src/bin/e_config.h
src/bin/e_desk.c
src/bin/e_output.c
src/bin/e_output.h

index 7771ce5ef5e74a8f45c5ed0f38d886fb68527beb..1de73f1a5934377653d5fac1542fc6bdb740f5f6 100755 (executable)
@@ -429,10 +429,6 @@ if test "x${have_wayland}" = "xyes"; then
   else
     have_hwc=no
   fi
-
-  if test "x$have_hwc" = "xyes";then
-    AC_DEFINE_UNQUOTED([HAVE_ZOOM_PP], [1], [enable pp_zoom support])
-  fi
 fi
 
 # does this compiler support -fopenmp, does it have the include file
index e5ecc4a4a347955291c9932b29055498cca3e903..45366cc81dfe69b5e94e4ee32a24bfdbf1329dc7 100644 (file)
@@ -283,6 +283,7 @@ _e_config_edd_init(Eina_Bool old)
    E_CONFIG_VAL(D, T, indicator_plug_name, STR);
    E_CONFIG_VAL(D, T, launchscreen_without_timer, UCHAR);
    E_CONFIG_VAL(D, T, log_type, INT);
+   E_CONFIG_VAL(D, T, use_pp_zoom, UCHAR);
 }
 
 static Eina_Bool
@@ -498,6 +499,7 @@ e_config_load(void)
    E_CONFIG_LIMIT(e_config->save_win_buffer, 0, 1);
    E_CONFIG_LIMIT(e_config->launchscreen_without_timer, 0, 1);
    E_CONFIG_LIMIT(e_config->log_type, 0, 255);
+   E_CONFIG_LIMIT(e_config->use_pp_zoom, 0, 1);
 }
 
 E_API int
index 39cde5f47dcf4c3a656b1ac8763e48a5f5988369..b1690d3cbb2dc500ac8e42cbd449597bedd26e89 100644 (file)
@@ -178,6 +178,7 @@ struct _E_Config
    const char *indicator_plug_name;
    Eina_Bool launchscreen_without_timer;
    int log_type;
+   Eina_Bool use_pp_zoom;
 };
 
 struct _E_Config_Desklock_Background
index a896b9fbb03448a9ba41f52b7d4da52d961afca8..7c02ae4557e83f745c544cfee1f27874fb837e5a 100644 (file)
@@ -821,14 +821,32 @@ e_desk_zoom_set(E_Desk *desk, double zoomx, double zoomy, int cx, int cy)
 {
    E_Client *ec;
    Eina_List *l;
-#ifdef HAVE_ZOOM_PP
    E_Zone *zone = NULL;
    E_Output *eout = NULL;
-#endif
 
    E_OBJECT_CHECK(desk);
    E_OBJECT_TYPE_CHECK(desk, E_DESK_TYPE);
 
+   if (e_config->use_pp_zoom)
+     {
+        if (e_comp_screen_pp_support())
+          {
+             zone = desk->zone;
+             eout = e_output_find(zone->output_id);
+             if (!eout)
+               {
+                  ERR("e_desk_zoom_set: fail get eout");
+                  return;
+               }
+             if (!e_output_zoom_set(eout, zoomx, zoomy, cx, cy))
+               ERR("e_desk_zoom_set: fail zoom set");
+             else
+               DBG("e_desk_zoom_set: zoomx:%f, zoomy:%f, x:%d, y:%d", zoomx, zoomy, cx, cy);
+
+             return;
+          }
+     }
+
    if (e_config->use_desk_smart_obj)
      {
         E_DESK_SMART_DATA_GET_OR_RETURN(desk->smart_obj, sd);
@@ -858,23 +876,6 @@ e_desk_zoom_set(E_Desk *desk, double zoomx, double zoomy, int cx, int cy)
              _e_desk_util_comp_hwc_disable_set(EINA_TRUE);
           }
      }
-#ifdef HAVE_ZOOM_PP
-   else
-     {
-        /* use PP */
-        zone = desk->zone;
-        eout = e_output_find(zone->output_id);
-        if (!eout)
-          {
-             ERR("e_desk_zoom_set: fail get eout");
-             return;
-          }
-        if (!e_output_zoom_set(eout, zoomx, zoomy, cx, cy))
-          ERR("e_desk_zoom_set: fail zoom set");
-        else
-          DBG("e_desk_zoom_set: zoomx:%f, zoomy:%f, x:%d, y:%d", zoomx, zoomy, cx, cy);
-     }
-#endif
 }
 
 E_API void
@@ -882,14 +883,31 @@ e_desk_zoom_unset(E_Desk *desk)
 {
    E_Client *ec;
    Eina_List *l;
-#ifdef HAVE_ZOOM_PP
    E_Zone *zone = NULL;
    E_Output *eout = NULL;
-#endif
 
    E_OBJECT_CHECK(desk);
    E_OBJECT_TYPE_CHECK(desk, E_DESK_TYPE);
 
+   if (e_config->use_pp_zoom)
+     {
+        if (e_comp_screen_pp_support())
+          {
+             zone = desk->zone;
+             eout = e_output_find(zone->output_id);
+             if (!eout)
+               {
+                  ERR("e_desk_zoom_unset: fail get eout");
+                  return;
+               }
+
+             e_output_zoom_unset(eout);
+             DBG("e_desk_zoom_unset");
+
+             return;
+          }
+     }
+
    if (e_config->use_desk_smart_obj)
      {
         E_DESK_SMART_DATA_GET_OR_RETURN(desk->smart_obj, sd);
@@ -916,22 +934,6 @@ e_desk_zoom_unset(E_Desk *desk)
         /* FIXME TEMP enable hwc */
         _e_desk_util_comp_hwc_disable_set(EINA_FALSE);
      }
-#ifdef HAVE_ZOOM_PP
-   else
-     {
-        /* use PP */
-        zone = desk->zone;
-        eout = e_output_find(zone->output_id);
-        if (!eout)
-          {
-             ERR("e_desk_zoom_set: fail get eout");
-             return;
-          }
-
-        e_output_zoom_unset(eout);
-        DBG("e_desk_zoom_unset");
-     }
-#endif
 }
 
 E_API void
index f3f6d2c8c603daff6293afc4a78dbeabb78732f8..e3b986514c897e976afbab4d6976387d300a7dbb 100644 (file)
@@ -1,6 +1,5 @@
 #include "e.h"
 
-#ifdef HAVE_ZOOM_PP
 static E_Client *
 _e_output_zoom_top_visible_ec_get()
 {
@@ -239,7 +238,6 @@ _e_output_zoom_rotating_check(E_Output *output)
         _e_output_zoom_rotate(output);
      }
 }
-#endif
 
 static void
 _e_output_cb_output_change(tdm_output *toutput,
@@ -1160,7 +1158,6 @@ e_output_plane_get_by_zpos(E_Output *output, int zpos)
    return NULL;
 }
 
-#ifdef HAVE_ZOOM_PP
 static Eina_Bool
 _e_output_zoom_touch_set(E_Output *eout, Eina_Bool set)
 {
@@ -1313,5 +1310,4 @@ e_output_zoom_unset(E_Output *eout)
    _e_output_render_update(eout);
 
    DBG("e_output_zoom_unset: output:%s", eout->id);
-}
-#endif
+}
\ No newline at end of file
index 991e292c742ea6f2e2fc777af3d58d69383c34c4..6234fe370a027cc647b2fdd0c1abb668ab320e13 100644 (file)
@@ -65,7 +65,7 @@ struct _E_Output
        int max_w, max_h;
        int preferred_align;
    } cursor_available;
-#ifdef HAVE_ZOOM_PP
+
    Eina_Bool            zoom_set;
    struct
    {
@@ -79,7 +79,6 @@ struct _E_Output
       int               current_angle;
       Eina_Rectangle    rect;
    } zoom_conf;
-#endif
 };
 
 EINTERN Eina_Bool         e_output_init(void);
@@ -104,11 +103,8 @@ E_API Eina_Bool           e_output_is_fb_composing(E_Output *output);
 E_API Eina_Bool           e_output_is_fb_full_compositing(E_Output *output);
 E_API E_Plane           * e_output_fb_target_get(E_Output *output);
 E_API E_Plane           * e_output_plane_get_by_zpos(E_Output *output, int zpos);
-
-#ifdef HAVE_ZOOM_PP
 EINTERN Eina_Bool         e_output_zoom_set(E_Output *eout, double zoomx, double zoomy, int cx, int cy);
 EINTERN void              e_output_zoom_unset(E_Output *eout);
-#endif
 
 #endif
 #endif