summaryrefslogtreecommitdiffstats
path: root/src/compositor/wayland_wrapper
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2012-01-26 15:28:36 +0100
committerAndy Nichols <andy.nichols@nokia.com>2012-01-26 16:05:47 +0100
commitda38cc40d07bc4faa647da126a9b9d640acc75f6 (patch)
tree6e4d80e58290cb5827e0189c7e287d107c314bc7 /src/compositor/wayland_wrapper
parent7956891fb94d2bde80b5a2bda364f994bff76719 (diff)
Add possibillity of overriding invertedY flag for wl_surfaces
Change-Id: I0f4c2696ae5c7071275af326c924dc1eaed6d5b6 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
Diffstat (limited to 'src/compositor/wayland_wrapper')
-rw-r--r--src/compositor/wayland_wrapper/wlsurface.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/compositor/wayland_wrapper/wlsurface.cpp b/src/compositor/wayland_wrapper/wlsurface.cpp
index f0631177a..2239004e4 100644
--- a/src/compositor/wayland_wrapper/wlsurface.cpp
+++ b/src/compositor/wayland_wrapper/wlsurface.cpp
@@ -431,13 +431,19 @@ bool Surface::isYInverted() const
#ifdef QT_COMPOSITOR_WAYLAND_GL
Q_D(const Surface);
- if (!d->surfaceBuffer)
- return false;
- if (d->compositor->graphicsHWIntegration() && d->surfaceBuffer->handle() && type() != WaylandSurface::Shm) {
- return d->compositor->graphicsHWIntegration()->isYInverted(d->surfaceBuffer->handle());
- }
+ bool ret = false;
+
+ static bool negateReturn = qgetenv("QT_COMPOSITOR_NEGATE_INVERTED_Y").toInt();
+
+ if (!d->surfaceBuffer) {
+ ret = false;
+ } else if (d->compositor->graphicsHWIntegration() && d->surfaceBuffer->handle() && type() != WaylandSurface::Shm) {
+ ret = d->compositor->graphicsHWIntegration()->isYInverted(d->surfaceBuffer->handle());
+ } else
#endif
- return true;
+ ret = true;
+
+ return ret^negateReturn;
}
bool Surface::visible() const