return bo;
}
-int
+unsigned int
tbm_surface_internal_get_size(tbm_surface_h surface)
{
struct _tbm_surface *surf;
surf = (struct _tbm_surface *)surface;
size = surf->info.size;
- TBM_TRACE("tbm_surface(%p) size(%d)\n", surface, size);
+ TBM_TRACE("tbm_surface(%p) size(%u)\n", surface, size);
_tbm_surface_mutex_unlock();
if (pitch)
*pitch = surf->info.planes[plane_idx].stride;
- TBM_TRACE("tbm_surface(%p) plane_idx(%d) size(%d) offset(%d) pitch(%d)\n", surface, plane_idx,
+ TBM_TRACE("tbm_surface(%p) plane_idx(%d) size(%u) offset(%u) pitch(%u)\n", surface, plane_idx,
surf->info.planes[plane_idx].size, surf->info.planes[plane_idx].offset,
surf->info.planes[plane_idx].stride);
surf = (struct _tbm_surface *)surface;
width = surf->info.width;
- TBM_TRACE("tbm_surface(%p) width(%d)\n", surface, width);
+ TBM_TRACE("tbm_surface(%p) width(%u)\n", surface, width);
_tbm_surface_mutex_unlock();
surf = (struct _tbm_surface *)surface;
height = surf->info.height;
- TBM_TRACE("tbm_surface(%p) height(%d)\n", surface, height);
+ TBM_TRACE("tbm_surface(%p) height(%u)\n", surface, height);
_tbm_surface_mutex_unlock();
TBM_RETURN_IF_FAIL(ret == TBM_SURFACE_ERROR_NONE);
if (info.size > buf_info->size) {
- TBM_LOG_W("Dump skip. surface over created buffer size(%d, %d)\n", info.size, buf_info->size);
+ TBM_LOG_W("Dump skip. surface over created buffer size(%u, %d)\n", info.size, buf_info->size);
tbm_surface_unmap(surface);
return;
}
* @brief Gets the size of the surface.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] surface : the tbm_surface_h
- * @return the size of tbm_surface, otherwise -1.
+ * @return the size of tbm_surface, otherwise 0.
* @par Example
@code
#include <tbm_surface.h>
tbm_surface_destroy (surface);
@endcode
*/
-int tbm_surface_internal_get_size(tbm_surface_h surface);
+unsigned int tbm_surface_internal_get_size(tbm_surface_h surface);
/**
* @brief Gets size, offset and pitch data of plane by the plane_index.
TEST(tbm_surface_internal_get_size, work_flow_success_2)
{
- int actual_size = 0;
- int expected_size = 1024;
+ unsigned int actual_size = 0;
+ unsigned int expected_size = 1024;
struct _tbm_surface surface;
struct _tbm_bufmgr bufmgr;
TEST(tbm_surface_internal_get_size, work_flow_success_1)
{
- int actual_size = 0;
- int expected_size = 0;
+ unsigned int actual_size = 0;
+ unsigned int expected_size = 0;
struct _tbm_surface surface;
struct _tbm_bufmgr bufmgr;
TEST(tbm_surface_internal_get_size, null_ptr_fail_1)
{
- int actual_size = 0;
- int expected_size = 0;
+ unsigned int actual_size = 0;
+ unsigned int expected_size = 0;
_init_test();