Skip to content

Remove unnecessary code in Texture2DConverter #320

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

Merged
merged 2 commits into from
May 31, 2025

Conversation

isHarryh
Copy link
Contributor

@isHarryh isHarryh commented May 29, 2025

Summary

This PR does some optimizations to the Texture2DConverter:

  • Removes unnecessary paste call in the pad_image, improving performance by ~20%.
  • Removes unused function assert_rgba.
  • Removes unnecessary if not instanceof(xxx, bytes) check before converting xxx to bytes. In CPython, bytes(xxx) will return xxx itself if xxx is already a bytes.

This PR is a part of #318

@K0lb3 K0lb3 merged commit 1b30650 into K0lb3:master May 31, 2025
5 checks passed
@isHarryh isHarryh deleted the patch-cleanup branch June 1, 2025 07:36
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.

2 participants