plugins/screencast: Simplify projection matrix code in window source

Split orthographic matrix construction and y inversion in two steps to
improve code readability.
remotes/origin/work/zzag/x11-configure-request-csd
Vlad Zahorodnii 3 years ago
parent 83c38b0907
commit a1a09e91ab
  1. 4
      src/plugins/screencast/windowscreencastsource.cpp

@ -53,8 +53,8 @@ void WindowScreenCastSource::render(GLFramebuffer *target)
{
const QRectF geometry = m_window->clientGeometry();
QMatrix4x4 projectionMatrix;
projectionMatrix.ortho(geometry.x(), geometry.x() + geometry.width(),
geometry.y(), geometry.y() + geometry.height(), -1, 1);
projectionMatrix.scale(1, -1);
projectionMatrix.ortho(geometry);
WindowPaintData data;
data.setProjectionMatrix(projectionMatrix);

Loading…
Cancel
Save