• Sean Gilhuly's avatar
    Add GPU modes for Vulkan and Metal · 3e84fc80
    Sean Gilhuly authored
    Split GpuMode::HARDWARE_ACCELERATED into HARDWARE_GL, HARDWARE_VULKAN,
    and HARDWARE_METAL. Then, during GpuDataManagerImpl initialization, add
    GL to the |fallback_modes_| stack, followed by Vulkan or Metal if they
    are enabled.
    
    GL can still be used in the Vulkan and Metal modes, but disable Vulkan
    and Metal when the GPU is not running in that mode. This way, the first
    GPU fallback will still leave hardware acceleration available.
    
    Note that this doesn't check what Vulkan or Metal are being used for.
    For instance, with the flag --use-vulkan=native, Vulkan will be
    initialized, but Skia GL will still be used for compositing without the
    flag --enable-features=Vulkan. In this case, the first fallback will
    disable Vulkan anyway, and the second will disable GL.
    
    Bug: 1005383
    Change-Id: I2cc46b4861f325883f8324bde541410440764c3c
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1976827
    Commit-Queue: Sean Gilhuly <sgilhuly@chromium.org>
    Reviewed-by: default avatarZhenyao Mo <zmo@chromium.org>
    Reviewed-by: default avatarkylechar <kylechar@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#734192}
    3e84fc80
gpu_mode.h 909 Bytes