From: Jørgen Lind Date: Tue, 24 Apr 2012 11:37:52 +0000 (+0200) Subject: Give "something" for the handle of a shm sufracebuffer X-Git-Tag: TIZEN~65 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d6235eb6574fd2327a98bf6a1a762d3edab4f4c5;p=profile%2Fivi%2Fqtwayland.git Give "something" for the handle of a shm sufracebuffer Change-Id: I91647bd515a1497ae999b3f493d60b3250727b67 Reviewed-by: Laszlo Agocs --- 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; }