static _getTypedArrayForFormat(buffer, format) {
    if (format === xrSessionMojom.XRDepthDataFormat.kFloat32) {
      return new Float32Array(buffer);
    } else { // "luminance-alpha" or "unsigned-short"
      return new Uint16Array(buffer);
    }
  }
Helper to get a TypedArray view for a given depth format.
@param {ArrayBuffer} buffer The ArrayBuffer.
@param {xrSessionMojom.XRDepthDataFormat} format The depth format.
@return {Uint16Array|Float32Array} A typed array view.