mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-11-25 07:12:20 -08:00
raddbg: eliminate preemptive glyph rasterization. we actually just pay more for it than we get.
This commit is contained in:
1 parent
933f05949c
commit
8036f7bed0
1 file changed
-42
@@ -5859,48 +5859,6 @@ rd_window_frame(void)
|
|||||||
ws->font_slot_raster_flags[RD_FontSlot_Code] = (rd_setting_b32_from_name(str8_lit("smooth_code_text"))*FNT_RasterFlag_Smooth)|(rd_setting_b32_from_name(str8_lit("hint_code_text"))*FNT_RasterFlag_Hinted);
|
ws->font_slot_raster_flags[RD_FontSlot_Code] = (rd_setting_b32_from_name(str8_lit("smooth_code_text"))*FNT_RasterFlag_Smooth)|(rd_setting_b32_from_name(str8_lit("hint_code_text"))*FNT_RasterFlag_Hinted);
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////
|
|
||||||
//- rjf: @window_frame_part pre-emptively rasterize common glyphs on the first frame
|
|
||||||
//
|
|
||||||
if(rd_state->first_window_state == ws && rd_state->last_window_state == ws && ws->frames_alive == 0)
|
|
||||||
{
|
|
||||||
F32 font_size = rd_font_size();
|
|
||||||
RD_FontSlot english_font_slots[] = {RD_FontSlot_Main, RD_FontSlot_Code};
|
|
||||||
RD_FontSlot icon_font_slot = RD_FontSlot_Icons;
|
|
||||||
for(U64 idx = 0; idx < ArrayCount(english_font_slots); idx += 1)
|
|
||||||
{
|
|
||||||
Temp scratch = scratch_begin(0, 0);
|
|
||||||
RD_FontSlot slot = english_font_slots[idx];
|
|
||||||
String8 sample_text = str8_lit("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890~!@#$%^&*()-_+=[{]}\\|;:'\",<.>/?");
|
|
||||||
fnt_run_from_string(rd_font_from_slot(slot),
|
|
||||||
font_size,
|
|
||||||
0, 0, 0,
|
|
||||||
sample_text);
|
|
||||||
fnt_run_from_string(rd_font_from_slot(slot),
|
|
||||||
font_size,
|
|
||||||
0, 0, 0,
|
|
||||||
sample_text);
|
|
||||||
scratch_end(scratch);
|
|
||||||
}
|
|
||||||
for(RD_IconKind icon_kind = RD_IconKind_Null; icon_kind < RD_IconKind_COUNT; icon_kind = (RD_IconKind)(icon_kind+1))
|
|
||||||
{
|
|
||||||
Temp scratch = scratch_begin(0, 0);
|
|
||||||
fnt_run_from_string(rd_font_from_slot(icon_font_slot),
|
|
||||||
font_size,
|
|
||||||
0, 0, FNT_RasterFlag_Smooth,
|
|
||||||
rd_icon_kind_text_table[icon_kind]);
|
|
||||||
fnt_run_from_string(rd_font_from_slot(icon_font_slot),
|
|
||||||
font_size,
|
|
||||||
0, 0, FNT_RasterFlag_Smooth,
|
|
||||||
rd_icon_kind_text_table[icon_kind]);
|
|
||||||
fnt_run_from_string(rd_font_from_slot(icon_font_slot),
|
|
||||||
font_size,
|
|
||||||
0, 0, FNT_RasterFlag_Smooth,
|
|
||||||
rd_icon_kind_text_table[icon_kind]);
|
|
||||||
scratch_end(scratch);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////
|
//////////////////////////////
|
||||||
//- rjf: @window_frame_part commit window's position/status to underlying cfg tree
|
//- rjf: @window_frame_part commit window's position/status to underlying cfg tree
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in new issue
Block a user