Interface TextureUploader<H>

Type Parameters:
H - the host's opaque texture-handle type
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface TextureUploader<H>
Uploads decoded image bytes into a host-managed GPU texture and returns an opaque host handle. The handle type H is whatever the host renderer uses (for example a NanoVG image handle, or a Skija texture reference) — the library treats it as opaque and never inspects it.

Always invoked on the main/render thread; the library marshals via MainThreadExecutor before calling.

Since:
0.1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    upload(InputStream imageBytes)
    Uploads an image and returns its handle.
  • Method Details

    • upload

      H upload(InputStream imageBytes)
      Uploads an image and returns its handle.
      Parameters:
      imageBytes - a stream over a complete encoded image (PNG)
      Returns:
      the host texture handle, or null if the upload failed
      Since:
      0.1.0