E_Output *output;
tdm_output *toutput;
tdm_layer *layer;
- tdm_error error;
*count = 0;
*count = NUM_SW_FORMAT;
}
}
+#if 0 //TODO:
else
{
+ tdm_error error;
error = tdm_output_hwc_get_video_supported_formats(output, formats, count);
if (error != TDM_ERROR_NONE)
{
*count = NUM_SW_FORMAT;
}
}
+#endif
}
static int
if (_is_video_hwc_windows(layer->video))
{
*count = 0;
+#if 0 //TODO:
if (layer->e_client->hwc_window->thwc_window)
ret = tdm_hwc_window_video_get_available_properties(
layer->e_client->hwc_window->thwc_window, props, count);
+#endif
}
else
{
if (_is_video_hwc_windows(layer->video))
{
+#if 0 //TODO:
if (layer->e_client->hwc_window->thwc_window)
ret = tdm_hwc_window_video_get_property(
layer->e_client->hwc_window->thwc_window, id, value);
else
+#endif
ret = TDM_ERROR_BAD_MODULE;
}
else
const tbm_format *formats;
Eina_Bool found = EINA_FALSE;
tdm_layer_capability capabilities = 0;
- tdm_error error;
if (e_hwc_policy_get(video->e_output->hwc) != E_HWC_POLICY_WINDOWS)
{
if (!(capabilities & TDM_LAYER_CAPABILITY_TRANSFORM))
goto need_pp;
}
+#if 0 // TODO:
else
{
E_Hwc_Window *hwc_window = video->ec->hwc_window;
tdm_hwc_window_video_capability capabilities = 0;
+ tdm_error error;
error = tdm_output_hwc_get_video_supported_formats(video->output, &formats, &count);
if (error != TDM_ERROR_NONE)
if (!(capabilities & TDM_HWC_WINDOW_VIDEO_CAPABILITY_TRANSFORM))
goto need_pp;
}
+#endif
return EINA_FALSE;
E_Hwc *hwc = (E_Hwc *)data;
E_Output *output = hwc->output;
E_Comp_Screen *e_comp_screen = output->e_comp_screen;
- tdm_output *toutput = output->toutput;
tbm_surface_queue_h tqueue = NULL;
tdm_error error;
int scr_w, scr_h, queue_w, queue_h;
if (output->tdm_hwc)
{
- tqueue = tdm_output_hwc_get_target_buffer_queue(toutput, &error);
+ tqueue = tdm_hwc_get_client_target_buffer_queue(hwc->thwc, &error);
if (error != TDM_ERROR_NONE)
{
- ERR("fail to tdm_output_hwc_get_target_buffer_queue");
+ ERR("fail to tdm_hwc_get_client_target_buffer_queue");
return (void *)NULL;
}
}
tqueue = tbm_surface_queue_create(3, w, h, TBM_FORMAT_ARGB8888, TBM_BO_SCANOUT);
if (!tqueue)
{
- ERR("fail to tdm_output_hwc_get_target_buffer_queue");
+ ERR("fail to tbm_surface_queue_create");
return (void *)NULL;
}
}
e_hwc_new(E_Output *output)
{
E_Hwc *hwc = NULL;
+ tdm_error error;
EINA_SAFETY_ON_NULL_RETURN_VAL(output, NULL);
{
hwc->hwc_policy = E_HWC_POLICY_WINDOWS;
+ hwc->thwc = tdm_output_get_hwc(output->toutput, &error);
+ if (!hwc->thwc)
+ {
+ ERR("hwc_opt: tdm_output_get_hwc failed");
+ goto fail;
+ }
+
if (!e_hwc_windows_init(hwc))
{
ERR("hwc_opt: e_hwc_windows_init failed");
E_Hwc_Policy hwc_policy;
E_Hwc_Mode hwc_mode;
- Eina_Bool hwc_deactive : 1; // deactive hwc policy
+ Eina_Bool hwc_deactive : 1; // deactive hwc policy
Ecore_Evas *ee;
Eina_Bool hwc_use_multi_plane;
/* variables for hwc_windows policy */
+ tdm_hwc *thwc;
Eina_Bool hwc_wins;
Eina_List *hwc_windows;
E_Hwc_Window_Target *target_hwc_window;
target_hwc_window = _e_hwc_window_target_new(hwc);
EINA_SAFETY_ON_NULL_RETURN_VAL(target_hwc_window, EINA_FALSE);
+ target_hwc_window->hwc = hwc;
/* set the target_window to the hwc */
hwc->target_hwc_window = target_hwc_window;
e_hwc_window_new(E_Hwc *hwc, E_Client *ec, E_Hwc_Window_State state)
{
E_Hwc_Window *hwc_window = NULL;
- tdm_output *toutput;
+ tdm_hwc *thwc;;
tdm_error error;
EINA_SAFETY_ON_NULL_RETURN_VAL(hwc, NULL);
- EINA_SAFETY_ON_NULL_RETURN_VAL(hwc->output, NULL);
EINA_SAFETY_ON_NULL_RETURN_VAL(ec, NULL);
- toutput = hwc->output->toutput;
- EINA_SAFETY_ON_NULL_RETURN_VAL(toutput, EINA_FALSE);
+ thwc = hwc->thwc;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(thwc, EINA_FALSE);
hwc_window = E_NEW(E_Hwc_Window, 1);
EINA_SAFETY_ON_NULL_RETURN_VAL(hwc_window, NULL);
hwc_window->state = state;
hwc_window->need_change_buffer_transform = EINA_TRUE;
- if (state == E_HWC_WINDOW_STATE_VIDEO)
- hwc_window->thwc_window = tdm_output_hwc_create_video_window(toutput, &error);
- else
- hwc_window->thwc_window = tdm_output_hwc_create_window(toutput, &error);
+ hwc_window->thwc_window = tdm_hwc_create_window(thwc, &error);
if (error != TDM_ERROR_NONE)
{
- ERR("cannot create tdm_hwc_window for toutput(%p)", toutput);
+ ERR("cannot create tdm_hwc_window for thwc(%p)", thwc);
E_FREE(hwc_window);
return NULL;
}
e_hwc_window_free(E_Hwc_Window *hwc_window)
{
E_Hwc *hwc = NULL;
- E_Output *output = NULL;
- tdm_output *toutput = NULL;
EINA_SAFETY_ON_NULL_RETURN(hwc_window);
EINA_SAFETY_ON_NULL_RETURN(hwc_window->hwc);
hwc = hwc_window->hwc;
EINA_SAFETY_ON_NULL_RETURN(hwc);
- output = hwc->output;
- EINA_SAFETY_ON_NULL_RETURN(hwc->output);
-
- toutput = output->toutput;
- EINA_SAFETY_ON_NULL_RETURN(toutput);
-
/* we cannot remove the hwc_window because we need to release the commit_data */
if (e_hwc_window_displaying_surface_get(hwc_window))
{
- ELOGF("HWC-WINS", "ehw:%p is destroyed on eout:%p. displaying surface.",
+ ELOGF("HWC-WINS", "ehw:%p is destroyed on ehwc:%p. displaying surface.",
hwc_window->ec ? hwc_window->ec->pixmap : NULL, hwc_window->ec,
- hwc_window, hwc->output);
+ hwc_window, hwc);
/* mark as deleted and delete when commit_data will be released */
hwc_window->is_deleted = EINA_TRUE;
return;
}
else
- ELOGF("HWC-WINS", "ehw:%p is destroyed on eout:%p",
+ ELOGF("HWC-WINS", "ehw:%p is destroyed on ehwc:%p",
hwc_window->ec ? hwc_window->ec->pixmap : NULL, hwc_window->ec,
- hwc_window, hwc->output);
+ hwc_window, hwc);
if (hwc_window->thwc_window)
- tdm_output_hwc_destroy_window(toutput, hwc_window->thwc_window);
+ tdm_hwc_window_destroy(hwc_window->thwc_window);
hwc->hwc_windows = eina_list_remove(hwc->hwc_windows, hwc_window);
EINTERN Eina_Bool
e_hwc_window_target_buffer_fetch(E_Hwc_Window_Target *target_hwc_window)
{
- E_Output *output;
E_Hwc *hwc;
E_Hwc_Window *hwc_window, *hw;
+ tdm_hwc *thwc;
tbm_surface_h tsurface;
- tdm_hwc_region fb_damage;
+ tdm_region fb_damage;
Eina_List *ee_rendered_hw_list = NULL;
uint32_t n_thw = 0;
const Eina_List *l;
hwc = hwc_window->hwc;
EINA_SAFETY_ON_NULL_RETURN_VAL(hwc, EINA_FALSE);
- output = hwc->output;
- EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE);
+ thwc = hwc->thwc;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(thwc, EINA_FALSE);
/* the damage isn't supported by hwc extension yet */
memset(&fb_damage, 0, sizeof(fb_damage));
- tdm_output_hwc_set_client_target_buffer(output->toutput, hwc_window->tsurface, fb_damage);
+ tdm_hwc_set_client_target_buffer(thwc, hwc_window->tsurface, fb_damage);
ee_rendered_hw_list = e_hwc_window_target_window_ee_rendered_hw_list_get(target_hwc_window);
n_thw = eina_list_count(ee_rendered_hw_list);
struct _E_Hwc_Window_Target
{
E_Hwc_Window hwc_window; /* don't move this field */
+ E_Hwc *hwc;
Ecore_Evas *ee;
Evas *evas;
E_Output *output = NULL;
tdm_layer *toutput = NULL;
tdm_error terror;
- tdm_hwc_region fb_damage;
+ tdm_region fb_damage;
/* the damage isn't supported by hwc extension yet */
memset(&fb_damage, 0, sizeof(fb_damage));
/* no need to pass composited_wnds list because smooth transition isn't
* used is this case */
- terror = tdm_output_hwc_set_client_target_buffer(toutput, data->tsurface, fb_damage);
+ terror = tdm_hwc_set_client_target_buffer(hwc->thwc, data->tsurface, fb_damage);
if (terror != TDM_ERROR_NONE)
{
- ERR("fail to tdm_output_hwc_set_client_target_buffer");
+ ERR("fail to tdm_hwc_set_client_target_buffer");
goto fail;
}
static Eina_Bool
_e_hwc_windows_accept(E_Hwc *hwc, uint32_t num_changes)
{
- E_Output *output = hwc->output;
E_Hwc_Window *hwc_window;
E_Hwc_Window_State state;
tdm_error terror;
- tdm_output *toutput = output->toutput;
tdm_hwc_window **changed_hwc_window = NULL;
tdm_hwc_window_composition *composition_types = NULL;
Eina_Bool accept_changes = EINA_TRUE;
composition_types = E_NEW(tdm_hwc_window_composition, num_changes);
EINA_SAFETY_ON_NULL_GOTO(composition_types, fail);
- terror = tdm_output_hwc_get_changed_composition_types(toutput,
+ terror = tdm_hwc_get_changed_composition_types(hwc->thwc,
&num_changes, changed_hwc_window,
composition_types);
if (terror != TDM_ERROR_NONE)
if (!accept_changes) goto fail;
/* accept changes */
- terror = tdm_output_hwc_accept_changes(toutput);
+ terror = tdm_hwc_accept_changes(hwc->thwc);
if (terror != TDM_ERROR_NONE)
{
ERR("HWC-WINS: failed to accept changes required by the hwc extension");
}
/* make hwc extension choose which clients will own hw overlays */
- terror = tdm_output_hwc_validate(toutput, thwc_windows, n_thw, num_changes);
+ terror = tdm_hwc_validate(hwc->thwc, thwc_windows, n_thw, num_changes);
if (terror != TDM_ERROR_NONE) goto error;
E_FREE(thwc_windows);