e_main_ts(buf);
}
- if (!e_hwc_windows_ecore_evas_set(hwc, ee))
+ if (hwc->hwc_policy == E_HWC_POLICY_WINDOWS)
{
- ERR("fail to e_hwc_windows_ecore_evas_set");
- e_hwc_ecore_evas_deinit();
- return EINA_FALSE;
+ if (!e_hwc_windows_ecore_evas_set(hwc, ee))
+ {
+ ERR("fail to e_hwc_windows_ecore_evas_set");
+ e_hwc_ecore_evas_deinit();
+ return EINA_FALSE;
+ }
+ }
+ else
+ {
+ if (!e_hwc_planes_ecore_evas_set(hwc, ee))
+ {
+ ERR("fail to e_hwc_planes_ecore_evas_set");
+ e_hwc_ecore_evas_deinit();
+ return EINA_FALSE;
+ }
}
return EINA_TRUE;
return EINA_TRUE;
}
+EINTERN Eina_Bool
+e_hwc_planes_ecore_evas_set(E_Hwc *hwc, Ecore_Evas *ee)
+{
+ E_Output *output;
+ E_Plane *plane;
+ Eina_List *l, *ll;
+
+ EINA_SAFETY_ON_NULL_RETURN_VAL(hwc, EINA_FALSE);
+
+ if (e_hwc_policy_get(hwc) == E_HWC_POLICY_WINDOWS)
+ return EINA_FALSE;
+
+ output = hwc->output;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE);
+
+ EINA_LIST_FOREACH_SAFE(output->planes, l, ll, plane)
+ {
+ if (plane->is_fb)
+ {
+ if (!e_plane_setup(plane)) return EINA_FALSE;
+ else return EINA_TRUE;
+ }
+ }
+
+ return EINA_FALSE;
+}
EINTERN Eina_Bool e_hwc_planes_presentation_update(E_Hwc *hwc, E_Client *ec);
EINTERN Eina_Bool e_hwc_planes_external_commit(E_Hwc *hwc);
+EINTERN Eina_Bool e_hwc_planes_ecore_evas_set(E_Hwc *hwc, Ecore_Evas *ee);
+
#endif
#endif
e_output_hwc_setup(E_Output *output)
{
E_Hwc *hwc = NULL;
- Eina_List *l, *ll;
- E_Plane *plane = NULL;
E_Output *primary_output = NULL;
Eina_Bool is_primary_output = EINA_FALSE;
EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE);
- /* available only the primary output now. */
if (output->hwc)
{
EOINF("Already has the HWC.", output);
EINA_SAFETY_ON_NULL_RETURN_VAL(hwc, EINA_FALSE);
output->hwc = hwc;
- if (e_hwc_policy_get(output->hwc) == E_HWC_POLICY_PLANES)
- {
- if (primary_output == output)
- {
- /* ecore evas engine setup */
- EINA_LIST_FOREACH_SAFE(output->planes, l, ll, plane)
- {
- if (plane->is_fb)
- {
- if (!e_plane_setup(plane)) return EINA_FALSE;
- else return EINA_TRUE;
- }
- }
- }
- else
- {
- return EINA_TRUE;
- }
- }
- else
- {
-#if 0
- Evas_Object *canvas_bg = NULL;
- unsigned int r, g, b, a;
-
- /* set the color of the canvas_gb object */
- r = 0; g = 0; b = 0; a = 1;
- canvas_bg = e_comp->bg_blank_object;
- evas_object_color_set(canvas_bg, r, g, b, a);
-#endif
- return EINA_TRUE;
- }
-
- return EINA_FALSE;
+ return EINA_TRUE;
}