discard method

  1. @override
void discard()
override

Releases this frame without presenting it.

Use this when rendering is abandoned after acquiring a frame. Discarding a frame does not change GpuImageSurface.currentImage.

Implementation

@override
void discard() {
  if (!_isActive) {
    return;
  }
  _isActive = false;
  colorTexture._valid = false;
  _surface._discardFrame(this);
}