Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/drm/egl_gbm_backend.cpp
Show First 20 Lines • Show All 228 Lines • ▼ Show 20 Line(s) | 219 | { | |||
---|---|---|---|---|---|
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 = screens()->size(); | ||
236 | const QRect &v = output.output->geometry(); | 236 | const QRect &v = output.output->geometry(); | ||
237 | qCDebug(KWIN_DRM) << "setting viewport" << overall << v; | ||||
237 | // TODO: are the values correct? | 238 | // TODO: are the values correct? | ||
238 | 239 | | |||
239 | qreal scale = output.output->scale(); | 240 | qreal scale = output.output->scale(); | ||
240 | 241 | | |||
241 | glViewport(-v.x() * scale, (v.height() - overall.height() + v.y()) * scale, | 242 | 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); | 243 | overall.height() * scale, overall.width() * scale); | ||
243 | return true; | 244 | return true; | ||
244 | } | 245 | } | ||
245 | 246 | | |||
246 | bool EglGbmBackend::initBufferConfigs() | 247 | bool EglGbmBackend::initBufferConfigs() | ||
247 | { | 248 | { | ||
248 | const EGLint config_attribs[] = { | 249 | const EGLint config_attribs[] = { | ||
249 | EGL_SURFACE_TYPE, EGL_WINDOW_BIT, | 250 | EGL_SURFACE_TYPE, EGL_WINDOW_BIT, | ||
250 | EGL_RED_SIZE, 1, | 251 | EGL_RED_SIZE, 1, | ||
▲ Show 20 Lines • Show All 176 Lines • Show Last 20 Lines |
Abuse of auto.