resize method
Captures at a new size. Takes effect on the next capture.
Implementation
void resize(int width, int height) {
assert(width > 0 && height > 0, 'ExternalTexture size must be positive');
if (width == _width && height == _height) return;
_width = width;
_height = height;
requestCapture();
}