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