Package io.flutter.view

# Interface TextureRegistry.SurfaceProducer

All Superinterfaces:
  `TextureRegistry.TextureEntry`

Enclosing interface:
  TextureRegistry

public static interface TextureRegistry.SurfaceProducer extends TextureRegistry.TextureEntry
Uses a Surface to populate the texture.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getHeight()`
  `Surface`
  `getSurface()`
  Get a Surface that can be used to update the texture contents.
  `int`
  `getWidth()`
  `long`
  `id()`
  `void`
  `release()`
  Deregisters and releases all resources .
  `void`
  `setSize(int width, int height)`
  Specify the size of this texture in physical pixels

- ## Method Details

  - ### id

    long id()
    Specified by:
      `id` in interface `TextureRegistry.TextureEntry`
    Returns:
      The identity of this texture.

  - ### release

    void release()
    Deregisters and releases all resources .
    Specified by:
      `release` in interface `TextureRegistry.TextureEntry`

  - ### setSize

    void setSize(int width, int height)
    Specify the size of this texture in physical pixels

  - ### getWidth

    int getWidth()
    Returns:
      The currently specified width (physical pixels)

  - ### getHeight

    int getHeight()
    Returns:
      The currently specified height (physical pixels)

  - ### getSurface

    Surface getSurface()
    Get a Surface that can be used to update the texture contents.

    NOTE: You should not cache the returned surface but instead invoke getSurface each time you need to draw. The surface may change when the texture is resized or has its format changed.

    Returns:
      a Surface to use for a drawing target for various APIs.