• Maksim Sisov's avatar
    ozone/wayland: add GLSurfaceEglReadbackWayland · cb8ff730
    Maksim Sisov authored
    This adds missing readback bits so that Wayland can be used with
    SwiftShader. I encountered this problem when started to work on
    enabled tests with wayland backend enabled.
    
    The implementation is quite naive - we create a
    shared memory buffer, import a wl_buffer with the fd for that
    shm buffer and write pixels that are read with glReadPixels into
    the shm buffer.
    
    Also, this patch restores async buffer swap support in
    SkiaOutputDeviceGL that was removed in https://crrev.com/c/2025968.
    Now, it's Wayland that has the support for async buffer swap, it's
    wrong to assume there are no clients that do not support it.
    
    and also running chrome --ozone-platform=wayland --use-gl=swiftshader.
    
    Test: views_unittests to ensure that surface with read back is created
    Bug: 1054305
    Change-Id: Iff307e1155d0a14965a2bd193a7b9b8d9aceb952
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2064929
    Commit-Queue: Maksim Sisov <msisov@igalia.com>
    Reviewed-by: default avatarRobert Kroeger <rjkroege@chromium.org>
    Reviewed-by: default avatarMichael Spang <spang@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#746758}
    cb8ff730
BUILD.gn 10.1 KB