qt-compositor: fix build with QT_WAYLAND_GL_CONFIG=nogl
authorCorentin Chary <corentin.chary@gmail.com>
Thu, 19 May 2011 08:14:25 +0000 (10:14 +0200)
committerSamuel Rødal <samuel.rodal@nokia.com>
Thu, 19 May 2011 08:14:25 +0000 (10:14 +0200)
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Merge-request: 2
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
src/qt-compositor/wayland_wrapper/wlsurface.cpp

index a72c826..56ca065 100644 (file)
@@ -194,7 +194,9 @@ WaylandSurface::Type Surface::type() const
 
 bool Surface::isYInverted() const
 {
+#ifdef QT_COMPOSITOR_WAYLAND_GL
     Q_D(const Surface);
+
     if (d->type() == WaylandSurface::Texture) {
         if (textureId()) {
             return d->compositor->graphicsHWIntegration()->isYInverted(d->buffer());
@@ -202,6 +204,7 @@ bool Surface::isYInverted() const
     } else if (d->type() == WaylandSurface::Direct) {
         return d->compositor->graphicsHWIntegration()->isYInverted(d->buffer());
     }
+#endif
     //shm surfaces are not flipped (in our "world")
     return false;
 }