From: SooChan Lim Date: Thu, 22 Feb 2018 05:14:43 +0000 (+0900) Subject: bufmgr: add tbm_bufmgr_set_bo_lock_type api X-Git-Tag: accepted/tizen/unified/20180223.062054~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8c7c82c9084a2b3360977bc8e4c3651e722f5787;p=platform%2Fcore%2Fuifw%2Flibtbm.git bufmgr: add tbm_bufmgr_set_bo_lock_type api this api is used intead of setting the BUFMGR_LOCK_TYPE env variables. Change-Id: I20f0b33663293d7c810027877f993eb2edcf7ecd --- diff --git a/src/tbm_bufmgr.c b/src/tbm_bufmgr.c index 1dd4f13..4208000 100644 --- a/src/tbm_bufmgr.c +++ b/src/tbm_bufmgr.c @@ -1813,6 +1813,20 @@ tbm_bufmgr_server_init(void) return bufmgr; } +int +tbm_bufmgr_set_bo_lock_type(tbm_bufmgr bufmgr, tbm_bufmgr_bo_lock_type bo_lock_type) +{ + TBM_BUFMGR_RETURN_VAL_IF_FAIL(TBM_BUFMGR_IS_VALID(gBufMgr), 0); + TBM_BUFMGR_RETURN_VAL_IF_FAIL(bufmgr == gBufMgr, 0); + + gBufMgr->bo_lock_type = bo_lock_type; + + TBM_LOG_I("The bo_lock_type of the bo is %d\n", bo_lock_type); + + return 1; +} + + int tbm_bufmgr_get_fd_limit(void) { struct rlimit lim; diff --git a/src/tbm_bufmgr.h b/src/tbm_bufmgr.h index 867cb3e..bc69778 100644 --- a/src/tbm_bufmgr.h +++ b/src/tbm_bufmgr.h @@ -1047,6 +1047,13 @@ int tbm_bufmgr_bind_native_display(tbm_bufmgr bufmgr, void *native_display); tbm_bufmgr tbm_bufmgr_server_init(void); /** + * @brief Set the bo_lock_type of the bufffer manager. + * @details set the bo_lock_type + * @since_tizen 5.0 + */ +int tbm_bufmgr_set_bo_lock_type(tbm_bufmgr bufmgr, tbm_bufmgr_bo_lock_type bo_lock_type); + +/** * @brief Print out the information of tbm_bos. * @since_tizen 3.0 * @param[in] bufmgr : the buffer manager