Files
godot-angle-static/util/linux/LinuxWindow.cpp
Antonio Caggiano 9ad43bdd2a Re-land: "Vulkan: Support Wayland"
Implement DisplayVkWayland and WindowSurfaceVkWayland. Get window size
from native window and check egl config is just empty. An EGL wayland
test is added for testing rendering and buffers swapping.

Re-land fixes:
- link failure in systems with no libwayland installed.
- XCB display availability check.

Bug: angleproject:6902
Change-Id: I5daecf3591493308ac71a7dd3bc0802f492e6fed
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3621059
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2022-05-03 16:29:24 +00:00

41 lines
804 B
C++

//
// Copyright 2022 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// LinuxWindow.cpp: Implementation of OSWindow::New for Linux
#include "util/OSWindow.h"
#if defined(ANGLE_USE_WAYLAND)
# include "wayland/WaylandWindow.h"
#endif
#if defined(ANGLE_USE_X11)
# include "x11/X11Window.h"
#endif
// static
#if defined(ANGLE_USE_X11) || defined(ANGLE_USE_WAYLAND)
OSWindow *OSWindow::New()
{
# if defined(ANGLE_USE_X11)
// Prefer X11
if (IsX11WindowAvailable())
{
return new X11Window();
}
# endif
# if defined(ANGLE_USE_WAYLAND)
if (IsWaylandWindowAvailable())
{
return new WaylandWindow();
}
# endif
return nullptr;
}
#endif