function loadPartialImageSource(texture, source, xOffset, yOffset) {
  const context = texture._context;
  const gl = context._gl;

  gl.pixelStorei(gl.UNPACK_ALIGNMENT, 4);
  gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, texture.preMultiplyAlpha);
  gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, texture.flipY);

  gl.texSubImage2D(
    texture._textureTarget,
    0,
    xOffset,
    yOffset,
    texture.pixelFormat,
    PixelDatatype.toWebGLConstant(texture.pixelDatatype, context),
    source,
  );
}
Load texel data from an Image into part of a texture

@param {Texture} texture The texture to which texel values will be loaded.
@param {ImageData|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement} source The source for texel values to be loaded into the texture.
@param {number} xOffset The texel x coordinate of the lower left corner of the subregion of the texture to be updated.
@param {number} yOffset The texel y coordinate of the lower left corner of the subregion of the texture to be updated.

@private