• Peng Huang's avatar
    Fix VANGLE initialize failure for remote desktop environment. · 3f1b86de
    Peng Huang authored
    For remote desktop environment, when Vulkan is used, VANGLE is only used
    for WebGL. It is not responsible for rendering to the native windows (we
    will not create GLSurfaceEGL for native windows). We will use Vulkan
    swapchain to render on native windows. However some Vulkan drivers
    (NVIDIA) cannot be initialized successfully, if the $DISPLAY env
    variable is set, but the Xserver(remote desktop Xserver) doesn't have
    necessary extensions (NV-CONTROL, NV-GLX). To workaround this issue,
    this CL unsets the $DISPLAY env variable before initializing VANGLE and
    sets it back after it, if the Xserver doesn't support vulkan swapchain.
    
    Change-Id: I528a6f7d2f618123ea519f0ab4f15e788c4dd607
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2424519Reviewed-by: default avatarThomas Anderson <thomasanderson@chromium.org>
    Reviewed-by: default avatarJonathan Backer <backer@chromium.org>
    Commit-Queue: Peng Huang <penghuang@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#809872}
    3f1b86de
x11_util.h 21.5 KB