summaryrefslogtreecommitdiffstats
path: root/src/opengl/qopenglpaintdevice.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add QPaintDevice metric query to get precise fractional DPR valueEirik Aavitsland2024-05-301-0/+4
| | | | | | | | | | | | | | | | | | | | | For compatibility reasons, QPaintDevice needs to query subclasses for device metrics as int values. To report fractional DPR values, they have been multiplied with a large constant and divided back afterwards. However, the loss of accuracy introduced by this, though tiny, could still lead to rounding errors and painting artefacts when the values where multiplied up for large coordinates. Avoid this issue by adding a metric query that transports the full floating point value encoded as two ints. [ChangeLog][QtGui] Added new QPaintDevice metrics for querying fractional device pixel ratios with high precision. Custom paintdevice classes that support fractional DPRs are recommended to implement support for these queries in metric(). Others can ignore them. Fixes: QTBUG-124342 Change-Id: Ia6fa46e68e9fe981bdcbafb41daf080b4d1fb6d7 Reviewed-by: Tor Arne Vestbø <[email protected]>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Lars Knoll <[email protected]> Reviewed-by: Jörg Bornemann <[email protected]>
* opengl: fix a typo in QOpenGLPaintDevice::dotsPerMeterY()Liang Qi2021-07-061-1/+1
| | | | | | | Fixes: QTBUG-95005 Pick-to: 6.2 6.1 5.15 5.12 Change-Id: I88ab9b757a5cfee520e07ac6280e31f9211342f0 Reviewed-by: Laszlo Agocs <[email protected]>
* Move QOpenGLPaintEngine and related classes from QtGui to QtOpenGLJohan Klokkhammer Helsing2020-01-221-0/+372
Also moves the openglwindow test to the opengl folder, as it makes use of these classes. Task-number: QTBUG-74409 Change-Id: Id9f0013cedcc8bd1e87122c005641d7298525045 Reviewed-by: Laszlo Agocs <[email protected]>