Skip to content

ebiten: change New*Image and SubImage returning a recyclable image and remove RecyclableSubImage #3428

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?

Especially the current Image.SubImage returns a image using an internal cache, and this cannot be replaced with sync.Pool due to compatibility.

If this and New*Image functions could use sync.Pool instead of the cache, they can always return recyclable image, and the user can put it back to the pool explicitly. We would no longer need RecyclableSubImage.

As this is a breaking change, let's do this in v3

Why is this needed?

Simplifying the semantics.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions