hwc_window);
return NULL;
}
-
- if (!e_comp_object_hwc_update_exists(ec->frame) && hwc_window->tsurface) return NULL;
+#if 1
+ if (hwc_window->cursor_tsurface) return hwc_window->cursor_tsurface;
+#else
+ /* return the exist tsurface when there is no update on cursor image(pointer image) */
+ if (!e_comp_object_hwc_update_exists(ec->frame) && hwc_window->tsurface)
+ return hwc_window->tsurface;
+#endif
e_comp_object_hwc_update_set(ec->frame, EINA_FALSE);
/* mark as deleted and delete when commit_data will be released */
hwc_window->is_deleted = EINA_TRUE;
hwc_window->ec = NULL;
- hwc_window->state = E_HWC_WINDOW_STATE_NONE;
+ e_hwc_window_state_set(hwc_window, E_HWC_WINDOW_STATE_NONE);
return;
}
else
error = tdm_hwc_window_set_buffer(hwc_window->thwc_window, hwc_window->tsurface);
EINA_SAFETY_ON_TRUE_RETURN_VAL(error != TDM_ERROR_NONE, EINA_FALSE);
- ELOGF("HWC-WINS", " ehw:%p sets ts:%p ------- {%25s}, state:%s, zpos:%d, deleted:%s",
- hwc_window->ec ? hwc_window->ec->pixmap : NULL, hwc_window->ec,
- hwc_window, hwc_window->tsurface, hwc_window->ec ? hwc_window->ec->icccm.title : "UNKNOWN",
- e_hwc_window_state_string_get(hwc_window->state),
- hwc_window->zpos, hwc_window->is_deleted ? "yes" : "no");
+ if (hwc_window->update_exist)
+ ELOGF("HWC-WINS", " ehw:%p sets ts:%10p ------- {%25s}, state:%s, zpos:%d, deleted:%s",
+ hwc_window->ec ? hwc_window->ec->pixmap : NULL, hwc_window->ec,
+ hwc_window, hwc_window->tsurface, hwc_window->ec ? hwc_window->ec->icccm.title : "UNKNOWN",
+ e_hwc_window_state_string_get(hwc_window->state),
+ hwc_window->zpos, hwc_window->is_deleted ? "yes" : "no");
return EINA_TRUE;
}
return hwc_window->is_cursor;
}
-static void
-_e_hwc_window_client_buffer_reset(E_Hwc_Window *hwc_window)
-{
- if (!hwc_window->tsurface) return;
-
- tdm_hwc_window_set_buffer(hwc_window->thwc_window, NULL);
-
- if (hwc_window->cursor_tsurface)
- {
- tbm_surface_destroy(hwc_window->cursor_tsurface);
- hwc_window->cursor_tsurface = NULL;
- }
-
- ELOGF("HWC-WINS", " ehw:%p sets ts:(NULL) ------- {%25s}, state:%s, zpos:%d, deleted:%s",
- hwc_window->ec ? hwc_window->ec->pixmap : NULL, hwc_window->ec,
- hwc_window, hwc_window->ec ? hwc_window->ec->icccm.title : "UNKNOWN",
- e_hwc_window_state_string_get(hwc_window->state),
- hwc_window->zpos, hwc_window->is_deleted ? "yes" : "no");
-
- hwc_window->tsurface = NULL;
-}
-
EINTERN Eina_Bool
e_hwc_window_buffer_fetch(E_Hwc_Window *hwc_window)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(hwc_window, EINA_FALSE);
- if (hwc_window->is_deleted)
- {
- ELOGF("HWC-WINS", "[soolim] ehw:%p is_delete.",
- hwc_window->ec ? ec->pixmap : NULL, hwc_window->ec, hwc_window);
- return EINA_FALSE;
- }
-
/* set the buffer to be null */
if (hwc_window->state == E_HWC_WINDOW_STATE_NONE)
{
- _e_hwc_window_client_buffer_reset(hwc_window);
- return EINA_TRUE;
- }
+ if (hwc_window->cursor_tsurface)
+ {
+ tbm_surface_destroy(hwc_window->cursor_tsurface);
+ hwc_window->cursor_tsurface = NULL;
+ }
- /* for video we set buffer in the video module */
- if (e_hwc_window_is_video(hwc_window))
+ hwc_window->tsurface = NULL;
+ }
+ else
{
- tsurface = e_comp_wl_video_hwc_widow_surface_get(hwc_window);
- if (!tsurface)
+ /* for video we set buffer in the video module */
+ if (e_hwc_window_is_video(hwc_window))
{
- ELOGF("HWC-WINS", " ehw:%p no buffer yet -- {%25s}, state:%s, zpos:%d, deleted:%s",
- hwc_window->ec ? hwc_window->ec->pixmap : NULL, hwc_window->ec,
- hwc_window, hwc_window->ec ? hwc_window->ec->icccm.title : "UNKNOWN",
- e_hwc_window_state_string_get(hwc_window->state),
- hwc_window->zpos, hwc_window->is_deleted ? "yes" : "no");
- return EINA_FALSE;
+ tsurface = e_comp_wl_video_hwc_widow_surface_get(hwc_window);
+ if (!tsurface)
+ {
+ ELOGF("HWC-WINS", " ehw:%p no buffer yet -- {%25s}, state:%s, zpos:%d, deleted:%s",
+ hwc_window->ec ? hwc_window->ec->pixmap : NULL, hwc_window->ec,
+ hwc_window, hwc_window->ec ? hwc_window->ec->icccm.title : "UNKNOWN",
+ e_hwc_window_state_string_get(hwc_window->state),
+ hwc_window->zpos, hwc_window->is_deleted ? "yes" : "no");
+ return EINA_FALSE;
+ }
+ }
+ else if (e_hwc_window_is_cursor(hwc_window))
+ {
+ tsurface = _e_hwc_window_cursor_surface_acquire(hwc_window);
+ if (!tsurface)
+ {
+ ELOGF("HWC-WINS", "[soolim] ehw:%p cursor buffer is null.",
+ hwc_window->ec ? ec->pixmap : NULL, hwc_window->ec, hwc_window);
+ return EINA_FALSE;
+ }
+ }
+ else
+ {
+ /* acquire the surface */
+ tsurface = _e_hwc_window_client_surface_acquire(hwc_window);
+ if (!tsurface)
+ {
+ ELOGF("HWC-WINS", "[soolim] ehw:%p client buffer is null.",
+ hwc_window->ec ? ec->pixmap : NULL, hwc_window->ec, hwc_window);
+ return EINA_FALSE;
+ }
}
+ /* exist tsurface for update hwc_window */
hwc_window->tsurface = tsurface;
+ }
- ELOGF("HWC-WINS", " ehw:%p sets ts:%p ------- {%25s}, state:%s, zpos:%d, deleted:%s",
+ if (hwc_window->tsurface != tsurface)
+ {
+ ELOGF("HWC-WINS", " ehw:%p sets ts:%10p ------- {%25s}, state:%s, zpos:%d, deleted:%s",
hwc_window->ec ? hwc_window->ec->pixmap : NULL, hwc_window->ec,
hwc_window, hwc_window->tsurface, hwc_window->ec ? hwc_window->ec->icccm.title : "UNKNOWN",
e_hwc_window_state_string_get(hwc_window->state),
hwc_window->zpos, hwc_window->is_deleted ? "yes" : "no");
-
- goto done;
- }
-
-#if 0
- /* Do not fetch the buffers of the windows except the video window at the canvas_norender. */
- if (e_comp_canvas_norender_get() > 0)
- {
- ELOGF("HWC-WINS", " NoRender get. no updated surface {%25s} on the ehw:%p.",
- hwc_window->ec ? ec->pixmap : NULL, hwc_window->ec,
- hwc_window->ec ? hwc_window->ec->icccm.title : "UNKNOWN",
- hwc_window);
- return EINA_FALSE;
- }
-#endif
-
- if (e_hwc_window_is_cursor(hwc_window))
- {
- tsurface = _e_hwc_window_cursor_surface_acquire(hwc_window);
- if (!tsurface) return EINA_FALSE;
- }
- else
- {
- /* acquire the surface */
- tsurface = _e_hwc_window_client_surface_acquire(hwc_window);
- if (!tsurface) return EINA_FALSE;
}
- /* exist tsurface for update hwc_window */
- hwc_window->tsurface = tsurface;
-
-done:
hwc_window->update_exist = EINA_TRUE;
return EINA_TRUE;
{
E_Hwc_Window_Commit_Data *commit_data = NULL;
+ if (hwc_window->update_exist == EINA_FALSE) return EINA_FALSE;
+
#if 0
if (!e_hwc_window_is_on_hw_overlay(hwc_window))
{
commit_data = E_NEW(E_Hwc_Window_Commit_Data, 1);
EINA_SAFETY_ON_NULL_RETURN_VAL(commit_data, EINA_FALSE);
+ /* fake commit data for free the e_hwc_window resource */
+ if (hwc_window->is_deleted) goto done;
+
if (e_hwc_window_is_target(hwc_window) ||
e_hwc_window_is_video(hwc_window))
{
e_comp_wl_buffer_reference(&commit_data->buffer_ref, _e_hwc_window_comp_wl_buffer_get(hwc_window));
}
+done:
hwc_window->commit_data = commit_data;
-
hwc_window->update_exist = EINA_FALSE;
return EINA_TRUE;
/* we don't have data to release */
if (!hwc_window->commit_data) return EINA_FALSE;
- tsurface = hwc_window->commit_data->tsurface;
-
- if (!tsurface)
- {
- e_comp_wl_buffer_reference(&hwc_window->display_info.buffer_ref, NULL);
- }
- else if (e_hwc_window_is_target(hwc_window) || e_hwc_window_is_video(hwc_window))
+ if (hwc_window->is_deleted)
{
- e_comp_wl_buffer_reference(&hwc_window->display_info.buffer_ref, NULL);
+ displaying_surface = e_hwc_window_displaying_surface_get(hwc_window);
+ if (displaying_surface) tbm_surface_internal_unref(displaying_surface);
+ hwc_window->display_info.tsurface = NULL;
+
+ free(hwc_window->commit_data);
+ e_hwc_window_free(hwc_window);
}
else
{
- e_comp_wl_buffer_reference(&hwc_window->display_info.buffer_ref, hwc_window->commit_data->buffer_ref.buffer);
- }
+ tsurface = hwc_window->commit_data->tsurface;
- e_comp_wl_buffer_reference(&hwc_window->commit_data->buffer_ref, NULL);
-
- displaying_surface = e_hwc_window_displaying_surface_get(hwc_window);
- if (displaying_surface)
- {
- if (e_hwc_window_is_target(hwc_window))
+ if (!tsurface)
{
- _e_hwc_window_target_window_surface_release((E_Hwc_Window_Target *)hwc_window, displaying_surface);
+ e_comp_wl_buffer_reference(&hwc_window->display_info.buffer_ref, NULL);
+ }
+ else if (e_hwc_window_is_target(hwc_window) || e_hwc_window_is_video(hwc_window))
+ {
+ e_comp_wl_buffer_reference(&hwc_window->display_info.buffer_ref, NULL);
+ }
+ else
+ {
+ e_comp_wl_buffer_reference(&hwc_window->display_info.buffer_ref, hwc_window->commit_data->buffer_ref.buffer);
}
- }
- /* update hwc_window display info */
- if (displaying_surface)
- tbm_surface_internal_unref(displaying_surface);
+ e_comp_wl_buffer_reference(&hwc_window->commit_data->buffer_ref, NULL);
- hwc_window->display_info.tsurface = tsurface;
+ /* release and unreference the previous surface */
+ displaying_surface = e_hwc_window_displaying_surface_get(hwc_window);
+ if (displaying_surface)
+ {
+ if (e_hwc_window_is_target(hwc_window))
+ {
+ _e_hwc_window_target_window_surface_release((E_Hwc_Window_Target *)hwc_window, displaying_surface);
+ }
+ tbm_surface_internal_unref(displaying_surface);
+ }
- free(hwc_window->commit_data);
- hwc_window->commit_data = NULL;
+ /* update hwc_window display info */
+ hwc_window->display_info.tsurface = tsurface;
- if (hwc_window->is_deleted && !e_hwc_window_displaying_surface_get(hwc_window))
- e_hwc_window_free(hwc_window);
+ free(hwc_window->commit_data);
+ hwc_window->commit_data = NULL;
+ }
return EINA_TRUE;
}
{
/* acquire the surface */
tsurface = _e_hwc_window_target_window_surface_acquire((E_Hwc_Window_Target *)hwc_window);
- if (!tsurface) return EINA_FALSE;
+ if (!tsurface)
+ {
+ ELOGF("HWC-WINS", " the surface of target is null.", NULL, NULL);
+ return EINA_FALSE;
+ }
+ if (tsurface == hwc_window->tsurface)
+ {
+ ELOGF("HWC-WINS", " aquired buffer is same.(ts:%p)", NULL, NULL, hwc_window->tsurface);
+ return EINA_FALSE;
+ }
hwc_window->tsurface = tsurface;
EINTERN Eina_Bool
e_hwc_window_state_set(E_Hwc_Window *hwc_window, E_Hwc_Window_State state)
{
- tdm_hwc_window_composition composition_type;
- tdm_error error;
-
EINA_SAFETY_ON_NULL_RETURN_VAL(hwc_window, EINA_FALSE);
- if (hwc_window->state != state)
- {
- /* target window and video window do not set the composition type */
- if (e_hwc_window_is_target(hwc_window))
- hwc_window->state = state;
- else
- {
- composition_type = _get_composition_type(state);
- error = tdm_hwc_window_set_composition_type(hwc_window->thwc_window, composition_type);
- EINA_SAFETY_ON_TRUE_RETURN_VAL(error != TDM_ERROR_NONE, EINA_FALSE);
-
- hwc_window->type = composition_type;
- hwc_window->state = state;
+ if (hwc_window->state != state) hwc_window->state = state;
- e_hwc_window_zpos_set(hwc_window, -999);
- }
- }
+ /* zpos is -999 at state none */
+ if (state == E_HWC_WINDOW_STATE_NONE)
+ e_hwc_window_zpos_set(hwc_window, -999);
return EINA_TRUE;
}
{
Eina_List *ee_rendered_hw_list = NULL;
E_Hwc_Window_Target *target_hwc_window;
+ E_Hwc_Window *target_window;
E_Hwc_Window *hw;
const Eina_List *l;
tbm_surface_h target_tsurface;
target_hwc_window = _e_hwc_window_target_window_get(hwc_window);
EINA_SAFETY_ON_NULL_RETURN_VAL(target_hwc_window, EINA_FALSE);
+ target_window = (E_Hwc_Window *)target_hwc_window;
+ if (e_hwc_window_state_get(target_window) != E_HWC_WINDOW_STATE_DEVICE) return EINA_FALSE;
+
target_tsurface = target_hwc_window->hwc_window.tsurface;
tbm_surface_internal_get_user_data(target_tsurface, ee_rendered_hw_list_key, (void**)&ee_rendered_hw_list);
case E_HWC_WINDOW_STATE_NONE:
return "NO"; // None
case E_HWC_WINDOW_STATE_CLIENT:
- return "CL"; // Clien
+ return "CL"; // Client
case E_HWC_WINDOW_STATE_DEVICE:
return "DV"; // Deivce
case E_HWC_WINDOW_STATE_VIDEO:
// if ec has invalid buffer or scaled( transformed ) or forced composite(never_hwc)
static Eina_Bool
-_e_output_hwc_windows_ec_check(E_Client *ec)
+_e_output_hwc_windows_device_state_check(E_Client *ec)
{
E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
E_Output *eout;
{
ELOGF("HWC-WINS", " ehw:%p -- {%25s} is forced to set CL state.(null cdata or buffer)",
ec->pixmap, ec, ec->hwc_window, ec->icccm.title);
-
- /* This buffer is like unvisible window */
- e_hwc_window_state_set(ec->hwc_window, E_HWC_WINDOW_STATE_NONE);
return EINA_FALSE;
}
if (!e_util_strcmp("wl_pointer-cursor", ec->icccm.window_role))
break;
default:
+ ELOGF("HWC-WINS", " ehw:%p -- {%25s} is forced to set CL state.(buffer_type)",
+ ec->pixmap, ec, ec->hwc_window, ec->icccm.title);
return EINA_FALSE;
}
}
static void
-_e_output_hwc_windows_status_print(E_Output_Hwc *output_hwc)
+_e_output_hwc_windows_status_print(E_Output_Hwc *output_hwc, Eina_Bool with_target)
{
const Eina_List *l;
Eina_List *sort_wnds;
if (hwc_window->state == E_HWC_WINDOW_STATE_NONE) continue;
if (e_hwc_window_is_target(hwc_window))
- ELOGF("HWC-WINS", " ehw:%p -- {%25s}, state:%s, zpos:%d",
- NULL, NULL, hwc_window, "@TARGET WINDOW@",
- e_hwc_window_state_string_get(hwc_window->state), hwc_window->zpos);
- else
- ELOGF("HWC-WINS", " ehw:%p -- {%25s}, state:%s, zpos:%d, deleted:%s",
- hwc_window->ec ? hwc_window->ec->pixmap : NULL, hwc_window->ec,
- hwc_window, hwc_window->ec ? hwc_window->ec->icccm.title : "UNKNOWN",
- e_hwc_window_state_string_get(hwc_window->state),
- hwc_window->zpos, hwc_window->is_deleted ? "yes" : "no");
+ {
+ if (!with_target) continue;
+
+ ELOGF("HWC-WINS", " ehw:%p ts:%p -- {%25s}, state:%s, zpos:%d",
+ NULL, NULL, hwc_window, hwc_window->tsurface, "@TARGET WINDOW@",
+ e_hwc_window_state_string_get(hwc_window->state), hwc_window->zpos);
+ continue;
+ }
+
+ ELOGF("HWC-WINS", " ehw:%p ts:%p -- {%25s}, state:%s, zpos:%d, deleted:%s",
+ hwc_window->ec ? hwc_window->ec->pixmap : NULL, hwc_window->ec,
+ hwc_window, hwc_window->tsurface, hwc_window->ec ? hwc_window->ec->icccm.title : "UNKNOWN",
+ e_hwc_window_state_string_get(hwc_window->state),
+ hwc_window->zpos, hwc_window->is_deleted ? "yes" : "no");
}
eina_list_free(sort_wnds);
#if DBG_EVALUATE
ELOGF("HWC-WINS", " Request HWC Validation to TDM HWC:", NULL, NULL);
- _e_output_hwc_windows_status_print(output_hwc);
+ _e_output_hwc_windows_status_print(output_hwc, EINA_FALSE);
#endif
return EINA_TRUE;
{
hwc_window->uncompleted_transition = E_HWC_WINDOW_TRANSITION_DEVICE_TO_CLIENT;
accept_changes = EINA_FALSE;
+
+ ELOGF("HWC-WINS", " E_HWC_WINDOW_TRANSITION_DEVICE_TO_CLIENT is set.(Accept_Changes)", NULL, NULL);
}
/* update the state with the changed compsition */
#if DBG_EVALUATE
ELOGF("HWC-WINS", " Modified after HWC Validation:", NULL, NULL);
- _e_output_hwc_windows_status_print(output_hwc);
+ _e_output_hwc_windows_status_print(output_hwc, EINA_FALSE);
#endif
return EINA_TRUE;
/* hwc_window manager required full GLES composition */
if (e_comp->nocomp_override > 0)
{
- ELOGF("HWC-WINS", " HWC_MODE_NONE due to nocomp_override > 0.", NULL, NULL);
+ ELOGF("HWC-WINS", " HWC_MODE_HYBRID due to nocomp_override > 0.", NULL, NULL);
goto full_gl_composite;
}
if (e_hwc_window_is_video(hwc_window)) continue;
// check clients are able to use hwc
- if (_e_output_hwc_windows_ec_check(hwc_window->ec))
- e_hwc_window_state_set(hwc_window, E_HWC_WINDOW_STATE_CLIENT);
- else
+ if (_e_output_hwc_windows_device_state_check(hwc_window->ec))
e_hwc_window_state_set(hwc_window, E_HWC_WINDOW_STATE_DEVICE);
+ else
+ e_hwc_window_state_set(hwc_window, E_HWC_WINDOW_STATE_CLIENT);
}
}
static Eina_Bool
_e_output_hwc_windows_uncomplete_transition_check(E_Output_Hwc *output_hwc)
{
+#if 1
+ return EINA_TRUE;
+#else
const Eina_List *l;
E_Hwc_Window *hwc_window;
E_Hwc_Window_Target *target_hwc_window = output_hwc->target_hwc_window;
{
e_hwc_window_state_set(hwc_window, E_HWC_WINDOW_STATE_NONE);
ret = EINA_FALSE;
+#if DBG_EVALUATE
+ ELOGF("HWC-WINS", " E_HWC_WINDOW_TRANSITION_DEVICE_TO_NONE is set.(Transition_Check)", NULL, NULL);
+#endif
}
}
else
{
e_hwc_window_state_set(hwc_window, E_HWC_WINDOW_STATE_CLIENT);
ret = EINA_FALSE;
+#if DBG_EVALUATE
+ ELOGF("HWC-WINS", " E_HWC_WINDOW_TRANSITION_DEVICE_TO_CLIENT is set.(Transition_Check)", NULL, NULL);
+#endif
}
}
else
{
e_hwc_window_state_set(hwc_window, E_HWC_WINDOW_STATE_NONE);
ret = EINA_FALSE;
+#if DBG_EVALUATE
+ ELOGF("HWC-WINS", " E_HWC_WINDOW_TRANSITION_CLIENT_TO_DEVICE is set.(Transition_Check)", NULL, NULL);
+#endif
}
}
else
}
return ret;
+#endif
}
static void
if (e_hwc_window_state_get(hwc_window) == E_HWC_WINDOW_STATE_NONE)
{
hwc_window->transition = E_HWC_WINDOW_TRANSITION_DEVICE_TO_NONE;
-
+#if 0
/* need to complete_transition if target_window is enabled */
if (e_hwc_window_target_enabled(output_hwc->target_hwc_window))
- hwc_window->uncompleted_transition = E_HWC_WINDOW_TRANSITION_DEVICE_TO_NONE;
+ {
+ hwc_window->uncompleted_transition = E_HWC_WINDOW_TRANSITION_DEVICE_TO_NONE;
+#if DBG_EVALUATE
+ ELOGF("HWC-WINS", " E_HWC_WINDOW_TRANSITION_DEVICE_TO_NONE is set.(Transition_Update)", NULL, NULL);
+ }
+#endif
+#endif
}
if (e_hwc_window_state_get(hwc_window) == E_HWC_WINDOW_STATE_CLIENT)
{
hwc_window->transition = E_HWC_WINDOW_TRANSITION_DEVICE_TO_CLIENT;
-
+#if 0
/* need to complete_transition if target_window is enabled */
if (e_hwc_window_target_enabled(output_hwc->target_hwc_window))
- hwc_window->uncompleted_transition = E_HWC_WINDOW_TRANSITION_DEVICE_TO_CLIENT;
-
+ {
+ hwc_window->uncompleted_transition = E_HWC_WINDOW_TRANSITION_DEVICE_TO_CLIENT;
+#if DBG_EVALUATE
+ ELOGF("HWC-WINS", " E_HWC_WINDOW_STATE_CLIENT is set.(Transition_Update)", NULL, NULL);
+#endif
+ }
+#endif
}
if (e_hwc_window_state_get(hwc_window) == E_HWC_WINDOW_STATE_DEVICE)
hwc_window->transition = E_HWC_WINDOW_TRANSITION_DEVICE_TO_DEVICE;
break;
+ case E_HWC_WINDOW_STATE_CURSOR:
+ break;
+ case E_HWC_WINDOW_STATE_VIDEO:
+ break;
+ case E_HWC_WINDOW_STATE_DEVICE_CANDIDATE:
+ break;
default:
ERR("Unknown Prev_State: failed to update the states.");
return;
}
}
-#if 0
-static void
-_e_output_hwc_windows_zpos_assign(E_Output_Hwc *output_hwc)
-{
- E_Hwc_Window *hwc_window;
- const Eina_List *l;
- int zpos = 0;
-
- EINA_LIST_FOREACH(e_output_hwc_windows_get(output_hwc), l, hwc_window)
- {
- if (e_hwc_window_is_target(hwc_window)) continue;
-
- if (hwc_window->state == E_HWC_WINDOW_STATE_NONE)
- {
- if (hwc_window->zpos != -999) hwc_window->zpos = -999;
- continue;
- }
-
- hwc_window->zpos = zpos++;
- }
-}
-#endif
-
static Eina_Bool
_e_output_hwc_windows_commit_evaulate(E_Output_Hwc *output_hwc)
{
can_validate = _e_output_hwc_windows_uncomplete_transition_check(output_hwc);
if (can_validate)
{
- //_e_output_hwc_windows_zpos_assign(output_hwc);
-
- if (! _e_output_hwc_windows_update(output_hwc))
+ if (!_e_output_hwc_windows_update(output_hwc))
{
ERR("HWC-WINS: _e_output_hwc_windows_update failed.");
ret = EINA_FALSE;
/* evaulate the need_commit */
if (_e_output_hwc_windows_commit_evaulate(output_hwc))
- output_hwc->need_commit = EINA_TRUE;
+ {
+ output_hwc->need_commit = EINA_TRUE;
+#if DBG_EVALUATE
+ ELOGF("HWC-WINS", " Succeed the commit_evaulation.", NULL, NULL);
+#endif
+ }
else
- output_hwc->need_commit = EINA_FALSE;
+ {
+ output_hwc->need_commit = EINA_FALSE;
+#if DBG_EVALUATE
+ ELOGF("HWC-WINS", " Need to re-evaulation.", NULL, NULL);
+#endif
+ }
/* update the activate/decativate state */
_e_output_hwc_windows_activation_states_update(output_hwc);
if (hwc_mode == E_OUTPUT_HWC_MODE_HYBRID || hwc_mode == E_OUTPUT_HWC_MODE_NONE)
ecore_event_add(E_EVENT_COMPOSITOR_ENABLE, NULL, NULL, NULL);
else
- {
- ecore_event_add(E_EVENT_COMPOSITOR_DISABLE, NULL, NULL, NULL);
- e_hwc_window_target_buffer_fetch(output_hwc->target_hwc_window); // release queue....
- }
+ ecore_event_add(E_EVENT_COMPOSITOR_DISABLE, NULL, NULL, NULL);
output_hwc->hwc_mode = hwc_mode;
}
+ ret = EINA_TRUE;
+
#if DBG_EVALUATE
if (hwc_mode == E_OUTPUT_HWC_MODE_NONE)
- ELOGF("HWC-WINS", " HWC_MODE is NONE composition.", NULL, NULL);
+ ELOGF("HWC-WINS", " HWC_MODE is NONE composition. need_commit is %s.",
+ NULL, NULL, output_hwc->need_commit ? "TRUE" : "FALSE");
else if (hwc_mode == E_OUTPUT_HWC_MODE_HYBRID)
- ELOGF("HWC-WINS", " HWC_MODE is HYBRID composition.", NULL, NULL);
+ ELOGF("HWC-WINS", " HWC_MODE is HYBRID composition. need_commit is %s",
+ NULL, NULL, output_hwc->need_commit ? "TRUE" : "FALSE");
else
- ELOGF("HWC-WINS", " HWC_MODE is FULL HW composition.", NULL, NULL);
+ ELOGF("HWC-WINS", " HWC_MODE is FULL HW composition. need_commit is %s",
+ NULL, NULL, output_hwc->need_commit ? "TRUE" : "FALSE");
#endif
- if (e_hwc_window_target_enabled(output_hwc->target_hwc_window))
- {
- if (!e_hwc_window_target_buffer_fetch(output_hwc->target_hwc_window)) // try aquire
- {
- output_hwc->need_commit = EINA_FALSE;
- }
- }
-
- ret = EINA_TRUE;
-
return ret;
}
e_output_hwc_windows_commit(E_Output_Hwc *output_hwc)
{
E_Hwc_Window *hwc_window = NULL;
+ E_Hwc_Window *target_window = NULL;
Eina_List *l;
E_Output *output = NULL;
tdm_error error = TDM_ERROR_NONE;
output = output_hwc->output;
- ELOGF("HWC-WINS", "###### Prepare Windows Commit(Fetch the buffers)", NULL, NULL);
-
if (output_hwc->wait_commit)
{
ELOGF("HWC-WINS", "!!!!!!!! Didn't get Output Commit Handler Yet !!!!!!!!", NULL, NULL);
return EINA_TRUE;
}
- if (output->dpms == E_OUTPUT_DPMS_OFF) return EINA_TRUE;
+ if (output->dpms == E_OUTPUT_DPMS_OFF)
+ {
+ EINA_LIST_FOREACH(output_hwc->hwc_windows, l, hwc_window)
+ _e_output_hwc_windows_offscreen_commit(output, hwc_window);
+
+ return EINA_TRUE;
+ }
+
+ target_window = (E_Hwc_Window *)output_hwc->target_hwc_window;
+ if (e_hwc_window_target_enabled(output_hwc->target_hwc_window))
+ {
+ if (!e_hwc_window_target_buffer_fetch(output_hwc->target_hwc_window)) // try aquire
+ {
+ output_hwc->need_commit = EINA_FALSE;
+ target_window->update_exist = EINA_FALSE;
+#if DBG_EVALUATE
+ ELOGF("HWC-WINS", " No available surface on target_window.", NULL, NULL);
+#endif
+ }
+ else
+ {
+ output_hwc->need_commit = EINA_TRUE;
+ target_window->update_exist = EINA_TRUE;
+#if DBG_EVALUATE
+ ELOGF("HWC-WINS", " Available surface on target_window.", NULL, NULL);
+#endif
+ }
+ }
if (output_hwc->need_commit)
{
{
ELOGF("HWC-WINS", "!!!!!!!! Output Commit !!!!!!!!", NULL, NULL);
ELOGF("HWC-WINS", " The number of visible clients:%d.", NULL, NULL, output_hwc->num_visible_windows);
- _e_output_hwc_windows_status_print(output_hwc);
+ _e_output_hwc_windows_status_print(output_hwc, EINA_TRUE);
error = tdm_output_commit(output->toutput, 0, _e_output_hwc_windows_commit_handler, output_hwc);
if (error != TDM_ERROR_NONE)