tbm_module: Remove unused tbm_module_support_surface_data 43/319843/2
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 18 Feb 2025 06:45:17 +0000 (15:45 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Thu, 20 Feb 2025 02:18:57 +0000 (11:18 +0900)
Change-Id: Ie7feab36efadb413f93c250f9f3d84f4c5a4e696

src/tbm_module.c
src/tbm_module.h

index 729daa35294e143f677c5f7d2196b4ac878529ab..e24c48d0ae949c0c4924bc8ea6abe50f711ffdd0 100644 (file)
@@ -658,39 +658,6 @@ tbm_module_get_plane_data(tbm_module *module, int format, int plane_idx, uint32_
        return error;
 }
 
-int
-tbm_module_support_surface_data(tbm_module *module)
-{
-       tbm_error_e error = TBM_ERROR_NONE;
-       tbm_surface_data *surface_data = NULL;
-
-       TBM_RETURN_VAL_IF_FAIL(module, 0);
-
-       // check once support_surface_data or not.
-       if (module->check_surface_data) {
-               // return the value which already set.
-               return module->support_surface_data;
-       }
-
-       // check this only once
-       module->check_surface_data = 1;
-
-       if (module->type != TBM_MODULE_TYPE_HAL_TBM)
-               goto done;
-
-       // Assume that the hal-tbm supports the hal surface apis if tbm_module_alloc_surface_data succeed.
-       surface_data = tbm_module_alloc_surface_data(module, 10, 10, TBM_FORMAT_ARGB8888, TBM_BO_DEFAULT, &error);
-       if (!surface_data)
-               goto done;
-       free(surface_data);
-
-       module->support_surface_data = 1;
-
-done:
-       return module->support_surface_data;
-}
-
-
 tbm_surface_data *
 tbm_module_alloc_surface_data(tbm_module *module, int width, int height, int format, int flags, tbm_error_e *error)
 {
index a27a94fd780e2d2b71e6d0ef1f4e86dddc40ad47..d0d8ee74a361bbcf8bfd9f77e43f7ada47e17d0e 100644 (file)
@@ -52,8 +52,6 @@ typedef enum _tbm_module_type {
 
 typedef struct _tbm_module {
        tbm_module_type type;
-       int support_surface_data;
-       int check_surface_data;
 
        void *module_data;                         /* backend module */
        tbm_bufmgr_backend   backend;              /* bufmgr backend (will be DEPRECATED) */
@@ -90,7 +88,6 @@ int                tbm_module_get_capabilities(tbm_module *module, tbm_error_e *
 tbm_error_e        tbm_module_bind_native_display(tbm_module *module, void *native_display);
 tbm_error_e        tbm_module_get_supported_formats(tbm_module *module, uint32_t **formats, uint32_t *num);
 tbm_error_e        tbm_module_get_plane_data(tbm_module *module, int format, int plane_idx, uint32_t w, uint32_t h, uint32_t *size, uint32_t *offset, uint32_t *pitch, int *bo_idx);
-int                tbm_module_support_surface_data(tbm_module *module);
 tbm_surface_data  *tbm_module_alloc_surface_data(tbm_module *module, int width, int height, int format, int flags, tbm_error_e *error);
 tbm_surface_data  *tbm_module_import_surface_data(tbm_module *module, int width, int height, int format, tbm_surface_buffer_data *buffer_data, tbm_error_e *error);
 tbm_bo_data       *tbm_module_alloc_bo_data(tbm_module *module, tbm_bo bo, int size, int flags, tbm_error_e *error);