diff options
author | Olivier Blin <olivier.blin@softathome.com> | 2014-11-28 11:41:36 +0100 |
---|---|---|
committer | Olivier Blin <qt@blino.org> | 2015-06-12 08:18:33 +0000 |
commit | dac4fcd9b03e2f4ac5e07cf36fcdd06951ab955e (patch) | |
tree | 5a79d164164d023ade170c729e541f1263a6b3ae | |
parent | 4018a19baa5fb63ee228fdbd24eb1eb0a343f8e4 (diff) | |
download | qtwayland-dac4fcd9b03e2f4ac5e07cf36fcdd06951ab955e.tar.gz |
Fix build without OpenGL
Also fix a comment alongside.
Change-Id: I0091a89ff8e7ed46e769ea47a0225bc87db2c1f5
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
-rw-r--r-- | src/compositor/wayland_wrapper/qwlcompositor.cpp | 8 | ||||
-rw-r--r-- | src/compositor/wayland_wrapper/qwlsurfacebuffer_p.h | 12 |
2 files changed, 19 insertions, 1 deletions
diff --git a/src/compositor/wayland_wrapper/qwlcompositor.cpp b/src/compositor/wayland_wrapper/qwlcompositor.cpp index 2fd91f30..f057542c 100644 --- a/src/compositor/wayland_wrapper/qwlcompositor.cpp +++ b/src/compositor/wayland_wrapper/qwlcompositor.cpp @@ -89,9 +89,11 @@ #include <wayland-server.h> +#if defined (QT_COMPOSITOR_WAYLAND_GL) #include "hardware_integration/qwlhwintegration_p.h" #include "hardware_integration/qwlclientbufferintegration_p.h" #include "hardware_integration/qwlserverbufferintegration_p.h" +#endif #include "windowmanagerprotocol/waylandwindowmanagerintegration_p.h" #include "hardware_integration/qwlclientbufferintegrationfactory_p.h" @@ -470,6 +472,7 @@ void Compositor::bindGlobal(wl_client *client, void *data, uint32_t version, uin void Compositor::loadClientBufferIntegration() { +#ifdef QT_COMPOSITOR_WAYLAND_GL QStringList keys = ClientBufferIntegrationFactory::keys(); QString targetKey; QByteArray clientBufferIntegration = qgetenv("QT_WAYLAND_HARDWARE_INTEGRATION"); @@ -491,11 +494,13 @@ void Compositor::loadClientBufferIntegration() m_hw_integration->setClientBufferIntegration(targetKey); } } - //BUG: if there is no client buffer integration, bad things will when opengl is used + //BUG: if there is no client buffer integration, bad things will happen when opengl is used +#endif } void Compositor::loadServerBufferIntegration() { +#ifdef QT_COMPOSITOR_WAYLAND_GL QStringList keys = ServerBufferIntegrationFactory::keys(); QString targetKey; QByteArray serverBufferIntegration = qgetenv("QT_WAYLAND_SERVER_BUFFER_INTEGRATION"); @@ -507,6 +512,7 @@ void Compositor::loadServerBufferIntegration() if (m_hw_integration) m_hw_integration->setServerBufferIntegration(targetKey); } +#endif } void Compositor::registerInputDevice(QWaylandInputDevice *device) diff --git a/src/compositor/wayland_wrapper/qwlsurfacebuffer_p.h b/src/compositor/wayland_wrapper/qwlsurfacebuffer_p.h index 8e07068b..580e71d0 100644 --- a/src/compositor/wayland_wrapper/qwlsurfacebuffer_p.h +++ b/src/compositor/wayland_wrapper/qwlsurfacebuffer_p.h @@ -95,7 +95,12 @@ public: bool isDestroyed() { return m_destroyed; } void createTexture(); +#ifdef QT_COMPOSITOR_WAYLAND_GL inline GLuint texture() const; +#else + inline uint texture() const; +#endif + void destroyTexture(); inline struct ::wl_resource *waylandBufferHandle() const { return m_buffer; } @@ -150,12 +155,19 @@ private: friend class ::QWaylandBufferRef; }; +#ifdef QT_COMPOSITOR_WAYLAND_GL GLuint SurfaceBuffer::texture() const { if (m_buffer) return m_texture; return 0; } +#else +uint SurfaceBuffer::texture() const +{ + return 0; +} +#endif } |