diff options
Diffstat (limited to 'tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp')
-rw-r--r-- | tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp index b660eb3..e1c0460 100644 --- a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp +++ b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** @@ -45,6 +45,7 @@ #include <private/qapplication_p.h> #include <private/qgraphicssystem_runtime_p.h> #include <private/qpixmap_raster_p.h> +#include <private/qwindowsurface_gl_p.h> #include "qmeegoruntime.h" #include "qmeegoswitchevent.h" @@ -153,3 +154,17 @@ void QMeeGoGraphicsSystemHelper::setTranslucent(bool translucent) ENSURE_RUNNING_MEEGO; QMeeGoRuntime::setTranslucent(translucent); } + +void QMeeGoGraphicsSystemHelper::setSwapBehavior(SwapMode mode) +{ + ENSURE_RUNNING_MEEGO; + + if (mode == AutomaticSwap) + QGLWindowSurface::swapBehavior = QGLWindowSurface::AutomaticSwap; + else if (mode == AlwaysFullSwap) + QGLWindowSurface::swapBehavior = QGLWindowSurface::AlwaysFullSwap; + else if (mode == AlwaysPartialSwap) + QGLWindowSurface::swapBehavior = QGLWindowSurface::AlwaysPartialSwap; + else if (mode == KillSwap) + QGLWindowSurface::swapBehavior = QGLWindowSurface::KillSwap; +} |