0
Commit Graph

7 Commits

Author SHA1 Message Date
Tom Anderson
b936950aa0 Remove complex GPU->Browser IPC for obtaining GL-compatible visuals
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}
2021-05-19 01:06:40 +00:00
Gary Tong
87fbe5a956 xvfb: Fix race condition in unit test
Bug: 1114251
Change-Id: I59f4fbe6cf6cc96895eb3e2d9bc8b8578009a5c7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2342256
Auto-Submit: Gary Tong <gatong@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Ilia Samsonov <isamsonov@google.com>
Commit-Queue: Gary Tong <gatong@chromium.org>
Cr-Commit-Position: refs/heads/master@{#796596}
2020-08-10 22:58:40 +00:00
Shahbaz Youssefi
1b47318547 Revert "Reland "xvfb: Wait for ReparentNotify before executing tests.""
This reverts commit b6f63e3eb8.

Reason for revert: Causes failures about missing xwmstartupcheck

Original change's description:
> Reland "xvfb: Wait for ReparentNotify before executing tests."
> 
> This is a reland of 2fb9ab545d:
> 
> FIX: change test type from windowed to console for
> midi_unittests
> 
> Original change's description:
> > xvfb: Wait for ReparentNotify before executing tests.
> >
> > X11 tests can fail because start up of OpenBox is not
> > synchronous and it is unknown when exactly it starts up.
> >
> > That results in a client that uses X11 missing events
> > and flakiness of tests.
> >
> > Thus, to avoid that issue, use a small program that
> > creates a dummy X11 windows and waits for the
> > ReparentNotify event. That is, OpenBox decorates
> > all the windows once it is initialized that results
> > in that event. Once the event is received, we can
> > be sure that the WM is up and running, and tests
> > can be executed.
> >
> > Bug: 1078771
> > Change-Id: Ic6fae30a706a6b9c32e4670da56457c833b4b7f9
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2214526
> > Reviewed-by: Nico Weber <thakis@chromium.org>
> > Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> > Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
> > Commit-Queue: Maksim Sisov <msisov@igalia.com>
> > Cr-Commit-Position: refs/heads/master@{#775001}
> 
> Bug: 1078771
> Change-Id: I500da8725f1c2d51788fd529d7c45318e5f93a03
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2230463
> Commit-Queue: Maksim Sisov <msisov@igalia.com>
> Reviewed-by: Dirk Pranke <dpranke@google.com>
> Reviewed-by: Nico Weber <thakis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#776886}

TBR=thakis@chromium.org,dpranke@google.com,thomasanderson@chromium.org,msisov@igalia.com

Change-Id: Idd212473c0f14f4261ada23359ba7a338688d5aa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1091149
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2239974
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#777012}
2020-06-10 18:05:25 +00:00
Maksim Sisov
b6f63e3eb8 Reland "xvfb: Wait for ReparentNotify before executing tests."
This is a reland of 2fb9ab545d:

FIX: change test type from windowed to console for
midi_unittests

Original change's description:
> xvfb: Wait for ReparentNotify before executing tests.
>
> X11 tests can fail because start up of OpenBox is not
> synchronous and it is unknown when exactly it starts up.
>
> That results in a client that uses X11 missing events
> and flakiness of tests.
>
> Thus, to avoid that issue, use a small program that
> creates a dummy X11 windows and waits for the
> ReparentNotify event. That is, OpenBox decorates
> all the windows once it is initialized that results
> in that event. Once the event is received, we can
> be sure that the WM is up and running, and tests
> can be executed.
>
> Bug: 1078771
> Change-Id: Ic6fae30a706a6b9c32e4670da56457c833b4b7f9
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2214526
> Reviewed-by: Nico Weber <thakis@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
> Commit-Queue: Maksim Sisov <msisov@igalia.com>
> Cr-Commit-Position: refs/heads/master@{#775001}

Bug: 1078771
Change-Id: I500da8725f1c2d51788fd529d7c45318e5f93a03
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2230463
Commit-Queue: Maksim Sisov <msisov@igalia.com>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#776886}
2020-06-10 09:44:15 +00:00
Martin Šrámek
6fdf1f648d Revert "xvfb: Wait for ReparentNotify before executing tests."
This reverts commit 2fb9ab545d.

Reason for revert: Broke the 'isolate tests' step: crbug.com/1091149

Original change's description:
> xvfb: Wait for ReparentNotify before executing tests.
> 
> X11 tests can fail because start up of OpenBox is not
> synchronous and it is unknown when exactly it starts up.
> 
> That results in a client that uses X11 missing events
> and flakiness of tests.
> 
> Thus, to avoid that issue, use a small program that
> creates a dummy X11 windows and waits for the
> ReparentNotify event. That is, OpenBox decorates
> all the windows once it is initialized that results
> in that event. Once the event is received, we can
> be sure that the WM is up and running, and tests
> can be executed.
> 
> Bug: 1078771
> Change-Id: Ic6fae30a706a6b9c32e4670da56457c833b4b7f9
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2214526
> Reviewed-by: Nico Weber <thakis@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
> Commit-Queue: Maksim Sisov <msisov@igalia.com>
> Cr-Commit-Position: refs/heads/master@{#775001}

TBR=thakis@chromium.org,dpranke@chromium.org,thomasanderson@chromium.org,msisov@igalia.com

Change-Id: Iadf54b030acc7358e2112212fd2aa6b2ed79e831
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1078771, 1091149
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2230482
Reviewed-by: Martin Šrámek <msramek@chromium.org>
Reviewed-by: Maksim Sisov <msisov@igalia.com>
Commit-Queue: Maksim Sisov <msisov@igalia.com>
Cr-Commit-Position: refs/heads/master@{#775026}
2020-06-04 08:53:16 +00:00
Maksim Sisov
2fb9ab545d xvfb: Wait for ReparentNotify before executing tests.
X11 tests can fail because start up of OpenBox is not
synchronous and it is unknown when exactly it starts up.

That results in a client that uses X11 missing events
and flakiness of tests.

Thus, to avoid that issue, use a small program that
creates a dummy X11 windows and waits for the
ReparentNotify event. That is, OpenBox decorates
all the windows once it is initialized that results
in that event. Once the event is received, we can
be sure that the WM is up and running, and tests
can be executed.

Bug: 1078771
Change-Id: Ic6fae30a706a6b9c32e4670da56457c833b4b7f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2214526
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Commit-Queue: Maksim Sisov <msisov@igalia.com>
Cr-Commit-Position: refs/heads/master@{#775001}
2020-06-04 07:08:11 +00:00
Ilia Samsonov
a0083530d7 [Test Automation] Use xvfb directly instead of xvfb-run
Thereby fix signal handling for SIGTERM and SIGINT.

The steps needed to start Xvfb are drawn from:
https://github.com/cgoldberg/xvfbwrapper/blob/master/xvfbwrapper.py
https://github.com/revnode/xvfb-run/blob/master/xvfb-run

Added unit tests to presubmit to test xvfb.py


Bug: 932240
Change-Id: I3b9439991697ae94e98b93e4f1fcfd411a451536
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1548424
Commit-Queue: Ilia Samsonov <isamsonov@google.com>
Reviewed-by: Caleb Rouleau <crouleau@chromium.org>
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: John Chen <johnchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#652562}
2019-04-19 17:37:59 +00:00