• Maksim Sisov's avatar
    Ozone/X11/Linux/Cros: Do not use sync extension. · e8811840
    Maksim Sisov authored
    1) It is possible to use ChromeOS Chromium builds and run them
    on Linux machines for development. However, we have made
    a lot of changes to Ozone/X11 recently, and it started to
    rely on XSync protocol that ChromeOS has never used (that is,
    DesktopWindowTreeHostLinux (not used on ChromeOS) listens
    to swap completions using CompositorObserver (previously,
    it was DesktopWindowTreeHostX11 doing it) and notifies
    X11 about swap completions with new sizes during interactive
    resizes). Previously, X11WindowOzone implementation did not
    use that extension and ChromeOS/X11/Ozone builds could be
    run fine on X11 and users could resize the native window
    without any issues. Now, the resizing operation either stucks
    or works with glitches.
    
    Thus, to fix that, just disable that extension for ChromeOS.
    
    2) Linux/Ozone/X11 builds suffer from the same problem. However,
    they do listen for swap completions using CompositorObserver, but
    EGL implementation for Ozone/X11 is quite limited and most of the
    code is guarded with USE_X11 define. We need to fix that first and
    only then start to use XSync protocol. Otherwise, the swap results
    may be sent with delays of several hundreds of ms.
    
    Thus, to fix that, explicitly disable the extension for ChromeOS
    builds.
    
    Bug: 1036070, 1036285
    Change-Id: I9bc3f5d042c6e8046aaa13bcff42508e433fad28
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1978740
    Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
    Reviewed-by: default avatarThomas Anderson <thomasanderson@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#727231}
    e8811840
x11_util.cc 53 KB