Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/drm/egl_gbm_backend.cpp
Show First 20 Lines • Show All 226 Lines • ▼ Show 20 Line(s) | 219 | { | |||
---|---|---|---|---|---|
227 | } | 227 | } | ||
228 | 228 | | |||
229 | EGLint error = eglGetError(); | 229 | EGLint error = eglGetError(); | ||
230 | if (error != EGL_SUCCESS) { | 230 | if (error != EGL_SUCCESS) { | ||
231 | qCWarning(KWIN_DRM) << "Error occurred while creating context " << error; | 231 | qCWarning(KWIN_DRM) << "Error occurred while creating context " << error; | ||
232 | return false; | 232 | return false; | ||
233 | } | 233 | } | ||
234 | // TODO: ensure the viewport is set correctly each time | 234 | // TODO: ensure the viewport is set correctly each time | ||
235 | const QSize &overall = screens()->size(); | 235 | const QSize &overall = output.output->orientateSize(screens()->size()); | ||
236 | const QRect &v = output.output->geometry(); | 236 | const QRect &v = output.output->geometry(); | ||
237 | // TODO: are the values correct? | 237 | // TODO: are the values correct? | ||
238 | 238 | | |||
239 | qreal scale = output.output->scale(); | 239 | qreal scale = output.output->scale(); | ||
240 | 240 | | |||
241 | glViewport(-v.x() * scale, (v.height() - overall.height() + v.y()) * scale, | 241 | glViewport(-v.x() * scale, (v.height() - overall.height() + v.y()) * scale, | ||
zzag: Abuse of `auto`. | |||||
Please align pointers to the right. Side note: It would be great to use clang-format so we don't have to deal with coding style issues. zzag: Please align pointers to the right.
Side note: It would be great to use clang-format so we… | |||||
242 | overall.width() * scale, overall.height() * scale); | 242 | overall.width() * scale, overall.height() * scale); | ||
243 | return true; | 243 | return true; | ||
244 | } | 244 | } | ||
245 | 245 | | |||
246 | bool EglGbmBackend::initBufferConfigs() | 246 | bool EglGbmBackend::initBufferConfigs() | ||
247 | { | 247 | { | ||
248 | const EGLint config_attribs[] = { | 248 | const EGLint config_attribs[] = { | ||
249 | EGL_SURFACE_TYPE, EGL_WINDOW_BIT, | 249 | EGL_SURFACE_TYPE, EGL_WINDOW_BIT, | ||
▲ Show 20 Lines • Show All 177 Lines • Show Last 20 Lines |
Abuse of auto.