backends/virtual: Provide vertically mirrored layer buffers

This makes the behavior of the virtual backend more consistent with
wayland, x11, and drm backends. However, the main advantage is that it's
more nicer to memfd fallback code path in screencasting plugin.
This commit is contained in:
Vlad Zahorodnii 2023-03-09 16:10:20 +02:00
parent 2f56cdc3fe
commit bacc35c236

View file

@ -46,6 +46,7 @@ std::optional<OutputLayerBeginFrameInfo> VirtualEglLayer::beginFrame()
if (!m_texture || m_texture->size() != nativeSize) {
m_fbo.reset();
m_texture = std::make_unique<GLTexture>(GL_RGB8, nativeSize);
m_texture->setContentTransform(TextureTransform::MirrorY);
m_fbo = std::make_unique<GLFramebuffer>(m_texture.get());
}