EINA_SAFETY_ON_NULL_RETURN_VAL(evh, EINA_FALSE);
- if (!evh->committed_vbuf)
- return EINA_FALSE;
-
- if (_e_video_hwc_can_commit(evh))
+ if ((evh->committed_vbuf) &&
+ (_e_video_hwc_can_commit(evh)))
{
displaying_buffer = evh->backend.displaying_buffer_get(evh);
{
E_Comp_Wl_Video_Buf *vbuf;
- if (evh->current_fb || evh->committed_vbuf)
- evh->backend.buffer_commit(evh, NULL);
-
- if (evh->current_fb)
+ if ((evh->current_fb) || (evh->committed_vbuf))
{
- e_comp_wl_video_buffer_set_use(evh->current_fb, EINA_FALSE);
- evh->current_fb = NULL;
+ if (evh->current_fb)
+ e_comp_wl_video_buffer_set_use(evh->current_fb, EINA_FALSE);
+
+ if (evh->committed_vbuf)
+ {
+ e_comp_wl_video_buffer_set_use(evh->committed_vbuf, EINA_FALSE);
+ e_comp_wl_buffer_reference(&evh->committed_vbuf->buffer_ref,
+ NULL);
+ evh->committed_vbuf = NULL;
+ }
+
+ evh->backend.buffer_commit(evh, NULL);
}
if (evh->old_comp_buffer)
evh->old_comp_buffer = NULL;
- if (evh->committed_vbuf)
- {
- e_comp_wl_video_buffer_set_use(evh->committed_vbuf, EINA_FALSE);
- evh->committed_vbuf = NULL;
- }
-
EINA_LIST_FREE(evh->bqueue, vbuf)
e_comp_wl_video_buffer_set_use(vbuf, EINA_FALSE);
}
static Eina_Bool
_e_video_hwc_windows_commit_data_set(E_Video_Hwc_Windows *evhw, E_Comp_Wl_Video_Buf *vbuf)
{
+ if (!vbuf)
+ {
+ evhw->commit_data.buffer = NULL;
+ goto end;
+ }
+
if ((evhw->commit_data.info.src_config.size.h == vbuf->width_from_pitch) &&
(evhw->commit_data.info.src_config.size.v == vbuf->height_from_size) &&
(evhw->commit_data.info.src_config.pos.x == vbuf->content_r.x) &&
/* Set buffer */
evhw->commit_data.buffer = vbuf->tbm_surface;
+end:
/* Set flag to wait until commit data is released. Otherwise, it maybe loses
* frame buffer. */
evhw->commit_data.wait_release = EINA_TRUE;
e_client_util_name_get(evhw->base.ec) ?: "No Name" ,
evhw->base.ec->netwm.pid,
wl_resource_get_id(evhw->base.ec->comp_data->surface),
- vbuf, vbuf->ref_cnt,
+ vbuf, (vbuf ? vbuf->ref_cnt : 0),
evhw->commit_data.info.src_config.size.h,
evhw->commit_data.info.src_config.size.v,
evhw->commit_data.info.src_config.pos.x,
/* show means that set the information of the buffer and the info of the hwc window */
- if (!vbuf) return EINA_TRUE;
-
ret = _e_video_hwc_windows_commit_data_set(evhw, vbuf);
// TODO:: this logic move to the hwc windows after hwc commit