From: SooChan Lim Date: Thu, 24 Jun 2021 01:05:51 +0000 (+0900) Subject: tbm_module: remove the static variable X-Git-Tag: submit/tizen/20210624.054931~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F58%2F260358%2F1;p=platform%2Fcore%2Fuifw%2Flibtbm.git tbm_module: remove the static variable assign the checking variable of the surface_data to tbm_module structure Change-Id: Ied5a89e68b63ed799d707a4dd2f94b3737e56486 --- diff --git a/src/tbm_module.c b/src/tbm_module.c index 652713d..2f38521 100644 --- a/src/tbm_module.c +++ b/src/tbm_module.c @@ -650,18 +650,16 @@ tbm_module_support_surface_data(tbm_module *module) tbm_error_e error = TBM_ERROR_NONE; tbm_surface_data *surface_data = NULL; - static int tbm_module_check_support_surface_data = 0; - TBM_RETURN_VAL_IF_FAIL(module, 0); // check once support_surface_data or not. - if (tbm_module_check_support_surface_data) { + if (module->check_surface_data) { // return the value which already set. return module->support_surface_data; } // check this only once - tbm_module_check_support_surface_data = 1; + module->check_surface_data = 1; if (module->type != TBM_MODULE_TYPE_HAL_TBM) goto done; diff --git a/src/tbm_module.h b/src/tbm_module.h index a87adcb..65db355 100644 --- a/src/tbm_module.h +++ b/src/tbm_module.h @@ -53,6 +53,7 @@ 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) */