diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/qnx/main.cpp | 7 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qnx.pro | 9 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qqnxeglwindow.cpp | 5 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qqnxlgmon.cpp | 49 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qqnxlgmon.h | 80 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qqnxrasterwindow.cpp | 5 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qqnxwindow.cpp | 8 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qqnxwindow.h | 3 |
8 files changed, 156 insertions, 10 deletions
diff --git a/src/plugins/platforms/qnx/main.cpp b/src/plugins/platforms/qnx/main.cpp index 50779d3e12..01e71b3810 100644 --- a/src/plugins/platforms/qnx/main.cpp +++ b/src/plugins/platforms/qnx/main.cpp @@ -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; } diff --git a/src/plugins/platforms/qnx/qnx.pro b/src/plugins/platforms/qnx/qnx.pro index c605126091..2399a91c12 100644 --- a/src/plugins/platforms/qnx/qnx.pro +++ b/src/plugins/platforms/qnx/qnx.pro @@ -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 diff --git a/src/plugins/platforms/qnx/qqnxeglwindow.cpp b/src/plugins/platforms/qnx/qqnxeglwindow.cpp index 45a7bab871..3c08cc9f82 100644 --- a/src/plugins/platforms/qnx/qqnxeglwindow.cpp +++ b/src/plugins/platforms/qnx/qqnxeglwindow.cpp @@ -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() diff --git a/src/plugins/platforms/qnx/qqnxlgmon.cpp b/src/plugins/platforms/qnx/qqnxlgmon.cpp new file mode 100644 index 0000000000..3c8d1c11a5 --- /dev/null +++ b/src/plugins/platforms/qnx/qqnxlgmon.cpp @@ -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 + diff --git a/src/plugins/platforms/qnx/qqnxlgmon.h b/src/plugins/platforms/qnx/qqnxlgmon.h new file mode 100644 index 0000000000..e3930ce93a --- /dev/null +++ b/src/plugins/platforms/qnx/qqnxlgmon.h @@ -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 + diff --git a/src/plugins/platforms/qnx/qqnxrasterwindow.cpp b/src/plugins/platforms/qnx/qqnxrasterwindow.cpp index 2c0639e8e3..eb9fac540f 100644 --- a/src/plugins/platforms/qnx/qqnxrasterwindow.cpp +++ b/src/plugins/platforms/qnx/qqnxrasterwindow.cpp @@ -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(); } } diff --git a/src/plugins/platforms/qnx/qqnxwindow.cpp b/src/plugins/platforms/qnx/qqnxwindow.cpp index bb76efea64..e57025cbc6 100644 --- a/src/plugins/platforms/qnx/qqnxwindow.cpp +++ b/src/plugins/platforms/qnx/qqnxwindow.cpp @@ -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 diff --git a/src/plugins/platforms/qnx/qqnxwindow.h b/src/plugins/platforms/qnx/qqnxwindow.h index ea7b388e9f..e97e941a08 100644 --- a/src/plugins/platforms/qnx/qqnxwindow.h +++ b/src/plugins/platforms/qnx/qqnxwindow.h @@ -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; |