Skip to content

Fix: prevent unnecessary webgl canvas recreation in noSmooth()#8303

Open
yaxit24 wants to merge 2 commits intoprocessing:mainfrom
yaxit24:fix/noSmooth-canvas-recreation
Open

Fix: prevent unnecessary webgl canvas recreation in noSmooth()#8303
yaxit24 wants to merge 2 commits intoprocessing:mainfrom
yaxit24:fix/noSmooth-canvas-recreation

Conversation

@yaxit24
Copy link
Copy Markdown

@yaxit24 yaxit24 commented Nov 27, 2025

Fixes: #7548

Changes:
I fixed a bug where calling noSmooth() in WebGL mode would unnecessarily recreate the canvas, causing it to lose its CSS positioning. The fix involves checking the actual WebGL context attributes to see if antialiasing is already disabled before attempting to disable it again.

  • [☑️] npm run lint passes

@yaxit24
Copy link
Copy Markdown
Author

yaxit24 commented Nov 28, 2025

@ksen0 @perminder-17 Please review.

Copy link
Copy Markdown
Collaborator

@perminder-17 perminder-17 left a comment

Choose a reason for hiding this comment

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

Hi, there are lot of extra spacing changes in your code which makes it hard to review. Can you please fix it?

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.

noSmooth() breaks positioned WEBGL canvas

2 participants