summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/directfb/qdirectfbintegration.cpp
Commit message (Collapse)AuthorAgeFilesLines
* port to modularized platformsupport librariesOswald Buddenhagen2016-10-151-3/+3
| | | | | Change-Id: I20eb0e33abfd70b6a5240e7b6b0aa0425f2d2ee7 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* DirectFB Provide a native interfaceAndy Nichols2014-08-251-0/+5
| | | | | | | | Using the same multiple inheiritance that is used in the EGLFS platform plugin. Change-Id: I016f904bfc365bec6266c3f5d638ab15ecefe63b Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* DirectFB Add QGenericUnixServices and inputContextAndy Nichols2014-08-251-0/+10
| | | | | | | | The DirectFB platform plugin was missing support for services and inputContext. Change-Id: I010fdcbed5e172b019b4dce79f3beea0f9c5025d Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* DirectFB define platform integration capabilitiesAndy Nichols2014-08-151-0/+13
| | | | | | | | Make sure that the DirectFB plugin defines that it is capable of using Threaded Pixmaps, Multiple Windows, and OpenGL when available. Change-Id: I68a0a69568af8e00e47cd2c59bbf6a301df6ec34 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* directfb: fix QThread destroyed while runningLucile Quirion2014-06-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | Commit cf092abdfc888f19a607a43c9b4bac776b5c1f8e introduces a virtual "void initialize()" in QPlatformIntegration class. "void initialize()" was already implemented in QDirectFbIntegration since commit 6534898cc69e22115cf158f71a1e0edd7f13877b allowing initialization steps to be overridden by QDirectFbIntegrationEGL. Therefore the QScopePointer "m_input" handling a QThread is reset twice. The QThread firstly created is forcibly terminated. The application displays the error message "QThread: Destroyed while thread is still running" and sometimes crash with a SIGSEGV. This commit rename QDirectFbIntegration::initialize() into QDirectFbIntegration::connectToDirectFb() to fix this issue. Task-number: QTBUG-38710 Change-Id: I3ca07c373af7c47abf08da2b45bbcf7a6cf573ad Reviewed-by: Holger Freyther <holger+qt@freyther.de> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* QPA: Fix semantics of GUI event dispatcher ownership in platform pluginsTor Arne Vestbø2013-09-301-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The QPlatformIntegration::guiThreadEventDispatcher() function acted as an accessor to event dispatchers created in the constructor of each platform plugin, but the logic and semantics of event-dispatcher handling in Qt itself (QCoreApplication/QGuiApplication) still assumed both ownership and control over the event dispatcher, such as when to create one, which one to create, and when to delete it. This conflicted with the explicit calls in the platform plugins to QGuiApplication::setEventDispatcher(), as well as left a possibility that the event-dispatcher created by the platform plugin would never be deleted, as none of the platform plugins actually took full ownership of the dispatcher and deleted it in its destructor. The integration function has now been renamed back to its old name, createEventDispatcher(), and acts as a factory function, leaving the logic and lifetime of event dispatcher to QtCoreApplication. The only platform left with creating the event-dispatcher in the constructor is QNX, where other parts of the platform relies on having an event-dispatcher before their initialization. We then need to manually take care of the ownership transfer, so that the event-dispatcher is still destroyed at some point. Change-Id: I113db97d2545ebda39ebdefa865e488d2ce9368b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* directfb: Allow a window subclass to allocate a different kind of surfaceHolger Hans Peter Freyther2012-05-301-1/+3
| | | | | | | | | | | | A subclass of QDirectFbWindow might need to allocate a window with different surface flags. This is the case for the DirectFB EGL plugin and QSurface::OpenGLSurface type of surfaces. Add createDirectFBWindow, make it virtual and call it from the platform integration classes. Add an assert to verify that this method is only called once. Remove the pre DirectFb 1.1 code as it was never really tested. Change-Id: Icf3d262f40bca70e376043935eeb292958f6df5d Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Expose QPA API under qpa/*Girish Ramakrishnan2012-05-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main reasons for doing this are: 1. _qpa.h end up in the master QtGui include file. QtGui is meant for userland applications. qpa code is neither binary nor source compatible. Inadvertant use of QPA api makes the user code binary-incompatible. 2. syncqt creates forwarding headers for non-private header files. This gives people the impression that this is public API. As discussed on the mailing list, even though QPA api is internal and subject to change, it needs to treated differently from private headers since they will be used by in-qtbase and out-of-qtbase plugins. This commit does the following: 1. The _qpa in QPA header files is dropped. 2. syncqt now treats any file with qplatform prefix as a special file and moves it to qpa/ directory. The recommended way of using QPA API in plugins is: #include <qpa/qplatformfoo.h>. This allows the user include QPA API from multiple modules (for example, qplatformfoo might be in QtPrintSupport) 3. The user needs to explicitly add QT += <module>-private to get access to the qpa api. 4. Creates compat headers for the olden style qplatformfoo_qpa.h and QPlatformFoo includes. This commit does not change the cpp filenames. This requires a more careful merging of existing non qpa cpp files and existing cpp files on a case by case basis. This can be done at anytime. The following files are not renamed as part of this changed but will be fixed as part of a future change: src/gui/kernel/qgenericpluginfactory_qpa.h src/gui/kernel/qgenericplugin_qpa.h src/gui/kernel/qwindowsysteminterface_qpa.h files were renamed using for x in `find . -name "qplatform*_qpa.h"`; do git mv $x "${x/_qpa.h/.h}"; done for x in `find . -name "qplatform*_qpa_p.h"`; do git mv $x "${x/_qpa_p.h/_p.h}"; done includes were renamed using script for file in `find . -name "*.h" -or -name "*.cpp" -or -name "*.mm"`; do sed -i -e 's,.*#.*include.*<\(Qt.*/\)\?\(QPlatform.*\)>,#include <qpa/\L\2.h>,g' \ -e 's,.*#.*include.*"\(Qt.*/\)\?\(QPlatform.*\)",#include <qpa/\L\2.h>,g' \ -e 's,.*#.*include.* "\(qplatform.*\)_qpa.h",#include <qpa/\L\1.h>,g' \ -e 's,.*#.*include.*"\(qplatform.*\)_qpa_p.h",#include <qpa/\L\1_p.h>,g' \ -e 's,.*#.*include.*<\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)>,#include <qpa/\2\3>,g' \ -e 's,.*#.*include.*"\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)",#include <qpa/\2\3>,g' \ $file done Change-Id: I04a350314a45746e3911f54b3b21ad03315afb67 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* directfb: Introduce EGL integration for DirectFBHolger Hans Peter Freyther2011-12-021-0/+16
| | | | | | | | | | | | Introduce a new platform called 'directfbegl' that allows platform integration with EGL. Change the QDirectFbIntegration to make it more easy to hook up in the creation process, introduce an EGL integration with custom screen, window and EGL Platform Context. Vendors might need to add custom code to initialize EGL to be used with DirectFB, this can be done in QDirectFbScreenEGL::platformInit. Change-Id: I7bee277ede27c72437cd7c5977fa6ed85e65f538 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* directfb: Remove dfbDisplayLayer from QDirectFbInputHolger Hans Peter Freyther2011-11-241-1/+1
| | | | | Change-Id: I2ae61c40c28b337448077cff5643a007b54a3d71 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* directfb: Move QDirectFbScreen into a separate fileHolger Hans Peter Freyther2011-11-241-19/+0
| | | | | | | | The screen handling will get a bit more complex due the integration of different ways to do OpenGL. Move to a new file. Change-Id: Ibe3e397d13da1b270ec4afaf046d28be50e976f9 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* [directfb] Manage the font database with a QScopedPointerHolger Hans Peter Freyther2011-10-211-1/+1
| | | | | | | Attempt to fix a memory leak on exit by deleting the font database. Change-Id: I07b0865c97bb8ef26950bf231b5239ca01e95c56 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* directfb: Initialize m_dfb after DirectFBInit has been calledHolger Hans Peter Freyther2011-10-211-2/+4
| | | | | | | | | | The QDirectFBIntegration is responsibe for deleting the DirectFB instance but it can only initialize the DirectFB instance after the DirectFBInit has been called. Change the order. This issue got introduced by myself in 3faa89f4. Change-Id: Ia67d439152d895e2e0a47f35eed57348c629f79f Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* [directfb] Introduce the QDirectFBPointer from QWS/gfxdriversHolger Hans Peter Freyther2011-10-211-8/+7
| | | | | | | | | | Introduce QDirectFBPointer and use it throughout the code to fix various resource leaks in the DirectFB backend. Fix the surface ownership of the IDirectFBSurface in the Blittable/BackingStore code. Change-Id: I0d4572eaab80b3558e644f26d76222461bf37bbb Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* [directfb] Make QDirectFBInput a QThread to allow proper exitsHolger Hans Peter Freyther2011-10-211-6/+3
| | | | | | | | | | | | | | | | Without this patch the application will get stuck waiting for the IDFBEventBuffer to report an event. We will use the IDFBEventBuffer::WakeUp function to interrupt the waiting but this produces the below error on exit: QEventLoop: Cannot be used without QApplication QThread: Destroyed while thread is still running This is solved by making the QDirectFBInput a QThread, reimplement the run() method to handle the events. It should work as this is only posting events to the QApplication event loop. Change-Id: I24adf2b080f96c72ede6a5499f484ac33fdd44fc Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* [directfb] Use QScopedPointer to manage heap allocated objectsHolger Hans Peter Freyther2011-10-211-14/+7
| | | | | | | | | | | Use QScopedPointer to avoid trying to manually delete objects. For some of the cases the leak would only be viewable when things are getting shut down. Leave in some more warnings for cleaning it up, e.g. the m_eventBuffer of the Input is leaked and the input task will only stop after another key event. Change-Id: Ic54568343605b4ab7094a7dece40e22250184a37 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* [directfb] Fix memory leak when passing arguments to directFBHolger Hans Peter Freyther2011-10-211-0/+3
| | | | | | | We need to delete the array but also the elements inside it. Change-Id: Ib61beeca569802638b9ff3b94ede79c0beebb399 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* [directfb] Rename class from WindowSurface to BackingStoreHolger Hans Peter Freyther2011-10-211-2/+2
| | | | | | | | Catch up with the naming by renaming the file from windowsurface to backingstore, update the class names and include files. Change-Id: I1b16826b60c19490946a77f61518e18f8099adce Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Improved logical and physical DPI APIs.Samuel Rødal2011-10-061-1/+1
| | | | | | | | | | | | | | Made physicalSize() return QSizeF instead, to prevent rounding errors. Added logicalSize() as the base to compute font pixel sizes instead, and added convenience functions in QScreen to access the logical and physical sizes and DPI metrics. Task-number: QTBUG-21736 Task-number: QTBUG-21737 Change-Id: Ic705dc98eb3632617659e65a0c9a552673dc0c65 Reviewed-on: http://codereview.qt-project.org/5888 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* directfb: Follow coding standards, add hints of memleaks, remove varsHolger Hans Peter Freyther2011-08-261-16/+17
| | | | | | | | | Use m_ for all member variables, document some classes that appear to lack proper destruction, remove unused variables from classes. Change-Id: Icec451149fa5d562d8d5f54cbe9a1aa1518bfc48 Reviewed-on: http://codereview.qt.nokia.com/3667 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* directfb: Convert the directfb plugin, disable the OpenGL supportHolger Hans Peter Freyther2011-08-261-11/+13
| | | | | | | | | | OpenGL was never tested and the platform integration has changed, remove it from the build and re-enable it once one can test it. Change-Id: I70d5b5b11de06e6e999d3aae44660f11d2dbc719 Reviewed-on: http://codereview.qt.nokia.com/3666 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Rename QPixmapData to QPlatformPixmap.Samuel Rødal2011-07-191-5/+5
| | | | | | | | | Makes the API symmetric with the other Lighthouse APIs. Change-Id: I8a399f3c968ea35d4624711b31f2ac5bb94b7893 Reviewed-on: http://codereview.qt.nokia.com/1735 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Add lighthouse event dispatcher API.Morten Sorvig2011-06-221-1/+8
| | | | | | | | | | Platform plugin creation is now moved forward in order to have a platform plugin instance at event dispatcher creation time. Plugins are now responsible for implementing PlatformIntegration::createEventDispatcher and returning an QAbstractEventDispatcher subclass.
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+144
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12