}
/* LCOV_EXCL_START */
-
static double
_tbm_surface_internal_get_time(void)
{
return "unknwon";
}
}
-/* LCOV_EXCL_STOP */
static bool
_tbm_surface_mutex_init(void)
tbm_bufmgr_deinit(g_surface_bufmgr);
g_surface_bufmgr = NULL;
}
+/* LCOV_EXCL_STOP */
static int
_tbm_surface_internal_is_valid(tbm_surface_h surface)
ret = mgr->backend->surface_get_plane_data(surf->info.width,
surf->info.height, surf->info.format, plane_idx, size, offset, pitch, bo_idx);
if (!ret) {
+ /* LCOV_EXCL_START */
TBM_LOG_E("Fail to surface_get_plane_data. surface(%p)\n", surface);
return 0;
+ /* LCOV_EXCL_STOP */
}
return 1;
ret = mgr->backend->surface_supported_format(formats, num);
if (!ret) {
+ /* LCOV_EXCL_START */
TBM_LOG_E("Fail to surface_supported_format.\n");
goto fail;
+ /* LCOV_EXCL_START */
}
TBM_TRACE("tbm_bufmgr(%p) format num(%u)\n", g_surface_bufmgr, *num);
return ret;
+/* LCOV_EXCL_START */
fail:
if (bufmgr_initialized) {
LIST_DELINIT(&g_surface_bufmgr->surf_list);
TBM_LOG_E("error: tbm_bufmgr(%p)\n", g_surface_bufmgr);
return 0;
+/* LCOV_EXCL_STOP */
}
int
surf = calloc(1, sizeof(struct _tbm_surface));
if (!surf) {
+ /* LCOV_EXCL_START */
TBM_LOG_E("fail to alloc surf\n");
goto alloc_surf_fail;
+ /* LCOV_EXCL_STOP */
}
surf->bufmgr = mgr;
return surf;
+/* LCOV_EXCL_START */
alloc_bo_fail:
for (j = 0; j < i; j++) {
if (surf->bos[j])
TBM_LOG_E("error: width(%d) height(%d) format(%s) flags(%d)\n",
width, height,
_tbm_surface_internal_format_to_str(format), flags);
+/* LCOV_EXCL_STOP */
return NULL;
}
surf = calloc(1, sizeof(struct _tbm_surface));
if (!surf) {
+ /* LCOV_EXCL_START */
TBM_LOG_E("fail to allocate struct _tbm_surface.\n");
goto alloc_surf_fail;
+ /* LCOV_EXCL_STOP */
}
surf->bufmgr = mgr;
return surf;
+/* LCOV_EXCL_START */
check_bo_fail:
for (i = 0; i < num; i++) {
if (surf->bos[i])
TBM_LOG_E("error: width(%u) height(%u) format(%s) bo_num(%d)\n",
info->width, info->height,
_tbm_surface_internal_format_to_str(info->format), num);
+/* LCOV_EXCL_STOP */
return NULL;
}
void
tbm_surface_internal_dump_with_scale_start(char *path, int w, int h, int count, double scale)
{
- TBM_RETURN_IF_FAIL(scale > 0.0);
-
- tbm_surface_internal_dump_start(path, (int)(scale * w), (int)(scale * h), count);
+ if (scale > 0.0) {
+ w *= scale;
+ h *= scale;
+ }
+ tbm_surface_internal_dump_start(path, w, h, count);
scale_factor = scale;
}