/* for damage region */
int num_rects;
int *rects;
+ tpl_bool_t need_to_commit;
twe_wl_surf_source *surf_source;
};
buf_info->num_rects = 0;
}
+ buf_info->need_to_commit = TPL_TRUE;
+
if (surf_source->in_use_buffers) {
TPL_OBJECT_LOCK(&surf_source->obj);
__tpl_list_push_back(surf_source->in_use_buffers,
buf_info->height = wl_egl_window->height;
buf_info->num_rects = 0;
buf_info->rects = NULL;
+ buf_info->need_to_commit = TPL_TRUE;
wl_buffer_add_listener((void *)buf_info->wl_buffer,
&wl_buffer_release_listener, tbm_surface);
wl_surface_commit(wl_surface);
+ buf_info->need_to_commit = TPL_FALSE;
+
TPL_LOG_T("WL_EGL", "[COMMIT] wl_buffer(%p) tbm_surface(%p) bo(%d)",
buf_info->wl_buffer, tbm_surface,
tbm_bo_export(tbm_surface_internal_get_bo(tbm_surface, 0)));
surf_source->tbm_queue);
}
+tpl_bool_t
+twe_surface_check_commit_needed(twe_surface_h twe_surface,
+ tbm_surface_h tbm_surface)
+{
+ twe_wl_surf_source *surf_source = (twe_wl_surf_source *)twe_surface;
+ twe_wl_buffer_info *buf_info = NULL;
+
+ if (!surf_source) {
+ TPL_ERR("Invalid parameter. twe_surface(%p)", twe_surface);
+ return TPL_FALSE;
+ }
+
+ tbm_surface_internal_get_user_data(tbm_surface, KEY_BUFFER_INFO,
+ (void **)&buf_info);
+ if (!buf_info) {
+ TPL_ERR("Failed to get buf_info from tbm_surface(%p).", tbm_surface);
+ return TPL_FALSE;
+ }
+
+ return buf_info->need_to_commit;
+}
+
void
twe_surface_commit_without_enqueue(twe_surface_h twe_surface,
tbm_surface_h tbm_surface)
tpl_bool_t
twe_surface_check_activated(twe_surface_h twe_surface);
+tpl_bool_t
+twe_surface_check_commit_needed(twe_surface_h twe_surface,
+ tbm_surface_h tbm_surface);
+
void
twe_surface_commit_without_enqueue(twe_surface_h twe_surface,
tbm_surface_h tbm_surface);