Scale xwindowed EGL output

Reviewers: #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3500
This commit is contained in:
David Edmundson 2016-11-09 03:47:13 +00:00
parent add93b3e36
commit bd1d88359f
2 changed files with 4 additions and 2 deletions

View file

@ -106,7 +106,9 @@ void EglX11Backend::setupViewport(int screenId)
const QSize &overall = screens()->size();
const QRect &v = screens()->geometry(screenId);
// TODO: are the values correct?
glViewport(-v.x(), v.height() - overall.height() - v.y(), overall.width(), overall.height());
qreal scale = screens()->scale(screenId);
glViewport(-v.x(), v.height() - overall.height() - v.y(), overall.width() * scale, overall.height() * scale);
}
void EglX11Backend::endRenderingFrameForScreen(int screenId, const QRegion &renderedRegion, const QRegion &damagedRegion)

View file

@ -471,7 +471,7 @@ QVector<QRect> X11WindowedBackend::screenGeometries() const
{
QVector<QRect> ret;
for (auto it = m_windows.constBegin(); it != m_windows.constEnd(); ++it) {
ret << QRect((*it).internalPosition, (*it).size);
ret << QRect((*it).internalPosition, (*it).size / (*it).scale);
}
return ret;
}