diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-05-11 15:24:58 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-04-11 14:25:18 +0000 |
commit | 887f51aaa64df60bda2dab136a72a64532f89e02 (patch) | |
tree | c8b519764ec7fa979275c0acac6152980a7a1431 /src/gui/image/qimage.cpp | |
parent | f34e73a16a3d757057e007874cb5008f16e20f02 (diff) |
Cleanup conversion parameters
Removes the now unused QPixelLayout parameter, simplifies the colorTable
passing and prepares for adding dithering.
Change-Id: Iaf7698b248b857804d8921bf118e7cfabbabff87
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/gui/image/qimage.cpp')
-rw-r--r-- | src/gui/image/qimage.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 64a53b4c0e..68e2847f02 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -2275,7 +2275,7 @@ QRgb QImage::pixel(int x, int y) const const QPixelLayout *layout = &qPixelLayouts[d->format]; uint result; const uint *ptr = qFetchPixels[layout->bpp](&result, s, x, 1); - return *layout->convertToARGB32PM(&result, ptr, 1, layout, 0); + return *layout->convertToARGB32PM(&result, ptr, 1, 0, 0); } /*! @@ -2377,7 +2377,7 @@ void QImage::setPixel(int x, int y, uint index_or_rgb) const QPixelLayout *layout = &qPixelLayouts[d->format]; uint result; - const uint *ptr = layout->convertFromARGB32PM(&result, &index_or_rgb, 1, layout, 0); + const uint *ptr = layout->convertFromARGB32PM(&result, &index_or_rgb, 1, 0, 0); qStorePixels[layout->bpp](s, ptr, x, 1); } @@ -2557,7 +2557,7 @@ bool QImage::allGray() const while (x < d->width) { int l = qMin(d->width - x, buffer_size); const uint *ptr = fetch(buffer, b, x, l); - ptr = layout->convertToARGB32PM(buffer, ptr, l, layout, 0); + ptr = layout->convertToARGB32PM(buffer, ptr, l, 0, 0); for (int i = 0; i < l; ++i) { if (!qIsGray(ptr[i])) return false; |