summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2019-07-11 17:51:15 +0200
committerMarc Mutz <marc.mutz@kdab.com>2019-07-12 14:15:35 +0200
commit389988c42f901f2d8f75a023039d641cf5fba9de (patch)
tree8de2968ec5bee4fbff576d9689650f5de733e917 /src/gui/image
parent79f9adffc5158b906830dcd7dbdf0e5d44f7ba22 (diff)
QColorTransform: make fit for release
- Unexport the value class, export only out-of-line public member functions to give us more leeway in changing code later (otherwise, we'd be bound by BC with MSVC debug builds, which call even inline methods from the DLL. - Don't use QSharedPointer as the d_ptr. It's twice the size of a pointer. Use a naked pointer-to-const. Derive Private from QSharedData. This requires some changes in QColorSpace, and, as usual, an out-of-line copy ctor. - Add member-swap(), Q_DECLARE_SHARED(). - Drop noexcept from the dtor. It implicitly is, adding it explicitly looks weird. - Pass QRgb and QRgba64 by value, not by cref. They're trivially-copyable, so passed in registers if passed by value. Passing by cref forces them onto the stack. Change-Id: I669643d219ede6b7d07f15afbf8728e16150b3b2 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qimage.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 61d32b0dec..cd2fe5bc10 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -5067,12 +5067,12 @@ void QImage::applyColorTransform(const QColorTransform &transform)
if (depth() > 32) {
for (int i = 0; i < height(); ++i) {
QRgba64 *scanline = reinterpret_cast<QRgba64 *>(scanLine(i));
- transform.d_func()->apply(scanline, scanline, width(), flags);
+ transform.d->apply(scanline, scanline, width(), flags);
}
} else {
for (int i = 0; i < height(); ++i) {
QRgb *scanline = reinterpret_cast<QRgb *>(scanLine(i));
- transform.d_func()->apply(scanline, scanline, width(), flags);
+ transform.d->apply(scanline, scanline, width(), flags);
}
}