Progress on fleshing out rendering (Getting ui ready to render in "layer batches")

This commit is contained in:
2024-06-23 02:47:13 -04:00
parent 136fef65c4
commit ce1d31f0d4
11 changed files with 317 additions and 80 deletions

View File

@ -172,7 +172,8 @@ LRU_reload :: proc( cache : ^LRU_Cache, allocator : Allocator )
LRU_hash_key :: #force_inline proc( key : u64 ) -> ( hash : u64 ) {
bytes := transmute( [8]byte ) key
hash = fnv64a( bytes[:] )
// hash = fnv64a( bytes[:] )
hash = cast(u64) crc64( bytes[:] )
return
}

View File

@ -754,8 +754,8 @@ reset_batch_codepoint_state :: proc( ctx : ^Context ) {
shape_text_cached :: proc( ctx : ^Context, font : FontID, text_utf8 : string ) -> ^ShapedText
{
font := font
// hash := cast(u64) crc32( transmute([]u8) text_utf8 )
hash := label_hash( text_utf8 )
hash := cast(u64) crc32( transmute([]u8) text_utf8 )
// hash := label_hash( text_utf8 )
shape_cache := & ctx.shape_cache
state := & ctx.shape_cache.state

View File

@ -1,6 +1,7 @@
package VEFontCache
import "core:hash"
crc64 :: hash.crc64_xz
crc32 :: hash.crc32
fnv64a :: hash.fnv64a