summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-02-24 12:08:34 +0100
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-02-26 09:49:13 +0000
commita09e67c2f7a796ec66c217fc25b2b8cd45812591 (patch)
tree4ff03037e1dacaaefa3d287ec7cf248c5825ffab /src/plugins
parent05e0dfa0060aab80afc696161226b2ab0cddfbf9 (diff)
Remove unused CGImage in qcocoabackingstore
Since 916dfcb8275bcce6b39606cd0b930239a60dc5df m_cgImage has been unsed in the QCocoaBackingStore and can be removed. Change-Id: Ib289b1a3b848e05dda2dfc76ca5d857770883a0b Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com> Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/cocoa/qcocoabackingstore.h1
-rw-r--r--src/plugins/platforms/cocoa/qcocoabackingstore.mm15
2 files changed, 0 insertions, 16 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoabackingstore.h b/src/plugins/platforms/cocoa/qcocoabackingstore.h
index 15445faca0..d012ede5f9 100644
--- a/src/plugins/platforms/cocoa/qcocoabackingstore.h
+++ b/src/plugins/platforms/cocoa/qcocoabackingstore.h
@@ -58,7 +58,6 @@ public:
private:
QImage m_qImage;
- CGImageRef m_cgImage;
QSize m_requestedSize;
};
diff --git a/src/plugins/platforms/cocoa/qcocoabackingstore.mm b/src/plugins/platforms/cocoa/qcocoabackingstore.mm
index a90db00d42..cddb960197 100644
--- a/src/plugins/platforms/cocoa/qcocoabackingstore.mm
+++ b/src/plugins/platforms/cocoa/qcocoabackingstore.mm
@@ -39,14 +39,11 @@ QT_BEGIN_NAMESPACE
QCocoaBackingStore::QCocoaBackingStore(QWindow *window)
: QPlatformBackingStore(window)
- , m_cgImage(0)
{
}
QCocoaBackingStore::~QCocoaBackingStore()
{
- CGImageRelease(m_cgImage);
- m_cgImage = 0;
}
QPaintDevice *QCocoaBackingStore::paintDevice()
@@ -58,9 +55,6 @@ QPaintDevice *QCocoaBackingStore::paintDevice()
// either due to a window resize or devicePixelRatio change.
QSize effectiveBufferSize = m_requestedSize * windowDevicePixelRatio;
if (m_qImage.size() != effectiveBufferSize) {
- CGImageRelease(m_cgImage);
- m_cgImage = 0;
-
QImage::Format format = (window()->format().hasAlpha() || cocoaWindow->m_drawContentBorderGradient)
? QImage::Format_ARGB32_Premultiplied : QImage::Format_RGB32;
m_qImage = QImage(effectiveBufferSize, format);
@@ -73,15 +67,6 @@ QPaintDevice *QCocoaBackingStore::paintDevice()
void QCocoaBackingStore::flush(QWindow *win, const QRegion &region, const QPoint &offset)
{
- // A flush means that qImage has changed. Since CGImages are seen as
- // immutable, CoreImage fails to pick up this change for m_cgImage
- // (since it usually cached), so we must recreate it. We await doing this
- // until one of the views needs it, since, together with calling
- // "setNeedsDisplayInRect" instead of "displayRect" we will, in most
- // cases, get away with doing this once for every repaint. Also note that
- // m_cgImage is only a reference to the data inside m_qImage, it is not a copy.
- CGImageRelease(m_cgImage);
- m_cgImage = 0;
if (!m_qImage.isNull()) {
if (QCocoaWindow *cocoaWindow = static_cast<QCocoaWindow *>(win->handle()))
[cocoaWindow->m_qtView flushBackingStore:this region:region offset:offset];