opengl/egldisplay: allow importing shm buffers through udmabuf
When the import works, it avoids a blocking CPU-side copy of the buffer in KWin. This can radically improve performance with applications that use shm buffers.
On my hi-dpi laptop, scrolling in KDevelop previously caused KWin to have 80-90% CPU usage on one core, while with this commit, it's about 20%. This also noticeably improves the responsiveness of the cursor above such applications, since the main thread no longer spends so much time on shm uploads.
In order to get these performance gains, applications have to allocate the shm buffers with some additional restrictions: The shm pool must be aligned to page sizes on the system, and the stride of the buffer must be compatible with the GPU used by the compositor (256 bytes alignment should always work). There is additionally a possible fast path for uploads with Vulkan that doesn't have any requirements on the stride, but that can be implemented later on.
The Qt side is at https://codereview.qt-project.org/c/qt/qtbase/+/733869
Note that while this improves efficiency of KWin, in my testing, the application takes on additional CPU use to render additional frames, so the total system load isn't much lower than before. If your system was already at the full frame rate before though, it should bring CPU usage down.