}
/* LCOV_EXCL_START */
-static double
-_tbm_surface_internal_get_time(void)
-{
- struct timespec tp;
- long time;
-
- clock_gettime(CLOCK_MONOTONIC, &tp);
- time = (tp.tv_sec * 1000000L) + (tp.tv_nsec / 1000);
-
- return time / 1000.0;
-}
static void
_tbm_surface_internal_debug_data_delete(tbm_surface_debug_data *debug_data)
const char *format = NULL;
char *keys;
int ret;
+ struct timespec tp;
if (!g_dump_info)
return;
}
memset(bo_handle.ptr, 0x00, buf_info->size);
+ clock_gettime(CLOCK_MONOTONIC, &tp);
+
switch (info.format) {
case TBM_FORMAT_ARGB8888:
case TBM_FORMAT_XRGB8888:
case TBM_FORMAT_ABGR8888:
case TBM_FORMAT_XBGR8888:
snprintf(buf_info->name, sizeof(buf_info->name),
- "%10.3f_%03d%s_%p_%s-%s.%s",
- _tbm_surface_internal_get_time(),
+ "%d.%03d_%03d%s_%p_%s-%s.%s",
+ (int)tp.tv_sec, (int)tp.tv_nsec / 1000000,
g_dump_info->count++, keys, surface, format, type, postfix);
if (scale_factor > 0.0) {
case TBM_FORMAT_YVU420:
case TBM_FORMAT_YUV420:
snprintf(buf_info->name, sizeof(buf_info->name),
- "%10.3f_%03d%s-%s_%dx%d_%c%c%c%c.%s",
- _tbm_surface_internal_get_time(),
+ "%d.%03d_%03d%s-%s_%dx%d_%c%c%c%c.%s",
+ (int)tp.tv_sec, (int)tp.tv_nsec / 1000000,
g_dump_info->count++, keys, type, info.planes[0].stride,
info.height, FOURCC_STR(info.format), postfix);
memcpy(bo_handle.ptr, info.planes[0].ptr, info.planes[0].stride * info.height);
case TBM_FORMAT_NV12:
case TBM_FORMAT_NV21:
snprintf(buf_info->name, sizeof(buf_info->name),
- "%10.3f_%03d%s-%s_%dx%d_%c%c%c%c.%s",
- _tbm_surface_internal_get_time(),
+ "%d.%03d_%03d%s-%s_%dx%d_%c%c%c%c.%s",
+ (int)tp.tv_sec, (int)tp.tv_nsec / 1000000,
g_dump_info->count++, keys, type, info.planes[0].stride,
info.height, FOURCC_STR(info.format), postfix);
memcpy(bo_handle.ptr, info.planes[0].ptr, info.planes[0].stride * info.height);
case TBM_FORMAT_YUYV:
case TBM_FORMAT_UYVY:
snprintf(buf_info->name, sizeof(buf_info->name),
- "%10.3f_%03d%s-%s_%dx%d_%c%c%c%c.%s",
- _tbm_surface_internal_get_time(),
+ "%d.%03d_%03d%s-%s_%dx%d_%c%c%c%c.%s",
+ (int)tp.tv_sec, (int)tp.tv_nsec / 1000000,
g_dump_info->count++, keys, type, info.planes[0].stride,
info.height, FOURCC_STR(info.format), postfix);
memcpy(bo_handle.ptr, info.planes[0].ptr, info.planes[0].stride * info.height);
struct list_head *next_link;
tbm_bo_handle bo_handle;
int ret, size, dw = 0, dh = 0, dstride = 0;
+ struct timespec tp;
if (!g_dump_info)
return;
memset(bo_handle.ptr, 0x00, buf_info->size);
memset(&buf_info->info, 0x00, sizeof(tbm_surface_info_s));
- snprintf(buf_info->name, sizeof(buf_info->name), "%10.3f_%03d-%s.%s",
- _tbm_surface_internal_get_time(),
+ clock_gettime(CLOCK_MONOTONIC, &tp);
+
+ snprintf(buf_info->name, sizeof(buf_info->name), "%d.%03d_%03d-%s.%s",
+ (int)tp.tv_sec, (int)tp.tv_nsec / 1000000,
g_dump_info->count++, type, dump_postfix[0]);
if (scale_factor > 0.0) {
ret = _tbm_surface_internal_buffer_scale(ptr, bo_handle.ptr,