summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/kms
Commit message (Collapse)AuthorAgeFilesLines
* KMS platform plugin: Introduce default cursor for better usability.Samuel Rødal2012-05-301-0/+8
| | | | | | | | Similar to the default cursor in eglfs, not having it makes it hard to interact with Qt applications using the evdevmouse plugin. Change-Id: I9638267c7d790d91b66620e4a82d86f299061922 Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* Fixed KMS y-invertedness.Samuel Rødal2012-05-2912-447/+177
| | | | | | | Upgrade to new gbm_surface API which lets us use eglCreateWindowSurface. Change-Id: I4af86d442375017ae3b4744e7b3bdebf3b496b6e Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* Compile fix for kms platform plugin.Samuel Rødal2012-05-242-1/+2
| | | | | Change-Id: Ieed141c390920d118f8bb34fa884574ba308d23e Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* Compile fix for kms plugin.Samuel Rødal2012-05-091-1/+0
| | | | | | Change-Id: I0ad9716273a7beb643fab5fafc7fcf4884c8a364 Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Expose QPA API under qpa/*Girish Ramakrishnan2012-05-078-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QPA plugins]Thiago Macieira2012-05-041-2/+2
| | | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: I4aef078ea87ecd3699de107d1e9352d9fb6d6e39 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Use the new udev based framework for detecting graphics cards.Hannu Lyytinen2012-04-135-17/+157
| | | | | | | | Get rid of hard coded device node and support any number of graphics cards. Change-Id: I50f07fb1e6ea321a4ae751db8fb49ab439dce51e Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* Implement basic bits for device autodetection via udev.Hannu Lyytinen2012-04-135-3/+305
| | | | | | | | | The graphics cards and eventually the input devices need to be resolved via udev. This commit adds a listener class and an abstract base class for writing device specific handlers. Change-Id: I62784c98bc7ad4bc1431d61cd5f13c8b48edf330 Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* Add support for QPlatformNativeInterface.Hannu Lyytinen2012-04-115-3/+188
| | | | | | | Initial bits to enable figuring out the EGL display and context. Change-Id: I4b578e356dceb40b4456f0590d32c8df1f51fa53 Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* Use correct framebuffer object.Hannu Lyytinen2012-04-112-0/+9
| | | | | | | | KMS plugin deals with FBO IDs not equal to zero (the default FBO), so return the correct ID. Change-Id: I904fc0b8d732f856b4526bd7f73cc48c358c8441 Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* Release the EGL context after initialization.Hannu Lyytinen2012-04-111-0/+2
| | | | | | | | Threaded applications like qmlscene could not bind the EGL context if the context is already bound in the other thread. Change-Id: Ia75ef9e76ebff48aa2c9b348101ab2f388e18c5e Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* Use the new plugin system in the KMS plugin.Hannu Lyytinen2012-04-113-16/+14
| | | | | | | Sync up the KMS QPA plugin with the plugin system changes. Change-Id: Ifaa8be6f11aeb93acc63643c62ca15db4e9bc38f Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* misc: Fix some random typos and grammar while reading code.Holger Hans Peter Freyther2012-03-091-1/+1
| | | | | | | | | | | | Typos: recieve -> receive descrived -> describe Grammar: this types -> these types Change-Id: Iedacc51a6322996f423ac9472af0a597424a4fed Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* QCursor: Associate cursor with screen.Friedemann Kleint2012-03-073-1/+7
| | | | | | | | | | | | | | | | | | | | | | - Introduce cursor() accessor to QPlatformScreen. - Remove screen member of QPlatformCursor (a cursor can be shared by multiple screens of a virtual desktop). - Add QCursor::pos()/ QCursor::setPos() taking a QScreen-parameter, use primaryScreen() for old overloads. QCursor::pos() can then query the platform cursor for the position and return the position even if the mouse position is outside the windows owned by the Qt application. - Fix tests Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Task-number: QTBUG-22457 Task-number: QTBUG-22565 Task-number: QTBUG-20753 Change-Id: Ia69f37343f95772e934eab1cd806bd54cbdbbe51 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-3017-17/+17
| | | | | | | | | | 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-2317-17/+17
| | | | | | | 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-0517-17/+17
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove QPlatformPrinterSupport usageJohannes Zellner2011-11-292-9/+0
| | | | | | | QPlatformPrinterSupport seems to not exist anymore. Change-Id: I142ce99877620e0b678fd6693bc72257ca230e4f Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Improved logical and physical DPI APIs.Samuel Rødal2011-10-062-4/+4
| | | | | | | | | | | | | | 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>
* Copy core GL functionality to QtGui with QGL -> QOpenGL naming.Samuel Rødal2011-08-294-7/+7
| | | | | | Change-Id: Ibc989afa4a30dd184d41d1a1cd89f97196e48855 Reviewed-on: http://codereview.qt.nokia.com/3710 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Introduce new platform capability ThreadedOpenGL.Samuel Rødal2011-08-261-0/+1
| | | | | | | | | | | | | Lets the platform plugin advertise whether it's safe to use OpenGL from a different thread. With XCB we only advertise this if we have a reasonably new XCB libary, as older versions suffer from the xcb_wait_for_reply() blocking bug, which cause GL rendering in a separate to stall when using Mesa drivers. Change-Id: I4829df7e583a1c8aed218ae13a159d21266cc594 Reviewed-on: http://codereview.qt.nokia.com/3613 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Initial support for Qt using Kernel Mode-setting (KMS)Andy Nichols2011-08-0418-0/+1864
This platform plugin supports fullscreen OpenGLES2 windows on devices that support Kernel Mode-setting. Change-Id: I7d4077319654c13851f0ff7ec0228b7b13936382 Reviewed-on: http://codereview.qt.nokia.com/2516 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>