summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qpixmapdata.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-02-03 06:19:45 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-02-03 06:19:45 (GMT)
commit21a1613da90e7b3f0d2d2b03983e236a55db15b0 (patch)
tree1b38d9600995b9e33d10d17c03bc50dfbbeab45e /src/gui/image/qpixmapdata.cpp
parent0d9ff247db8ca64e0dcfd0ea05c3a615abab845b (diff)
parentc186c0402781ec6ef6ee97e2168d16f0b043044e (diff)
downloadQt-21a1613da90e7b3f0d2d2b03983e236a55db15b0.zip
Qt-21a1613da90e7b3f0d2d2b03983e236a55db15b0.tar.gz
Qt-21a1613da90e7b3f0d2d2b03983e236a55db15b0.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (22 commits) Make DSFLIP_ONSYNC part of the default flip flags. Fixed a failure in tst_qgl. 4.6.2 changes Avoids a possible crash when saving the state of a main window Implemented QGifHandler::imageCount(). Fixed compilation of the GL2 engine for OpenGL ES 2. fix whitespace Document that QModelIndex::child does not work for the root item Fixed missing textures in the boxes demo. Fix QTBUG_7714_fullUpdateDiscardingOpacityUpdate2 autotest in qws-linux Assert failure when setting a widget focus proxy as its successor in tab order Fixed garbled 3D Qt logo in the overpainting example. fix crash in Phonon::DS9 backend Don't crash when running Qt on KDE with Oxygen style. Fixes missing update when setting opacity on an item that had opacity 0.0 Avoids missing opacity updates by not propagating the ignoreOpacity flag Cleanup in graphicsitem autotest Adds convenience functions QGraphicsItemPrivate::isOpacityNull Fixed a crash when QPixmaps are destroyed after the ~QApplication. Fix GL texture leaks when pixmaps are deleted ...
Diffstat (limited to 'src/gui/image/qpixmapdata.cpp')
-rw-r--r--src/gui/image/qpixmapdata.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gui/image/qpixmapdata.cpp b/src/gui/image/qpixmapdata.cpp
index 65032da..ea4fe6b 100644
--- a/src/gui/image/qpixmapdata.cpp
+++ b/src/gui/image/qpixmapdata.cpp
@@ -45,6 +45,7 @@
#include <QtGui/qimagereader.h>
#include <private/qgraphicssystem_p.h>
#include <private/qapplication_p.h>
+#include <private/qimagepixmapcleanuphooks_p.h>
QT_BEGIN_NAMESPACE
@@ -80,6 +81,16 @@ QPixmapData::QPixmapData(PixelType pixelType, int objectId)
QPixmapData::~QPixmapData()
{
+ // Sometimes the pixmap cleanup hooks will be called from derrived classes, which will
+ // then set is_cached to false. For example, on X11 QtOpenGL needs to delete the GLXPixmap
+ // or EGL Pixmap Surface for a given pixmap _before_ the native X11 pixmap is deleted,
+ // otherwise some drivers will leak the GL surface. In this case, QX11PixmapData will
+ // call the cleanup hooks itself before deleting the native pixmap and set is_cached to
+ // false.
+ if (is_cached) {
+ QImagePixmapCleanupHooks::executePixmapDataDestructionHooks(this);
+ is_cached = false;
+ }
}
QPixmapData *QPixmapData::createCompatiblePixmapData() const