Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/drm/egl_gbm_backend.cpp
Show First 20 Lines • Show All 156 Lines • ▼ Show 20 Line(s) | 154 | { | |||
---|---|---|---|---|---|
157 | auto size = drmOutput->pixelSize(); | 157 | auto size = drmOutput->pixelSize(); | ||
158 | 158 | | |||
159 | o.gbmSurface = std::make_shared<GbmSurface>(m_backend->gbmDevice(), size.width(), size.height(), | 159 | o.gbmSurface = std::make_shared<GbmSurface>(m_backend->gbmDevice(), size.width(), size.height(), | ||
160 | GBM_FORMAT_XRGB8888, GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING); | 160 | GBM_FORMAT_XRGB8888, GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING); | ||
161 | if (!o.gbmSurface) { | 161 | if (!o.gbmSurface) { | ||
162 | qCCritical(KWIN_DRM) << "Create gbm surface failed"; | 162 | qCCritical(KWIN_DRM) << "Create gbm surface failed"; | ||
163 | return; | 163 | return; | ||
164 | } | 164 | } | ||
165 | o.eglSurface = eglCreatePlatformWindowSurfaceEXT(eglDisplay(), config(), (void *)((gbm_surface*)o.gbmSurface.get()), nullptr); | 165 | o.eglSurface = eglCreatePlatformWindowSurfaceEXT(eglDisplay(), config(), (void *)(o.gbmSurface->surface()), nullptr); | ||
166 | if (o.eglSurface == EGL_NO_SURFACE) { | 166 | if (o.eglSurface == EGL_NO_SURFACE) { | ||
167 | qCCritical(KWIN_DRM) << "Create Window Surface failed"; | 167 | qCCritical(KWIN_DRM) << "Create Window Surface failed"; | ||
168 | o.gbmSurface.reset(); | 168 | o.gbmSurface.reset(); | ||
169 | return; | 169 | return; | ||
170 | } | 170 | } | ||
171 | m_outputs << o; | 171 | m_outputs << o; | ||
172 | } | 172 | } | ||
173 | 173 | | |||
▲ Show 20 Lines • Show All 179 Lines • Show Last 20 Lines |