QNX: Add support for lgmon
Added configure test, whether lgmon (liquid graphics performance monitor) is available. The test is supposed to be positive only for internal BlackBerry NDKs currently. Added calls to initialize lgmon and to indicate when an app is ready for user input. Change-Id: I5cbc29fb38a86585dcebd14d462436deaa1998aa Reviewed-by: Wolfgang Bremer <wbremer@blackberry.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
This commit is contained in:
parent
85e576535c
commit
fa8e6d5083
49
config.tests/unix/lgmon/lgmon.cpp
Normal file
49
config.tests/unix/lgmon/lgmon.cpp
Normal file
@ -0,0 +1,49 @@
|
||||
/***************************************************************************
|
||||
**
|
||||
** Copyright (C) 2014 BlackBerry Limited. All rights reserved.
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the config.tests of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Digia. For licensing terms and
|
||||
** conditions see http://qt.digia.com/licensing. For further information
|
||||
** use the contact form at http://qt.digia.com/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 2.1 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Digia gives you certain additional
|
||||
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3.0 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU General Public License version 3.0 requirements will be
|
||||
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <lgmon.h>
|
||||
|
||||
int main(int, char **)
|
||||
{
|
||||
lgmon_supported(getpid());
|
||||
return 0;
|
||||
}
|
||||
|
3
config.tests/unix/lgmon/lgmon.pro
Normal file
3
config.tests/unix/lgmon/lgmon.pro
Normal file
@ -0,0 +1,3 @@
|
||||
SOURCES = lgmon.cpp
|
||||
CONFIG -= qt
|
||||
LIBS += -llgmon
|
21
configure
vendored
21
configure
vendored
@ -633,6 +633,7 @@ CFG_STACK_PROTECTOR_STRONG=auto
|
||||
CFG_SLOG2=auto
|
||||
CFG_PPS=auto
|
||||
CFG_QNX_IMF=auto
|
||||
CFG_LGMON=auto
|
||||
CFG_SYSTEM_PROXIES=no
|
||||
|
||||
# Target architecture
|
||||
@ -1800,6 +1801,13 @@ while [ "$#" -gt 0 ]; do
|
||||
UNKNOWN_OPT=yes
|
||||
fi
|
||||
;;
|
||||
lgmon)
|
||||
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
||||
CFG_LGMON="$VAL"
|
||||
else
|
||||
UNKNOWN_OPT=yes
|
||||
fi
|
||||
;;
|
||||
gtkstyle)
|
||||
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
||||
CFG_QGTKSTYLE="$VAL"
|
||||
@ -2502,6 +2510,9 @@ QNX/Blackberry options:
|
||||
-no-imf ............ Do not compile with imf support.
|
||||
-imf ............... Compile with imf support.
|
||||
|
||||
-no-lgmon .......... Do not compile with lgmon support.
|
||||
-lgmon ............. Compile with lgmon support.
|
||||
|
||||
MacOS/iOS options:
|
||||
|
||||
-Fstring ........... Add an explicit framework path.
|
||||
@ -4416,6 +4427,15 @@ if [ "$XPLATFORM_QNX" = "yes" ]; then
|
||||
CFG_PPS=no
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CFG_LGMON" != "no" ]; then
|
||||
if compileTest unix/lgmon "lgmon"; then
|
||||
CFG_LGMON=yes
|
||||
QMAKE_CONFIG="$QMAKE_CONFIG lgmon"
|
||||
else
|
||||
CFG_LGMON=no
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CFG_ZLIB" = "auto" ]; then
|
||||
@ -6841,6 +6861,7 @@ if [ "$XPLATFORM_QNX" = "yes" ]; then
|
||||
report_support " SLOG2 .................." "$CFG_SLOG2"
|
||||
report_support " IMF ...................." "$CFG_QNX_IMF"
|
||||
report_support " PPS ...................." "$CFG_PPS"
|
||||
report_support " LGMON .................." "$CFG_LGMON"
|
||||
fi
|
||||
report_support " SQL drivers:"
|
||||
report_support " DB2 .................." "$CFG_SQL_db2" plugin "plugin" yes "built into QtSql"
|
||||
|
@ -32,6 +32,7 @@ unix {
|
||||
(cd config.tests/unix/libjpeg && $(MAKE) distclean); \
|
||||
(cd config.tests/unix/libpng && $(MAKE) distclean); \
|
||||
(cd config.tests/unix/slog2 && $(MAKE) distclean); \
|
||||
(cd config.tests/unix/lgmon && $(MAKE) distclean); \
|
||||
(cd config.tests/x11/xcursor && $(MAKE) distclean); \
|
||||
(cd config.tests/x11/xrender && $(MAKE) distclean); \
|
||||
(cd config.tests/x11/xrandr && $(MAKE) distclean); \
|
||||
|
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
**
|
||||
** Copyright (C) 2011 - 2012 Research In Motion
|
||||
** Copyright (C) 2011 - 2014 BlackBerry Limited. All rights reserved.
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the plugins of the Qt Toolkit.
|
||||
@ -41,13 +41,16 @@
|
||||
|
||||
#include "main.h"
|
||||
#include "qqnxintegration.h"
|
||||
#include "qqnxlgmon.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
QPlatformIntegration *QQnxIntegrationPlugin::create(const QString& system, const QStringList& paramList)
|
||||
{
|
||||
if (!system.compare(QLatin1String("qnx"), Qt::CaseInsensitive))
|
||||
if (!system.compare(QLatin1String("qnx"), Qt::CaseInsensitive)) {
|
||||
qqnxLgmonInit();
|
||||
return new QQnxIntegration(paramList);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -65,7 +65,8 @@ HEADERS = main.h \
|
||||
qqnxcursor.h \
|
||||
qqnxrasterwindow.h \
|
||||
qqnxscreeneventfilter.h \
|
||||
qqnxglobal.h
|
||||
qqnxglobal.h \
|
||||
qqnxlgmon.h
|
||||
|
||||
CONFIG(qqnx_screeneventthread) {
|
||||
DEFINES += QQNX_SCREENEVENTTHREAD
|
||||
@ -145,6 +146,12 @@ CONFIG(qqnx_pps) {
|
||||
}
|
||||
}
|
||||
|
||||
lgmon {
|
||||
DEFINES += QQNX_LGMON
|
||||
SOURCES += qqnxlgmon.cpp
|
||||
LIBS += -llgmon
|
||||
}
|
||||
|
||||
OTHER_FILES += qnx.json
|
||||
|
||||
QMAKE_CXXFLAGS += -I./private
|
||||
|
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 BlackBerry Limited. All rights reserved.
|
||||
** Copyright (C) 2013 - 2014 BlackBerry Limited. All rights reserved.
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the plugins of the Qt Toolkit.
|
||||
@ -135,8 +135,7 @@ void QQnxEglWindow::swapEGLBuffers()
|
||||
if (eglResult != EGL_TRUE)
|
||||
qFatal("QQNX: failed to swap EGL buffers, err=%d", eglGetError());
|
||||
|
||||
if (m_cover)
|
||||
m_cover->updateCover();
|
||||
windowPosted();
|
||||
}
|
||||
|
||||
EGLSurface QQnxEglWindow::getSurface()
|
||||
|
49
src/plugins/platforms/qnx/qqnxlgmon.cpp
Normal file
49
src/plugins/platforms/qnx/qqnxlgmon.cpp
Normal file
@ -0,0 +1,49 @@
|
||||
/***************************************************************************
|
||||
**
|
||||
** Copyright (C) 2014 BlackBerry Limited. All rights reserved.
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the plugins of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Digia. For licensing terms and
|
||||
** conditions see http://qt.digia.com/licensing. For further information
|
||||
** use the contact form at http://qt.digia.com/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 2.1 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Digia gives you certain additional
|
||||
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3.0 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU General Public License version 3.0 requirements will be
|
||||
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qqnxlgmon.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
bool qqnxLgmonFirstFrame = true;
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
80
src/plugins/platforms/qnx/qqnxlgmon.h
Normal file
80
src/plugins/platforms/qnx/qqnxlgmon.h
Normal file
@ -0,0 +1,80 @@
|
||||
/***************************************************************************
|
||||
**
|
||||
** Copyright (C) 2014 BlackBerry Limited. All rights reserved.
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the plugins of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Digia. For licensing terms and
|
||||
** conditions see http://qt.digia.com/licensing. For further information
|
||||
** use the contact form at http://qt.digia.com/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 2.1 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Digia gives you certain additional
|
||||
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3.0 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU General Public License version 3.0 requirements will be
|
||||
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QQNXLGMON_H
|
||||
#define QQNXLGMON_H
|
||||
|
||||
#include <qglobal.h>
|
||||
|
||||
#if defined(QQNX_LGMON)
|
||||
#include <lgmon.h>
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#if defined(QQNX_LGMON)
|
||||
|
||||
extern bool qqnxLgmonFirstFrame;
|
||||
|
||||
inline void qqnxLgmonInit()
|
||||
{
|
||||
lgmon_supported(getpid());
|
||||
}
|
||||
|
||||
inline void qqnxLgmonFramePosted(bool isCover)
|
||||
{
|
||||
if (qqnxLgmonFirstFrame && !isCover) {
|
||||
qqnxLgmonFirstFrame = false;
|
||||
lgmon_app_ready_for_user_input(getpid());
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
inline void qqnxLgmonInit() {}
|
||||
inline void qqnxLgmonFramePosted(bool /*isCover*/) {}
|
||||
|
||||
#endif
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QQNXLGMON_H
|
||||
|
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 BlackBerry Limited. All rights reserved.
|
||||
** Copyright (C) 2013 - 2014 BlackBerry Limited. All rights reserved.
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the plugins of the Qt Toolkit.
|
||||
@ -123,8 +123,7 @@ void QQnxRasterWindow::post(const QRegion &dirty)
|
||||
m_previousDirty = dirty;
|
||||
m_scrolled = QRegion();
|
||||
|
||||
if (m_cover)
|
||||
m_cover->updateCover();
|
||||
windowPosted();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -44,6 +44,7 @@
|
||||
#include "qqnxwindow.h"
|
||||
#include "qqnxintegration.h"
|
||||
#include "qqnxscreen.h"
|
||||
#include "qqnxlgmon.h"
|
||||
|
||||
#include <QUuid>
|
||||
|
||||
@ -705,5 +706,12 @@ void QQnxWindow::applyWindowState()
|
||||
}
|
||||
}
|
||||
|
||||
void QQnxWindow::windowPosted()
|
||||
{
|
||||
if (m_cover)
|
||||
m_cover->updateCover();
|
||||
|
||||
qqnxLgmonFramePosted(m_cover); // for performance measurements
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -117,9 +117,9 @@ protected:
|
||||
virtual void resetBuffers() = 0;
|
||||
|
||||
void initWindow();
|
||||
void windowPosted();
|
||||
|
||||
screen_context_t m_screenContext;
|
||||
QScopedPointer<QQnxAbstractCover> m_cover;
|
||||
|
||||
private:
|
||||
void createWindowGroup();
|
||||
@ -137,6 +137,7 @@ private:
|
||||
QQnxScreen *m_screen;
|
||||
QQnxWindow *m_parentWindow;
|
||||
QList<QQnxWindow*> m_childWindows;
|
||||
QScopedPointer<QQnxAbstractCover> m_cover;
|
||||
bool m_visible;
|
||||
bool m_exposed;
|
||||
QRect m_unmaximizedGeometry;
|
||||
|
@ -197,6 +197,7 @@ Configure::Configure(int& argc, char** argv)
|
||||
dictionary[ "SLOG2" ] = "no";
|
||||
dictionary[ "QNX_IMF" ] = "no";
|
||||
dictionary[ "PPS" ] = "no";
|
||||
dictionary[ "LGMON" ] = "no";
|
||||
dictionary[ "SYSTEM_PROXIES" ] = "no";
|
||||
dictionary[ "WERROR" ] = "auto";
|
||||
dictionary[ "QREAL" ] = "double";
|
||||
@ -890,6 +891,10 @@ void Configure::parseCmdLine()
|
||||
dictionary[ "PPS" ] = "no";
|
||||
} else if (configCmdLine.at(i) == "-pps") {
|
||||
dictionary[ "PPS" ] = "yes";
|
||||
} else if (configCmdLine.at(i) == "-no-lgmon") {
|
||||
dictionary[ "LGMON" ] = "no";
|
||||
} else if (configCmdLine.at(i) == "-lgmon") {
|
||||
dictionary[ "LGMON" ] = "yes";
|
||||
} else if (configCmdLine.at(i) == "-no-system-proxies") {
|
||||
dictionary[ "SYSTEM_PROXIES" ] = "no";
|
||||
} else if (configCmdLine.at(i) == "-system-proxies") {
|
||||
@ -1666,6 +1671,7 @@ void Configure::applySpecSpecifics()
|
||||
dictionary["SLOG2"] = "auto";
|
||||
dictionary["QNX_IMF"] = "auto";
|
||||
dictionary["PPS"] = "auto";
|
||||
dictionary["LGMON"] = "auto";
|
||||
dictionary["QT_XKBCOMMON"] = "no";
|
||||
dictionary[ "ANGLE" ] = "no";
|
||||
dictionary[ "FONT_CONFIG" ] = "auto";
|
||||
@ -1877,7 +1883,7 @@ bool Configure::displayHelp()
|
||||
"by setting QT_HARFBUZZ environment variable to \"old\".");
|
||||
desc("HARFBUZZ", "system","-system-harfbuzz", "(experimental) Use HarfBuzz-NG from the operating system\n"
|
||||
"to do text shaping. It can still be disabled\n"
|
||||
"by setting QT_HARFBUZZ environment variable to \"old\".");
|
||||
"by setting QT_HARFBUZZ environment variable to \"old\".\n");
|
||||
|
||||
if ((platform() == QNX) || (platform() == BLACKBERRY)) {
|
||||
desc("SLOG2", "yes", "-slog2", "Compile with slog2 support.");
|
||||
@ -1886,6 +1892,8 @@ bool Configure::displayHelp()
|
||||
desc("QNX_IMF", "no", "-no-imf", "Do not compile with imf support.");
|
||||
desc("PPS", "yes", "-pps", "Compile with PPS support.");
|
||||
desc("PPS", "no", "-no-pps", "Do not compile with PPS support.");
|
||||
desc("LGMON", "yes", "-lgmon", "Compile with lgmon support.");
|
||||
desc("LGMON", "no", "-no-lgmon", "Do not compile with lgmon support.\n");
|
||||
}
|
||||
|
||||
desc("ANGLE", "yes", "-angle", "Use the ANGLE implementation of OpenGL ES 2.0.");
|
||||
@ -2236,6 +2244,9 @@ bool Configure::checkAvailability(const QString &part)
|
||||
available = tryCompileProject("unix/qqnx_imf");
|
||||
} else if (part == "PPS") {
|
||||
available = (platform() == QNX || platform() == BLACKBERRY) && tryCompileProject("unix/pps");
|
||||
} else if (part == "LGMON") {
|
||||
available = (platform() == QNX || platform() == BLACKBERRY)
|
||||
&& tryCompileProject("unix/lgmon");
|
||||
} else if (part == "NEON") {
|
||||
available = (dictionary["QT_ARCH"] == "arm") && tryCompileProject("unix/neon");
|
||||
} else if (part == "FONT_CONFIG") {
|
||||
@ -2389,6 +2400,10 @@ void Configure::autoDetection()
|
||||
dictionary["PPS"] = checkAvailability("PPS") ? "yes" : "no";
|
||||
}
|
||||
|
||||
if ((platform() == QNX || platform() == BLACKBERRY) && dictionary["LGMON"] == "auto") {
|
||||
dictionary["LGMON"] = checkAvailability("LGMON") ? "yes" : "no";
|
||||
}
|
||||
|
||||
if (dictionary["QT_EVENTFD"] == "auto")
|
||||
dictionary["QT_EVENTFD"] = checkAvailability("QT_EVENTFD") ? "yes" : "no";
|
||||
|
||||
@ -3244,6 +3259,9 @@ void Configure::generateQConfigPri()
|
||||
if (dictionary[ "PPS" ] == "yes")
|
||||
configStream << " qqnx_pps";
|
||||
|
||||
if (dictionary[ "LGMON" ] == "yes")
|
||||
configStream << " lgmon";
|
||||
|
||||
if (dictionary["DIRECTWRITE"] == "yes")
|
||||
configStream << " directwrite";
|
||||
|
||||
@ -3620,6 +3638,7 @@ void Configure::displayConfig()
|
||||
sout << " SLOG2 support..........." << dictionary[ "SLOG2" ] << endl;
|
||||
sout << " IMF support............." << dictionary[ "QNX_IMF" ] << endl;
|
||||
sout << " PPS support............." << dictionary[ "PPS" ] << endl;
|
||||
sout << " LGMON support..........." << dictionary[ "LGMON" ] << endl;
|
||||
}
|
||||
sout << " ANGLE..................." << dictionary[ "ANGLE" ] << endl;
|
||||
sout << endl;
|
||||
|
Loading…
Reference in New Issue
Block a user