Skip to content

Renderer.blit rework. #2623

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

Closed

Conversation

yunline
Copy link
Contributor

@yunline yunline commented Dec 21, 2023

@yunline yunline added video pygame.video bugfix PR that fixes bug labels Dec 21, 2023
@yunline yunline requested a review from a team as a code owner December 21, 2023 06:28
@yunline yunline linked an issue Dec 21, 2023 that may be closed by this pull request
2 tasks
Copy link
Member

@MyreMylar MyreMylar left a comment

Choose a reason for hiding this comment

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

LGTM 👍

if (<Image>source).texture.renderer != self:
raise TypeError("Source Image is not created by this Renderer")
elif isinstance(source, Surface):
source = Texture.from_surface(self, source) # Warning: slow
Copy link
Contributor

Choose a reason for hiding this comment

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

Warning: slow

This is an understatement if there ever was one. We should probably at least create a warning here. This kind of defeats the purpose of using renderer, and calling Texture.from_surface at the call site is not that much slower than doing it here.

I understand that this for convenience, but silently succeeding makes it hard to see what the problem is.

@ankith26 ankith26 marked this pull request as draft June 30, 2024 17:59
@zoldalma999
Copy link
Member

I think I'll close this. While there are some nice fixes in this PR, I agree with robertpfeiffer, surfaces should not be accepted here, and there are some conflicts too. I still see you around sometimes so if you have the time and energy, feel free to reopen this PR!

@zoldalma999 zoldalma999 closed this Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix PR that fixes bug video pygame.video
Projects
None yet
5 participants