Skip to content

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

@hajimehoshi

Description

@hajimehoshi

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions