[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kwin/scaling_merged] plugins/platforms/drm: Hopefully implment DRM scaling
From: David Edmundson <kde () davidedmundson ! co ! uk>
Date: 2016-11-24 20:48:40
Message-ID: E1cA0wi-0000TY-MC () code ! kde ! org
[Download RAW message or body]
Git commit c10f05216952408b5e2b799f923e2cebd70e1607 by David Edmundson.
Committed on 24/11/2016 at 20:48.
Pushed by davidedmundson into branch 'scaling_merged'.
Hopefully implment DRM scaling
M +6 -2 plugins/platforms/drm/egl_gbm_backend.cpp
https://commits.kde.org/kwin/c10f05216952408b5e2b799f923e2cebd70e1607
diff --git a/plugins/platforms/drm/egl_gbm_backend.cpp \
b/plugins/platforms/drm/egl_gbm_backend.cpp index 38e130b..9441456 100644
--- a/plugins/platforms/drm/egl_gbm_backend.cpp
+++ b/plugins/platforms/drm/egl_gbm_backend.cpp
@@ -156,7 +156,9 @@ void EglGbmBackend::createOutput(DrmOutput *drmOutput)
{
Output o;
o.output = drmOutput;
- o.gbmSurface = gbm_surface_create(m_backend->gbmDevice(), \
drmOutput->size().width(), drmOutput->size().height(), + auto size = \
drmOutput->size() * drmOutput->scale(); +
+ o.gbmSurface = gbm_surface_create(m_backend->gbmDevice(), size.width(), \
size.height(),
GBM_FORMAT_XRGB8888, GBM_BO_USE_SCANOUT | \
GBM_BO_USE_RENDERING); if (!o.gbmSurface) {
qCCritical(KWIN_DRM) << "Create gbm surface failed";
@@ -191,7 +193,9 @@ bool EglGbmBackend::makeContextCurrent(const Output &output)
const QSize &overall = screens()->size();
const QRect &v = output.output->geometry();
// TODO: are the values correct?
- glViewport(-v.x(), v.height() - overall.height() - v.y(), overall.width(), \
overall.height()); +
+ qreal scale = output.output->scale();
+ glViewport(-v.x(), v.height() - overall.height() - v.y(), overall.width() * \
scale, overall.height() * scale); return true;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic