hwc_window: added macro for log 23/185523/2
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 31 Jul 2018 05:38:29 +0000 (14:38 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Wed, 1 Aug 2018 06:52:43 +0000 (06:52 +0000)
Change-Id: I3fcb0b48903e8f5998f65455f0a86e809440557f

src/bin/e_hwc_window.c
src/bin/e_hwc_windows.c

index b5ab261..a50ea78 100644 (file)
@@ -7,6 +7,46 @@
 # include <pixman.h>
 # include <wayland-tbm-server.h>
 
+#ifndef CLEAR
+#define CLEAR(x) memset(&(x), 0, sizeof (x))
+#endif
+
+#define EHWINF(f, ec, ehw, x...)                                \
+   do                                                           \
+     {                                                          \
+        if ((!ec) && (!ehw))                                    \
+          INF("EWL|%20.20s|              |             |"f,     \
+              "HWC-WIN", ##x);                                  \
+        else                                                    \
+          INF("EWL|%20.20s|win:0x%08x|ec:0x%08x| ehw:0x%08x "f, \
+              "HWC-WIN",                                        \
+              (unsigned int)(e_client_util_win_get(ec)),        \
+              (unsigned int)(ec),                               \
+              (unsigned int)(ehw),                              \
+              ##x);                                             \
+     }                                                          \
+   while (0)
+
+#define EHWTRACE(f, ec, ehw, x...)                                  \
+   do                                                               \
+     {                                                              \
+        if (ehw_trace)                                              \
+          {                                                         \
+            if ((!ec) && (!ehw))                                    \
+              INF("EWL|%20.20s|              |             |"f,     \
+                  "HWC-WIN", ##x);                                  \
+            else                                                    \
+              INF("EWL|%20.20s|win:0x%08x|ec:0x%08x| ehw:0x%08x "f, \
+                  "HWC-WIN",                                        \
+                  (unsigned int)(e_client_util_win_get(ec)),        \
+                  (unsigned int)(ec),                               \
+                  (unsigned int)(ehw),                              \
+                  ##x);                                             \
+          }                                                         \
+     }                                                              \
+   while (0)
+
+static Eina_Bool ehw_trace = EINA_TRUE;
 static E_Client_Hook *client_hook_new = NULL;
 static E_Client_Hook *client_hook_del = NULL;
 static Ecore_Event_Handler *zone_set_event_handler = NULL;
index 74734be..0085c32 100644 (file)
@@ -5,6 +5,41 @@
 
 #define ZPOS_NONE -999
 
+#define EHWSINF(f, ec, x...)                                \
+   do                                                       \
+     {                                                      \
+        if (!ec)                                            \
+          INF("EWL|%20.20s|              |             |"f, \
+              "HWC-WINS", ##x);                             \
+        else                                                \
+          INF("EWL|%20.20s|win:0x%08x|ec:0x%08x|"f,         \
+              "HWC-WINS",                                   \
+              (unsigned int)(e_client_util_win_get(ec)),    \
+              (unsigned int)(ec),                           \
+              ##x);                                         \
+     }                                                      \
+   while (0)
+
+#define EHWSTRACE(f, ec, x...)                              \
+   do                                                            \
+     {                                                           \
+        if (ehws_trace)                                          \
+          {                                                      \
+             if (!ec)                                            \
+               INF("EWL|%20.20s|              |             |"f, \
+                   "HWC-WINS", ##x);                             \
+             else                                                \
+               INF("EWL|%20.20s|win:0x%08x|ec:0x%08x|"f,         \
+                   "HWC-WINS",                                   \
+                   (unsigned int)(e_client_util_win_get(ec)),    \
+                   (unsigned int)(ec),                           \
+                   ##x);                                         \
+          }                                                      \
+     }                                                           \
+   while (0)
+
+static Eina_Bool ehws_trace = EINA_TRUE;
+
 static Eina_Bool _e_hwc_windows_pp_output_data_commit(E_Hwc *hwc, E_Hwc_Window_Commit_Data *data);
 static Eina_Bool _e_hwc_windows_pp_window_commit(E_Hwc *hwc, E_Hwc_Window *hwc_window);