Progress on fleshing out rendering (Getting ui ready to render in "layer batches")
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -1,6 +1,7 @@
|
||||
package VEFontCache
|
||||
|
||||
import "core:hash"
|
||||
crc64 :: hash.crc64_xz
|
||||
crc32 :: hash.crc32
|
||||
fnv64a :: hash.fnv64a
|
||||
|
||||
|
Reference in New Issue
Block a user