From d6235eb6574fd2327a98bf6a1a762d3edab4f4c5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B8rgen=20Lind?= Date: Tue, 24 Apr 2012 13:37:52 +0200 Subject: [PATCH] Give "something" for the handle of a shm sufracebuffer Change-Id: I91647bd515a1497ae999b3f493d60b3250727b67 Reviewed-by: Laszlo Agocs --- src/compositor/wayland_wrapper/wlsurfacebuffer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/compositor/wayland_wrapper/wlsurfacebuffer.cpp b/src/compositor/wayland_wrapper/wlsurfacebuffer.cpp index ad8d3d6..a729eb0 100644 --- a/src/compositor/wayland_wrapper/wlsurfacebuffer.cpp +++ b/src/compositor/wayland_wrapper/wlsurfacebuffer.cpp @@ -178,7 +178,11 @@ void *SurfaceBuffer::handle() const if (!m_handle) { GraphicsHardwareIntegration *hwIntegration = m_compositor->graphicsHWIntegration(); SurfaceBuffer *that = const_cast(this); - that->m_handle = hwIntegration->lockNativeBuffer(m_buffer, m_compositor->directRenderContext()); + if (isShmBuffer()) { + that->m_handle = wl_shm_buffer_get_data(m_buffer); + } else { + that->m_handle = hwIntegration->lockNativeBuffer(m_buffer, m_compositor->directRenderContext()); + } } return m_handle; } -- 2.7.4