From 76359dab8ea88403def4ad11e884080d3eb03e3e Mon Sep 17 00:00:00 2001 From: Thomas Senyk Date: Wed, 25 Sep 2013 13:22:55 +0200 Subject: eglfs/imx6: enable double buffering and vsync by default Enabling vsync and double buffering improves the overall impression. Enabling by default helps to get the best "out of the box" If not desired, one can disable this behavior via: export QT_EGLFS_IMX6_NO_FB_MULTI_BUFFER=1 Change-Id: I21ce5366ea5829140d8103cf2dbd8c487d079db6 Reviewed-by: Donald Carr Reviewed-by: Gunnar Sletta --- mkspecs/devices/linux-imx6-g++/qeglfshooks_imx6.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'mkspecs/devices/linux-imx6-g++/qeglfshooks_imx6.cpp') diff --git a/mkspecs/devices/linux-imx6-g++/qeglfshooks_imx6.cpp b/mkspecs/devices/linux-imx6-g++/qeglfshooks_imx6.cpp index 2a5ee74648..c351e3dbc4 100644 --- a/mkspecs/devices/linux-imx6-g++/qeglfshooks_imx6.cpp +++ b/mkspecs/devices/linux-imx6-g++/qeglfshooks_imx6.cpp @@ -41,6 +41,7 @@ #include "qeglfshooks.h" #include +#include QT_BEGIN_NAMESPACE @@ -62,6 +63,15 @@ private: QEglFSImx6Hooks::QEglFSImx6Hooks() { int width, height; + + bool multiBufferNotEnabledYet = qEnvironmentVariableIsEmpty("FB_MULTI_BUFFER"); + bool multiBuffer = qEnvironmentVariableIsEmpty("QT_EGLFS_IMX6_NO_FB_MULTI_BUFFER"); + if (multiBufferNotEnabledYet && multiBuffer) { + qWarning() << "QEglFSImx6Hooks will set environment variable FB_MULTI_BUFFER=2 to enable double buffering and vsync.\n" + << "If this is not desired, you can override this via: export QT_EGLFS_IMX6_NO_FB_MULTI_BUFFER=1"; + qputenv("FB_MULTI_BUFFER", "2"); + } + mNativeDisplay = fbGetDisplayByIndex(0); fbGetDisplayGeometry(mNativeDisplay, &width, &height); mScreenSize.setHeight(height); -- cgit v1.2.3