Commit 6c6af91e authored by Tom Anderson's avatar Tom Anderson Committed by Commit Bot

X11: Fix GPU crash when there's no alpha visuals provided by the system

This fixes a regression introduced after [1].  The issue is that there
may not always be an alpha visual.

[1] https://chromium.googlesource.com/chromium/src/+/76ddcd29071bd4079c8776e0576268da5493f3ff

BUG=1001026
R=kbr

Change-Id: I040082e9e1921c5a541aecb80279ca7c50275f71
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1906318
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Auto-Submit: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: default avatarKenneth Russell <kbr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714054}
parent 5018c355
......@@ -459,7 +459,10 @@ bool GLSurfaceGLX::InitializeOneOff() {
return false;
}
const auto& visual_info = gl::GLVisualPickerGLX::GetInstance()->rgba_visual();
auto* visual_picker = gl::GLVisualPickerGLX::GetInstance();
XVisualInfo visual_info = visual_picker->rgba_visual();
if (!visual_info.visual)
visual_info = visual_picker->system_visual();
g_visual = visual_info.visual;
g_depth = visual_info.depth;
g_colormap =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment