Ed_
1533a14a1b
* draw_text_string_pos_extent_zoomed can now oversample text futher (if desired) * render_ui_via_box_tree has a rudimentary render pass layering optimization Add support for the slab allocator to accept arbitrary alignments (odin's map container needs it) Messing around with 64-byte alignment as the default for the allocator...
30 lines
825 B
Odin
30 lines
825 B
Odin
package grime
|
|
|
|
import "base:runtime"
|
|
import "core:prof/spall"
|
|
|
|
SpallProfiler :: struct {
|
|
ctx : spall.Context,
|
|
buffer : spall.Buffer,
|
|
}
|
|
|
|
@(private)
|
|
Module_Context : ^SpallProfiler
|
|
|
|
set_profiler_module_context :: #force_inline proc "contextless" ( ctx : ^SpallProfiler ) {
|
|
Module_Context = ctx
|
|
}
|
|
|
|
@(deferred_none = profile_end)
|
|
profile :: #force_inline proc "contextless" ( name : string, loc := #caller_location ) {
|
|
// spall._buffer_begin( & Module_Context.ctx, & Module_Context.buffer, name, "", loc )
|
|
}
|
|
|
|
profile_begin :: #force_inline proc "contextless" ( name : string, loc := #caller_location ) {
|
|
// spall._buffer_begin( & Module_Context.ctx, & Module_Context.buffer, name, "", loc )
|
|
}
|
|
|
|
profile_end :: #force_inline proc "contextless" () {
|
|
// spall._buffer_end( & Module_Context.ctx, & Module_Context.buffer)
|
|
}
|