• Maksim Sisov's avatar
    Ozone/X11: Share non-Ozone/X11's GMBX11 support with Ozone/X11. · 939c65cc
    Maksim Sisov authored
    In the first take, I thought buffer formats could be determined from
    the browser process side as early as possible, but several problems
    were identified in the end -
    
    1) glx's bindings' initialization is required.
    And it's done on the gpu process side
    
    2) gl implementation can be
    determined after gl is set (it's temporarily required before
    angle + gmb support is added, though).
    
    I also thought to make fetching gmb formats asynchronous, but it would
    require rewriting some important clients, which is non-trivial,
    unfortunately.
    
    Thus, that approach didn't work well and I had to reuse the existing
    approach to pass support buffer formats for gmb via gpu extra info.
    
    Now, OzonePlatform has fetch_buffer_formats_for_gmb_on_gpu variable
    that clients can use to determine the way that they are able to fetch
    supported buffer formats. All the previous logic that non-Ozone/X11
    had stayed the same except that it's also used by OzonePlatform
    that has fetch_buffer_formats_for_gmb_on_gpu set to true. In this
    case, CollectGpuExtraInfo collects supported buffer formats.
    
    
    Bug: 1099183
    Change-Id: I56c1323af54ae5bec4a5f9152aca47a21035d6b8
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2540286Reviewed-by: default avatarJonathan Backer <backer@chromium.org>
    Reviewed-by: default avatarRobert Kroeger <rjkroege@chromium.org>
    Commit-Queue: Maksim Sisov (GMT+2) <msisov@igalia.com>
    Cr-Commit-Position: refs/heads/master@{#829205}
    939c65cc
gpu_init.cc 31.6 KB