Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Using whole pixel canvas rendering #4

1 commit merged into from Jan 28, 2011


None yet
2 participants

aduros commented Jan 28, 2011

(Details in commit message)

This of course does ever so slightly change the visual appearance of what is drawn, but the benefit is potentially large and worth considering. For animation, the effect is unnoticeable.

Bruno Garcia Truncate to int to avoid subpixel rendering.
On browsers that don't accelerate canvas, subpixel rendering is done in
software and is a lot slower. Rendering on whole pixels can allow software
renderers to just do a simple pixel copy.

On my system (Linux, Firefox 4 beta 10) this change significantly speeds
up the canvas demo and improves my overall score from 81 to 143 sprites.
This seems to be supported by the results of this benchmark:

cory commented on 4f9315e Jan 28, 2011

Seems logical. May ultimate add this as a test case. Thank you!

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment