Return a WebGL context if requesting xr compatibility fails
If the xrCompatible flag is set on the attributes when creating a WebGL context and we cannot be xr compatible, today's behavior returns a null context. Instead, a WebGL context should be created and returned with the xrCompatible flag set to false. XRSystem::MakeXrCompatible* is also changed to return kNotCompatible on failure. This previously returned kAlreadyCompatible because MacOS doesn't have a VR service, so MakeXrCompatible fails. This caused tests on MacOS to fail since null was being returned when requesting a WebGL context. Bug: 1086697 Change-Id: Ida9b99b334a85f12c6313bc700cd02e7e5bda8db Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2264599Reviewed-by:Alexander Cooper <alcooper@chromium.org> Reviewed-by:
Brandon Jones <bajones@chromium.org> Commit-Queue: Patrick To <patrto@microsoft.com> Cr-Commit-Position: refs/heads/master@{#782612}
Showing
Please register or sign in to comment