summaryrefslogtreecommitdiffstats
path: root/src/platformsupport
Commit message (Collapse)AuthorAgeFilesLines
* Fix launching with depth 30 XOrgAllan Sandfeld Jensen2018-10-142-7/+40
| | | | | | | | Our fallback logic for inexact matches was not very good at accepting better suggestions. Change-Id: I40fb78bf583171105725156148e4a2245fb81354 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* glib dispatcher: rework userEventSourcePrepare() event sourceGatis Paeglis2018-10-141-5/+3
| | | | | | | | | | | | | | | | | | | | | | | This is a better solution for fbb485d4f6985643b27da3cc6c5b5f960c32e74d. The existing solution was working fine, but it was exposing logic that is internal to QWindowSystemInterface and platform plugin interaction. Some platform plugins do event filtering at native event level - those that support QAbstractEventDispatcher::filterNativeEvent(). Other plugins rely on QWindowSystemInterface to do the filtering. Dispatchers should not care about this. The new logic rely on the fact that QWindowSystemInterfacePrivate::handleWindowSystemEvent calls QAbstractEventDispatcher::wakeUp(). The same way postEventSourcePrepare() rely on QCoreApplication::postEvent() to call QAbstractEventDispatcher::wakeUp(). Event sources run in the order they are attached, postEventSourcePrepare runs before userEventSourcePrepare(). We rely on that order to pass wakeUpCalled value. Change-Id: I0327f4f2398fd863fb2421b8033bb1df8d65f5af Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Revert "glib dispatcher: ensure all window system events are flushed"Gatis Paeglis2018-10-122-2/+57
| | | | | | | | | | | | | | | | | | | This reverts commit 341bfcd1eaa9116c143e3b7d3219ef04c7b8a0cb. As it turns out there might be use cases where we want to have proper windowing system event integration with glib dispatcher via g_source_attach(). For example with gtk_dialog_run, where GTK blocks in a recursive main loop. We want to continue dispatcing our windowing system events during this nested event loop. Not having a proper glib integration can result in rendering issues, e.g. when resizing parent window via mouse while GTK-based dialog is shown. Can be seen on examples/widgets/richtext/textedit/ -> Format (from menu) -> "Color..." The issue from 341bfcd1eaa actually should be fixed inside XCB platform plugin, by improving integration with event dispatcher. That is handled in follow-up patches. Change-Id: Icabc6d841a554aefbdd460765a3165d22e65f651 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-10-081-1/+1
|\ | | | | | | | | | | | | Conflicts: src/corelib/tools/qtimezoneprivate.cpp Change-Id: Icbb5999d378711ce3786a4fe0aba176a45ac702c
| * Fix DejaVu fonts URLSergio Martins2018-10-061-1/+1
| | | | | | | | | | | | | | | | http://dejavu-fonts.org is something else nowadays Change-Id: Idb03b864fb145b016ce4ae1a2f0df02ff80280a8 Reviewed-by: Rolland Dudemaine <rolland.dudemaine@esol.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Fix font weights on macOS 10.14Eskil Abrahamsen Blomfeldt2018-09-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On later versions of macOS, the font weight trait of fonts is a 64 bit double, not a 32 bit float, and on macOS 10.14, CFNumberGetValue() started returning false for values when the type conversion is lossy, like it is documented to. Therefore, we would end up without weight information in 10.14. The fix is to ask for a double instead, which works regardless of whether the CFNumber represents a 32-bit or 64-bit value. [ChangeLog][macOS][Text] Fixed font weights on macOS 10.14 Task-number: QTBUG-69955 Change-Id: Ia0577236ddc6b96f9231e6de7b1c49f7f8a837a6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Jason Haslam <jason@scitools.com>
* | Windows code: Fix to prefer ranged-for, as clang-tidy advisesFriedemann Kleint2018-09-021-1/+1
| | | | | | | | | | | | | | Change-Id: Id9bb21855ae832cdbbc456326226ec72b634672e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Make flatpak portal support to be used also by Snap applicationsJan Grulich2018-09-021-12/+12
| | | | | | | | | | | | | | | | | | Snap now uses xdg-desktop-portal for portal support. Add check for apps running in Snap and make them use portals by default. We also should be using different name for the platform theme used by sandboxed apps. Change-Id: Ibaa35b7549b3d94775d7edb937f729a300d071b6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Windows code: Fix clang-tidy warnings about (private) class definitionsFriedemann Kleint2018-09-025-7/+10
| | | | | | | | | | | | | | | | | | | | | | Add override, disable copies where appropriate and use = default for trivial functions. Change-Id: Ia5bc7419b1aa053c5503ea7dfaf11cb6dfafd2e2 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Windows: Check Pointer messages in MessageDebugEntryAndre de la Rocha2018-09-011-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | Some Pointer Input messages are defined only for Windows 10 and new versions of the Windows SDK and could break compilation with older SDKs. Currently, they are not used anywhere outside of the MessageDebugEntry debug function. Checking if they are defined before using. Change-Id: I5fc7bb8e52ab8aca66bb21084289ab8938938063 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Windows code: Fix clang-tidy warnings about C-style castsFriedemann Kleint2018-08-302-6/+7
| | | | | | | | | | | | | | | | | | | | | | Replace by reinterpret_cast or const_cast, respectively. Use auto when initializing a variable to fix Clang warnings about repeating the type name, do minor tidying along the way, and a few conversions of 0 or NULL to nullptr. Change-Id: Ieb271a87ddcf064f536e1ff05d23b1e688b1b56a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Windows Font databases: Rename struct FontNames to QFontNamesFriedemann Kleint2018-08-283-12/+13
| | | | | | | | | | | | | | | | | | Prefix by Q to unclutter the namespace in static builds. Amends 9204b8c31ea1b5f0c05870c5b5d74c33b1a4f622 Task-number: QTBUG-53458 Change-Id: I1448cd944b6a3262b9cfa9f5c3fbab17c1c5c71c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | macOS: Take application appearance into account when drawing glyphsTor Arne Vestbø2018-08-241-3/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | macOS 10.14 uses a new font smoothing algorithm that takes the fill color into account. This means our default approach of drawing white on black to produce the alpha map will result in non-native looking text when then drawn as black on white during the final blit. As a workaround we use the application's current appearance to decide whether to draw with white or black fill, and then invert the glyph image in the latter case, producing an alpha map. This covers the most common use-cases, but longer term we should propagate the fill color all the way from the paint engine, and include it in the key for the glyph cache. At the moment we do not react to changes in the application appearance, as that seems to be buggy in general in Qt (palette/style, e.g.), and those bugs need to be weeded before we can react to the theme change with confidence. Task-number: QTBUG-68824 Change-Id: Ibbfd49fcf3a091e454009c08159f46b3499e2bd0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Modernize the "thread" featureUlf Hermann2018-08-173-26/+0
| | | | | | | | | | | | | | | | | | | | Add it to configure.json and replace all occurrences of QT_NO_THREAD with QT_CONFIG(thread). Add conditions for other features that depend on thread support. Remove conditions where we can use the QMutex and QThreadStorage stubs. Change-Id: I284e5d794fda9a4c6f4a1ab29e55aa686272a0eb Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Remove forward declaration of non existing classJędrzej Nowacki2018-08-071-3/+0
| | | | | | | | | | | | | | | | QUnixEventDispatcherQPA has no private class, there is no need to declare a fake one. Change-Id: I615304709fbbea83f6747bb6202dbfd2cc03256d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Move the createUnixEventDispatcher() function to a namespaceThiago Macieira2018-08-032-1/+4
| | | | | | | | | | | | | | | | Easier than renaming it with a "qt_" prefix everywhere it's used (it's in a lot of plugins). Change-Id: Ie01831ddac5446fdbdeefffd15468918f3bc2238 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Minor grammar fixupFrederik Gladhorn2018-08-031-1/+1
| | | | | | | | | | | | Change-Id: I528a2b2d8e9734bf5c00948a78369f4e89af16fc Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Fix EDID vendor table generation script: source git repo is goneFrederik Gladhorn2018-08-031-1/+1
| | | | | | | | | | | | | | | | | | fedorahosted seems to be gone and I didn't find a better source for the data. Change-Id: Ifb02b9833a735bab4aff2dc7a6db46aedd567583 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Keep EDID pnp IDs sortedFrederik Gladhorn2018-08-031-2146/+2146
| | | | | | | | | | | | | | | | | | In Python 3.6 the sorting comes for free, since dict keeps the insertion order, but adding sorted means older Python versions behave the same. Change-Id: I3ac4c0f5c3739cb8b284c8a02c4a96b5f41b2286 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* | Fix manufacturer parsing from EDIDFrederik Gladhorn2018-08-031-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | The code was quite dubious, in the edid data, the manufacturer is encoded with a three letter shortcut. In addition it can be set by the extra data strings, which is not often the case. We would randomly overwrite the identifier string, so clearly separate the pnpId (3 letter ID) out and use the fallback table we have. Also looking up the manufacturer string twice is pointless (contains and then operator[]). Change-Id: I18882a78d69b9f3dfc2af31e646ded44f2b70a50 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Fix EDID parsing: strings can be 13 bytesFrederik Gladhorn2018-08-031-1/+1
| | | | | | | | | | | | | | | | The spec gives 13 bytes (5 header, 13 data in increments of 18). Change-Id: I059590cd750ac403a1f3b44b5f9a0ee300cff5b5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-07-171-1/+1
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbintegration.cpp Conflicts git missed: src/plugins/platforms/qnx/qqnxglcontext.cpp Change-Id: I0582cdc9e66e43efe79038b9c43d4f9572ac88fc
| * Fix Clang annoying, useless warning about using %llu when it wants %luThiago Macieira2018-07-051-1/+1
| | | | | | | | | | | | | | | | | | | | The types have the same size. So it's stupid for it to make the issue a warning... qkmsdevice.cpp:737:88: error: format specifies type 'unsigned long long' but the argument has type '__u64' (aka 'unsigned long') [-Werror,-Wformat] Change-Id: I117816bf0f5e469b8d34fffd153e640b62bef635 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Add Windows Pointer Input Messages supportAndre de la Rocha2018-07-121-1/+23
| | | | | | | | | | | | | | | | | | | | Replaces the handling of tablet/touchscreen/touchpad/mouse input with a unified implementation based on the Windows Pointer Input Messages added to Windows 8. The legacy implementation is still used for Windows 7. Task-number: QTBUG-60437 Change-Id: I0a0f48ee9d5365f84ba528aa04c6ab1fe4253c50 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-07-026-16/+15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_dragging.mm src/plugins/platforms/ios/qiosinputcontext.mm src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/tools/androiddeployqt/main.cpp Was moved from qttools into qtbase in 5.11. So re-apply 32398e4d here. tests/auto/corelib/global/qlogging/test/test.pro tests/auto/corelib/global/qlogging/tst_qlogging.cpp tests/auto/corelib/io/qfile/tst_qfile.cpp tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp tests/auto/corelib/thread/qthreadstorage/test/test.pro tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp tests/auto/widgets/kernel/qapplication/test/test.pro Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Done-with: Mårten Nordheim <marten.nordheim@qt.io> Done-with: Oliver Wolff <oliver.wolff@qt.io> Change-Id: Id970486c5315a1718c540f00deb2633533e8fc7b
| * Fix mouse-wheel handling for evdev devices with extended valuesChristian Muehlhaeuser2018-06-221-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Newer mouse devices support a so-called "free-scroll" mode, which unlocks the wheel and allows for faster scrolling. For such input devices, evdev will report an event value greater than 1, when free scrolling is active. Examples for such devices would be the Logitech G700 or MX Master series. However QEvdevMouseHandler interpreted such an event's data incorrectly and triggered wheel events for the opposite scrolling direction. This also often resulted in jittery & jumpy scrolling, when the events' values alternated between 1 and 2. Change-Id: Ibb23ed4419d647fff9b90d371d5bb4037cf2bd9b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * QDBusTrayIcon: Avoid needless initialization of a global varAlexander Volkov2018-06-221-2/+7
| | | | | | | | | | | | | | | | | | | | | | TempFileTemplate is initialized each time an application starts. It leads to the call of QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation) which is slow and can even change permissions of the runtime directory. Use a static wrapper function to initialize this variable only when needed. Change-Id: Ib620f9b842c88103c67f8dfab200f4d39c9981ee Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * QWindowsFontDatabase/QWindowsXPStyle: Fix compilation with g++ 8.1/MinGWFriedemann Kleint2018-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Silence warnings about copying/clearing memory types which g++ considers non-trivial, for example: windows\qwindowsfontdatabase.cpp:1003:75: error: 'void* memcpy(void*, const void*, size_t)' copying an object of non-trivial type 'class QChar' from an array of 'const ushort' {aka 'const short unsigned int'} [-Werror=class-memaccess] memcpy(faceNamePtr, faceName.utf16(), sizeof(wchar_t) * nameLength); qwindowsxpstyle.cpp:946:46: error: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct ThemeMapData'; use assignment or value-initialization instead [-Werror=class-memaccess] memset(&data, 0, sizeof(data)); ^ qwindowsxpstyle.cpp:1053:38: error: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct ThemeMapData'; use assignment or value-initialization instead [-Werror=class-memaccess] memset(&data, 0, sizeof(data)); by introducing a cast. Task-number: QTBUG-68742 Task-number: QTQAINFRA-2095 Change-Id: I160eb5fc7b64a2bc404e1fa61d306af2662d1252 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Fix evdevtouch input plugin crash when the device can't be openedRomain Pokrzywka2018-06-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a device fails to open during the plugin startup, we exit the handler constructor early and leave the d member as nullptr. However the recently added m_handler->isFiltered() call after m_handler is instantiated assumes that d is always valid, which triggers a crash in the forementionned situation. Fix it to check for d's validity first. This can occur when a device is connected then disconnected right after, so that it's gone by the time we get the notification from udev. Change-Id: Ia755868338f92b91c181be8557e06e087d70fcc6 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * Add support for building QtWayland on macOSRobert Griebl2018-06-092-2/+2
| | | | | | | | | | | | Change-Id: Ibed63a01abf32e10a31c610996ae93d3bd9ce153 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Fix unused parameter warningRobert Griebl2018-06-151-0/+2
| | | | | | | | | | | | Task-number: QTBUG-68804 Change-Id: Id40ea045237e5ceafc04d86629f2264eecc084c1 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-241-0/+47
|\| | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt_common.prf src/corelib/tools/qstring.cpp src/plugins/platforms/windows/qwindowsmousehandler.cpp src/widgets/widgets/qmainwindowlayout_p.h Change-Id: I5df613008f6336f69b257d08e49a133d033a9d65
| * egl: Add ES3.2 direct function pointersJanne Koskinen2018-05-221-0/+47
| | | | | | | | | | | | | | Task-number: QT3DS-1738 Change-Id: Ib582d37717618104e10535bae8dea87e2e98b2ce Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Vulkan: share library loading implementationMorten Johan Sørvig2018-05-142-0/+19
| | | | | | | | | | | | | | | | The macOS, Windows, and XCB implementations are identical and can be moved to QBasicPlatformVulkanInstance. Change-Id: Id84b27ffd87f86afe3798c4ad2743ba05e6190d3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Vulkan: Share destroySurface() implementationMorten Johan Sørvig2018-05-142-0/+13
| | | | | | | | | | | | | | | | The macOS, Windows, and XCB implementations are identical and can be moved to QBasicPlatformVulkanInstance. Change-Id: I1380b2bd03080710084a1458bdce3a362ba5c287 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-05-051-6/+5
|\| | | | | | | Change-Id: Ib58433da04bffb5dfab5486b80f17f39cc4145fa
| * macOS + FreeType: Properly distinguish memory fonts from file fontsTor Arne Vestbø2018-05-041-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In recent macOS versions the descriptor created from the function CTFontManagerCreateFontDescriptorFromData() will contain the NSCTFontFileURLAttribute with a value such as: file://iNmEmOrYcGfOnT_0x101d3c3a0#postscript-name=New Which means we can't use the presence of the kCTFontURLAttribute to determine that we're dealing with a file font. Instead we check for our custom kQtFontDataAttribute first, which is only set for memory fonts. Task-number: QTBUG-68044 Change-Id: Ie87d06b5a9e0e251305200b717f18ef68ccc6abc Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | eglfs/kms: Add drm atomic zpos property handlingLionel CHAZALLON2018-05-032-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | This adds the ability to specify a ZPOS property for the eglfs plane ZPOS will allow to control the relative position between eglfs layer and the other layers. It is bound to using QT_QPA_EGLFS_KMS_ZPOS environment variable to determine its value. Change-Id: I51986ccb22a9dbaeef20165ac5feb7dbe8047373 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-035-14/+21
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/graphicsview/elasticnodes/graphwidget.cpp examples/widgets/graphicsview/elasticnodes/node.cpp examples/widgets/graphicsview/elasticnodes/node.h src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_drawing.mm src/widgets/kernel/qmacgesturerecognizer_p.h Change-Id: I13cf06bac75d48d779d8ee7b5c91bfc976f2a32c
| * Fix for mouse with modifiers handlingKarim Pinter2018-05-025-14/+21
| | | | | | | | | | | | | | | | | | | | | | | | Modifier keys are saved in qinputdevicemanager such way that both evdev and libinput can use it the same way, it is also handling the repeating modifier key events. Evdev support is important for VxWorks support because it is using it. Task-number: QTBUG-60694 Change-Id: I49038cb7fe2ad5134b3a37167c19953867ea31c3 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Add support for opening files in OpenURI flatpak portalJan Grulich2018-04-131-0/+39
| | | | | | | | | | | | | | | | | | | | Adds support for opening files in applications outside sandbox. To prove we have access to given file, we have to pass it as file descriptor. The user then gets a dialog with list of application which can be used to open given file. Change-Id: Ifb4cf3dece15d0792b8eb1b90a240da2d3f3c89e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | eglfs/kms: also set windowing properties on planesLionel CHAZALLON2018-04-092-0/+12
| | | | | | | | | | | | | | | | | | The 0 values should be default for X,Y both on plane and crtc. But atomic implementation can have flaws on some devices so we don't assume they are defaulted right and set them to 0. Change-Id: I2f7dc98fdba523eb46eb86b97568d18b6cfd1277 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | eglfs/kms: Add framebuffer scaling ability with KMS atomicLionel CHAZALLON2018-04-042-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit will add the possibility to have a different sizes between framebuffer and videomode using DRM atomic, which is not possible with DRM legacy. The main goal of this change is to allow to get decent performance on embedded devices which can support high resolution display (ie UHD), and which don't have a GPU able to achieve decent framerate in such resolutions. This patch adds a "size" member to the output configuration in KMS configuration file. The GBM framebuffer will be created with that size and the GBM screen will report that size so that EGLFS can do everything normally. Scaling planes with different size than the video mode size is not something supported consistently with DRM legacy, so that feature will be only available when using the DRM atomic API. This was tested on Rock64 device, both with drm legacy and atomic. Change-Id: I8ba5bae35e61fcb7d9fc58234504bdfd647b43f6 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Lionel CHAZALLON <longchair@hotmail.com>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-311-1/+1
|\| | | | | | | Change-Id: I33b47095efdfe0ba698c6a88ca41ec911f432208
| * QCoreTextFontEngine: Fix build with Xcode 9.3Gabriel de Dietrich2018-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Apple LLVM version 9.1.0 (clang-902.0.39.1) Error message: .../qfontengine_coretext.mm:827:20: error: qualified reference to 'QFixed' is a constructor name rather than a type in this context return QFixed::QFixed(int(CTFontGetUnitsPerEm(ctfont))); Change-Id: Iebe26b3b087a16b10664208fc8851cbddb47f043 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-212-5/+2
|\| | | | | | | Change-Id: I35a6555e3885e489f88aa9b4b0142e1017f7a959
| * Modernize the "regularexpression" featureUlf Hermann2018-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Use QT_CONFIG(regularexpression), disentangle it from QT_BOOTSTRAPPED, switch it off in the bootstrap build, remove the #ifdefs from qregularexpression.{h|cpp}, and add QT_REQUIRE_CONFIG(regularexpression) to the header. qregularexpression.{h|cpp} are already correctly excluded in tools.pri if !qtConfig(regularexpression). Change-Id: I21de154a6a118b76f99003d3acb72ac1e220d302 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Fix infinite recursion on stack trying load empty glyhsLars Knoll2018-03-201-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Loading empty glyphs in some fonts would cause the application to crash with an infinite recusion on the stack between qfontengine and qfontengine_ft: 12 0x00007ffff6954395 in QFontEngine::alphaMapForGlyph (this=0x7fb0c0, glyph=50, subPixelPosition=..., t=...) at text/qfontengine.cpp:877 13 0x00007fffee7d104e in QFontEngineFT::alphaMapForGlyph (this=0x7fb0c0, g=50, subPixelPosition=..., t=...) at freetype/qfontengine_ft.cpp:2096 14 0x00007fffee7d0ea8 in QFontEngineFT::alphaMapForGlyph (this=0x7fb0c0, g=50, subPixelPosition=...) at freetype/qfontengine_ft.cpp:2078 15 0x00007ffff6954395 in QFontEngine::alphaMapForGlyph (this=0x7fb0c0, glyph=50, subPixelPosition=..., t=...) at text/qfontengine.cpp:877 16 0x00007fffee7d104e in QFontEngineFT::alphaMapForGlyph (this=0x7fb0c0, g=50, subPixelPosition=..., t=...) at freetype/qfontengine_ft.cpp:2096 17 0x00007fffee7d0ea8 in QFontEngineFT::alphaMapForGlyph (this=0x7fb0c0, g=50, subPixelPosition=...) at freetype/qfontengine_ft.cpp:2078 18 0x00007ffff6954395 in QFontEngine::alphaMapForGlyph (this=0x7fb0c0, glyph=50, subPixelPosition=..., t=...) at text/qfontengine.cpp:877 ... Fix this by trusting the freetype fontengine that it could load the glyph, as the base class anyway can't do better. Task-number: QTBUG-62331 Task-number: QTBUG-66617 Change-Id: I6c7c24d24ec0f71a66fa519c04a336f276e418f6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | eglfs/kms: make sure eglfs plane is always consistentLionel CHAZALLON2018-03-181-3/+9
| | | | | | | | | | | | | | | | We need to make sure we update the eglfs plane properly even when we are forcing the rendering plane index. Change-Id: I0cd19fbc53c34f28d55708ba2c8e84278e1d7e7d Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | eglfs/kms: Add DRM atomic ModeSettingLionel CHAZALLON2018-03-172-1/+54
| | | | | | | | | | | | | | | | | | | | | | This patch will allow to set the video mode with DRM atomic API when available. Using Atomic ModeSetting will allow further to enable framebuffer upscaling which is something not possible with DRM legacy API or at least not supported on all devices in a reliable way. Change-Id: Ie340585cf4cbf5d65555c9a7c547dcbadb327fc0 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>