diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2012-04-16 19:30:04 +0200 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@nokia.com> | 2012-04-17 15:20:20 +0200 |
commit | df7d34d4b4d713c5b26871e31e0bec950480f2b9 (patch) | |
tree | 7aaf805ec86934c5c92ccc723532f2746d4a9748 /src/compositor/wayland_wrapper/wlcompositor.cpp | |
parent | 56758f210dc090d9b306d20c221fdc35f3b3a917 (diff) |
Implement nativeBufferLocking
This is needed to be able to post directly to the framebuffer.
Change-Id: I6d19a6c8d9736a513a22dfa71358e6c4c7968e15
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
Diffstat (limited to 'src/compositor/wayland_wrapper/wlcompositor.cpp')
-rw-r--r-- | src/compositor/wayland_wrapper/wlcompositor.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/compositor/wayland_wrapper/wlcompositor.cpp b/src/compositor/wayland_wrapper/wlcompositor.cpp index 9388ab9e6..1e60d95bd 100644 --- a/src/compositor/wayland_wrapper/wlcompositor.cpp +++ b/src/compositor/wayland_wrapper/wlcompositor.cpp @@ -124,6 +124,7 @@ Compositor::Compositor(WaylandCompositor *qt_compositor) , m_qt_compositor(qt_compositor) , m_orientation(Qt::PrimaryOrientation) , m_directRenderSurface(0) + , m_directRenderContext(0) #if defined (QT_COMPOSITOR_WAYLAND_GL) , m_graphics_hw_integration(0) #endif @@ -274,7 +275,7 @@ void Compositor::surfaceDestroyed(Surface *surface) m_surfaces.removeOne(surface); m_dirty_surfaces.remove(surface); if (m_directRenderSurface == surface) - setDirectRenderSurface(0); + setDirectRenderSurface(0, 0); waylandCompositor()->surfaceAboutToBeDestroyed(surface->waylandSurface()); } @@ -332,7 +333,7 @@ void Compositor::enableSubSurfaceExtension() } } -bool Compositor::setDirectRenderSurface(Surface *surface) +bool Compositor::setDirectRenderSurface(Surface *surface, QOpenGLContext *context) { #ifdef QT_COMPOSITOR_WAYLAND_GL if (!m_pageFlipper) { @@ -341,6 +342,7 @@ bool Compositor::setDirectRenderSurface(Surface *surface) if (m_graphics_hw_integration && m_graphics_hw_integration->setDirectRenderSurface(surface ? surface->waylandSurface() : 0)) { m_directRenderSurface = surface; + m_directRenderContext = context; return true; } #else |