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 <sirspudd@gmail.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
This commit is contained in:
parent
894f867090
commit
76359dab8e
@ -41,6 +41,7 @@
|
||||
|
||||
#include "qeglfshooks.h"
|
||||
#include <EGL/eglvivante.h>
|
||||
#include <QDebug>
|
||||
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user