}
EINTERN void
-e_video_commit_data_release(E_Client *ec, unsigned int sequence,
+e_comp_wl_video_hwc_window_commit_data_release(E_Hwc_Window *hwc_window, unsigned int sequence,
unsigned int tv_sec, unsigned int tv_usec)
{
+ E_Client *ec = NULL;
E_Video *video = NULL;
Eina_List *l = NULL;
E_Video_Layer *video_layer;
- if (!ec) return;
+ EINA_SAFETY_ON_NULL_RETURN(hwc_window);
+
+ ec = hwc_window->ec;
+ EINA_SAFETY_ON_NULL_RETURN(ec);
EINA_LIST_FOREACH(video_list, l, video)
+ if (video->ec == ec) break;
+ EINA_SAFETY_ON_NULL_RETURN(video);
+
+ video_layer = video->layer;
+ EINA_SAFETY_ON_NULL_RETURN(video_layer);
+
+ _e_video_commit_handler(NULL, sequence, tv_sec, tv_usec, video);
+}
+
+EINTERN tbm_surface_h
+e_comp_wl_video_hwc_widow_surface_get(E_Hwc_Window *hwc_window)
+{
+ E_Client *ec = NULL;
+ Eina_List *l = NULL;
+ E_Video *video = NULL;
+ E_Video_Layer *video_layer;
+
+ EINA_SAFETY_ON_NULL_RETURN_VAL(hwc_window, NULL);
+
+ if (!e_hwc_window_is_video(hwc_window))
{
- if (video->ec == ec) break;
+ ERR("ehw:%p is NOT Video HWC window.", hwc_window);
+ return NULL;
}
- if (!video) return;
+
+ ec = hwc_window->ec;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ec, NULL);
+
+ EINA_LIST_FOREACH(video_list, l, video)
+ if (video->ec == ec) break;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(video, NULL);
video_layer = video->layer;
- if (!video_layer) return;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(video_layer, NULL);
- _e_video_commit_handler(NULL, sequence, tv_sec, tv_usec, video);
+ return hwc_window->tsurface;
}
static void
EINTERN tdm_layer* e_comp_wl_video_layer_get(tdm_output *output);
-EINTERN void e_video_commit_data_release(E_Client *ec, unsigned int sequence, unsigned int tv_sec, unsigned int tv_usec);
+EINTERN void e_comp_wl_video_hwc_window_commit_data_release(E_Hwc_Window *hwc_window, unsigned int sequence, unsigned int tv_sec, unsigned int tv_usec);
+EINTERN tbm_surface_h e_comp_wl_video_hwc_widow_surface_get(E_Hwc_Window *hwc_window);
#define C(b,m) (((b) >> (m)) & 0xFF)
#define FOURCC_STR(id) C(id,0), C(id,8), C(id,16), C(id,24)
EINA_SAFETY_ON_NULL_RETURN_VAL(wl_surface, NULL);
cqueue = wayland_tbm_server_client_queue_get(wl_comp_data->tbm.server, wl_surface);
+ if (!cqueue)
+ {
+ ELOGF("HWC-WINS", " ehw:%p has no wl_tbm_server_client_queue. -- {%25s}, state:%s, zpos:%d, deleted:%s",
+ ec->pixmap, ec, ec->hwc_window, ec->icccm.title,
+ e_hwc_window_state_string_get(ec->hwc_window->state),
+ ec->hwc_window->zpos, ec->hwc_window->is_deleted ? "yes" : "no");
+ }
EINA_SAFETY_ON_NULL_RETURN_VAL(cqueue, NULL);
return cqueue;
EINA_SAFETY_ON_NULL_RETURN(ec);
zone = ec->zone;
- EINA_SAFETY_ON_NULL_RETURN(zone);
+ if (!zone)
+ {
+ ELOGF("HWC-WINS", "Try to create hwc_window, but it couldn't.(no zone)", ec->pixmap, ec);
+ return;
+ }
+
EINA_SAFETY_ON_NULL_RETURN(zone->output_id);
output = e_output_find(zone->output_id);
{
if (!e_output_hwc_windows_commit(output->output_hwc))
{
- ERR("fail e_output_hwc_windows_commit");
return EINA_FALSE;
}
}
void *user_data)
{
const Eina_List *l;
- E_Hwc_Window *window;
+ E_Hwc_Window *hwc_window;
E_Output_Hwc *output_hwc = (E_Output_Hwc *)user_data;
EINA_SAFETY_ON_NULL_RETURN(output_hwc);
output_hwc->pp_tsurface = NULL;
}
- EINA_LIST_FOREACH(e_output_hwc_windows_get(output_hwc), l, window)
+ EINA_LIST_FOREACH(e_output_hwc_windows_get(output_hwc), l, hwc_window)
{
- if (!e_hwc_window_commit_data_release(window)) continue;
- if (e_hwc_window_is_video(window))
- e_video_commit_data_release(window->ec, sequence, tv_sec, tv_usec);
+ if (!e_hwc_window_commit_data_release(hwc_window)) continue;
+ if (e_hwc_window_is_video(hwc_window))
+ e_comp_wl_video_hwc_window_commit_data_release(hwc_window, sequence, tv_sec, tv_usec);
}
/* 'wait_commit' is mechanism to make 'fetch and commit' no more than one time per a frame;
{
if (!e_hwc_window_is_on_hw_overlay(hwc_window)) continue;
- if (!hwc_window->tsurface) can_commit = EINA_FALSE;
+ if (!hwc_window->tsurface)
+ {
+ ELOGF("HWC-WINS", " ehw:%p has no ts. -- {%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");
+
+ can_commit = EINA_FALSE;
+ }
}
return can_commit;