Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

faster drawTile, remove repeat clipping checks #1801

Merged
merged 1 commit into from
Jan 9, 2022

Conversation

joshgoebel
Copy link
Collaborator

Resolves #1796 .

drawTile appears to be taking clipping into account, yet in
setPixel for every single pixel we check the clipping
individually... it seems this is not necessary.

This adds a new setPixelFast that avoids the repeat checks.

I see about a 4-5% increase in benchmarks for just sprite draws.

`drawTile` appears to be taking clipping into account, yet in
setPixel for every single pixel we check the clipping
individually... it seems this is not necessary.

This adds a new `setPixelFast` that avoids the repeat checks.

I see about a 4-5% increase in benchmarks for just sprite draws.
Copy link
Owner

@nesbox nesbox left a comment

Choose a reason for hiding this comment

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

Thanks

@nesbox nesbox merged commit c3efe28 into master Jan 9, 2022
@nesbox nesbox deleted the drawtile_already_clips branch January 9, 2022 14:59
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.

Doesn't drawTile already check clipping itself?
2 participants