summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2010-03-08 09:24:49 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2010-03-08 09:24:49 (GMT)
commitd2d519f72433d70c342ed4cf0827a10ab0cdfdad (patch)
treecbedaf01248784527aef6c2fcff4a1fbaff66bf6
parent7d587efef35b3adbb3433a4baec1c5ee7105cf0b (diff)
downloadQt-d2d519f72433d70c342ed4cf0827a10ab0cdfdad.zip
Qt-d2d519f72433d70c342ed4cf0827a10ab0cdfdad.tar.gz
Qt-d2d519f72433d70c342ed4cf0827a10ab0cdfdad.tar.bz2
Enable cleanup hooks when creating an EGL surface for a pixmap
Reviewed-By: TrustMe
-rw-r--r--src/gui/egl/qegl_x11.cpp12
-rw-r--r--src/opengl/qgl_x11egl.cpp1
2 files changed, 7 insertions, 6 deletions
diff --git a/src/gui/egl/qegl_x11.cpp b/src/gui/egl/qegl_x11.cpp
index 8608523..53c4711 100644
--- a/src/gui/egl/qegl_x11.cpp
+++ b/src/gui/egl/qegl_x11.cpp
@@ -41,18 +41,19 @@
#include <QtCore/qdebug.h>
-#include <private/qt_x11_p.h>
+#include <QtGui/private/qt_x11_p.h>
#include <QtGui/qx11info_x11.h>
-#include <private/qpixmapdata_p.h>
-#include <private/qpixmap_x11_p.h>
+#include <QtGui/private/qpixmapdata_p.h>
+#include <QtGui/private/qpixmap_x11_p.h>
+#include <QtGui/private/qimagepixmapcleanuphooks_p.h>
#include <QtGui/qpaintdevice.h>
#include <QtGui/qpixmap.h>
#include <QtGui/qwidget.h>
#include <QtGui/qcolormap.h>
-#include "qegl_p.h"
-#include "qeglcontext_p.h"
+#include "QtGui/private/qegl_p.h"
+#include "QtGui/private/qeglcontext_p.h"
QT_BEGIN_NAMESPACE
@@ -408,6 +409,7 @@ EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig config, const QEg
(EGLNativePixmapType) x11PixmapData->handle(),
surfaceAttribs.properties());
x11PixmapData->gl_surface = (Qt::HANDLE)surf;
+ QImagePixmapCleanupHooks::enableCleanupHooks(x11PixmapData);
return surf;
}
diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp
index 5ffecc5..fdcc412 100644
--- a/src/opengl/qgl_x11egl.cpp
+++ b/src/opengl/qgl_x11egl.cpp
@@ -42,7 +42,6 @@
#include "qgl.h"
#include <private/qt_x11_p.h>
#include <private/qpixmap_x11_p.h>
-#include <private/qimagepixmapcleanuphooks_p.h>
#include <private/qgl_p.h>
#include <private/qpaintengine_opengl_p.h>
#include "qgl_egl_p.h"