1 /**************************************************************************
5 Copyright 2012 Samsung Electronics co., Ltd. All Rights Reserved.
7 Contact: SooChan Lim <sc1.lim@samsung.com>, Sangjin Lee <lsj119@samsung.com>
8 Boram Park <boram1288.park@samsung.com>, Changyeon Lee <cyeon.lee@samsung.com>
10 Permission is hereby granted, free of charge, to any person obtaining a
11 copy of this software and associated documentation files (the
12 "Software"), to deal in the Software without restriction, including
13 without limitation the rights to use, copy, modify, merge, publish,
14 distribute, sub license, and/or sell copies of the Software, and to
15 permit persons to whom the Software is furnished to do so, subject to
16 the following conditions:
18 The above copyright notice and this permission notice (including the
19 next paragraph) shall be included in all copies or substantial portions
22 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
23 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
25 IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
26 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
27 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
28 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30 **************************************************************************/
32 #ifndef _TBM_BUFMGR_H_
33 #define _TBM_BUFMGR_H_
36 #include <tbm_type_common.h>
38 #include <tbm_error.h>
42 * \brief Tizen Buffer Manager
49 /* Functions for buffer manager */
52 * @brief Initializes the buffer manager.
53 * @details If fd is lower than zero, fd is get drm fd in tbm_bufmgr_init function\n
55 * @param[in] fd : file descripter of the system buffer manager
56 * @return a buffer manager
58 * @see tbm_bufmgr_deinit();
61 #include <tbm_bufmgr.h>
65 bufmgr = tbm_bufmgr_init (bufmgr_fd);
69 tbm_bufmgr_deinit (bufmgr);
72 tbm_bufmgr tbm_bufmgr_init(int fd);
75 * @brief Deinitializes the buffer manager.
77 * @param[in] bufmgr : the buffer manager
78 * @see tbm_bufmgr_init()
81 #include <tbm_bufmgr.h>
86 bufmgr = tbm_bufmgr_init (bufmgr_fd);
89 error = tbm_get_last_error ();
95 tbm_bufmgr_deinit (bufmgr);
98 void tbm_bufmgr_deinit(tbm_bufmgr bufmgr);
101 * @brief Gets the tbm buffer capability.
103 * @param[in] bufmgr : the buffer manager
104 * @return the tbm bufmgr capability
107 #include <tbm_bufmgr.h>
111 unsigned int capability;
113 bufmgr = tbm_bufmgr_init (bufmgr_fd);
115 capability = tbm_bufmgr_get_capability (bufmgr);
117 tbm_bufmgr_deinit (bufmgr);
120 unsigned int tbm_bufmgr_get_capability(tbm_bufmgr bufmgr);
125 #endif /* _TBM_BUFMGR_H_ */