diff options
author | Paul Olav Tvete <paul.tvete@nokia.com> | 2012-01-10 13:40:31 +0100 |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2012-01-10 13:53:02 +0100 |
commit | f3e02faa0d59a3e383afb8773a91e9c5d037ecbc (patch) | |
tree | 830a4314d935c561f2e7c8ac39042abc3ce8d098 /src | |
parent | a0ad79fcadc9df6144ff91a8ba4b49321000f5cd (diff) |
Direct rendering fix for previous fix.
In the direct rendering case we disown the buffer, so we end up in
yet another strange state. This code definitely needs refactoring...
Change-Id: Ie5495f9cb1e993e195ba9ecbe19f74425600efa9
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/compositor/wayland_wrapper/wlsurface.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/compositor/wayland_wrapper/wlsurface.cpp b/src/compositor/wayland_wrapper/wlsurface.cpp index 7acd379a8..fdfd14bf8 100644 --- a/src/compositor/wayland_wrapper/wlsurface.cpp +++ b/src/compositor/wayland_wrapper/wlsurface.cpp @@ -266,10 +266,9 @@ public: void newCurrentBuffer() { //TODO release SHM buffer.... - if (surfaceBuffer && surfaceBuffer->isPosted()) + if (surfaceBuffer && surfaceBuffer->isPosted()) { surfaceBuffer->destructBufferState(); - - if (surfaceBuffer && !surfaceBuffer->isDisplayed()) { + } else if (surfaceBuffer && !surfaceBuffer->isDisplayed()) { qDebug() << "### not skipping undisplayed buffer"; return; } @@ -413,7 +412,7 @@ Surface::~Surface() WaylandSurface::Type Surface::type() const { Q_D(const Surface); - if (d->surfaceBuffer && !d->surfaceBuffer->bufferIsDestroyed()) { + if (d->surfaceBuffer && d->surfaceBuffer->handle()) { if (d->surfaceBuffer && d->surfaceBuffer->isShmBuffer()) { return WaylandSurface::Shm; } else if (d->surfaceBuffer){ @@ -430,7 +429,7 @@ bool Surface::isYInverted() const if (!d->surfaceBuffer) return false; - if (d->compositor->graphicsHWIntegration() && !d->surfaceBuffer->bufferIsDestroyed() && type() != WaylandSurface::Shm) { + if (d->compositor->graphicsHWIntegration() && d->surfaceBuffer->handle() && type() != WaylandSurface::Shm) { return d->compositor->graphicsHWIntegration()->isYInverted(d->surfaceBuffer->handle()); } #endif |