}
static void
-_e_info_client_proc_hwc_trace(int argc, char **argv)
+_e_info_client_proc_trace(int argc, char **argv)
{
uint32_t onoff;
- if (argc < 3)
- {
- printf("Error Check Args: enlightenment_info -hwc_trace [0/1/2]\n");
- return;
- }
+ if (argc < 4)
+ goto arg_err;
- onoff = atoi(argv[2]);
+ onoff = atoi(argv[3]);
- if (onoff == 1 || onoff == 0 || onoff == 2)
+ if (onoff == 1 || onoff == 0)
{
- if (!_e_info_client_eldbus_message_with_args("hwc_trace_message", NULL, "i", onoff))
+ if (eina_streq(argv[2], "hwc"))
{
- printf("_e_info_client_eldbus_message_with_args error");
+ if (!_e_info_client_eldbus_message_with_args("trace_message_hwc", NULL, "i", onoff))
+ {
+ printf("_e_info_client_eldbus_message_with_args error");
+ }
return;
}
}
- else
- printf("Error Check Args: enlightenment_info -hwc_trace [0/1/2]\n");
+
+arg_err:
+ printf("Error Check Args: enlightenment_info -trace %s\n", USAGE_TRACE);
}
static void
_e_info_client_proc_hwc(int argc, char **argv)
{
- uint32_t onoff;
+ uint32_t param;
if (argc < 3)
- {
- printf("Error Check Args: enlightenment_info -hwc [1: on, 0: off]\n");
- return;
- }
+ goto arg_err;
- onoff = atoi(argv[2]);
+ param = atoi(argv[2]);
- if (onoff == 1 || onoff == 0)
+ if (param == 1 || param == 0 || param == 2)
{
- if (!_e_info_client_eldbus_message_with_args("hwc", NULL, "i", onoff))
+ if (!_e_info_client_eldbus_message_with_args("hwc", NULL, "i", param))
{
printf("_e_info_client_eldbus_message_with_args error");
- return;
}
+ return;
}
- else
- printf("Error Check Args: enlightenment_info -hwc [1: on, 0: off]\n");
+
+arg_err:
+ printf("Error Check Args: enlightenment_info -hwc [0: off, 1: on, 2: info]\n");
}
},
#endif
{
- "hwc_trace",
- "[off: 0, on: 1, info:2]",
- "Show the hwc trace log",
- _e_info_client_proc_hwc_trace
+ "trace",
+ "[hwc] [off: 0, on: 1]",
+ "Show the trace log in detail",
+ _e_info_client_proc_trace
},
};
},
{
"hwc",
- "[on: 1, off: 0]",
- "HW composite [on 1, off 0]",
+ "[on: 1, off: 0, 2: info]",
+ "HW composite policy on(1) and off(0), or prints info(2) via dlog",
_e_info_client_proc_hwc
},
{
e_info_server_cb_hwc(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg)
{
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
- uint32_t onoff;
+ uint32_t info;
- if (!eldbus_message_arguments_get(msg, "i", &onoff))
+ if (!eldbus_message_arguments_get(msg, "i", &info))
{
ERR("Error getting arguments.");
return reply;
return reply;
}
- if (onoff == 1)
- e_comp_hwc_deactive_set(EINA_FALSE);
- else if (onoff == 0)
- e_comp_hwc_deactive_set(EINA_TRUE);
+ switch (info)
+ {
+ case 0:
+ e_comp_hwc_deactive_set(EINA_TRUE);
+ break;
+
+ case 1:
+ e_comp_hwc_deactive_set(EINA_FALSE);
+ break;
+
+ default:
+ case 2:
+ e_comp_screen_hwc_info_debug();
+ break;
+ }
return reply;
}
{ "dump_selected_buffers", ELDBUS_ARGS({"ss", "dump_selected_buffers"}), NULL, _e_info_server_cb_selected_buffer_dump, 0 },
{ "dump_screen", ELDBUS_ARGS({"s", "dump_screen"}), NULL, _e_info_server_cb_screen_dump, 0 },
{ "output_mode", ELDBUS_ARGS({SIGNATURE_OUTPUT_MODE_CLIENT, "output mode"}), ELDBUS_ARGS({"a("SIGNATURE_OUTPUT_MODE_SERVER")", "array of ec"}), _e_info_server_cb_output_mode, 0 },
- { "hwc_trace_message", ELDBUS_ARGS({"i", "hwc_trace_message"}), NULL, e_info_server_cb_hwc_trace_message, 0},
+ { "trace_message_hwc", ELDBUS_ARGS({"i", "trace_message_hwc"}), NULL, e_info_server_cb_hwc_trace_message, 0},
{ "hwc", ELDBUS_ARGS({"i", "hwc"}), NULL, e_info_server_cb_hwc, 0},
{ "show_plane_state", NULL, NULL, e_info_server_cb_show_plane_state, 0},
{ "show_pending_commit", NULL, ELDBUS_ARGS({"a("VALUE_TYPE_FOR_PENDING_COMMIT")", "array of pending commit"}), e_info_server_cb_show_pending_commit, 0},
"\tgeometry [ x][ y][ w][ h] : change desktop screen given geometry\n" \
"\tzoom [zx][zy][cx][cy] : scale desktop screen\n"
+/* -------------------------------------------------------------------------- */
+/* TRACE */
+/* -------------------------------------------------------------------------- */
+#define USAGE_TRACE \
+ "[hwc] [off: 0, on: 1]\n" \
+ "Example:\n" \
+ "\tenlightenment_info -trace hwc 1\n" \
+ "\tenlightenment_info -trace hwc 0\n"
#endif /* end of _E_INFO_SHARED_TYPES_ */