From: SooChan Lim Date: Tue, 15 Jun 2021 03:25:35 +0000 (+0900) Subject: tbm_surface_internal: remove direct alls of backend functions X-Git-Tag: submit/tizen/20210617.053259~21 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Flibtbm.git;a=commitdiff_plain;h=refs%2Fchanges%2F89%2F259889%2F1 tbm_surface_internal: remove direct alls of backend functions The tbm_bo_alloc_with_format calls tbm_module_bo_alloc_with_format. The tbm_module_bo_alloc_with_format calls the backend functions. Change-Id: Ic5cac77257e95e567367b6f16c395c55dd22beba --- diff --git a/src/tbm_surface_internal.c b/src/tbm_surface_internal.c index d4fab86..3b88a08 100644 --- a/src/tbm_surface_internal.c +++ b/src/tbm_surface_internal.c @@ -703,57 +703,13 @@ _tbm_surface_internal_create_surface(tbm_bufmgr bufmgr, int width, int height, i bo_size += surf->info.planes[j].size; } - if (bufmgr->use_hal_tbm) { - surf->bos[i] = tbm_bo_alloc_with_format(bufmgr, format, i, width, height, surf->info.bpp/8, flags, error); - if (*error == TBM_ERROR_NOT_SUPPORTED) { - surf->bos[i] = tbm_bo_alloc(bufmgr, bo_size, flags); - if (!surf->bos[i]) { - TBM_ERR("fail to alloc bo idx:%d\n", i); - *error = tbm_get_last_error(); - goto alloc_bo_fail; - } - } - } else if (bufmgr->backend_module_data) { - if (bufmgr->bufmgr_func->bufmgr_alloc_bo_with_format) { - /* LCOV_EXCL_START */ - surf->bos[i] = tbm_bo_alloc_with_format(bufmgr, format, i, width, height, surf->info.bpp/8, flags, error); - if (!surf->bos[i]) { - TBM_ERR("fail to tbm_bo_alloc_with_format idx:%d\n", i); - *error = tbm_get_last_error(); - goto alloc_bo_fail; - } - /* LCOV_EXCL_STOP */ - } else if (bufmgr->bufmgr_func->bufmgr_alloc_bo_with_tiled_format && (flags & TBM_BO_TILED)) { - /* LCOV_EXCL_START */ - TBM_ERR("NOT SUPPORTED. idx:%d", i); - *error = TBM_ERROR_NOT_SUPPORTED; + surf->bos[i] = tbm_bo_alloc_with_format(bufmgr, format, i, width, height, surf->info.bpp/8, flags, error); + if (!surf->bos[i]) { + surf->bos[i] = tbm_bo_alloc(bufmgr, bo_size, flags); + if (!surf->bos[i]) { + TBM_ERR("fail to alloc bo idx:%d\n", i); + *error = tbm_get_last_error(); goto alloc_bo_fail; - /* LCOV_EXCL_STOP */ - } else { - surf->bos[i] = tbm_bo_alloc(bufmgr, bo_size, flags); - if (!surf->bos[i]) { - TBM_ERR("fail to alloc bo idx:%d\n", i); - *error = tbm_get_last_error(); - goto alloc_bo_fail; - } - } - } else { - if (bufmgr->backend->surface_bo_alloc) { - /* LCOV_EXCL_START */ - surf->bos[i] = tbm_bo_alloc_with_surface(bufmgr, width, height, format, flags, i); - if (!surf->bos[i]) { - TBM_ERR("fail to tbm_bo_alloc_with_surface idx:%d\n", i); - *error = tbm_get_last_error(); - goto alloc_bo_fail; - /* LCOV_EXCL_STOP */ - } - } else { - surf->bos[i] = tbm_bo_alloc(bufmgr, bo_size, flags); - if (!surf->bos[i]) { - TBM_ERR("fail to alloc bo idx:%d\n", i); - *error = tbm_get_last_error(); - goto alloc_bo_fail; - } } }