From 310519d6d11da546b23c1cba307f37c24e0a5c0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Fri, 15 Jul 2011 14:07:12 +0200 Subject: Rename QPixmapData to QPlatformPixmap. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Makes the API symmetric with the other Lighthouse APIs. Change-Id: I8a399f3c968ea35d4624711b31f2ac5bb94b7893 Reviewed-on: http://codereview.qt.nokia.com/1735 Reviewed-by: Qt Sanity Bot Reviewed-by: Jørgen Lind --- src/gui/egl/qegl_x11.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/gui/egl/qegl_x11.cpp') diff --git a/src/gui/egl/qegl_x11.cpp b/src/gui/egl/qegl_x11.cpp index c0f8a240fb..4fd8a15157 100644 --- a/src/gui/egl/qegl_x11.cpp +++ b/src/gui/egl/qegl_x11.cpp @@ -43,7 +43,7 @@ #include #include -#include +#include #include #include @@ -339,14 +339,14 @@ EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig config, const QEg return EGL_NO_SURFACE; } - QX11PixmapData *x11PixmapData = 0; + QX11PlatformPixmap *x11PlatformPixmap = 0; if (devType == QInternal::Pixmap) { - QPixmapData *pmd = static_cast(device)->data_ptr().data(); - if (pmd->classId() == QPixmapData::X11Class) - x11PixmapData = static_cast(pmd); + QPlatformPixmap *pmd = static_cast(device)->data_ptr().data(); + if (pmd->classId() == QPlatformPixmap::X11Class) + x11PlatformPixmap = static_cast(pmd); else { - // TODO: Replace the pixmap's data with a new QX11PixmapData - qWarning("WARNING: Creating an EGL surface on a QPixmap is only supported for QX11PixmapData"); + // TODO: Replace the pixmap's data with a new QX11PlatformPixmap + qWarning("WARNING: Creating an EGL surface on a QPixmap is only supported for QX11PlatformPixmap"); return EGL_NO_SURFACE; } } else if ((devType != QInternal::Widget) && (devType != QInternal::Pbuffer)) { @@ -426,11 +426,11 @@ EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig config, const QEg return surf; } - if (x11PixmapData) { + if (x11PlatformPixmap) { // X11 Pixmaps are only created with a depth, so that's all we need to check EGLint configDepth; eglGetConfigAttrib(QEgl::display(), config, EGL_BUFFER_SIZE , &configDepth); - if (x11PixmapData->depth() != configDepth) { + if (x11PlatformPixmap->depth() != configDepth) { // The bit depths are wrong which means the EGLConfig isn't compatable with // this pixmap. So we need to replace the pixmap's existing data with a new // one which is created with the correct depth: @@ -438,13 +438,13 @@ EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig config, const QEg #ifndef QT_NO_XRENDER if (configDepth == 32) { qWarning("Warning: EGLConfig's depth (32) != pixmap's depth (%d), converting to ARGB32", - x11PixmapData->depth()); - x11PixmapData->convertToARGB32(true); + x11PlatformPixmap->depth()); + x11PlatformPixmap->convertToARGB32(true); } else #endif { qWarning("Warning: EGLConfig's depth (%d) != pixmap's depth (%d)", - configDepth, x11PixmapData->depth()); + configDepth, x11PlatformPixmap->depth()); } } @@ -458,10 +458,10 @@ EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig config, const QEg surfaceAttribs.setValue(EGL_TEXTURE_FORMAT, EGL_TEXTURE_RGB); EGLSurface surf = eglCreatePixmapSurface(QEgl::display(), config, - (EGLNativePixmapType) x11PixmapData->handle(), + (EGLNativePixmapType) x11PlatformPixmap->handle(), surfaceAttribs.properties()); - x11PixmapData->gl_surface = (void*)surf; - QImagePixmapCleanupHooks::enableCleanupHooks(x11PixmapData); + x11PlatformPixmap->gl_surface = (void*)surf; + QImagePixmapCleanupHooks::enableCleanupHooks(x11PlatformPixmap); return surf; } -- cgit v1.2.3