35c4786820
The Display provides a method to create the shm pool and a BufferInterface class is added to the server module. It is created from the SurfaceInterface when a buffer gets attached to the surface. The BufferInterface can be referenced and once its unreferenced it sends a buffer release to the client and destroys itself. For the case that the buffer is a shm buffer the BufferInterface provides a convenience method to turn it into a QImage. The auto test for Surface is extended by attaching buffers to the surface and verifying that the content is correct.
15 lines
785 B
CMake
15 lines
785 B
CMake
########################################################
|
|
# Test WaylandServerDisplay
|
|
########################################################
|
|
set( testWaylandServerDisplay_SRCS
|
|
test_display.cpp
|
|
${KWIN_SOURCE_DIR}/wayland_server/buffer_interface.cpp
|
|
${KWIN_SOURCE_DIR}/wayland_server/compositor_interface.cpp
|
|
${KWIN_SOURCE_DIR}/wayland_server/display.cpp
|
|
${KWIN_SOURCE_DIR}/wayland_server/output_interface.cpp
|
|
${KWIN_SOURCE_DIR}/wayland_server/surface_interface.cpp
|
|
)
|
|
add_executable(testWaylandServerDisplay ${testWaylandServerDisplay_SRCS})
|
|
target_link_libraries( testWaylandServerDisplay Qt5::Test Qt5::Gui Wayland::Server)
|
|
add_test(kwin-testWaylandServerDisplay testWaylandServerDisplay)
|
|
ecm_mark_as_test(testWaylandServerDisplay)
|