From d5663068f9e6a46f2da58d82b22d9c1bf02d2da9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Samuel=20R=C3=B8dal?= Date: Mon, 14 May 2012 20:51:04 +0200 Subject: [PATCH] Build without hw integration. Change-Id: I011d0e9af8082570b29e9836df40d719bb5e96a6 Reviewed-by: Laszlo Agocs --- src/compositor/wayland_wrapper/wlsurfacebuffer.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/compositor/wayland_wrapper/wlsurfacebuffer.cpp b/src/compositor/wayland_wrapper/wlsurfacebuffer.cpp index efd5040..ced3ed2 100644 --- a/src/compositor/wayland_wrapper/wlsurfacebuffer.cpp +++ b/src/compositor/wayland_wrapper/wlsurfacebuffer.cpp @@ -102,9 +102,11 @@ void SurfaceBuffer::destructBufferState() if (m_handle) { if (m_is_shm) { delete static_cast(m_handle); +#ifdef QT_COMPOSITOR_WAYLAND_GL } else { GraphicsHardwareIntegration *hwIntegration = m_compositor->graphicsHWIntegration(); hwIntegration->unlockNativeBuffer(m_handle, m_compositor->directRenderContext()); +#endif } } wl_list_remove(&m_destroy_listener.listener.link); @@ -198,7 +200,6 @@ void SurfaceBuffer::handleDisplayed() void *SurfaceBuffer::handle() const { if (!m_handle) { - GraphicsHardwareIntegration *hwIntegration = m_compositor->graphicsHWIntegration(); SurfaceBuffer *that = const_cast(this); if (isShmBuffer()) { const uchar *data = static_cast(wl_shm_buffer_get_data(m_buffer)); @@ -207,8 +208,11 @@ void *SurfaceBuffer::handle() const int height = m_buffer->height; QImage *image = new QImage(data,width,height,stride, QImage::Format_ARGB32_Premultiplied); that->m_handle = image; +#ifdef QT_COMPOSITOR_WAYLAND_GL } else { + GraphicsHardwareIntegration *hwIntegration = m_compositor->graphicsHWIntegration(); that->m_handle = hwIntegration->lockNativeBuffer(m_buffer, m_compositor->directRenderContext()); +#endif } } return m_handle; @@ -229,6 +233,9 @@ void SurfaceBuffer::createTexture(GraphicsHardwareIntegration *hwIntegration, QO { #ifdef QT_COMPOSITOR_WAYLAND_GL m_texture = hwIntegration->createTextureFromBuffer(m_buffer, context); +#else + Q_UNUSED(hwIntegration); + Q_UNUSED(context); #endif } -- 2.7.4