projects
/
vg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
replace VG_STATIC -> static
[vg.git]
/
vg_profiler.h
diff --git
a/vg_profiler.h
b/vg_profiler.h
index ca79e18d0bf77df3da6421de40176b916ff83d5c..67808a7a6d42d898f42e747d0be49f0a4528b8aa 100644
(file)
--- a/
vg_profiler.h
+++ b/
vg_profiler.h
@@
-26,12
+26,12
@@
struct vg_profile
u64 start;
};
u64 start;
};
-
VG_STATIC
void vg_profile_begin( struct vg_profile *profile )
+
static
void vg_profile_begin( struct vg_profile *profile )
{
profile->start = SDL_GetPerformanceCounter();
}
{
profile->start = SDL_GetPerformanceCounter();
}
-
VG_STATIC
void vg_profile_increment( struct vg_profile *profile )
+
static
void vg_profile_increment( struct vg_profile *profile )
{
profile->buffer_current ++;
{
profile->buffer_current ++;
@@
-44,7
+44,7
@@
VG_STATIC void vg_profile_increment( struct vg_profile *profile )
profile->samples[ profile->buffer_current ] = 0;
}
profile->samples[ profile->buffer_current ] = 0;
}
-
VG_STATIC
void vg_profile_end( struct vg_profile *profile )
+
static
void vg_profile_end( struct vg_profile *profile )
{
u64 time_end = SDL_GetPerformanceCounter(),
delta = time_end - profile->start;
{
u64 time_end = SDL_GetPerformanceCounter(),
delta = time_end - profile->start;
@@
-58,7
+58,7
@@
VG_STATIC void vg_profile_end( struct vg_profile *profile )
}
}
}
}
-
VG_STATIC
void vg_profile_drawn( struct vg_profile **profiles, u32 count,
+
static
void vg_profile_drawn( struct vg_profile **profiles, u32 count,
float budget, ui_rect panel, u32 colour_offset )
{
if( !vg_profiler )
float budget, ui_rect panel, u32 colour_offset )
{
if( !vg_profiler )
@@
-73,7
+73,7
@@
VG_STATIC void vg_profile_drawn( struct vg_profile **profiles, u32 count,
float sh = panel[3] / VG_PROFILE_SAMPLE_COUNT,
sw = panel[2];
float sh = panel[3] / VG_PROFILE_SAMPLE_COUNT,
sw = panel[2];
- ui_fill
_rect
( panel, 0xa0000000 );
+ ui_fill( panel, 0xa0000000 );
assert( count <= 8 );
double avgs[8];
assert( count <= 8 );
double avgs[8];
@@
-106,7
+106,7
@@
VG_STATIC void vg_profile_drawn( struct vg_profile **profiles, u32 count,
wx, sh };
u32 colour = colours[ (j+colour_offset) % vg_list_size(colours) ];
wx, sh };
u32 colour = colours[ (j+colour_offset) % vg_list_size(colours) ];
- ui_fill
_rect
( block, colour );
+ ui_fill( block, colour );
total += sample;
avgs[j] += sample;
total += sample;
avgs[j] += sample;
@@
-117,10
+117,10
@@
VG_STATIC void vg_profile_drawn( struct vg_profile **profiles, u32 count,
snprintf( infbuf, 64, "accuracy: %.7fms", rate_mul );
ui_text( (ui_rect){ panel[0] + 4,
snprintf( infbuf, 64, "accuracy: %.7fms", rate_mul );
ui_text( (ui_rect){ panel[0] + 4,
- panel[1] + 0 * 14,
0,
0 },
+ panel[1] + 0 * 14,
500, 3
0 },
infbuf,
1,
infbuf,
1,
- k_
text_align_left
);
+ k_
ui_align_left, 0
);
for( int i=0; i<count; i++ ){
snprintf( infbuf, 64, "%.4fms %s",
for( int i=0; i<count; i++ ){
snprintf( infbuf, 64, "%.4fms %s",
@@
-131,11
+131,11
@@
VG_STATIC void vg_profile_drawn( struct vg_profile **profiles, u32 count,
panel[1] + i * 14, 0, 0 },
infbuf,
1,
panel[1] + i * 14, 0, 0 },
infbuf,
1,
- k_
text_align_left
);
+ k_
ui_align_left, 0
);
}
}
}
}
-
VG_STATIC
void vg_profiler_init(void)
+
static
void vg_profiler_init(void)
{
VG_VAR_I32( vg_profiler, flags=VG_VAR_PERSISTENT );
}
{
VG_VAR_I32( vg_profiler, flags=VG_VAR_PERSISTENT );
}