setup_hwcompose:
// TO DO :
// query if selective HWC plane can be used
- if (!e_comp_gl_get() && !e_comp->hwc)
+ if (!e_comp_gl_get() || !e_comp->hwc || !e_comp->hwc_fs)
{
goto end;
}
e_comp->hwc = e_comp_hwc_init();
if (!e_comp->hwc)
WRN("fail to init hwc.");
+ else
+ e_comp->hwc_fs = EINA_TRUE; // 1: active hwc policy
}
#endif
Eina_Bool shape_queue_blocked : 1;
Eina_Bool calc_fps : 1;
Eina_Bool hwc : 1;
+ Eina_Bool hwc_fs : 1; // active hwc policy
Eina_List *connected_clients;
Eina_List *launchscrns; // list of dummy clients for launchscreen image.
Eina_List *l;
int i = 0;
int prev_layer = -1;
+ int hwc_off = 0;
+
const char *prev_layer_name = NULL;
if (!_e_info_client_eldbus_message("get_window_info", _cb_window_info_get))
prev_layer_name = win->layer_name;
}
- if (win->visibility == 0)
+ if (win->hwc >= 0)
{
- if (win->hwc) snprintf(tmp, sizeof(tmp), "hwc@%i", win->pl_zpos);
- else snprintf(tmp, sizeof(tmp), "comp@%i", win->pl_zpos);
+ if (win->visibility == 0)
+ {
+ if (win->hwc) snprintf(tmp, sizeof(tmp), "hwc@%i", win->pl_zpos);
+ else snprintf(tmp, sizeof(tmp), "comp@%i", win->pl_zpos);
+ }
+ else
+ snprintf(tmp, sizeof(tmp), " - ");
}
- else
+ else // hwc is not initialized or hwc_fs deactivated
{
+ hwc_off = 1;
snprintf(tmp, sizeof(tmp), " - ");
}
printf("--------------------------------------------------------------------------------------------------------------[%s]\n",
prev_layer_name ? prev_layer_name : " ");
+ if(hwc_off)
+ printf("\nHWC is disabled\n\n");
+
E_FREE_LIST(e_info_client.win_list, _e_win_info_free);
}
printf("Error Check Args: enlightenment_info -effect [1: on, 0: off]\n");
}
+static void
+_e_info_client_proc_hwc(int argc, char **argv)
+{
+ uint32_t onoff;
+
+ if (argc < 3)
+ {
+ printf("Error Check Args: enlightenment_info -hwc [1: on, 0: off]\n");
+ return;
+ }
+
+ onoff = atoi(argv[2]);
+
+ if (onoff == 1 || onoff == 0)
+ {
+ if (!_e_info_client_eldbus_message_with_args("hwc", NULL, "i", onoff))
+ {
+ printf("_e_info_client_eldbus_message_with_args error");
+ return;
+ }
+ }
+ else
+ printf("Error Check Args: enlightenment_info -hwc [1: on, 0: off]\n");
+
+}
+
static struct
{
const char *option;
"[on: 1, off: 0]",
"On/Off the window effect",
_e_info_client_proc_effect_control
+ },
+ {
+ "hwc",
+ "[on: 1, off: 0]",
+ "On/Off the hw composite",
+ _e_info_client_proc_hwc
}
};
}
}
- if (e_comp->hwc)
+ if (e_comp->hwc && e_comp->hwc_fs)
{
#ifdef ENABLE_HWC_MULTI
Eina_List *l, *ll;
pl_zpos = ep->zpos;
}
}
- }
#else
- if (e_comp->nocomp_ec == ec)
- {
- hwc = 1;
+ if (e_comp->nocomp_ec == ec) hwc = 1;
pl_zpos = 0;
- }
#endif
+ }
+ else
+ hwc = -1;
+
eldbus_message_iter_arguments_append(array_of_ec, "("VALUE_TYPE_FOR_TOPVWINS")", &struct_of_ec);
eldbus_message_iter_arguments_append
return reply;
}
+static int override = 0;
+static Eldbus_Message *
+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;
+
+ if (!eldbus_message_arguments_get(msg, "i", &onoff))
+ {
+ ERR("Error getting arguments.");
+ return reply;
+ }
+
+ if (!e_comp->hwc)
+ {
+ ERR("Error HWC is not initialized.");
+ return reply;
+ }
+
+ if (onoff == 1)
+ {
+ e_comp->hwc_fs = EINA_TRUE;
+ }
+ else if (onoff == 0)
+ {
+#ifdef ENABLE_HWC_MULTI
+ _e_comp_hwc_end("in runtime by e_info..");
+#else
+ e_comp_nocomp_end("in runtime by e_info..");
+#endif // end of ENABLE_HWC_MULTI
+ e_comp->hwc_fs = EINA_FALSE;
+ }
+
+ return reply;
+}
+
static const Eldbus_Method methods[] = {
{ "get_window_info", NULL, ELDBUS_ARGS({"a("VALUE_TYPE_FOR_TOPVWINS")", "array of ec"}), _e_info_server_cb_window_info_get, 0 },
{ "dump_topvwins", ELDBUS_ARGS({"s", "directory"}), NULL, _e_info_server_cb_topvwins_dump, 0 },
#endif
{ "get_keymap", NULL, ELDBUS_ARGS({"hi", "keymap fd"}), _e_info_server_cb_keymap_info_get, 0},
{ "effect_control", ELDBUS_ARGS({"i", "effect_control"}), NULL, e_info_server_cb_effect_control, 0},
+ { "hwc", ELDBUS_ARGS({"i", "hwc"}), NULL, e_info_server_cb_hwc, 0},
{ NULL, NULL, NULL, NULL, 0 }
};