g_mutex_lock(&_twe_ctx->thread_mutex);
- if (g_source_is_destroyed(source)) {
- TPL_ERR("del_source(%p) already destroyed.", source);
- g_cond_signal(&_twe_ctx->thread_cond);
- g_mutex_unlock(&_twe_ctx->thread_mutex);
- return G_SOURCE_REMOVE;
- }
-
cond = g_source_query_unix_fd(source, del_source->tag);
if (cond & G_IO_IN) {
uint64_t value = 1;
int ret;
- if (!del_source || g_source_is_destroyed(&del_source->gsource)) {
- TPL_ERR("del_source(%p) is already destroyed.", del_source);
- return;
- }
-
ret = write(del_source->event_fd, &value, sizeof(uint64_t));
if (ret == -1) {
TPL_ERR("failed to send delete event. twe_del_source(%p)",
tdm_error tdm_err = TDM_ERROR_NONE;
GIOCondition cond;
- if (!source || g_source_is_destroyed(source)) {
- TPL_ERR("TDM source(%p) already destroyed.", source);
- return G_SOURCE_REMOVE;
- }
-
cond = g_source_query_unix_fd(source, tdm_source->tag);
if (cond & G_IO_IN) {
{
twe_tdm_source *tdm_source = (twe_tdm_source *)source;
- if (!tdm_source || g_source_is_destroyed(&tdm_source->gsource)) {
- TPL_ERR("TDM source(%p) already destroyed.", tdm_source);
- return;
- }
-
_twe_ctx->tdm_source = NULL;
g_source_remove_unix_fd(&tdm_source->gsource, tdm_source->tag);
twe_wl_disp_source *disp_source = (twe_wl_disp_source *)source;
gboolean ret = FALSE;
- if (g_source_is_destroyed(source)) {
- if (disp_source && disp_source->disp && disp_source->prepared)
- wl_display_cancel_read(disp_source->disp);
- TPL_ERR("display source(%p) already destroyed.", source);
- return ret;
- }
-
if (!disp_source->prepared)
return ret;
{
twe_wl_disp_source *disp_source = (twe_wl_disp_source *)source;
- if (g_source_is_destroyed(source)) {
- TPL_ERR("display source(%p) already destroyed.", source);
- return G_SOURCE_REMOVE;
- }
-
g_mutex_lock(&disp_source->wl_event_mutex);
if (disp_source->gfd.revents & G_IO_IN) {
if (wl_display_dispatch_queue_pending(disp_source->disp,
twe_wl_surf_source *surf_source = (twe_wl_surf_source *)source;
GIOCondition cond;
- if (g_source_is_destroyed(source)) {
- TPL_ERR("surface source(%p) already destroyed.", source);
- return G_SOURCE_REMOVE;
- }
-
cond = g_source_query_unix_fd(source, surf_source->tag);
if (cond & G_IO_IN) {
tbm_bufmgr bufmgr = NULL;
unsigned int capability;
- if (!surf_source || g_source_is_destroyed(&surf_source->gsource)) {
- TPL_ERR("twe_surface(%p) is invalid.", twe_surface);
- return TPL_ERROR_INVALID_PARAMETER;
- }
-
if (surf_source->tbm_queue) {
TPL_LOG_B(BACKEND, "[REUSE SWAPCHAIN] surf_source(%p) tbm_queue(%p)",
surf_source, surf_source->tbm_queue);
{
twe_wl_surf_source *surf_source = (twe_wl_surf_source *)twe_surface;
- if (!surf_source || g_source_is_destroyed(&surf_source->gsource)) {
- TPL_ERR("twe_surface(%p) is invalid.", twe_surface);
- return TPL_ERROR_INVALID_PARAMETER;
- }
-
TPL_LOG_T(BACKEND, "[SWAPCHAIN_DESTROY] twe_surface(%p) tbm_queue(%p)",
twe_surface, surf_source->tbm_queue);
twe_wl_disp_source *disp_source = NULL;
int ret = 1;
- if (!surf_source || g_source_is_destroyed(&surf_source->gsource)) {
- TPL_ERR("twe_surface(%p) is invalid.", twe_surface);
- return TPL_ERROR_INVALID_PARAMETER;
- }
-
if (!buffer_count) {
TPL_ERR("Invalid parameter. buffer_count is NULL.");
return TPL_ERROR_INVALID_PARAMETER;
twe_wl_disp_source *disp_source = NULL;
gint64 end_time;
- if (!surf_source || g_source_is_destroyed(&surf_source->gsource)) {
- TPL_ERR("Invalid parameter. surf_source(%p)", surf_source);
- return TPL_ERROR_INVALID_PARAMETER;
- }
-
disp_source = surf_source->disp_source;
if (timeout_ns != UINT64_MAX)
{
twe_wl_surf_source *surf_source = (twe_wl_surf_source *)twe_surface;
- if (!surf_source || g_source_is_destroyed(&surf_source->gsource)) {
- TPL_ERR("Invalid parameter. surf_source(%p)", surf_source);
- return TPL_ERROR_INVALID_PARAMETER;
- }
-
surf_source->post_interval = post_interval;
TPL_LOG_T(BACKEND, "surf_source(%p) post_interval(%d)",