Skip to content
New issue

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

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

Already on GitHub? # to your account

ebiten: take performance profile to consider adding DrawImageOptions.DstRegion and/or DrawImageOptions.SrcRegions #3184

Open
11 tasks
hajimehoshi opened this issue Jan 22, 2025 · 0 comments
Milestone

Comments

@hajimehoshi
Copy link
Owner

Operating System

  • Windows
  • macOS
  • Linux
  • FreeBSD
  • OpenBSD
  • Android
  • iOS
  • Nintendo Switch
  • PlayStation 5
  • Xbox
  • Web Browsers

What feature would you like to be added?

See also #2945

We know that (*ebiten.Image).SubImage has some performance penalty: this returns an interface type image.Image and always allocates a heap object. If we change this to return an *ebiten.Image directly, the situation might change. However, even if this returned *ebiten.Image, this still might have a performance penalty as this still creates a new object. What about adding options to specify regions for a source and a destination image when redering an image? Before we introduce this, we need to take performance profile.

This issue is just for taking a profile. If we decide to make new APIs, let's file another issue.

Why is this needed?

To mitigate performance penalty of SubImage.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant