Build the QNX plugin with -no-opengl enabled.
Change-Id: I776a3eb0d7ada4399b8c191bbfa1e3ed9236b20e Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
This commit is contained in:
parent
61c433785e
commit
d21f8c157a
@ -2,7 +2,11 @@ TARGET = qnx
|
||||
include(../../qpluginbase.pri)
|
||||
|
||||
QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/platforms
|
||||
QT += opengl opengl-private platformsupport platformsupport-private widgets-private
|
||||
QT += platformsupport platformsupport-private widgets-private
|
||||
|
||||
contains(QT_CONFIG, opengles2) {
|
||||
QT += opengl opengl-private
|
||||
}
|
||||
|
||||
# Uncomment this to build with support for IMF once it becomes available in the BBNDK
|
||||
#CONFIG += qqnx_imf
|
||||
@ -28,8 +32,6 @@ QT += opengl opengl-private platformsupport platformsupport-private widgets-priv
|
||||
SOURCES = main.cpp \
|
||||
qqnxbuffer.cpp \
|
||||
qqnxeventthread.cpp \
|
||||
qqnxglcontext.cpp \
|
||||
qqnxglbackingstore.cpp \
|
||||
qqnxintegration.cpp \
|
||||
qqnxscreen.cpp \
|
||||
qqnxwindow.cpp \
|
||||
@ -46,13 +48,16 @@ CONFIG(blackberry) {
|
||||
qqnxabstractvirtualkeyboard.cpp
|
||||
}
|
||||
|
||||
contains(QT_CONFIG, opengles2) {
|
||||
SOURCES += qqnxglcontext.cpp \
|
||||
qqnxglbackingstore.cpp
|
||||
}
|
||||
|
||||
HEADERS = main.h \
|
||||
qqnxbuffer.h \
|
||||
qqnxeventthread.h \
|
||||
qqnxkeytranslator.h \
|
||||
qqnxintegration.h \
|
||||
qqnxglcontext.h \
|
||||
qqnxglbackingstore.h \
|
||||
qqnxscreen.h \
|
||||
qqnxwindow.h \
|
||||
qqnxrasterbackingstore.h \
|
||||
@ -68,6 +73,11 @@ CONFIG(blackberry) {
|
||||
qqnxabstractvirtualkeyboard.h
|
||||
}
|
||||
|
||||
contains(QT_CONFIG, opengles2) {
|
||||
HEADERS += qqnxglcontext.h \
|
||||
qqnxglbackingstore.h
|
||||
}
|
||||
|
||||
|
||||
CONFIG(blackberry) {
|
||||
SOURCES += qqnxservices.cpp
|
||||
@ -87,7 +97,11 @@ OTHER_FILES += qnx.json
|
||||
|
||||
QMAKE_CXXFLAGS += -I./private
|
||||
|
||||
LIBS += -lscreen -lEGL
|
||||
LIBS += -lscreen
|
||||
|
||||
contains(QT_CONFIG, opengles2) {
|
||||
LIBS += -lEGL
|
||||
}
|
||||
|
||||
CONFIG(blackberry) {
|
||||
LIBS += -lbps -lpps -lclipboard
|
||||
|
@ -41,14 +41,11 @@
|
||||
|
||||
#include "qqnxintegration.h"
|
||||
#include "qqnxeventthread.h"
|
||||
#include "qqnxglbackingstore.h"
|
||||
#include "qqnxglcontext.h"
|
||||
#include "qqnxnativeinterface.h"
|
||||
#include "qqnxrasterbackingstore.h"
|
||||
#include "qqnxscreen.h"
|
||||
#include "qqnxscreeneventhandler.h"
|
||||
#include "qqnxwindow.h"
|
||||
#include "qqnxglcontext.h"
|
||||
|
||||
#ifdef Q_OS_BLACKBERRY
|
||||
#include "qqnxnavigatoreventhandler.h"
|
||||
@ -69,7 +66,13 @@
|
||||
|
||||
#include <QtGui/QPlatformWindow>
|
||||
#include <QtGui/QWindowSystemInterface>
|
||||
|
||||
#ifndef QT_NO_OPENGL
|
||||
#include "qqnxglbackingstore.h"
|
||||
#include "qqnxglcontext.h"
|
||||
|
||||
#include <QtGui/QOpenGLContext>
|
||||
#endif
|
||||
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtCore/QHash>
|
||||
@ -92,7 +95,9 @@ QQnxIntegration::QQnxIntegration()
|
||||
, m_services(0)
|
||||
#endif
|
||||
, m_fontDatabase(new QGenericUnixFontDatabase())
|
||||
#ifndef QT_NO_OPENGL
|
||||
, m_paintUsingOpenGL(false)
|
||||
#endif
|
||||
, m_eventDispatcher(createUnixEventDispatcher())
|
||||
, m_nativeInterface(new QQnxNativeInterface())
|
||||
, m_screenEventHandler(new QQnxScreenEventHandler())
|
||||
@ -122,8 +127,10 @@ QQnxIntegration::QQnxIntegration()
|
||||
// Create displays for all possible screens (which may not be attached)
|
||||
createDisplays();
|
||||
|
||||
#ifndef QT_NO_OPENGL
|
||||
// Initialize global OpenGL resources
|
||||
QQnxGLContext::initialize();
|
||||
#endif
|
||||
|
||||
// Create/start event thread
|
||||
m_eventThread = new QQnxEventThread(m_screenContext, m_screenEventHandler);
|
||||
@ -185,8 +192,10 @@ QQnxIntegration::~QQnxIntegration()
|
||||
// Close connection to QNX composition manager
|
||||
screen_destroy_context(m_screenContext);
|
||||
|
||||
#ifndef QT_NO_OPENGL
|
||||
// Cleanup global OpenGL resources
|
||||
QQnxGLContext::shutdown();
|
||||
#endif
|
||||
|
||||
// Destroy services class
|
||||
#ifdef Q_OS_BLACKBERRY
|
||||
@ -226,12 +235,15 @@ QPlatformBackingStore *QQnxIntegration::createPlatformBackingStore(QWindow *wind
|
||||
#if defined(QQNXINTEGRATION_DEBUG)
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
#endif
|
||||
#ifndef QT_NO_OPENGL
|
||||
if (paintUsingOpenGL())
|
||||
return new QQnxGLBackingStore(window);
|
||||
else
|
||||
#endif
|
||||
return new QQnxRasterBackingStore(window);
|
||||
}
|
||||
|
||||
#ifndef QT_NO_OPENGL
|
||||
QPlatformOpenGLContext *QQnxIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
|
||||
{
|
||||
#if defined(QQNXINTEGRATION_DEBUG)
|
||||
@ -239,6 +251,7 @@ QPlatformOpenGLContext *QQnxIntegration::createPlatformOpenGLContext(QOpenGLCont
|
||||
#endif
|
||||
return new QQnxGLContext(context);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_BLACKBERRY
|
||||
QPlatformInputContext *QQnxIntegration::inputContext() const
|
||||
|
@ -81,7 +81,10 @@ public:
|
||||
|
||||
QPlatformWindow *createPlatformWindow(QWindow *window) const;
|
||||
QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const;
|
||||
|
||||
#ifndef QT_NO_OPENGL
|
||||
QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const;
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_BLACKBERRY
|
||||
QPlatformInputContext *inputContext() const;
|
||||
@ -101,7 +104,9 @@ public:
|
||||
|
||||
QVariant styleHint(StyleHint hint) const;
|
||||
|
||||
#ifndef QT_NO_OPENGL
|
||||
bool paintUsingOpenGL() const { return m_paintUsingOpenGL; }
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_BLACKBERRY
|
||||
QPlatformServices *services() const;
|
||||
@ -127,7 +132,9 @@ private:
|
||||
QQnxServices *m_services;
|
||||
#endif
|
||||
QPlatformFontDatabase *m_fontDatabase;
|
||||
#ifndef QT_NO_OPENGL
|
||||
bool m_paintUsingOpenGL;
|
||||
#endif
|
||||
QAbstractEventDispatcher *m_eventDispatcher;
|
||||
QQnxNativeInterface *m_nativeInterface;
|
||||
QList<QQnxScreen*> m_screens;
|
||||
|
@ -40,7 +40,9 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "qqnxwindow.h"
|
||||
#ifndef QT_NO_OPENGL
|
||||
#include "qqnxglcontext.h"
|
||||
#endif
|
||||
#include "qqnxintegration.h"
|
||||
#include "qqnxscreen.h"
|
||||
|
||||
@ -59,7 +61,9 @@ QQnxWindow::QQnxWindow(QWindow *window, screen_context_t context)
|
||||
m_window(0),
|
||||
m_currentBufferIndex(-1),
|
||||
m_previousBufferIndex(-1),
|
||||
#ifndef QT_NO_OPENGL
|
||||
m_platformOpenGLContext(0),
|
||||
#endif
|
||||
m_screen(0),
|
||||
m_parentWindow(0),
|
||||
m_visible(true)
|
||||
@ -301,6 +305,7 @@ void QQnxWindow::setBufferSize(const QSize &size)
|
||||
|
||||
// Create window buffers if they do not exist
|
||||
if (!hasBuffers()) {
|
||||
#ifndef QT_NO_OPENGL
|
||||
// Get pixel format from EGL config if using OpenGL;
|
||||
// otherwise inherit pixel format of window's screen
|
||||
if (m_platformOpenGLContext != 0) {
|
||||
@ -308,6 +313,7 @@ void QQnxWindow::setBufferSize(const QSize &size)
|
||||
} else {
|
||||
val[0] = m_screen->nativeFormat();
|
||||
}
|
||||
#endif
|
||||
|
||||
errno = 0;
|
||||
result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_FORMAT, val);
|
||||
@ -553,12 +559,14 @@ void QQnxWindow::gainedFocus()
|
||||
QWindowSystemInterface::handleWindowActivated(window());
|
||||
}
|
||||
|
||||
#ifndef QT_NO_OPENGL
|
||||
void QQnxWindow::setPlatformOpenGLContext(QQnxGLContext *platformOpenGLContext)
|
||||
{
|
||||
// This function does not take ownership of the platform gl context.
|
||||
// It is owned by the frontend QOpenGLContext
|
||||
m_platformOpenGLContext = platformOpenGLContext;
|
||||
}
|
||||
#endif
|
||||
|
||||
QQnxWindow *QQnxWindow::findWindow(screen_window_t windowHandle)
|
||||
{
|
||||
|
@ -48,7 +48,9 @@
|
||||
|
||||
#include <QtGui/QImage>
|
||||
|
||||
#ifndef QT_NO_OPENGL
|
||||
#include <EGL/egl.h>
|
||||
#endif
|
||||
|
||||
#include <screen/screen.h>
|
||||
|
||||
@ -57,7 +59,9 @@ QT_BEGIN_NAMESPACE
|
||||
// all surfaces double buffered
|
||||
#define MAX_BUFFER_COUNT 2
|
||||
|
||||
#ifndef QT_NO_OPENGL
|
||||
class QQnxGLContext;
|
||||
#endif
|
||||
class QQnxScreen;
|
||||
|
||||
class QSurfaceFormat;
|
||||
@ -98,8 +102,10 @@ public:
|
||||
QQnxScreen *screen() const { return m_screen; }
|
||||
const QList<QQnxWindow*>& children() const { return m_childWindows; }
|
||||
|
||||
#ifndef QT_NO_OPENGL
|
||||
void setPlatformOpenGLContext(QQnxGLContext *platformOpenGLContext);
|
||||
QQnxGLContext *platformOpenGLContext() const { return m_platformOpenGLContext; }
|
||||
#endif
|
||||
|
||||
QQnxWindow *findWindow(screen_window_t windowHandle);
|
||||
|
||||
@ -124,7 +130,9 @@ private:
|
||||
QRegion m_previousDirty;
|
||||
QRegion m_scrolled;
|
||||
|
||||
#ifndef QT_NO_OPENGL
|
||||
QQnxGLContext *m_platformOpenGLContext;
|
||||
#endif
|
||||
QQnxScreen *m_screen;
|
||||
QList<QQnxWindow*> m_childWindows;
|
||||
QQnxWindow *m_parentWindow;
|
||||
|
Loading…
x
Reference in New Issue
Block a user