clone method

ImageInfo clone()
override

Creates an ImageInfo with a cloned image.

This method must be used in cases where a client holding an ImageInfo needs to share the image info object with another client and will still need to access the underlying image data at some later point, e.g. to share it again with another client.

See details for disposing contract in the class description.

See also:

Implementation

ImageInfo clone() {
  return PowerTextureImageInfo(
    image: image.clone(),
    textureId: textureId,
    width: width,
    height: height,
    scale: scale,
    debugLabel: debugLabel,
  );
}