summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_x11egl.cpp
diff options
context:
space:
mode:
authorKurt Korbatits <kurt.korbatits@nokia.com>2009-10-22 21:18:11 (GMT)
committerKurt Korbatits <kurt.korbatits@nokia.com>2009-10-22 21:18:11 (GMT)
commit4d1a9b18b905f21b70608b13f4789dadec6bc181 (patch)
treebfa0d9364432b0c4fc55648acc0f99a3a12e42f9 /src/opengl/qgl_x11egl.cpp
parenta6a8e2b1918b2037c9d79e59aabf04ef09bee73e (diff)
parent6e84a8f0d93f178611a40917fec92648e956fe38 (diff)
downloadQt-4d1a9b18b905f21b70608b13f4789dadec6bc181.zip
Qt-4d1a9b18b905f21b70608b13f4789dadec6bc181.tar.gz
Qt-4d1a9b18b905f21b70608b13f4789dadec6bc181.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src/opengl/qgl_x11egl.cpp')
-rw-r--r--src/opengl/qgl_x11egl.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp
index 971a660..3894ed1 100644
--- a/src/opengl/qgl_x11egl.cpp
+++ b/src/opengl/qgl_x11egl.cpp
@@ -513,11 +513,22 @@ bool Q_OPENGL_EXPORT qt_createEGLSurfaceForPixmap(QPixmapData* pmd, bool readOnl
pixmapConfig,
(EGLNativePixmapType) pixmapData->handle(),
pixmapAttribs.properties());
+// qDebug("qt_createEGLSurfaceForPixmap() created surface 0x%x for pixmap 0x%x",
+// pixmapSurface, pixmapData->handle());
if (pixmapSurface == EGL_NO_SURFACE) {
- qWarning("Failed to create a pixmap surface using config %d", (int)pixmapConfig);
+ qWarning() << "Failed to create a pixmap surface using config" << (int)pixmapConfig
+ << ":" << QEglContext::errorString(eglGetError());
return false;
}
+ static bool doneOnce = false;
+ if (!doneOnce) {
+ // Make sure QGLTextureCache is instanciated so it can install cleanup hooks
+ // which cleanup the EGL surface.
+ QGLTextureCache::instance();
+ doneOnce = true;
+ }
+
Q_ASSERT(sizeof(Qt::HANDLE) >= sizeof(EGLSurface)); // Just to make totally sure!
pixmapData->gl_surface = (Qt::HANDLE)pixmapSurface;
pixmapData->is_cached = true; // Make sure the cleanup hook gets called