more perf improves for VEFontCache

This commit is contained in:
2025-01-03 01:25:05 -05:00
parent 5e0afd5b7b
commit b066b0de3a
10 changed files with 171 additions and 111 deletions

View File

@ -277,16 +277,16 @@ ui_graph_build_end :: proc( ui : ^UI_State )
if ! current.computed.fresh
{
if len(current.text.str) > 0 {
app_window := get_state().app_window
screen_extent := app_window.extent
screen_size := screen_extent * 2
screen_size_norm := 1 / screen_size
// app_window := get_state().app_window
// screen_extent := app_window.extent
// screen_size := screen_extent * 2
// screen_size_norm := 1 / screen_size
font_size_screen_scalar := app_config().font_size_screen_scalar
// over_sample : f32 = f32(get_state().config.font_size_canvas_scalar)
current.computed.text_shape = shape_text_cached( current.text.str, current.style.font, current.layout.font_size, 1.0 )
current.computed.text_shape = shape_text_cached_latin( current.text.str, current.style.font, current.layout.font_size, 1.0 )
}
ui_box_compute_layout( current )
}

View File

@ -73,8 +73,6 @@ ui_box_compute_layout :: proc( box : ^UI_Box,
text_size : Vec2
if len(box.text.str) > 0
{
text_size = computed.text_shape.size
// if layout.font_size == computed.text_size.y {
// text_size = computed.text_size