Added texture accessor to WaylandSurface even in the case of no GL.
authorSamuel Rødal <samuel.rodal@nokia.com>
Thu, 24 Mar 2011 10:56:14 +0000 (11:56 +0100)
committerSamuel Rødal <samuel.rodal@nokia.com>
Thu, 24 Mar 2011 10:57:21 +0000 (11:57 +0100)
Just return 0, so that compositors don't have to be rewritten when the
backend only supports SHM surfaces.

src/qt-compositor/compositor_api/waylandsurface.cpp
src/qt-compositor/compositor_api/waylandsurface.h

index 933e9fe..5a37459 100644 (file)
@@ -49,7 +49,13 @@ GLuint WaylandSurface::texture() const
     Q_D(const WaylandSurface);
     return d->surface->textureId();
 }
-#endif //QT_COMPOSITOR_WAYLAND_GL
+#else //QT_COMPOSITOR_WAYLAND_GL
+uint WaylandSurface::texture() const
+{
+    return 0;
+}
+
+#endif
 
 Wayland::Surface * WaylandSurface::handle() const
 {
index b0cd1d1..e269698 100644 (file)
@@ -35,6 +35,8 @@ public:
     QImage image() const;
 #ifdef QT_COMPOSITOR_WAYLAND_GL
     GLuint texture() const;
+#else
+    uint texture() const;
 #endif
 
     void sendMousePressEvent(const QPoint &pos, Qt::MouseButton button);