mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-13 07:32:23 -07:00
eliminate old profiling markup
This commit is contained in:
@@ -165,7 +165,6 @@ dr_fuzzy_match_find_from_fstrs(Arena *arena, DR_FStrList *fstrs, String8 needle)
|
||||
internal DR_FRunList
|
||||
dr_fruns_from_fstrs(Arena *arena, F32 tab_size_px, DR_FStrList *strs)
|
||||
{
|
||||
ProfBeginFunction();
|
||||
DR_FRunList run_list = {0};
|
||||
F32 base_align_px = 0;
|
||||
for(DR_FStrNode *n = strs->first; n != 0; n = n->next)
|
||||
@@ -182,7 +181,6 @@ dr_fruns_from_fstrs(Arena *arena, F32 tab_size_px, DR_FStrList *strs)
|
||||
run_list.dim.y = Max(run_list.dim.y, dst_n->v.run.dim.y);
|
||||
base_align_px += dst_n->v.run.dim.x;
|
||||
}
|
||||
ProfEnd();
|
||||
return run_list;
|
||||
}
|
||||
|
||||
@@ -536,8 +534,6 @@ dr_sub_bucket(DR_Bucket *bucket)
|
||||
internal void
|
||||
dr_truncated_fancy_run_list(Vec2F32 p, DR_FRunList *list, F32 max_x, FNT_Run trailer_run)
|
||||
{
|
||||
ProfBeginFunction();
|
||||
|
||||
//- rjf: total advance > max? -> enable trailer
|
||||
B32 trailer_enabled = (list->dim.x > max_x && trailer_run.dim.x < max_x);
|
||||
|
||||
@@ -632,8 +628,6 @@ dr_truncated_fancy_run_list(Vec2F32 p, DR_FRunList *list, F32 max_x, FNT_Run tra
|
||||
advance += piece->advance;
|
||||
}
|
||||
}
|
||||
|
||||
ProfEnd();
|
||||
}
|
||||
|
||||
internal void
|
||||
@@ -691,7 +685,6 @@ dr_truncated_fancy_run_fuzzy_matches(Vec2F32 p, DR_FRunList *list, F32 max_x, Fu
|
||||
internal void
|
||||
dr_text_run(Vec2F32 p, Vec4F32 color, FNT_Run run)
|
||||
{
|
||||
ProfBeginFunction();
|
||||
F32 advance = 0;
|
||||
FNT_Piece *piece_first = run.pieces.v;
|
||||
FNT_Piece *piece_opl = piece_first + run.pieces.count;
|
||||
@@ -712,7 +705,6 @@ dr_text_run(Vec2F32 p, Vec4F32 color, FNT_Run run)
|
||||
}
|
||||
advance += piece->advance;
|
||||
}
|
||||
ProfEnd();
|
||||
}
|
||||
|
||||
internal void
|
||||
|
||||
@@ -246,8 +246,6 @@ fnt_path_from_tag(FNT_Tag tag)
|
||||
internal Rng2S16
|
||||
fnt_atlas_region_alloc(Arena *arena, FNT_Atlas *atlas, Vec2S16 needed_size)
|
||||
{
|
||||
ProfBeginFunction();
|
||||
|
||||
//- rjf: find node with best-fit size
|
||||
Vec2S16 region_p0 = {0};
|
||||
Vec2S16 region_sz = {0};
|
||||
@@ -356,15 +354,12 @@ fnt_atlas_region_alloc(Arena *arena, FNT_Atlas *atlas, Vec2S16 needed_size)
|
||||
Rng2S16 result = {0};
|
||||
result.p0 = region_p0;
|
||||
result.p1 = add_2s16(region_p0, region_sz);
|
||||
ProfEnd();
|
||||
return result;
|
||||
}
|
||||
|
||||
internal void
|
||||
fnt_atlas_region_release(FNT_Atlas *atlas, Rng2S16 region)
|
||||
{
|
||||
ProfBeginFunction();
|
||||
|
||||
//- rjf: extract region size
|
||||
Vec2S16 region_size = v2s16(region.x1 - region.x0, region.y1 - region.y0);
|
||||
|
||||
@@ -463,7 +458,6 @@ fnt_atlas_region_release(FNT_Atlas *atlas, Rng2S16 region)
|
||||
}
|
||||
}
|
||||
}
|
||||
ProfEnd();
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
@@ -542,7 +536,6 @@ fnt_hash2style_from_tag_size_flags(FNT_Tag tag, F32 size, FNT_RasterFlags flags)
|
||||
//- rjf: style hash -> style node
|
||||
FNT_Hash2StyleRasterCacheNode *hash2style_node = 0;
|
||||
{
|
||||
ProfBegin("style hash -> style node");
|
||||
U64 slot_idx = style_hash%fnt_state->hash2style_slots_count;
|
||||
FNT_Hash2StyleRasterCacheSlot *slot = &fnt_state->hash2style_slots[slot_idx];
|
||||
for(FNT_Hash2StyleRasterCacheNode *n = slot->first;
|
||||
@@ -567,7 +560,6 @@ fnt_hash2style_from_tag_size_flags(FNT_Tag tag, F32 size, FNT_RasterFlags flags)
|
||||
hash2style_node->hash2info_slots_count = 1024;
|
||||
hash2style_node->hash2info_slots = push_array(fnt_state->raster_arena, FNT_Hash2InfoRasterCacheSlot, hash2style_node->hash2info_slots_count);
|
||||
}
|
||||
ProfEnd();
|
||||
}
|
||||
|
||||
return hash2style_node;
|
||||
@@ -576,8 +568,6 @@ fnt_hash2style_from_tag_size_flags(FNT_Tag tag, F32 size, FNT_RasterFlags flags)
|
||||
internal FNT_Run
|
||||
fnt_run_from_string(FNT_Tag tag, F32 size, F32 base_align_px, F32 tab_size_px, FNT_RasterFlags flags, String8 string)
|
||||
{
|
||||
ProfBeginFunction();
|
||||
|
||||
//- rjf: map tag/size to style node
|
||||
FNT_Hash2StyleRasterCacheNode *hash2style_node = fnt_hash2style_from_tag_size_flags(tag, size, flags);
|
||||
|
||||
@@ -615,8 +605,6 @@ fnt_run_from_string(FNT_Tag tag, F32 size, F32 base_align_px, F32 tab_size_px, F
|
||||
run = run_node->run;
|
||||
}
|
||||
else
|
||||
ProfScope("no run node? -> cache miss")
|
||||
ProfScope("compute & build & fill node for '%.*s'", str8_varg(string))
|
||||
{
|
||||
//- rjf: decode string & produce run pieces
|
||||
FNT_PieceChunkList piece_chunks = {0};
|
||||
@@ -700,7 +688,6 @@ fnt_run_from_string(FNT_Tag tag, F32 size, F32 base_align_px, F32 tab_size_px, F
|
||||
//- rjf: no info found -> miss... fill this hash in the cache
|
||||
if(info == 0)
|
||||
{
|
||||
ProfBegin("no info found -> miss... fill this hash in the cache");
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
|
||||
// rjf: grab font handle for this tag if we don't have one already
|
||||
@@ -822,7 +809,6 @@ fnt_run_from_string(FNT_Tag tag, F32 size, F32 base_align_px, F32 tab_size_px, F
|
||||
}
|
||||
|
||||
scratch_end(scratch);
|
||||
ProfEnd();
|
||||
}
|
||||
|
||||
//- rjf: push piece for this raster portion
|
||||
@@ -898,7 +884,6 @@ fnt_run_from_string(FNT_Tag tag, F32 size, F32 base_align_px, F32 tab_size_px, F
|
||||
run_node->run = run;
|
||||
}
|
||||
|
||||
ProfEnd();
|
||||
return run;
|
||||
}
|
||||
|
||||
@@ -1018,20 +1003,17 @@ fnt_wrapped_string_lines_from_font_size_string_max(Arena *arena, FNT_Tag font, F
|
||||
internal Vec2F32
|
||||
fnt_dim_from_tag_size_string(FNT_Tag tag, F32 size, F32 base_align_px, F32 tab_size_px, String8 string)
|
||||
{
|
||||
ProfBeginFunction();
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
Vec2F32 result = {0};
|
||||
FNT_Run run = fnt_run_from_string(tag, size, base_align_px, tab_size_px, 0, string);
|
||||
result = run.dim;
|
||||
scratch_end(scratch);
|
||||
ProfEnd();
|
||||
return result;
|
||||
}
|
||||
|
||||
internal Vec2F32
|
||||
fnt_dim_from_tag_size_string_list(FNT_Tag tag, F32 size, F32 base_align_px, F32 tab_size_px, String8List list)
|
||||
{
|
||||
ProfBeginFunction();
|
||||
Vec2F32 sum = {0};
|
||||
for(String8Node *n = list.first; n != 0; n = n->next)
|
||||
{
|
||||
@@ -1039,7 +1021,6 @@ fnt_dim_from_tag_size_string_list(FNT_Tag tag, F32 size, F32 base_align_px, F32
|
||||
sum.x += str_dim.x;
|
||||
sum.y = Max(sum.y, str_dim.y);
|
||||
}
|
||||
ProfEnd();
|
||||
return sum;
|
||||
}
|
||||
|
||||
@@ -1084,7 +1065,6 @@ fnt_char_pos_from_tag_size_string_p(FNT_Tag tag, F32 size, F32 base_align_px, F3
|
||||
internal FNT_Metrics
|
||||
fnt_metrics_from_tag_size(FNT_Tag tag, F32 size)
|
||||
{
|
||||
ProfBeginFunction();
|
||||
FP_Metrics metrics = fnt_fp_metrics_from_tag(tag);
|
||||
FNT_Metrics result = {0};
|
||||
{
|
||||
@@ -1093,7 +1073,6 @@ fnt_metrics_from_tag_size(FNT_Tag tag, F32 size)
|
||||
result.line_gap = floor_f32(size) * metrics.line_gap / metrics.design_units_per_em;
|
||||
result.capital_height = floor_f32(size) * metrics.capital_height / metrics.design_units_per_em;
|
||||
}
|
||||
ProfEnd();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,12 +9,6 @@ thread_static UI_State *ui_state = 0;
|
||||
////////////////////////////////
|
||||
//~ rjf: Basic Type Functions
|
||||
|
||||
#if !defined(XXH_IMPLEMENTATION)
|
||||
# define XXH_IMPLEMENTATION
|
||||
# define XXH_STATIC_LINKING_ONLY
|
||||
# include "third_party/xxHash/xxhash.h"
|
||||
#endif
|
||||
|
||||
internal String8
|
||||
ui_hash_part_from_key_string(String8 string)
|
||||
{
|
||||
@@ -56,14 +50,12 @@ ui_key_make(U64 v)
|
||||
internal UI_Key
|
||||
ui_key_from_string(UI_Key seed_key, String8 string)
|
||||
{
|
||||
ProfBeginFunction();
|
||||
UI_Key result = {0};
|
||||
if(string.size != 0)
|
||||
{
|
||||
String8 hash_part = ui_hash_part_from_key_string(string);
|
||||
result.u64[0] = u64_hash_from_seed_str8(seed_key.u64[0], hash_part);
|
||||
}
|
||||
ProfEnd();
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -2416,7 +2408,6 @@ ui_color_from_tags_key_name(UI_Key key, String8 name)
|
||||
internal UI_Box *
|
||||
ui_build_box_from_key(UI_BoxFlags flags, UI_Key key)
|
||||
{
|
||||
ProfBeginFunction();
|
||||
ui_state->build_box_count += 1;
|
||||
|
||||
//- rjf: grab active parent
|
||||
@@ -2622,7 +2613,6 @@ ui_build_box_from_key(UI_BoxFlags flags, UI_Key key)
|
||||
}
|
||||
|
||||
//- rjf: return
|
||||
ProfEnd();
|
||||
return box;
|
||||
}
|
||||
|
||||
@@ -2646,8 +2636,6 @@ ui_active_seed_key(void)
|
||||
internal UI_Box *
|
||||
ui_build_box_from_string(UI_BoxFlags flags, String8 string)
|
||||
{
|
||||
ProfBeginFunction();
|
||||
|
||||
//- rjf: grab active parent
|
||||
UI_Box *parent = ui_top_parent();
|
||||
|
||||
@@ -2662,7 +2650,6 @@ ui_build_box_from_string(UI_BoxFlags flags, String8 string)
|
||||
}
|
||||
|
||||
//- rjf: return
|
||||
ProfEnd();
|
||||
return box;
|
||||
}
|
||||
|
||||
@@ -2684,7 +2671,6 @@ ui_build_box_from_stringf(UI_BoxFlags flags, char *fmt, ...)
|
||||
internal void
|
||||
ui_box_equip_display_string(UI_Box *box, String8 string)
|
||||
{
|
||||
ProfBeginFunction();
|
||||
box->string = push_str8_copy(ui_build_arena(), string);
|
||||
box->flags |= UI_BoxFlag_HasDisplayString;
|
||||
Vec4F32 text_color = box->text_color;
|
||||
@@ -2721,7 +2707,6 @@ ui_box_equip_display_string(UI_Box *box, String8 string)
|
||||
}
|
||||
scratch_end(scratch);
|
||||
}
|
||||
ProfEnd();
|
||||
}
|
||||
|
||||
internal void
|
||||
@@ -2822,7 +2807,6 @@ ui_box_char_pos_from_xy(UI_Box *box, Vec2F32 xy)
|
||||
internal UI_Signal
|
||||
ui_signal_from_box(UI_Box *box)
|
||||
{
|
||||
ProfBeginFunction();
|
||||
B32 is_focus_hot = box->flags & UI_BoxFlag_FocusHot && !(box->flags & UI_BoxFlag_FocusHotDisabled);
|
||||
UI_Signal sig = {box};
|
||||
sig.event_flags |= os_get_modifiers();
|
||||
@@ -2843,7 +2827,6 @@ ui_signal_from_box(UI_Box *box)
|
||||
//- rjf: determine if we're under the context menu or not
|
||||
//
|
||||
B32 ctx_menu_is_ancestor = 0;
|
||||
ProfScope("check context menu ancestor")
|
||||
{
|
||||
for(UI_Box *parent = box; !ui_box_is_nil(parent); parent = parent->parent)
|
||||
{
|
||||
@@ -3230,7 +3213,6 @@ ui_signal_from_box(UI_Box *box)
|
||||
}
|
||||
}
|
||||
|
||||
ProfEnd();
|
||||
return sig;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user