Skip to content

avoid subpixel rendering in canvas#8

Open
luizbills wants to merge 1 commit into
Shirajuki:masterfrom
luizbills:canvas-fix
Open

avoid subpixel rendering in canvas#8
luizbills wants to merge 1 commit into
Shirajuki:masterfrom
luizbills:canvas-fix

Conversation

@luizbills

Copy link
Copy Markdown
Contributor

I noticed that Canvas was rendering slower than my Litecanvas engine (which only uses native Canvas 2D). After investigating for a few minutes I noticed that your Canvas was not flooring the coordinates to avoid rendering subpixels. This trick really improves the performance of the canvas.

Note: I used ~~ rather than Math.floor (works perfectly the same for positive numbers).

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.

1 participant