_e_comp_wl_tbm_funcs->module_name = strdup(module_name);
_e_comp_wl_tbm_funcs->capturable_buffer_get = fn->capturable_buffer_get;
_e_comp_wl_tbm_funcs->egl_image_buffer_get = fn->egl_image_buffer_get;
+ _e_comp_wl_tbm_funcs->egl_image_buffer_get_with_flags = fn->egl_image_buffer_get_with_flags;
return EINA_TRUE;
}
}
EINTERN tbm_surface_h
-e_comp_wl_tbm_egl_image_buffer_get(int width, int height, tbm_format format)
+e_comp_wl_tbm_egl_image_buffer_get(int width, int height, tbm_format format, int flags)
{
tbm_surface_h egl_image_buffer = NULL;
+ if (_e_comp_wl_tbm_funcs && _e_comp_wl_tbm_funcs->egl_image_buffer_get_with_flags)
+ {
+ if (_e_comp_wl_tbm_funcs->egl_image_buffer_get_with_flags(width, height, format, flags, &egl_image_buffer))
+ return egl_image_buffer;
+ }
+
if (_e_comp_wl_tbm_funcs && _e_comp_wl_tbm_funcs->egl_image_buffer_get)
{
if (_e_comp_wl_tbm_funcs->egl_image_buffer_get(width, height, format, &egl_image_buffer))
/* reference count of dst_tsurface should be increased */
Eina_Bool (*capturable_buffer_get)(tbm_surface_h src_tsurface, tbm_surface_h *dst_tsurface);
Eina_Bool (*egl_image_buffer_get)(int width, int height, tbm_format format, tbm_surface_h *egl_image_tsurface);
+ Eina_Bool (*egl_image_buffer_get_with_flags)(int width, int height, tbm_format format, int flags, tbm_surface_h *egl_image_tsurface);
};
EINTERN Eina_Bool e_comp_wl_tbm_init(void);
/* reference count of returned tbm_surface should be decreased when not using it anymore */
EINTERN tbm_surface_h e_comp_wl_tbm_capturable_buffer_get(tbm_surface_h tsurface);
-EINTERN tbm_surface_h e_comp_wl_tbm_egl_image_buffer_get(int width, int height, tbm_format format);
+EINTERN tbm_surface_h e_comp_wl_tbm_egl_image_buffer_get(int width, int height, tbm_format format, int flags);
EINTERN Eina_Bool e_comp_wl_tbm_gbm_bo_user_data_set(tbm_surface_h tsurface, void *gbo);
tbm_surface_h new_tsurface;
tbm_surface_info_s src_info;
int ret = TBM_SURFACE_ERROR_NONE;
+ tbm_bo tbo;
ret = tbm_surface_get_info(tsurface, &src_info);
if (ret != TBM_SURFACE_ERROR_NONE)
return NULL;
}
+ tbo = tbm_surface_internal_get_bo(tsurface, 0);
+ if (!tbo)
+ {
+ EHWQERR("fail to get bo", NULL, NULL, NULL);
+ return NULL;
+ }
+
EHWQINF("Copy Backup buffer create w:%d h:%d fmt:%c%c%c%c", NULL, NULL, NULL,
src_info.width, src_info.height, EHW_FOURCC_STR(src_info.format));
/* get the buffer from e20 module first, if no buffer from e20 module, then create the tbm_surface here. */
- new_tsurface = e_comp_wl_tbm_egl_image_buffer_get(src_info.width, src_info.height, src_info.format);
+ new_tsurface = e_comp_wl_tbm_egl_image_buffer_get(src_info.width, src_info.height, src_info.format, tbm_bo_get_flags(tbo));
if (!new_tsurface)
{
new_tsurface = tbm_surface_create(src_info.width, src_info.height, src_info.format);