From: Samuel Rødal Date: Thu, 24 Mar 2011 10:56:14 +0000 (+0100) Subject: Added texture accessor to WaylandSurface even in the case of no GL. X-Git-Tag: qt-v5.0.0-alpha1~337 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=05d18002e137152856404ee2f01215f8d086d074;p=profile%2Fivi%2Fqtwayland.git Added texture accessor to WaylandSurface even in the case of no GL. Just return 0, so that compositors don't have to be rewritten when the backend only supports SHM surfaces. --- diff --git a/src/qt-compositor/compositor_api/waylandsurface.cpp b/src/qt-compositor/compositor_api/waylandsurface.cpp index 933e9fe..5a37459 100644 --- a/src/qt-compositor/compositor_api/waylandsurface.cpp +++ b/src/qt-compositor/compositor_api/waylandsurface.cpp @@ -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 { diff --git a/src/qt-compositor/compositor_api/waylandsurface.h b/src/qt-compositor/compositor_api/waylandsurface.h index b0cd1d1..e269698 100644 --- a/src/qt-compositor/compositor_api/waylandsurface.h +++ b/src/qt-compositor/compositor_api/waylandsurface.h @@ -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);