invalidate(renderer) {
		if (typeof renderer.gl !== "undefined") {
			// make sure the right compositor is active
			renderer.setCompositor("quad");
			// invalidate the previous corresponding texture so that it can reuploaded once changed
			this.glTextureUnit = renderer.cache.getUnit(
				renderer.cache.get(this.canvas),
			);
			renderer.currentCompositor.unbindTexture2D(null, this.glTextureUnit);
		}
	}
invalidate the current CanvasRenderTarget, and force a reupload of the corresponding texture
(call this if you modify the canvas content between two draw calls)
@param {CanvasRenderer|WebGLRenderer} renderer - the renderer to which this canvas texture is attached