From 1c20c3f29441a6856c6eb58dda40b86bdaac6a06 Mon Sep 17 00:00:00 2001 From: Sean Harmer Date: Thu, 5 Apr 2012 16:46:18 +0100 Subject: Moving stack-smashing protection to the Blackberry mkspecs It transpires that QNX 6.5.0 does not yet have libc support for the gcc stack smashing protection. Change-Id: Ic635662b6aa3ce2fad5f69e236386ae9ace420db Reviewed-by: Andreas Holzammer Reviewed-by: Stephen Kelly Reviewed-by: Oswald Buddenhagen --- mkspecs/common/qcc-base.conf | 3 +-- mkspecs/unsupported/blackberry-armv7le-qcc/qmake.conf | 3 +++ mkspecs/unsupported/blackberry-x86-qcc/qmake.conf | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/common/qcc-base.conf b/mkspecs/common/qcc-base.conf index a2aefc6cd3..aa6abee0a0 100644 --- a/mkspecs/common/qcc-base.conf +++ b/mkspecs/common/qcc-base.conf @@ -7,10 +7,9 @@ # # 1) -pipe is removed as it's on by default in qcc (and has an analogous -nopipe option) # 2) -Wno-psabi is added to silence harmless warnings about va_list mangling -# 3) -fstack-protector -fstack-protector-all is added to enable stack smashing protection # -QMAKE_CFLAGS += -Wno-psabi -fstack-protector -fstack-protector-all +QMAKE_CFLAGS += -Wno-psabi QMAKE_CFLAGS_DEPS += -M QMAKE_CFLAGS_WARN_ON += -Wall -W QMAKE_CFLAGS_WARN_OFF += -w diff --git a/mkspecs/unsupported/blackberry-armv7le-qcc/qmake.conf b/mkspecs/unsupported/blackberry-armv7le-qcc/qmake.conf index df9961b107..4e72667c5d 100644 --- a/mkspecs/unsupported/blackberry-armv7le-qcc/qmake.conf +++ b/mkspecs/unsupported/blackberry-armv7le-qcc/qmake.conf @@ -6,4 +6,7 @@ DEFINES += Q_OS_BLACKBERRY CONFIG += blackberry LIBS += -lbps +# Blackberry also has support for stack smashing protection in its libc +QMAKE_CFLAGS += -fstack-protector -fstack-protector-all + include(../qnx-armv7le-qcc/qmake.conf) diff --git a/mkspecs/unsupported/blackberry-x86-qcc/qmake.conf b/mkspecs/unsupported/blackberry-x86-qcc/qmake.conf index 2cb405cd51..60b67f801e 100644 --- a/mkspecs/unsupported/blackberry-x86-qcc/qmake.conf +++ b/mkspecs/unsupported/blackberry-x86-qcc/qmake.conf @@ -6,4 +6,7 @@ DEFINES += Q_OS_BLACKBERRY CONFIG += blackberry LIBS += -lbps +# Blackberry also has support for stack smashing protection in its libc +QMAKE_CFLAGS += -fstack-protector -fstack-protector-all + include(../qnx-x86-qcc/qmake.conf) -- cgit v1.2.3 From 42f3bf772bab75d639b9211d66a0e085538526e2 Mon Sep 17 00:00:00 2001 From: Donald Carr Date: Tue, 10 Apr 2012 17:20:31 +0000 Subject: Extend eglhooks to include hasCapability MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add BufferQueueingOpenGL to Raspberry PI's numerous capabilities Change-Id: I1197c28a0c82df3ae2f6d5360791010e17373555 Reviewed-by: Girish Ramakrishnan Reviewed-by: Donald Carr Reviewed-by: Samuel Rødal --- .../linux-arm-amlogic-8726M-g++/qeglfs_hooks_8726m.cpp | 5 +++++ mkspecs/devices/linux-rasp-pi-g++/qeglfs_hooks.cpp | 13 +++++++++++++ 2 files changed, 18 insertions(+) (limited to 'mkspecs') diff --git a/mkspecs/devices/linux-arm-amlogic-8726M-g++/qeglfs_hooks_8726m.cpp b/mkspecs/devices/linux-arm-amlogic-8726M-g++/qeglfs_hooks_8726m.cpp index 06cb424e4f..40fb2a336b 100644 --- a/mkspecs/devices/linux-arm-amlogic-8726M-g++/qeglfs_hooks_8726m.cpp +++ b/mkspecs/devices/linux-arm-amlogic-8726M-g++/qeglfs_hooks_8726m.cpp @@ -92,4 +92,9 @@ void QEglFSHooks::destroyNativeWindow(EGLNativeWindowType window) delete window; } +bool QEglFSHooks::hasCapability(QPlatformIntegration::Capability cap) const +{ + return false; +} + QEglFSHooks platform_hooks; diff --git a/mkspecs/devices/linux-rasp-pi-g++/qeglfs_hooks.cpp b/mkspecs/devices/linux-rasp-pi-g++/qeglfs_hooks.cpp index 2cbd297a90..f17af55947 100644 --- a/mkspecs/devices/linux-rasp-pi-g++/qeglfs_hooks.cpp +++ b/mkspecs/devices/linux-rasp-pi-g++/qeglfs_hooks.cpp @@ -140,4 +140,17 @@ void QEglFSHooks::destroyNativeWindow(EGLNativeWindowType window) delete eglWindow; } +bool QEglFSHooks::hasCapability(QPlatformIntegration::Capability cap) const +{ + switch (cap) { + case QPlatformIntegration::ThreadedPixmaps: + case QPlatformIntegration::OpenGL: + case QPlatformIntegration::ThreadedOpenGL: + case QPlatformIntegration::BufferQueueingOpenGL: + return true; + default: + return false; + } +} + QEglFSHooks platform_hooks; -- cgit v1.2.3 From e60ca0de6015a8ee16c7be54d0d430252ef525c1 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Tue, 10 Apr 2012 22:06:48 -0700 Subject: eglfs: rework hooks design MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There are two problems with the current design: 1. if (hooks) hooks->foo() doesn't work in debug mode when no platform hook is defined. The problem doesn't arise in release mode because the compiler optimizes away the if (hooks) into a no-op since hooks is NULL when no platform hook is defined. 2. Adding a new hook requires changing every platform's hook implementation. New approach: 1. Define QEglFSHooks as a class with virtual functions. A stub file provides the default implementation. 2. Platform hooks derive from above class and reimplement whatever is needed. The filenames and variables have been changed to be more in line with the Qt style. Change-Id: I2eaaa5ad7c8b48a06361c4747d4f210c428c983f Reviewed-by: Samuel Rødal --- .../qeglfs_hooks_8726m.cpp | 100 ------------ .../qeglfshooks_8726m.cpp | 92 +++++++++++ .../devices/linux-arm-amlogic-8726M-g++/qmake.conf | 2 +- mkspecs/devices/linux-rasp-pi-g++/qeglfs_hooks.cpp | 156 ------------------- .../devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp | 169 +++++++++++++++++++++ mkspecs/devices/linux-rasp-pi-g++/qmake.conf | 2 +- 6 files changed, 263 insertions(+), 258 deletions(-) delete mode 100644 mkspecs/devices/linux-arm-amlogic-8726M-g++/qeglfs_hooks_8726m.cpp create mode 100644 mkspecs/devices/linux-arm-amlogic-8726M-g++/qeglfshooks_8726m.cpp delete mode 100644 mkspecs/devices/linux-rasp-pi-g++/qeglfs_hooks.cpp create mode 100644 mkspecs/devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp (limited to 'mkspecs') diff --git a/mkspecs/devices/linux-arm-amlogic-8726M-g++/qeglfs_hooks_8726m.cpp b/mkspecs/devices/linux-arm-amlogic-8726M-g++/qeglfs_hooks_8726m.cpp deleted file mode 100644 index 40fb2a336b..0000000000 --- a/mkspecs/devices/linux-arm-amlogic-8726M-g++/qeglfs_hooks_8726m.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the qmake spec of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qeglfs_hooks.h" -#include -#include -#include -#include -#include -#include -#include - -void QEglFSHooks::platformInit() -{ -} - -void QEglFSHooks::platformDestroy() -{ -} - -EGLNativeDisplayType QEglFSHooks::platformDisplay() const -{ - return EGL_DEFAULT_DISPLAY; -} - -QSize QEglFSHooks::screenSize() const -{ - int fd = open("/dev/fb0", O_RDONLY); - if (fd == -1) { - qFatal("Failed to open fb to detect screen resolution!"); - } - - struct fb_var_screeninfo vinfo; - if (ioctl(fd, FBIOGET_VSCREENINFO, &vinfo) == -1) { - qFatal("Could not get variable screen info"); - } - - close(fd); - - return QSize(vinfo.xres, vinfo.yres); -} - -EGLNativeWindowType QEglFSHooks::createNativeWindow(const QSize &size) -{ - fbdev_window *window = new fbdev_window; - window->width = size.width(); - window->height = size.height(); - - return window; -} - -void QEglFSHooks::destroyNativeWindow(EGLNativeWindowType window) -{ - delete window; -} - -bool QEglFSHooks::hasCapability(QPlatformIntegration::Capability cap) const -{ - return false; -} - -QEglFSHooks platform_hooks; diff --git a/mkspecs/devices/linux-arm-amlogic-8726M-g++/qeglfshooks_8726m.cpp b/mkspecs/devices/linux-arm-amlogic-8726M-g++/qeglfshooks_8726m.cpp new file mode 100644 index 0000000000..6655c50573 --- /dev/null +++ b/mkspecs/devices/linux-arm-amlogic-8726M-g++/qeglfshooks_8726m.cpp @@ -0,0 +1,92 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia 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. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qeglfshooks.h" +#include +#include +#include +#include +#include +#include +#include + +class QEglFS8726MHooks : public QEglFSHooks +{ +public: + virtual QSize screenSize() const; + virtual EGLNativeWindowType createNativeWindow(const QSize &size); + virtual void destroyNativeWindow(EGLNativeWindowType window); +}; + +QSize QEglFS8726MHooks::screenSize() const +{ + int fd = open("/dev/fb0", O_RDONLY); + if (fd == -1) { + qFatal("Failed to open fb to detect screen resolution!"); + } + + struct fb_var_screeninfo vinfo; + if (ioctl(fd, FBIOGET_VSCREENINFO, &vinfo) == -1) { + qFatal("Could not get variable screen info"); + } + + close(fd); + + return QSize(vinfo.xres, vinfo.yres); +} + +EGLNativeWindowType QEglFS8726MHooks::createNativeWindow(const QSize &size) +{ + fbdev_window *window = new fbdev_window; + window->width = size.width(); + window->height = size.height(); + + return window; +} + +void QEglFS8726MHooks::destroyNativeWindow(EGLNativeWindowType window) +{ + delete window; +} + +QEglFS8726MHooks eglFS8726MHooks; +QEglFSHooks *platformHooks = &eglFS8726MHooks; + diff --git a/mkspecs/devices/linux-arm-amlogic-8726M-g++/qmake.conf b/mkspecs/devices/linux-arm-amlogic-8726M-g++/qmake.conf index b0b02f32e6..7525397a65 100644 --- a/mkspecs/devices/linux-arm-amlogic-8726M-g++/qmake.conf +++ b/mkspecs/devices/linux-arm-amlogic-8726M-g++/qmake.conf @@ -31,6 +31,6 @@ QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE deviceSanityCheckCompiler() -EGLFS_PLATFORM_HOOKS_SOURCES = $$PWD/qeglfs_hooks_8726m.cpp +EGLFS_PLATFORM_HOOKS_SOURCES = $$PWD/qeglfshooks_8726m.cpp load(qt_config) diff --git a/mkspecs/devices/linux-rasp-pi-g++/qeglfs_hooks.cpp b/mkspecs/devices/linux-rasp-pi-g++/qeglfs_hooks.cpp deleted file mode 100644 index f17af55947..0000000000 --- a/mkspecs/devices/linux-rasp-pi-g++/qeglfs_hooks.cpp +++ /dev/null @@ -1,156 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the qmake spec of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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, Nokia gives you certain additional -** rights. These rights are described in the Nokia 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qeglfs_hooks.h" - -#include - -#if 0 //fb size query -#include -#include -#include -#include -#include -#include -#endif - -static DISPMANX_DISPLAY_HANDLE_T dispman_display = 0; -static DISPMANX_UPDATE_HANDLE_T dispman_update = 0; - -void QEglFSHooks::platformInit() -{ - bcm_host_init(); -} - -EGLNativeDisplayType QEglFSHooks::platformDisplay() const -{ - dispman_display = vc_dispmanx_display_open(0/* LCD */); - return EGL_DEFAULT_DISPLAY; -} - -void QEglFSHooks::platformDestroy() -{ - vc_dispmanx_display_close(dispman_display); -} - -QSize QEglFSHooks::screenSize() const -{ - //both mechanisms work -#if 1 - uint32_t width, height; - graphics_get_display_size(0 /* LCD */, &width, &height); - return QSize(width, height); -#else - int fd = open("/dev/fb0", O_RDONLY); - if (fd == -1) { - fprintf(stderr, "Failed to open fb to detect screen resolution!\n"); - return QSize(); - } - - struct fb_var_screeninfo vinfo; - if (ioctl(fd, FBIOGET_VSCREENINFO, &vinfo) = -1) { - fprintf(stderr, "Could not query screen info variable\n"); - close(fd); - return QSize(); - } - - close(fd); - - return QSize(vinfo.xres, vinfo.yres); -#endif -} - -EGLNativeWindowType QEglFSHooks::createNativeWindow(const QSize &size) -{ - VC_RECT_T dst_rect; - dst_rect.x = 0; - dst_rect.y = 0; - dst_rect.width = size.width(); - dst_rect.height = size.height(); - - VC_RECT_T src_rect; - src_rect.x = 0; - src_rect.y = 0; - src_rect.width = size.width() << 16; - src_rect.height = size.height() << 16; - - dispman_update = vc_dispmanx_update_start(0); - - VC_DISPMANX_ALPHA_T alpha; - alpha.flags = DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS; - alpha.opacity = 0xFF; - alpha.mask = 0; - - DISPMANX_ELEMENT_HANDLE_T dispman_element = vc_dispmanx_element_add( - dispman_update, dispman_display, 0, &dst_rect, 0, &src_rect, - DISPMANX_PROTECTION_NONE, &alpha, (DISPMANX_CLAMP_T *)NULL, (DISPMANX_TRANSFORM_T)0); - - vc_dispmanx_update_submit_sync(dispman_update); - - EGL_DISPMANX_WINDOW_T *eglWindow = new EGL_DISPMANX_WINDOW_T; - eglWindow->element = dispman_element; - eglWindow->width = size.width(); - eglWindow->height = size.height(); - - return eglWindow; -} - -void QEglFSHooks::destroyNativeWindow(EGLNativeWindowType window) -{ - EGL_DISPMANX_WINDOW_T *eglWindow = static_cast(window); - vc_dispmanx_element_remove(dispman_update, eglWindow->element); - delete eglWindow; -} - -bool QEglFSHooks::hasCapability(QPlatformIntegration::Capability cap) const -{ - switch (cap) { - case QPlatformIntegration::ThreadedPixmaps: - case QPlatformIntegration::OpenGL: - case QPlatformIntegration::ThreadedOpenGL: - case QPlatformIntegration::BufferQueueingOpenGL: - return true; - default: - return false; - } -} - -QEglFSHooks platform_hooks; diff --git a/mkspecs/devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp b/mkspecs/devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp new file mode 100644 index 0000000000..21052a5b63 --- /dev/null +++ b/mkspecs/devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp @@ -0,0 +1,169 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia 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. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qeglfshooks.h" + +#include + +#if 0 //fb size query +#include +#include +#include +#include +#include +#include +#endif + +static DISPMANX_DISPLAY_HANDLE_T dispman_display = 0; +static DISPMANX_UPDATE_HANDLE_T dispman_update = 0; + +class QEglFSPiHooks : public QEglFSHooks +{ +public: + virtual void platformInit(); + virtual void platformDestroy(); + virtual EGLNativeDisplayType platformDisplay() const; + virtual QSize screenSize() const; + virtual EGLNativeWindowType createNativeWindow(const QSize &size); + virtual void destroyNativeWindow(EGLNativeWindowType window); + virtual bool hasCapability(QPlatformIntegration::Capability cap) const; +}; + +void QEglFSPiHooks::platformInit() +{ + bcm_host_init(); +} + +EGLNativeDisplayType QEglFSPiHooks::platformDisplay() const +{ + dispman_display = vc_dispmanx_display_open(0/* LCD */); + return EGL_DEFAULT_DISPLAY; +} + +void QEglFSPiHooks::platformDestroy() +{ + vc_dispmanx_display_close(dispman_display); +} + +QSize QEglFSPiHooks::screenSize() const +{ + //both mechanisms work +#if 1 + uint32_t width, height; + graphics_get_display_size(0 /* LCD */, &width, &height); + return QSize(width, height); +#else + int fd = open("/dev/fb0", O_RDONLY); + if (fd == -1) { + fprintf(stderr, "Failed to open fb to detect screen resolution!\n"); + return QSize(); + } + + struct fb_var_screeninfo vinfo; + if (ioctl(fd, FBIOGET_VSCREENINFO, &vinfo) = -1) { + fprintf(stderr, "Could not query screen info variable\n"); + close(fd); + return QSize(); + } + + close(fd); + + return QSize(vinfo.xres, vinfo.yres); +#endif +} + +EGLNativeWindowType QEglFSPiHooks::createNativeWindow(const QSize &size) +{ + VC_RECT_T dst_rect; + dst_rect.x = 0; + dst_rect.y = 0; + dst_rect.width = size.width(); + dst_rect.height = size.height(); + + VC_RECT_T src_rect; + src_rect.x = 0; + src_rect.y = 0; + src_rect.width = size.width() << 16; + src_rect.height = size.height() << 16; + + dispman_update = vc_dispmanx_update_start(0); + + VC_DISPMANX_ALPHA_T alpha; + alpha.flags = DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS; + alpha.opacity = 0xFF; + alpha.mask = 0; + + DISPMANX_ELEMENT_HANDLE_T dispman_element = vc_dispmanx_element_add( + dispman_update, dispman_display, 0, &dst_rect, 0, &src_rect, + DISPMANX_PROTECTION_NONE, &alpha, (DISPMANX_CLAMP_T *)NULL, (DISPMANX_TRANSFORM_T)0); + + vc_dispmanx_update_submit_sync(dispman_update); + + EGL_DISPMANX_WINDOW_T *eglWindow = new EGL_DISPMANX_WINDOW_T; + eglWindow->element = dispman_element; + eglWindow->width = size.width(); + eglWindow->height = size.height(); + + return eglWindow; +} + +void QEglFSPiHooks::destroyNativeWindow(EGLNativeWindowType window) +{ + EGL_DISPMANX_WINDOW_T *eglWindow = static_cast(window); + vc_dispmanx_element_remove(dispman_update, eglWindow->element); + delete eglWindow; +} + +bool QEglFSPiHooks::hasCapability(QPlatformIntegration::Capability cap) const +{ + switch (cap) { + case QPlatformIntegration::ThreadedPixmaps: + case QPlatformIntegration::OpenGL: + case QPlatformIntegration::ThreadedOpenGL: + case QPlatformIntegration::BufferQueueingOpenGL: + return true; + default: + return false; + } +} + +QEglFSPiHooks eglFSPiHooks; +QEglFSHooks *platformHooks = &eglFSPiHooks; diff --git a/mkspecs/devices/linux-rasp-pi-g++/qmake.conf b/mkspecs/devices/linux-rasp-pi-g++/qmake.conf index 326d6b3b61..4c75e0b0b2 100644 --- a/mkspecs/devices/linux-rasp-pi-g++/qmake.conf +++ b/mkspecs/devices/linux-rasp-pi-g++/qmake.conf @@ -48,7 +48,7 @@ QMAKE_CFLAGS_RELEASE += \ QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -EGLFS_PLATFORM_HOOKS_SOURCES = $$PWD/qeglfs_hooks.cpp +EGLFS_PLATFORM_HOOKS_SOURCES = $$PWD/qeglfshooks_pi.cpp # Sanity check deviceSanityCheckCompiler() -- cgit v1.2.3 From 9cdfeb2b84bcdb4f9dd5060283c0745224a7c58d Mon Sep 17 00:00:00 2001 From: Jason Barron Date: Sat, 31 Mar 2012 12:41:00 +0200 Subject: Change default value of QMAKE_LIBS_OPENGL_ES1 to libGLESv1_CM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The naming convention for these libraries says that libGLES_CM is to be used when EGL is included while libGLESv1_CM should be used when EGL is not included. Since we have a seperate variable for libEGL, it makes sense to have this variable represent the non-EGL version of the library. Change-Id: I9147c116da7be4a296a0ebeac39762b46725f10e Reviewed-by: Oswald Buddenhagen Reviewed-by: Samuel Rødal --- mkspecs/common/linux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mkspecs') diff --git a/mkspecs/common/linux.conf b/mkspecs/common/linux.conf index fd10785079..064d16c359 100644 --- a/mkspecs/common/linux.conf +++ b/mkspecs/common/linux.conf @@ -30,7 +30,7 @@ QMAKE_LIBS_NIS = -lnsl QMAKE_LIBS_EGL = -lEGL QMAKE_LIBS_OPENGL = -lGL QMAKE_LIBS_OPENGL_QT = -lGL -QMAKE_LIBS_OPENGL_ES1 = -lGLES_CM +QMAKE_LIBS_OPENGL_ES1 = -lGLESv1_CM QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 QMAKE_LIBS_OPENVG = -lOpenVG QMAKE_LIBS_THREAD = -lpthread -- cgit v1.2.3 From 0fdd1155e11415b5c085be432f27ef2ead25e4d2 Mon Sep 17 00:00:00 2001 From: Bhooshan Supe Date: Tue, 10 Apr 2012 18:51:42 -0700 Subject: device: Add device support for STMicroelectronic's ST7540 Add mkspec for the STMicroelectronic's ST7540 platform to be used in conjunction with the -device support in configure. This allows you to build Qt with the application libraries provided by STM SDK 36. Change-Id: I4369b23b9a0c9063417e5cc71969f65e967e4019 Reviewed-by: Girish Ramakrishnan --- .../linux-sh4-stmicro-ST7540-g++/qmake.conf | 47 ++++++++++++++++++++++ .../linux-sh4-stmicro-ST7540-g++/qplatformdefs.h | 43 ++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 mkspecs/devices/linux-sh4-stmicro-ST7540-g++/qmake.conf create mode 100644 mkspecs/devices/linux-sh4-stmicro-ST7540-g++/qplatformdefs.h (limited to 'mkspecs') diff --git a/mkspecs/devices/linux-sh4-stmicro-ST7540-g++/qmake.conf b/mkspecs/devices/linux-sh4-stmicro-ST7540-g++/qmake.conf new file mode 100644 index 0000000000..9a99a82ee3 --- /dev/null +++ b/mkspecs/devices/linux-sh4-stmicro-ST7540-g++/qmake.conf @@ -0,0 +1,47 @@ +# +# qmake configuration for linux-g++ using the sh4-linux-g++ crosscompiler +# +# http://wiki.qt-project.org/Devices/ST7540 +# + +MAKEFILE_GENERATOR = UNIX +TARGET_PLATFORM = unix +TEMPLATE = app +CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index +QT += core gui +QMAKE_INCREMENTAL_STYLE = sublib + +include(../../common/linux.conf) +include(../../common/gcc-base-unix.conf) +include(../../common/g++-unix.conf) + +load(device_config) + +isEmpty(CROSS_COMPILE): error("CROSS_COMPILE needs to be set via -device-option CROSS_COMPILE=") + +QMAKE_CC = $${CROSS_COMPILE}gcc +QMAKE_CXX = $${CROSS_COMPILE}g++ +QMAKE_LINK = $${QMAKE_CXX} +QMAKE_LINK_SHLIB = $${QMAKE_CXX} + +QMAKE_AR = $${CROSS_COMPILE}ar cqs +QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy +QMAKE_STRIP = $${CROSS_COMPILE}strip + +deviceSanityCheckCompiler() + +QMAKE_INCDIR_EGL += $$[QT_SYSROOT]/root/modules/include/ +QMAKE_LIBDIR_EGL += $$[QT_SYSROOT]/root/modules/ + +# +# The EGL library used for ST7540 is based on DirectFB so it has to be linked with +# 1. libdirectfb.so 2. libfusion.so 3. libdirect.so +# +QMAKE_LIBS_EGL += -lMali -ldirectfb -lfusion -ldirect + +QMAKE_INCDIR_OPENGL_ES2 += $$QMAKE_INCDIR_EGL +QMAKE_LIBDIR_OPENGL_ES2 += $$QMAKE_LIBDIR_EGL +QMAKE_LIBS_OPENGL_ES2 += $$QMAKE_LIBS_EGL + +load(qt_config) + diff --git a/mkspecs/devices/linux-sh4-stmicro-ST7540-g++/qplatformdefs.h b/mkspecs/devices/linux-sh4-stmicro-ST7540-g++/qplatformdefs.h new file mode 100644 index 0000000000..e246417223 --- /dev/null +++ b/mkspecs/devices/linux-sh4-stmicro-ST7540-g++/qplatformdefs.h @@ -0,0 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia 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. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "../../linux-g++/qplatformdefs.h" + -- cgit v1.2.3 From 8730c333bacd346de7f5ee9fb0b97361384b8f91 Mon Sep 17 00:00:00 2001 From: Bhooshan Supe Date: Tue, 10 Apr 2012 10:02:13 -0700 Subject: device: Add device support for STMicroelectronic's ST7108 Add mkspec for the STMicroelectronic's ST7108 platform to be used in conjunction with the -device support in configure. This allows you to build Qt with the application libraries provided by STM SDK 35. Change-Id: I36aa174200f034ccd6ee285e3f8a8ffec99b3e70 Reviewed-by: Girish Ramakrishnan --- .../linux-sh4-stmicro-ST7108-g++/qmake.conf | 35 ++++++++++++++++++ .../linux-sh4-stmicro-ST7108-g++/qplatformdefs.h | 43 ++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 mkspecs/devices/linux-sh4-stmicro-ST7108-g++/qmake.conf create mode 100644 mkspecs/devices/linux-sh4-stmicro-ST7108-g++/qplatformdefs.h (limited to 'mkspecs') diff --git a/mkspecs/devices/linux-sh4-stmicro-ST7108-g++/qmake.conf b/mkspecs/devices/linux-sh4-stmicro-ST7108-g++/qmake.conf new file mode 100644 index 0000000000..ba8ab28026 --- /dev/null +++ b/mkspecs/devices/linux-sh4-stmicro-ST7108-g++/qmake.conf @@ -0,0 +1,35 @@ +# +# qmake configuration for linux-g++ using the sh4-linux-g++ crosscompiler +# +# http://wiki.qt-project.org/Devices/ST7108 +# + +MAKEFILE_GENERATOR = UNIX +TARGET_PLATFORM = unix +TEMPLATE = app +CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index +QT += core gui +QMAKE_INCREMENTAL_STYLE = sublib + +include(../../common/linux.conf) +include(../../common/gcc-base-unix.conf) +include(../../common/g++-unix.conf) + +load(device_config) + +isEmpty(CROSS_COMPILE): error("CROSS_COMPILE needs to be set via -device-option CROSS_COMPILE=") + +QMAKE_CC = $${CROSS_COMPILE}gcc +QMAKE_CXX = $${CROSS_COMPILE}g++ +QMAKE_LINK = $${QMAKE_CXX} +QMAKE_LINK_SHLIB = $${QMAKE_CXX} + +QMAKE_AR = $${CROSS_COMPILE}ar cqs +QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy +QMAKE_STRIP = $${CROSS_COMPILE}strip + +deviceSanityCheckCompiler() + +QMAKE_LIBS_EGL += -lMali + +load(qt_config) diff --git a/mkspecs/devices/linux-sh4-stmicro-ST7108-g++/qplatformdefs.h b/mkspecs/devices/linux-sh4-stmicro-ST7108-g++/qplatformdefs.h new file mode 100644 index 0000000000..e246417223 --- /dev/null +++ b/mkspecs/devices/linux-sh4-stmicro-ST7108-g++/qplatformdefs.h @@ -0,0 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia 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. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "../../linux-g++/qplatformdefs.h" + -- cgit v1.2.3 From e78424523884f7c0ae48590322c071fb0d19a56b Mon Sep 17 00:00:00 2001 From: Bhooshan Supe Date: Mon, 9 Apr 2012 17:13:23 -0700 Subject: device: Add device support for Trident's Shiner Add mkspec for the Trident's Shiner platform to be used in conjunction with the -device support in configure. This allows you to build Qt Change-Id: I68d8e8eb78f073e98f72207e9c5de6a0da0ed35d Reviewed-by: Girish Ramakrishnan Reviewed-by: Oswald Buddenhagen --- .../linux-arm-trident-pnx8473-g++/qmake.conf | 66 ++++++++++++++++++++++ .../linux-arm-trident-pnx8473-g++/qplatformdefs.h | 43 ++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 mkspecs/devices/linux-arm-trident-pnx8473-g++/qmake.conf create mode 100644 mkspecs/devices/linux-arm-trident-pnx8473-g++/qplatformdefs.h (limited to 'mkspecs') diff --git a/mkspecs/devices/linux-arm-trident-pnx8473-g++/qmake.conf b/mkspecs/devices/linux-arm-trident-pnx8473-g++/qmake.conf new file mode 100644 index 0000000000..fbe6ed100b --- /dev/null +++ b/mkspecs/devices/linux-arm-trident-pnx8473-g++/qmake.conf @@ -0,0 +1,66 @@ +# +# qmake configuration for building with arm-linux-uclibcgnueabi-g++ +# +# http://wiki.qt-project.org/Devices/Shiner +# + +MAKEFILE_GENERATOR = UNIX +TARGET_PLATFORM = unix +TEMPLATE = app +CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index +QT += core gui +QMAKE_INCREMENTAL_STYLE = sublib + +include(../../common/linux.conf) +include(../../common/gcc-base-unix.conf) +include(../../common/g++-unix.conf) + +load(device_config) + +# Sanity checks +isEmpty(TRIDENT_SHINER_SDK_BUILDTREE): error("TRIDENT_SHINER_SDK_BUILDTREE needs to be set via -device-option TRIDENT_SHINER_SDK_BUILDTREE=") +isEmpty(CROSS_COMPILE): error("CROSS_COMPILE needs to be set via -device-option CROSS_COMPILE=") +isEmpty(TRIDENT_SHINER_SDK_BUILDSPEC): error("TRIDENT_SHINER_SDK_BUILDSPEC needs to be set via -device-option TRIDENT_SHINER_SDK_BUILDSPEC=") +isEmpty(TRIDENT_SHINER_SDK_INCDIR_EGL_OPENGL_ES2): error("TRIDENT_SHINER_SDK_INCDIR_EGL_OPENGL_ES2 needs to be set via -device-option TRIDENT_SHINER_SDK_INCDIR_EGL_OPENGL_ES2=") +isEmpty(TRIDENT_SHINER_SDK_LIBDIR_EGL_OPENGL_ES2): error("TRIDENT_SHINER_SDK_LIBDIR_EGL_OPENGL_ES2 needs to be set via -device-option TRIDENT_SHINER_SDK_LIBDIR_EGL_OPENGL_ES2=") + +QMAKE_CC = $${CROSS_COMPILE}gcc +QMAKE_CXX = $${CROSS_COMPILE}g++ +QMAKE_LINK = $${CROSS_COMPILE}g++ +QMAKE_LINK_SHLIB = $${CROSS_COMPILE}g++ + +# +# Usage configure options "-sysroot " with "--prefix=" results into installation of Qt at "". +# Trident Shiner SDK expects all libs to be in "Application file system" which is not +# +# Because of this fact not using "-sysroot " and hence following code is required +# +QMAKE_CFLAGS += --sysroot=$${TRIDENT_SHINER_SDK_BUILDTREE}/open_source_archive/linux/toolchains/gcc-4.5.2_uclibc/ +QMAKE_CXXFLAGS += --sysroot=$${TRIDENT_SHINER_SDK_BUILDTREE}/open_source_archive/linux/toolchains/gcc-4.5.2_uclibc/ +QMAKE_LFLAGS += --sysroot=$${TRIDENT_SHINER_SDK_BUILDTREE}/open_source_archive/linux/toolchains/gcc-4.5.2_uclibc/ + +# Compiler Sanity check +deviceSanityCheckCompiler() + +QMAKE_CFLAGS_RELEASE = -O2 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE + +# modifications to linux.conf +QMAKE_AR = $${CROSS_COMPILE}ar cqs +QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy +QMAKE_STRIP = $${CROSS_COMPILE}strip + +QMAKE_INCDIR += $${TRIDENT_SHINER_SDK_BUILDTREE}/target/output/objs/$${TRIDENT_SHINER_SDK_BUILDSPEC}/comps/generic_apps/usr/include +QMAKE_LIBDIR += $${TRIDENT_SHINER_SDK_BUILDTREE}/target/output/objs/$${TRIDENT_SHINER_SDK_BUILDSPEC}/comps/generic_apps/usr/lib +QMAKE_LIBDIR += $${TRIDENT_SHINER_SDK_BUILDTREE}/target/output/objs/$${TRIDENT_SHINER_SDK_BUILDSPEC}/comps/generated/lib/armgnu_linux_el_cortex-a9 + +QMAKE_INCDIR_EGL = $${TRIDENT_SHINER_SDK_INCDIR_EGL_OPENGL_ES2} +QMAKE_LIBDIR_EGL = $${TRIDENT_SHINER_SDK_LIBDIR_EGL_OPENGL_ES2} + +QMAKE_INCDIR_OPENGL_ES2 = $${TRIDENT_SHINER_SDK_INCDIR_EGL_OPENGL_ES2} +QMAKE_LIBDIR_OPENGL_ES2 = $${TRIDENT_SHINER_SDK_LIBDIR_EGL_OPENGL_ES2} + +QMAKE_LIBS_EGL = -lEGL -lIMGegl -lsrv_um -lusc +QMAKE_LIBS_OPENGL_ES2 = $$QMAKE_LIBS_EGL -lGLESv2 -lGLES_CM + +load(qt_config) diff --git a/mkspecs/devices/linux-arm-trident-pnx8473-g++/qplatformdefs.h b/mkspecs/devices/linux-arm-trident-pnx8473-g++/qplatformdefs.h new file mode 100644 index 0000000000..e246417223 --- /dev/null +++ b/mkspecs/devices/linux-arm-trident-pnx8473-g++/qplatformdefs.h @@ -0,0 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia 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. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "../../linux-g++/qplatformdefs.h" + -- cgit v1.2.3 From 01b54bcd84d9a2129f2db4fe03a5f331f9eec203 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 16 Mar 2012 22:50:30 +0100 Subject: device: Introduce hooks for the directfb plugin and use them The EGL integration is vendor specific, add platform hooks to the DirectFB plugin and implement them for the Broadcom 97425. The hook interface is internal and there are no ABI/API gurantees. Change-Id: I33359830c51f16895e771837fccb71e03c81cf18 Reviewed-by: Girish Ramakrishnan --- .../qdirectfbeglhooks_bcm97425.cpp | 71 ++++++++++++++++++++++ .../linux-mipsel-broadcom-97425-g++/qmake.conf | 4 ++ 2 files changed, 75 insertions(+) create mode 100644 mkspecs/devices/linux-mipsel-broadcom-97425-g++/qdirectfbeglhooks_bcm97425.cpp (limited to 'mkspecs') diff --git a/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qdirectfbeglhooks_bcm97425.cpp b/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qdirectfbeglhooks_bcm97425.cpp new file mode 100644 index 0000000000..16aee0c4f7 --- /dev/null +++ b/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qdirectfbeglhooks_bcm97425.cpp @@ -0,0 +1,71 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia 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. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qdirectfbeglhooks.h" +#include "qdirectfbconvenience.h" + +#include "default_directfb.h" + +// Exported to the directfb plugin +QDirectFBEGLHooks platform_hook; +static void *dbpl_handle; + +void QDirectFBEGLHooks::platformInit() +{ + DBPL_RegisterDirectFBDisplayPlatform(&dbpl_handle, QDirectFbConvenience::dfbInterface()); +} + +void QDirectFBEGLHooks::platformDestroy() +{ + DBPL_UnregisterDirectFBDisplayPlatform(&dbpl_handle); + dbpl_handle = 0; +} + +bool QDirectFBEGLHooks::hasCapability(QPlatformIntegration::Capability cap) const +{ + switch (cap) { + case QPlatformIntegration::ThreadedOpenGL: + return true; + default: + return false; + } +} + diff --git a/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qmake.conf b/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qmake.conf index 866fad639b..ced323feba 100644 --- a/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qmake.conf +++ b/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qmake.conf @@ -62,4 +62,8 @@ DIRECTFB_LIBS = -L$${BRCM_APPLIBS_PATH}/opensource/directfb/bin/Direct QMAKE_LFLAGS += -Wl,-rpath-link,$$QMAKE_LIBDIR_OPENGL_ES2 -Wl,-rpath-link,$${BRCM_APPLIBS_PATH}/opensource/zlib/zlib-1.2.3 +# DirectFB platform hooks for this hardware +QT_CONFIG += directfb_egl +DIRECTFB_PLATFORM_HOOKS_SOURCES = $$PWD/qdirectfbeglhooks_bcm97425.cpp + load(qt_config) -- cgit v1.2.3 From 19524b7499c0a4b6f66d4797f04f06e140234149 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 28 Feb 2012 10:00:32 +0100 Subject: directfb: Integrate building into configure. Add DirectFB buildsystem integration by adding a configure target and adding it as subdirectory to the project file. The default is to automatically build directfb. Update the Broadcom/9425 build. Change-Id: I482f865cebd9d5cd4c98c184773f8534f92db9df Reviewed-by: Girish Ramakrishnan --- mkspecs/devices/linux-mipsel-broadcom-97425-g++/qmake.conf | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qmake.conf b/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qmake.conf index ced323feba..e69a3cee4b 100644 --- a/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qmake.conf +++ b/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qmake.conf @@ -55,15 +55,13 @@ QMAKE_LIBS_OPENGL_ES2 = -lv3ddriver -lrt INCLUDEPATH += $${BRCM_APPLIBS_PATH}/opensource/zlib/zlib-1.2.3 QMAKE_LIBDIR += $${BRCM_APPLIBS_PATH}/opensource/zlib/zlib-1.2.3 -# DirectFB, needs to be changed once -directfb is added to configure -DIRECTFB_INCLUDEPATH = $${BRCM_APPLIBS_PATH}/opensource/directfb/bin/DirectFB-1.4.15_multi_$${BRCM_BUILD_TYPE}_build.97425B1/usr/local/include/directfb $${BRCM_ROCKFORD_PATH}/middleware/platform/directfb -DIRECTFB_LIBS = -L$${BRCM_APPLIBS_PATH}/opensource/directfb/bin/DirectFB-1.4.15_multi_$${BRCM_BUILD_TYPE}_build.97425B1/usr/local/lib -L$${BRCM_ROCKFORD_PATH}/middleware/platform/directfb/lib_$${BRCM_PLATFORM}_$${BRCM_BUILD_TYPE} -ldirectfb -lfusion -ldirect -lpthread -lnexus -ldbpl -lz - - QMAKE_LFLAGS += -Wl,-rpath-link,$$QMAKE_LIBDIR_OPENGL_ES2 -Wl,-rpath-link,$${BRCM_APPLIBS_PATH}/opensource/zlib/zlib-1.2.3 # DirectFB platform hooks for this hardware QT_CONFIG += directfb_egl DIRECTFB_PLATFORM_HOOKS_SOURCES = $$PWD/qdirectfbeglhooks_bcm97425.cpp +DIRECTFB_PLATFORM_HOOKS_INCLUDEPATH = $${BRCM_ROCKFORD_PATH}/middleware/platform/directfb +DIRECTFB_PLATFORM_HOOKS_LIBS = -ldbpl +DIRECTFB_PLATFORM_HOOKS_LIBDIR = $${BRCM_ROCKFORD_PATH}/middleware/platform/directfb/lib_$${BRCM_PLATFORM}_$${BRCM_BUILD_TYPE} load(qt_config) -- cgit v1.2.3