diff --git a/plugins/platforms/drm/drm_backend.cpp b/plugins/platforms/drm/drm_backend.cpp index 69ce95b36e..9afa8b79c3 100644 --- a/plugins/platforms/drm/drm_backend.cpp +++ b/plugins/platforms/drm/drm_backend.cpp @@ -705,15 +705,14 @@ DrmDumbBuffer *DrmBackend::createBuffer(const QSize &size) return b; } +#if HAVE_GBM DrmSurfaceBuffer *DrmBackend::createBuffer(gbm_surface *surface) { -#if HAVE_GBM DrmSurfaceBuffer *b = new DrmSurfaceBuffer(this, surface); return b; -#else return nullptr; -#endif } +#endif void DrmBackend::outputDpmsChanged() { diff --git a/plugins/platforms/drm/drm_backend.h b/plugins/platforms/drm/drm_backend.h index c1d2ec0955..96a8d0ce65 100644 --- a/plugins/platforms/drm/drm_backend.h +++ b/plugins/platforms/drm/drm_backend.h @@ -78,7 +78,9 @@ public: void init() override; DrmDumbBuffer *createBuffer(const QSize &size); +#if HAVE_GBM DrmSurfaceBuffer *createBuffer(gbm_surface *surface); +#endif void present(DrmBuffer *buffer, DrmOutput *output); int fd() const {