From 9334d0ac48239156d7e6d2e08c626852fca8b164 Mon Sep 17 00:00:00 2001 From: Roman Gilg Date: Thu, 11 May 2017 23:47:27 +0200 Subject: [PATCH] [DRM plugin] No forward declare of DrmSurfaceBuffer without GBM This fixes a compilation error introduced with efedddd905c3e49, which forward declared the DrmSurfaceBuffer class also on builds without GBM. BUG: 379732 --- plugins/platforms/drm/drm_backend.cpp | 5 ++--- plugins/platforms/drm/drm_backend.h | 2 ++ 2 files changed, 4 insertions(+), 3 deletions(-) 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 {