From: Jørgen Lind Date: Fri, 6 May 2011 11:50:14 +0000 (+0200) Subject: We still support not having custome shaders X-Git-Tag: qt-v5.0.0-alpha1~288 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ca98bcb2bedb7f521892a4c97119f11753b48d70;p=profile%2Fivi%2Fqtwayland.git We still support not having custome shaders --- diff --git a/src/qt-compositor/compositor_api/waylandsurfaceitem.cpp b/src/qt-compositor/compositor_api/waylandsurfaceitem.cpp index 597bff0..1504316 100644 --- a/src/qt-compositor/compositor_api/waylandsurfaceitem.cpp +++ b/src/qt-compositor/compositor_api/waylandsurfaceitem.cpp @@ -186,6 +186,13 @@ QSGNode *WaylandSurfaceItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeDa if (!node) { node = new QSGSimpleTextureNode(); } + + if (surface()->isYInverted()) { + node->setRect(0, height(), width(), -height()); + } else { + node->setRect(0, 0, width(), height()); + } + node->setTexture(m_texture); node->setFiltering(smooth() ? QSGTexture::Linear : QSGTexture::Nearest); diff --git a/src/qt-compositor/wayland_wrapper/wlsurface.cpp b/src/qt-compositor/wayland_wrapper/wlsurface.cpp index deec00e..5095383 100644 --- a/src/qt-compositor/wayland_wrapper/wlsurface.cpp +++ b/src/qt-compositor/wayland_wrapper/wlsurface.cpp @@ -196,10 +196,12 @@ WaylandSurface::Type Surface::type() const bool Surface::isYInverted() const { Q_D(const Surface); - if (d->type() == WaylandSurface::Texture || d->type() == WaylandSurface::Direct) { + if (d->type() == WaylandSurface::Texture) { if (textureId()) { return d->compositor->graphicsHWIntegration()->isYInverted(d->buffer()); } + } else if (d->type() == WaylandSurface::Direct) { + return d->compositor->graphicsHWIntegration()->isYInverted(d->buffer()); } //shm surfaces are not flipped (in our "world") return false;