Skip to content
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.

Commit

Permalink
Fix blood canvas timing + add new span for canvas blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
darthdeus committed Apr 19, 2024
1 parent a24994d commit dca9278
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# EXAMPLE=animated_text
# EXAMPLE=animated_sprites
# EXAMPLE=alpha_sprite
# EXAMPLE=blood_canvas
EXAMPLE=blood_canvas
# EXAMPLE=bloom
# EXAMPLE=custom_config
# EXAMPLE=cooldowns
Expand All @@ -26,7 +26,7 @@
# EXAMPLE=physics
# EXAMPLE=post_processing
# EXAMPLE=render-target
EXAMPLE=screenshot_history
# EXAMPLE=screenshot_history
# EXAMPLE=sprite
# EXAMPLE=shapes
# EXAMPLE=sound
Expand Down
2 changes: 2 additions & 0 deletions comfy-wgpu/src/blood_canvas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ pub fn blood_canvas_update_and_draw(f: fn(IVec2, &CanvasBlock)) {
let canvas = &mut *canvas;

for (_, block) in canvas.blocks.iter_mut() {
let _span = span!("canvas_block");

if block.modified {
// info!("updating block at {}", key);
block.modified = false;
Expand Down
2 changes: 1 addition & 1 deletion comfy/src/update_stages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ fn render_text(c: &mut EngineContext) {
}

fn update_blood_canvas(_c: &mut EngineContext) {
let _span = span!("blood_canvas");
span_with_timing!("blood_canvas");

// TODO: this really doesn't belong here
blood_canvas_update_and_draw(|key, block| {
Expand Down

0 comments on commit dca9278

Please sign in to comment.