plugins/screencast: Make region screen cast nicer to memfd

Set the FlipY flag so when the memfd code grabs the texture contents, it
doesn't need to flip the texture on the cpu side.
wilder/Plasma/6.2
Vlad Zahorodnii 2 years ago
parent 3388b7643c
commit af12a103ae
  1. 2
      src/plugins/screencast/regionscreencastsource.cpp

@ -59,6 +59,7 @@ void RegionScreenCastSource::updateOutput(Output *output)
ShaderBinder shaderBinder(ShaderTrait::MapTexture | ShaderTrait::TransformColorspace);
QMatrix4x4 projectionMatrix;
projectionMatrix.scale(1, -1);
projectionMatrix.ortho(m_region);
projectionMatrix.translate(outputGeometry.left(), outputGeometry.top());
@ -82,6 +83,7 @@ void RegionScreenCastSource::ensureTexture()
if (!m_renderedTexture) {
return;
}
m_renderedTexture->setContentTransform(OutputTransform::FlipY);
m_renderedTexture->setFilter(GL_LINEAR);
m_renderedTexture->setWrapMode(GL_CLAMP_TO_EDGE);

Loading…
Cancel
Save