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);
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;