Skip to content

Conversation

ryantrem
Copy link
Member

This brings in the changes from master to fix timing/sequencing issues related to copyTexture and deleteTexture.

This included changes on the JS side, so it brings with it new versions of the BJS packages.

}

return needClear;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its expected that the Canvas is cleared when setheight/setwidth is set (even if they don't change)

Has this behavior has been preserved?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, good question, it seems like the previous call to Clear is gone and needClear is now and unused local variable. If we can wait until tomorrow, let's ask @CedricGuillemet.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did this result in any regression? If not, I would say lets just merge this PR since it is already in master, and we can do a follow up PR in master after Cedric is back if needed and bring it into this branch. If it is causing a regression though, then let's wait a day for Cedric.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will test this on iOS and update.

Copy link

@Pheo Pheo Apr 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there is a regression (in that it doesn't clear anymore). But should be solvable with a simple flush on setheight/width. Image free crashes seem to be resolved -- so I think we can just merge this now, and I can raise a PR after to fix canvas clear behaviour

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to simplify the code too much and it caused the regression. Best seems to revert that part on this PR. Can you do the change and test it again @Pheo ? Sorry for the inconveniences.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

raised PR @ ryantrem#6

Copy link

@Pheo Pheo Apr 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

raised PR @ ryantrem#6

Confirmed working! Framebuffer correctly clears on canvas setHeight/setWidth.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CedricGuillemet can you make that same fix in master as well?

Copy link
Contributor

@CedricGuillemet CedricGuillemet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good once ryantrem#6 is merged

@ryantrem ryantrem merged commit 425bc34 into BabylonJS:CanvasTest Apr 22, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants