summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authorNorwegian Rock Cat <qt-info@nokia.com>2009-06-24 08:38:36 (GMT)
committerNorwegian Rock Cat <qt-info@nokia.com>2009-06-24 09:24:05 (GMT)
commit0fec4eecb0f65d7dbf7a4769c9b7784c31b97578 (patch)
tree7e161f9e6f1d0e026008600d8b2d4bbbc74f0648 /src/gui/image
parent0068e3e0ffa1948f95a4d96d514e0e8b08624dae (diff)
downloadQt-0fec4eecb0f65d7dbf7a4769c9b7784c31b97578.zip
Qt-0fec4eecb0f65d7dbf7a4769c9b7784c31b97578.tar.gz
Qt-0fec4eecb0f65d7dbf7a4769c9b7784c31b97578.tar.bz2
Remove these colorspace references.
It is only used for creating the bitmap context, so there is no reason to keep it around. Reviewed-by: Morten Sørvig
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qnativeimage.cpp7
-rw-r--r--src/gui/image/qnativeimage_p.h1
2 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp
index e3fb27a..a716eb1 100644
--- a/src/gui/image/qnativeimage.cpp
+++ b/src/gui/image/qnativeimage.cpp
@@ -232,14 +232,16 @@ QImage::Format QNativeImage::systemFormat()
QNativeImage::QNativeImage(int width, int height, QImage::Format format, bool /* isTextBuffer */, QWidget *widget)
: image(width, height, format)
{
- cgColorSpace = QCoreGraphicsPaintEngine::macDisplayColorSpace(widget);
+
+
uint cgflags = kCGImageAlphaNoneSkipFirst;
#ifdef kCGBitmapByteOrder32Host //only needed because CGImage.h added symbols in the minor version
cgflags |= kCGBitmapByteOrder32Host;
#endif
- cg = CGBitmapContextCreate(image.bits(), width, height, 8, image.bytesPerLine(), cgColorSpace, cgflags);
+ cg = CGBitmapContextCreate(image.bits(), width, height, 8, image.bytesPerLine(),
+ QCoreGraphicsPaintEngine::macDisplayColorSpace(widget), cgflags);
CGContextTranslateCTM(cg, 0, height);
CGContextScaleCTM(cg, 1, -1);
@@ -251,7 +253,6 @@ QNativeImage::QNativeImage(int width, int height, QImage::Format format, bool /*
QNativeImage::~QNativeImage()
{
CGContextRelease(cg);
- CGColorSpaceRelease(cgColorSpace);
}
QImage::Format QNativeImage::systemFormat()
diff --git a/src/gui/image/qnativeimage_p.h b/src/gui/image/qnativeimage_p.h
index f0c3688..268fe49 100644
--- a/src/gui/image/qnativeimage_p.h
+++ b/src/gui/image/qnativeimage_p.h
@@ -95,7 +95,6 @@ public:
#elif defined(Q_WS_MAC)
CGContextRef cg;
- CGColorSpaceRef cgColorSpace;
#endif
private: