56ce6689fd
Summary: The egl implementation for the virtual platform tries to use a render node if available. If there is no render node it looks for a virtual (kernel driver vgem) device, which unfortunately does not create a render node in mainline kernel (there are patches in ChromiumOS). For this the Udev wrapper is extended to search for renderNode devices and for virtual dri devices. If either render node or vgem dri device is found, it is tried to be opened (without logind escalation) and on success a gbm device is created on it. If any step of this fails the so far default behavior of default device is tried for creating the EGLDisplay. All of this is compile optional, so that the virtual platform does not hard depend on udev and/or gbm. Test Plan: Auto tests which need OpenGL executed and verified that they use the render node or vgem device. Reviewers: #kwin, #plasma_on_wayland Subscribers: plasma-devel, kwin Tags: #plasma_on_wayland, #kwin Differential Revision: https://phabricator.kde.org/D2216
23 lines
661 B
CMake
23 lines
661 B
CMake
set(VIRTUAL_SOURCES
|
|
egl_gbm_backend.cpp
|
|
virtual_backend.cpp
|
|
scene_qpainter_virtual_backend.cpp
|
|
screens_virtual.cpp
|
|
)
|
|
|
|
include(ECMQtDeclareLoggingCategory)
|
|
ecm_qt_declare_logging_category(VIRTUAL_SOURCES HEADER logging.h IDENTIFIER KWIN_VIRTUAL CATEGORY_NAME kwin_platform_virtual DEFAULT_SEVERITY Critical)
|
|
|
|
add_library(KWinWaylandVirtualBackend MODULE ${VIRTUAL_SOURCES})
|
|
target_link_libraries(KWinWaylandVirtualBackend kwin)
|
|
|
|
if(HAVE_GBM)
|
|
target_link_libraries(KWinWaylandVirtualBackend gbm::gbm)
|
|
endif()
|
|
|
|
install(
|
|
TARGETS
|
|
KWinWaylandVirtualBackend
|
|
DESTINATION
|
|
${PLUGIN_INSTALL_DIR}/org.kde.kwin.waylandbackends/
|
|
)
|