
When GLVisualPickerGLX was written, the only way of obtaining GL-compatible visuals was with libGLX, which loads the GPU driver. This forced us to rely on the GPU process sending the visuals to the browser process, which comes with a significant amount of complexity. Now that we've switched to XProto, we can use x11::Glx to obtain the visuals, which doesn't require loading the GPU driver. This allows us to simplify the visual loading code. In addition, now that the transparent visual is available early, it can be used as the visual for browser windows. This can allow us to remove usage of the XShape extension which we were using to "cut off" a few pixels around the corners to give the appearance of rounded corners. This solution is not ideal since it: 1. causes a performance hit on some environments (GNOME/Mutter) 2. prevents the WM from drawing a shadow on the window 3. doesn't antialias the corners Using a transparent visual will solve all 3 issues. However, we'll have to draw client-side shadows (just like GTK does). R=sky Bug: 650494,811515,1198080 Change-Id: Ie518dfe489d3ba0af9ca73c80cc10792a4214838 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2895228 Reviewed-by: Dirk Pranke <dpranke@google.com> Reviewed-by: Bo <boliu@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Emily Stark <estark@chromium.org> Reviewed-by: Scott Violet <sky@chromium.org> Commit-Queue: Thomas Anderson <thomasanderson@chromium.org> Commit-Queue: Emily Stark <estark@chromium.org> Auto-Submit: Thomas Anderson <thomasanderson@chromium.org> Cr-Commit-Position: refs/heads/master@{#884257}
31 lines
799 B
Python
Executable File
31 lines
799 B
Python
Executable File
#!/usr/bin/env python
|
|
# Copyright (c) 2019 The Chromium Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
"""Simple script for xvfb_unittest to launch.
|
|
|
|
This script outputs formatted data to stdout for the xvfb unit tests
|
|
to read and compare with expected output.
|
|
"""
|
|
|
|
import os
|
|
import signal
|
|
import sys
|
|
import time
|
|
|
|
|
|
def print_signal(sig, *_):
|
|
print 'Signal :{}'.format(sig)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
signal.signal(signal.SIGTERM, print_signal)
|
|
signal.signal(signal.SIGINT, print_signal)
|
|
|
|
# test the subprocess display number.
|
|
print 'Display :{}'.format(os.environ.get('DISPLAY', 'None'))
|
|
|
|
if len(sys.argv) > 1 and sys.argv[1] == '--sleep':
|
|
time.sleep(2) # gives process time to receive signal.
|