зеркало из https://github.com/AvaloniaUI/angle.git
Properly report xcb_connect failures in DisplayVkXcb
Bug: chromium:1223431 Change-Id: Iaefddbda3fef283eed365fe010ee003a3b3beca8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3083383 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
This commit is contained in:
Родитель
97c21277da
Коммит
81bee2e7f6
|
@ -49,8 +49,13 @@ DisplayVkXcb::DisplayVkXcb(const egl::DisplayState &state)
|
|||
egl::Error DisplayVkXcb::initialize(egl::Display *display)
|
||||
{
|
||||
mXcbConnection = xcb_connect(nullptr, nullptr);
|
||||
if (mXcbConnection == nullptr)
|
||||
ASSERT(mXcbConnection != nullptr);
|
||||
int xcb_connection_error = xcb_connection_has_error(mXcbConnection);
|
||||
if (xcb_connection_error)
|
||||
{
|
||||
ERR() << "xcb_connect() failed, error " << xcb_connection_error;
|
||||
xcb_disconnect(mXcbConnection);
|
||||
mXcbConnection = nullptr;
|
||||
return egl::EglNotInitialized();
|
||||
}
|
||||
return DisplayVk::initialize(display);
|
||||
|
|
Загрузка…
Ссылка в новой задаче