summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qpixmapdata.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-02-03 18:13:44 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-02-03 18:13:44 (GMT)
commit1b8c6049af9f20ac3df5469dd18d231da6aebfcd (patch)
tree4cb8deebbc737c100e3e8131e7a36bc4bc0d84b9 /src/gui/image/qpixmapdata.cpp
parenta9fa8187b1a7efe343e0bf2722cde5c0ef5fa77e (diff)
parent71e2f9d35a922fb0ec8fff40bdc7d2d47d42dd8c (diff)
downloadQt-1b8c6049af9f20ac3df5469dd18d231da6aebfcd.zip
Qt-1b8c6049af9f20ac3df5469dd18d231da6aebfcd.tar.gz
Qt-1b8c6049af9f20ac3df5469dd18d231da6aebfcd.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: (29 commits) Compiler warning in QAbstractSlider. Optimize QPathClipper::pathToRect. QGraphicsScene: Use QPainter::setClipRect instead of setClipPath if possible. QStyleSheetStyle: Fix combinaison of border-image and border-radius Revert "QAbstractScrollArea: Wheel over a scrollarea that has only one horizontal scrollbar" Proper Fav icon is not shown, for all the links default fav icon shown Update changes-4.6.2. 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 ...
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