Add hook for plane if multi hwc is enabled
authorChangyeon Lee <cyeon.lee@samsung.com>
Thu, 14 Jul 2016 07:26:38 +0000 (16:26 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Mon, 25 Jul 2016 09:56:36 +0000 (18:56 +0900)
Change-Id: I1c63235e5a1be8a073daa140c8e9c929f212325a

src/bin/e_info_server.c
src/bin/e_plane.c
src/bin/e_plane.h

index 92079ae..4c5aafc 100644 (file)
@@ -1473,7 +1473,11 @@ e_info_server_cb_hwc_trace_message(const Eldbus_Service_Interface *iface EINA_UN
      }
 
    if (onoff == 0 || onoff == 1)
+#ifdef ENABLE_HWC_MULTI
+     e_plane_hwc_trace_debug(onoff);
+#else
      e_comp_hwc_trace_debug(onoff);
+#endif /* ENABLE_HWC_MULTI */
    if (onoff == 2)
      e_comp_hwc_info_debug();
 
index 99c1513..6c2f114 100644 (file)
@@ -1376,6 +1376,7 @@ _e_plane_cb_ec_buffer_change(void *data, int type, void *event)
 EINTERN Eina_Bool
 e_plane_init(void)
 {
+#ifdef ENABLE_HWC_MULTI
    if (client_hook_new) return EINA_TRUE;
    if (client_hook_del) return EINA_TRUE;
 
@@ -1386,16 +1387,14 @@ e_plane_init(void)
 
    E_LIST_HANDLER_APPEND(plane_hdlrs, E_EVENT_CLIENT_BUFFER_CHANGE,
                          _e_plane_cb_ec_buffer_change, NULL);
-
-   // soolim debug
-   plane_trace_debug = EINA_TRUE;
-
+#endif
    return EINA_TRUE;
 }
 
 EINTERN void
 e_plane_shutdown(void)
 {
+#ifdef ENABLE_HWC_MULTI
    if (client_hook_new)
      {
         e_client_hook_del(client_hook_new);
@@ -1407,6 +1406,7 @@ e_plane_shutdown(void)
         e_client_hook_del(client_hook_del);
         client_hook_del = NULL;
      }
+#endif
 }
 
 EINTERN E_Plane *
@@ -1928,3 +1928,11 @@ e_plane_is_fb_target(E_Plane *plane)
    if (plane->is_fb) return EINA_TRUE;
    return EINA_FALSE;
 }
+
+EINTERN void
+e_plane_hwc_trace_debug(Eina_Bool onoff)
+{
+   if (onoff == plane_trace_debug) return;
+   plane_trace_debug = onoff;
+   INF("Plane: hwc trace_debug is %s", onoff?"ON":"OFF");
+}
\ No newline at end of file
index 92ad1d7..2a7188e 100644 (file)
@@ -102,6 +102,7 @@ EINTERN E_Plane_Commit_Data *e_plane_commit_data_aquire(E_Plane *plane);
 EINTERN void                 e_plane_commit_data_release(E_Plane_Commit_Data *data);
 EINTERN Eina_Bool            e_plane_is_reserved(E_Plane *plane);
 EINTERN void                 e_plane_reserved_set(E_Plane *plane, Eina_Bool set);
+EINTERN void                 e_plane_hwc_trace_debug(Eina_Bool onoff);
 E_API Eina_Bool              e_plane_type_set(E_Plane *plane, E_Plane_Type type);
 E_API E_Plane_Type           e_plane_type_get(E_Plane *plane);
 E_API E_Client              *e_plane_ec_get(E_Plane *plane);