| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of an explicit ctor, make conversion from QPointF an
explicitly-named ctor.
This prepares the class for being converted to a pure struct,
alleviating its use in arrays without the additional QUninitialized
kludge that Coverity doesn't seem to understand.
Amends 78a7e54f8f5c4ca6ce1ee6b0ac82c42b21738ac5.
As a drive-by, take the QPointF by value, fixing
clazy-function-args-by-value.
Coverity-Id: 444249
Coverity-Id: 425860
Change-Id: I925e94b21bf041a6fb03c56ef9a2da85d8285982
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid the optimized fixed-point function for vertical gradients if the
parameters are out of range for that. Fall back to the general
gradient function in that case.
Fixes: QTBUG-120331
Pick-to: 6.7 6.5 6.2
Change-Id: Idf116f0077403531d9ea414e3043fdc92b6fe4a9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Qt already runs on Vision Pro as "Designed for iPad", using Qt
for iOS. This change enables building Qt for visionOS directly,
which opens the door to visionOS specific APIs and use-cases
such as volumes and immersive spaces.
The platform removes some APIs we depend on, notably UIScreen,
so some code paths have been disabled or mocked to get something
up and running.
As our current window management approach on UIKit platforms
depends on UIWindow and UIScreen there is currently no way to
bring up QWindows. This will improve once we refactor our
window management to use window scenes.
To configure for visionOS, pass -platform macx-visionos-clang,
and optionally add -sdk xrsimulator to build for the simulator.
Change-Id: I4eda55fc3fd06e12d30a188928487cf68940ee07
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
|
|
|
|
|
| |
Change-Id: I9da3b37927650ab9dee928156f907ea5c58fc500
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
|
|
| |
Makes it more obvious to code-checker what is possible.
Change-Id: I8b2bbc55a600e8b570644135867a3244c6d57be7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|
|
|
|
|
| |
Change-Id: I3bca1460257ddb44004e85d153351fba52b0c8c3
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
|
|
|
|
|
|
|
|
| |
[ChangeLog][QtGui][QColorSpace] Support for CMYK color spaces has been
added.
Change-Id: I2c684dbeee8b97fc90ca4e2a892349a7fa465d06
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The original change was introduced to fix performance regression due to
the increased value of QT_RASTER_COORD_LIMIT. The optimization was done
by clipping anything outside the device rect plus a small margin.
However, setting the margin to a small value caused a regression, where the
rasterization became slightly different from the previous implementation.
Fixes: QTBUG-123054
Pick-to: 6.7 6.5 6.2
Change-Id: Ic4fddea89cd5f6e5760dc4a91b1f2f59527e8e5c
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
|
|
|
|
|
|
|
| |
Should make the profile a valid ICCv4 profile now.
Change-Id: Ifb8649b588117a4357e1f801c9b0202202ce9a38
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
|
|
|
|
|
|
|
|
|
|
| |
The assignment to the output was missing.
This work has been kindly sponsored by the QGIS project
(https://qgis.org/).
Change-Id: Ibe33073b7e97597631a8dbb0035742693fef97f5
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
|
|
| |
Removes the old hack of parsing them as a compatible RGB color space.
Change-Id: I876d74ca5830b46decc15b20e8a3baa12d5e2713
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
|
|
|
|
|
|
|
|
| |
Parse them, so we can change white-points correctly,
and write them as required by ICCv4
Change-Id: I6d28fb6a85585f80a9867df45864069efda956c5
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
|
|
|
|
|
|
|
|
| |
Make it possible to generate one way QColorTrcLut tables, and make it
easier test out different table size,
Change-Id: I953c68d772699de87fdddbf15ce196e6ba8b9898
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
|
|
|
|
|
|
|
|
|
| |
This also adds image conversion of both format and color space, which
will also be required later for conversions to CMYK formats and color
spaces.
Change-Id: I578c0a010ffcdb4df4cf9080c0621fac8bc342bf
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
|
|
|
|
|
|
| |
Change-Id: Ifce2dc720e4e4cae54a00147049edcf369ae8190
Done-by: Allan Sandfeld Jensen
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a QWidget with an associated RHI swapchain (via its QWindow) is
moved to a different top level window, that top level window has its
own backing store, and QBackingStoreRhiSupport, which doesn't know
anything about the fact that the window already has an associated
swap chain in the original top level window's QBackingStoreRhiSupport.
As having multiple swap chains for the same window is not supported
on all RHI backends (Vulkan and DX in particular), we need to throw
away the swap chain when detecting that the window is moved to a new
top level.
We do this by hooking into the existing WindowAboutToChangeInternal
event delivery to renderToTexture children, which now delivers the
event both to renderToTexture QWidget children as well as QWindows
in the hierarchy. The condition of when to deliver the event has
been updated to reflect whether the top level uses RHI for flushing,
instead of only including renderToTexture children, as the former
also includes setting QT_WIDGETS_RHI=1 explicitly.
The event is then caught by QBackingStoreRhiSupportWindowWatcher,
and handled the same way as for SurfaceAboutToBeDestroyed.
Renaming qSendWindowChangeToTextureChildrenRecursively would make
sense at this point, but to make cherry-picks easier we keep the
current name for now.
Fixes: QTBUG-120276
Pick-to: 6.7 6.5
Change-Id: Ic4c60e89be985f12a84e9f893c299e602b70851a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Unexport the class (it's fully defined inline)
* Use QFlags instead of "manual" math on an enum class.
The latter requires some extra minor syntax adjustements (making
the enumeration public, so that the operators can pick it up; and
explicitly wrap a couple of usages of the enumerators as
the operators on them are defined *after* the class itself).
Change-Id: I176558de2d5e75697d62790d8783c417997206a9
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
With the introduction of CMYK32 the old logic of assuming depth
meant compatible alpha version no longer works. So change the logic
to more explicitly return compatible opaque or alpha versions and
remove the now invalid qt_maybeAlphaVersionWithSameDepth.
Change-Id: Ib1f7b76b0ce0eae7d49a0dfe369918a746bbe2b4
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Follow the established convention that byte-oriented image formats
have the "8888" suffix, not "32". The old enum name is temporarily
left to help port other submodules.
This work has been kindly sponsored by the QGIS project
(https://qgis.org/).
Change-Id: I4b6f10cb22312b614cb9cf4b0ac439907276c538
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
|
|
| |
In case creation of the QTemporaryFile fails, keep the data in memory.
Change-Id: I9933571259a26ee990609010763a1ef57877338a
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
... not a QColorVector.
While cccda0e62d3d70f09654bbd6681a3e79c9814c8d, successfully worked
around the problem that QColorVector does not fulfill the
_mm_store_ps() function's alignment requirement (by using the
unaligned version, _mm_storeu_ps()), it failed to address the problem
that the code writes into a QColorVector object's member variable
(float, a 32-bit storage location) when the function is asking for a
128-bit storage:
/// Stores a 128-bit vector of [4 x float] into an aligned memory
/// location.
///
/// \headerfile <x86intrin.h>
///
/// This intrinsic corresponds to the <c> VMOVAPS / MOVAPS </c> instruction.
///
/// \param __p
/// A pointer to a 128-bit memory location. The address of the memory
/// location has to be 16-byte aligned.
/// \param __a
/// A 128-bit vector of [4 x float] containing the values to be stored.
The treatment of a struct { float x, y, z, w; } as a float[4] is not
allowed by C++, and even if it was, we'd have to pass the address of
the struct object, not that of its first member variable.
It seems like Coverity has recently learned about this kind of thing,
at least there are tons of such new issues listed in the March scan
and while I can't find a report about this particular instance in the
current build, that probably just means that the Coverity build simply
doesn't see this code path due to the #ifdef'ery.
To fix, replace the QColorVector with an over-aligned float[4].
Because we're over-aligning the float[4], we can go back to the
original _mm_store_ps(), which is, presumably, faster then the -u
variant. We don't lose any expressiveness here, either, because the old
code never used any of the member functions of the QColorVector object
used as a store target.
Amends f944651e3db01a73b10212926a7b1c7aad5eb83e.
Amends cccda0e62d3d70f09654bbd6681a3e79c9814c8d.
Change-Id: Ia0f8202bf4266b8b19b3de897a897de58b7a6d94
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the user gives us a CMYK image, save it as such.
[ChangeLog][QtGui][QPdfWriter] QPdfWriter can now save images in CMYK
format directly.
This work has been kindly sponsored by the QGIS project
(https://qgis.org/).
Change-Id: I4e5ba93970a545987e38d9a3b2e15b0d64bb72b6
Reviewed-by: Albert Astals Cid <aacid@kde.org>
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
| |
These are files under our control, but still, may get moved/renamed/...
by accident. Assert that we can open them.
Change-Id: I46987f2f12e04a8d7292652eb6440fa0f345175a
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Although the output of these functions is premultiplied ARGB, we know
the alpha is always going to be full (1.0) because the source is CMYK 32
bit (without alpha). We can therefore avoid calling qPremultiply.
This work has been kindly sponsored by the QGIS project
(https://qgis.org/).
Change-Id: I129b601f5c93a1c444ab06c3325f946d2bcc6efc
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
|
|
| |
Never called from anywhere.
Change-Id: I76480586b5eca6b450a6cd36429cdc6e264849cc
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds a CMYK 8bpp format to QImage. The idea is to enable the
transport of CMYK images inside Qt, for instance to be loaded/saved from
files or painted on CMYK capable paint devices (e.g. PDF).
Also, rasterization support *from* a CMYK image is added (on top of a
RGB surface), as well as CMYK image scaling/conversion.
Conversion and rasterization between CMYK and RGB isn't particularly
optimized nor it honors any colorspaces yet. The overall idea is to
match 1:1 the existing behavior of CMYK QColor (which get naively
changed to RGB; there isn't colorspace support in QPainter yet).
There are no plans to add rasterization *towards* CMYK.
Image save/load in native CMYK formats will be added in future commits.
This work has been kindly sponsored by the QGIS project
(https://qgis.org/).
[ChangeLog][QtGui] Support for 8-bit CMYK images has been added.
Change-Id: I4b024cd4c15119c669b6ddd450418a9e425587f8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
|
|
| |
QColorVector is not forced to 128-bit alignment.
Change-Id: Ifacc171296ddddda742d49745372b47585e40802
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
|
|
|
|
|
|
|
|
| |
To indicate color spaces that can not be used as a target,
but only as a source.
Change-Id: Iae79e3533599c112872d171a2f45178029be89dc
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Like the QPolygon code. This fixes a mistake in failing to clear the
list before de-marshalling in operator>>.
Updated most of the QDataStream tests to have data in the objects
they're streaming into, to ensure that the stream overwrites everything.
Fixes: QTBUG-122684
Task-number: QTBUG-122704
Pick-to: 5.15 6.5 6.6 6.7
Change-Id: I01ec3c774d9943adb903fffd17b6920c72f5042b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
|
|
|
|
|
|
|
|
| |
We had no examples of this type, and didn't catch the table was parsed as
-0.5 to 0.5 instead of 0 to 1.
Change-Id: I904937a50deaeecfc89e271bf918eedc521bc8a2
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
src/gui/painting/qpaintengine_raster.cpp:3811:42: error: ‘void* calloc(size_t, size_t)’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
3811 | m_clipLines = (ClipLine *)calloc(sizeof(ClipLine), clipSpanHeight);
| ^~~~~~~~~~~~~~~~
src/gui/painting/qpaintengine_raster.cpp:3811:42: note: earlier argument should specify number of elements, later size of each element
Pick-to: 6.7 6.6 6.5 6.2 5.15
Change-Id: I41ec3dd5c439e5cd51dd917741125ce50659500e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
|
|
|
|
|
|
|
| |
Simplifies maintenance of code paths that rely on Metal.
Change-Id: I1d1f705fffc14dbafde346eeb555b43be6d5be54
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
| |
Do all colors in parallel using SIMD.
Change-Id: I36cb47888d92c4244b5ea7a91c8d84ac3656c56a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
| |
Replace all divisions by constant with multiplications of its inverse
Change-Id: I05aa0631e8117e7d42da0eaa30077cd230caa919
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
| |
Change-Id: I23a2515b42ef6592df0a18f04420670dc2b4ac1a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allows to use it without Qt Widgets or Qt Graphics Views.
Since anyone having imported this through Qt Widget will also be
linking Qt Gui this should be compatible.
qt_halfScaled is also unexported for lack of known users.
Change-Id: I39406dfd4839ed46f8cbfd4651577ab6ece9932c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
|
|
|
|
|
|
|
| |
Ensure move where it makes sense, and remove it where it doesnt
Change-Id: I988d7ff44f1d7898a967130fa53ed6ec5690e778
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This finishes off ICC color space support in Qt (short of the
optional multi process elements), and includes necessary parts for
potential CMYK support (PCSLab and A2B support)
[ChangeLog][QColorSpace] ICC profiles that are not three-component
matrix based are now supported.
Task-number: QTBUG-108175
Change-Id: Ie29b17a366d9ba0ea8135e1752530d6bb19e7520
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
|
|
|
|
|
|
| |
Pick-to: 6.7
Change-Id: Id697fa3844610606c202e3fa717d631a3621e774
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clang's `-Wimplicit-fallthrough` warnings are a little stricter than
gcc's interpretation:
switch (i) {
case 0:
foo();
case 4:
break;
}
While gcc accepts the implicit fallthrough, if the following statement
is a trivial `break`, clang will warn about it.
Pick-to: 6.7
Change-Id: I38e0817f1bc034fbb552aeac21de1516edcbcbb0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
| |
Change-Id: I03434d11cf0ee734b4c0300db9b675fe393ccfab
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
|
|
|
|
|
|
|
|
|
|
| |
Otherwise we end up appending and modifying the shared object.
Pick-to: 5.15 6.5 6.6 6.7
Task-number: QTBUG-122704
Change-Id: I01ec3c774d9943adb903fffd17b692c2e6d53e97
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
| |
Change-Id: Ida703ddf34454d5acaf5a212b9b2f21eac21fa1d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
|
|
|
|
|
|
|
|
|
| |
Not really a common use-case and shouldnt be in images anyway, but
we have the code to support it, except it had a typo in it.
Pick-to: 6.7 6.6 6.5
Change-Id: I8585eaf7be82f13e61c94430743d765359fa48fe
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
|
|
|
|
|
|
| |
Pick-to: 6.7
Change-Id: I8fa8a0789d382ffb3e77ff79ac507d857442cbf4
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code assumed that the rounding of a floating point value, and the
rounding of the sum of that value and an integer, would always snap in
the same direction. But because of accuracy limits (independently
of the rounding function employed), that is not always the case for
fractions very near to .5.
Fixes: QTBUG-122451
Pick-to: 6.7 6.6 6.5 6.2 5.15
Change-Id: I0825d42e6be7f6e3397760a5e9be5dddca42dcdc
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: I9a77b6ea0026748c7f97f73b327118f7a9212d52
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was a feature in Qt 4, but the only platform that carried it over
to Qt 5 was Windows, in ab76593f18396e693f24066592244ca95e135ea2, and
that's still the situation.
As a first step in possibly implementing this on more platforms, lets
replace the hard-coded check in QWidgetRepaintManager::hasStaticContents
with a proper QPlatformIntegration capability check in the only call site.
Pick-to: 6.7
Change-Id: I2067109f45116cd8c62facf7224cd748f19e845b
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
The plumbing from QBackingStore::resize to the platform backing store
was missing a high-DPI conversion for the backing store's static
contents, which is also expressed in the QtGui coordinate system.
Pick-to: 6.7 6.6 6.5 6.2
Change-Id: Ifaac916cbf184b9386aa5feca1577a53bf2906ed
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For qPixelLayouts, there's a static_assert right below it that checks
that the array has a specific size, as a guard for extending
QImage::NImageFormats without also extending the array. Giving an
explicit size to qPixelLayouts defeats the entire purpose.
For the other arrays of function pointers, drop the sizing and add the
missing static_asserts.
Use std::size as a drive-by.
This work has been kindly sponsored by the QGIS project
(https://qgis.org/).
Change-Id: Ic791a706a8ae964e3aee482f23b7eeeedf97bdc6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|