Changeset 769 for trunk/src/opengl
- Timestamp:
- Aug 2, 2010, 9:27:30 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.6.3 (added) merged: 768 /branches/vendor/nokia/qt/current merged: 767 /branches/vendor/nokia/qt/4.6.2 removed
- Property svn:mergeinfo changed
-
trunk/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
r651 r769 266 266 do { 267 267 QByteArray source; 268 269 270 271 268 272 source.append(qShaderSnippets[prog.mainFragShader]); 269 273 source.append(qShaderSnippets[prog.srcPixelFragShader]); 270 if (prog.srcPixelFragShader == CustomImageSrcFragmentShader)271 source.append(prog.customStageSource);272 274 if (prog.compositionFragShader) 273 275 source.append(qShaderSnippets[prog.compositionFragShader]); … … 766 768 QGLContextPrivate* ctx_d = ctx->d_func(); 767 769 ctx_d->setVertexAttribArrayEnabled(QT_VERTEX_COORDS_ATTR, true); 768 ctx_d->setVertexAttribArrayEnabled(QT_TEXTURE_COORDS_ATTR, currentShaderProg ->useTextureCoords);769 ctx_d->setVertexAttribArrayEnabled(QT_OPACITY_ATTR, currentShaderProg ->useOpacityAttribute);770 ctx_d->setVertexAttribArrayEnabled(QT_TEXTURE_COORDS_ATTR, currentShaderProg->useTextureCoords); 771 ctx_d->setVertexAttribArrayEnabled(QT_OPACITY_ATTR, currentShaderProg->useOpacityAttribute); 770 772 771 773 shaderProgNeedsChanging = false; -
trunk/src/opengl/gl2paintengineex/qglengineshadersource_p.h
r651 r769 332 332 uniform lowp sampler2D imageTexture; \n\ 333 333 lowp vec4 srcPixel() \n\ 334 { \n\ 335 return texture2D(imageTexture, textureCoords); \n\ 336 }\n"; 334 { \n" 335 #ifdef QT_OPENGL_ES_2 336 // work-around for driver bug 337 "return 1.0 * texture2D(imageTexture, textureCoords); \n" 338 #else 339 "return texture2D(imageTexture, textureCoords); \n" 340 #endif 341 "}\n"; 337 342 338 343 static const char* const qglslCustomSrcFragmentShader = "\n\ 339 344 varying highp vec2 textureCoords; \n\ 340 345 uniform lowp sampler2D imageTexture; \n\ 341 lowp vec4 customShader(lowp sampler2D texture, highp vec2 coords); \n\342 346 lowp vec4 srcPixel() \n\ 343 347 { \n\ -
trunk/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
r651 r769 90 90 91 91 //#define QT_GL_NO_SCISSOR_TEST 92 93 94 92 95 93 96 extern QImage qt_imageForBrush(int brushStyle, bool invert); … … 182 185 183 186 glActiveTexture(GL_TEXTURE0 + QT_BRUSH_TEXTURE_UNIT); 184 ctx->d_func()->bindTexture(texImage, GL_TEXTURE_2D, GL_RGBA, true,QGLContext::InternalBindOption);187 ctx->d_func()->bindTexture(texImage, GL_TEXTURE_2D, GL_RGBA, QGLContext::InternalBindOption); 185 188 updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, q->state()->renderHints & QPainter::SmoothPixmapTransform); 186 189 } … … 1232 1235 : d->glyphCacheType; 1233 1236 1234 if (txtype > QTransform::TxTranslate) 1235 glyphType = QFontEngineGlyphCache::Raster_A8;1236 1237 if (glyphType == QFontEngineGlyphCache::Raster_RGBMask1238 && state()->composition_mode != QPainter::CompositionMode_Source1239 && state()->composition_mode != QPainter::CompositionMode_SourceOver)1240 {1241 drawCached = false;1237 1238 1239 if (d->device->alphaRequested() || txtype > QTransform::TxTranslate 1240 1241 1242 1243 1244 1242 1245 } 1243 1246 … … 1556 1559 #if !defined(QT_OPENGL_ES_2) 1557 1560 #if defined(Q_WS_WIN) 1558 extern Q_GUI_EXPORT bool qt_cleartype_enabled;1559 1561 if (qt_cleartype_enabled) 1560 1562 #endif … … 1596 1598 delete d->shaderManager; 1597 1599 d->shaderManager = 0; 1600 1598 1601 1599 1602 #ifdef QT_OPENGL_CACHE_AS_VBOS -
trunk/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
r651 r769 42 42 #include "qtextureglyphcache_gl_p.h" 43 43 #include "qpaintengineex_opengl2_p.h" 44 45 44 46 45 47 #ifdef Q_WS_WIN … … 244 246 #endif 245 247 } 248 249 -
trunk/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp
r651 r769 145 145 146 146 const qreal *endPts = pts + (count<<1); 147 const qreal *startPts ;147 const qreal *startPts; 148 148 149 149 Qt::PenCapStyle cap = m_cap_style; 150 150 151 151 if (!types) { 152 153 154 155 156 157 152 158 startPts = pts; 153 159 … … 162 168 pts += 2; 163 169 while (pts < endPts) { 164 join(pts); 165 lineTo(pts); 170 if (m_cx != pts[0] || m_cy != pts[1]) { 171 join(pts); 172 lineTo(pts); 173 } 166 174 pts += 2; 167 175 } … … 170 178 171 179 } else { 172 bool endsAtStart ;180 bool endsAtStart; 173 181 while (pts < endPts) { 174 182 switch (*types) { -
trunk/src/opengl/qgl.cpp
r651 r769 103 103 #if defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_WS_QWS) 104 104 QGLExtensionFuncs QGLContextPrivate::qt_extensionFuncs; 105 106 107 108 105 109 #endif 106 110 … … 1531 1535 for (int x=0; x < w; ++x) { 1532 1536 const uint pixel = *q; 1533 *q = ((pixel << 16) & 0xff0000) | ((pixel >> 16) & 0xff) | (pixel & 0xff00ff00); 1537 if (alpha_format && include_alpha) { 1538 *q = ((pixel << 16) & 0xff0000) | ((pixel >> 16) & 0xff) 1539 | (pixel & 0xff00ff00); 1540 } else { 1541 *q = 0xff000000 | ((pixel << 16) & 0xff0000) 1542 | ((pixel >> 16) & 0xff) | (pixel & 0x00ff00); 1543 } 1544 1534 1545 q++; 1535 1546 } … … 1542 1553 QImage qt_gl_read_framebuffer(const QSize &size, bool alpha_format, bool include_alpha) 1543 1554 { 1544 QImage img(size, alpha_format ? QImage::Format_ARGB32 : QImage::Format_RGB32); 1555 QImage img(size, (alpha_format && include_alpha) ? QImage::Format_ARGB32 1556 : QImage::Format_RGB32); 1545 1557 int w = size.width(); 1546 1558 int h = size.height(); … … 1591 1603 qt_gl_texture_cache = this; 1592 1604 1593 QImagePixmapCleanupHooks::instance()->addPixmapDataModificationHook(cleanupTextures );1605 QImagePixmapCleanupHooks::instance()->addPixmapDataModificationHook(cleanupTextures); 1594 1606 QImagePixmapCleanupHooks::instance()->addPixmapDataDestructionHook(cleanupBeforePixmapDestruction); 1595 QImagePixmapCleanupHooks::instance()->addImageHook( imageCleanupHook);1607 QImagePixmapCleanupHooks::instance()->addImageHook(); 1596 1608 } 1597 1609 … … 1600 1612 qt_gl_texture_cache = 0; 1601 1613 1602 QImagePixmapCleanupHooks::instance()->removePixmapDataModificationHook(cleanupTextures );1614 QImagePixmapCleanupHooks::instance()->removePixmapDataModificationHook(cleanupTextures); 1603 1615 QImagePixmapCleanupHooks::instance()->removePixmapDataDestructionHook(cleanupBeforePixmapDestruction); 1604 QImagePixmapCleanupHooks::instance()->removeImageHook( imageCleanupHook);1616 QImagePixmapCleanupHooks::instance()->removeImageHook(); 1605 1617 } 1606 1618 … … 1658 1670 is deref'ed 1659 1671 */ 1660 void QGLTextureCache::imageCleanupHook(qint64 cacheKey) 1661 { 1662 // ### remove when the GL texture cache becomes thread-safe 1663 if (qApp->thread() != QThread::currentThread()) 1664 return; 1665 QGLTexture *texture = instance()->getTexture(cacheKey); 1666 if (texture && texture->options & QGLContext::MemoryManagedBindOption) 1667 instance()->remove(cacheKey); 1668 } 1669 1670 1671 void QGLTextureCache::cleanupTextures(QPixmapData* pmd) 1672 void QGLTextureCache::cleanupTexturesForCacheKey(qint64 cacheKey) 1672 1673 { 1673 1674 // ### remove when the GL texture cache becomes thread-safe 1674 1675 if (qApp->thread() == QThread::currentThread()) { 1675 const qint64 cacheKey = pmd->cacheKey(); 1676 QGLTexture *texture = instance()->getTexture(cacheKey); 1677 if (texture && texture->options & QGLContext::MemoryManagedBindOption) 1678 instance()->remove(cacheKey); 1679 } 1676 instance()->remove(cacheKey); 1677 Q_ASSERT(instance()->getTexture(cacheKey) == 0); 1678 } 1679 } 1680 1681 1682 void QGLTextureCache::cleanupTexturesForPixampData(QPixmapData* pmd) 1683 { 1684 cleanupTexturesForCacheKey(pmd->cacheKey()); 1680 1685 } 1681 1686 … … 1683 1688 { 1684 1689 // Remove any bound textures first: 1685 cleanupTextures(pmd); 1686 Q_ASSERT(instance()->getTexture(pmd->cacheKey()) == 0); 1690 cleanupTexturesForPixampData(pmd); 1687 1691 1688 1692 #if defined(Q_WS_X11) … … 2085 2089 Q_ASSERT(texture); 2086 2090 2087 if (texture->id > 0) 2088 QImagePixmapCleanupHooks::enableCleanupHooks(image); 2091 // Enable the cleanup hooks for this image so that the texture cache entry is removed when the 2092 // image gets deleted: 2093 QImagePixmapCleanupHooks::enableCleanupHooks(image); 2089 2094 2090 2095 return texture; … … 2140 2145 2141 2146 QImage img = image; 2147 2142 2148 if (!(QGLExtensions::glExtensions() & QGLExtensions::NPOTTextures) 2143 2149 && !(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_ES_Version_2_0) … … 2308 2314 QGLTexture *texture = new QGLTexture(q, tx_id, target, options); 2309 2315 QGLTextureCache::instance()->insert(q, key, texture, cost); 2316 2310 2317 return texture; 2311 2318 } … … 2352 2359 #if defined(Q_WS_X11) 2353 2360 // Try to use texture_from_pixmap 2354 if (pd->classId() == QPixmapData::X11Class && pd->pixelType() == QPixmapData::PixmapType) { 2361 const QX11Info *xinfo = qt_x11Info(paintDevice); 2362 if (pd->classId() == QPixmapData::X11Class && pd->pixelType() == QPixmapData::PixmapType 2363 && xinfo && xinfo->screen() == pixmap.x11Info().screen()) 2364 { 2355 2365 texture = bindTextureFromNativePixmap(pd, key, options); 2356 2366 if (texture) { … … 2421 2431 2422 2432 Q_D(QGLContext); 2423 QGLTexture *texture = d->bindTexture(image, target, format, false,DefaultBindOption);2433 QGLTexture *texture = d->bindTexture(image, target, format, DefaultBindOption); 2424 2434 return texture->id; 2425 2435 } … … 2561 2571 GLuint texture = dds_cache->value(ddsKeys.at(i)); 2562 2572 if (id == texture) { 2563 glDeleteTextures(1, &texture);2564 2573 dds_cache->remove(ddsKeys.at(i)); 2565 return;2574 ; 2566 2575 } 2567 2576 } 2577 2578 2579 2568 2580 } 2569 2581 … … 4416 4428 4417 4429 QPaintEngine::Type oldEngineType = qgl_engine_selector()->preferredPaintEngine(); 4430 4431 4432 4433 4434 4435 4436 4437 4438 4418 4439 qgl_engine_selector()->setPreferredPaintEngine(QPaintEngine::OpenGL); 4419 QPaintEngine *engine = paintEngine();4440 engine = paintEngine(); 4420 4441 QPainter *p; 4421 4442 bool reuse_painter = false; … … 4510 4531 4511 4532 QPaintEngine::Type oldEngineType = qgl_engine_selector()->preferredPaintEngine(); 4533 4534 4535 4536 4537 4538 4539 4540 4541 4512 4542 qgl_engine_selector()->setPreferredPaintEngine(QPaintEngine::OpenGL); 4513 QPaintEngine *engine = paintEngine();4543 engine = paintEngine(); 4514 4544 QPainter *p; 4515 4545 bool reuse_painter = false; … … 5430 5460 quint32 width = pvrHeader->width; 5431 5461 quint32 height = pvrHeader->height; 5432 while (bufferSize > 0 && level < pvrHeader->mipMapCount) {5462 while (bufferSize > 0 && level < pvrHeader->mipMapCount) { 5433 5463 quint32 size = 5434 5464 (qMax(width, minWidth) * qMax(height, minHeight) * -
trunk/src/opengl/qgl_mac.mm
r651 r769 952 952 current = current->parentWidget(); 953 953 } 954 955 isGLWidget = 1;956 954 } 957 955 -
trunk/src/opengl/qgl_p.h
r651 r769 81 81 #endif //QT_OPENGL_ES_1_CL 82 82 83 #if def QT_OPENGL_ES83 #if 84 84 QT_BEGIN_INCLUDE_NAMESPACE 85 85 86 #if defined(QT_OPENGL_ES_2) 86 #include <EGL/egl.h> 87 # include <GLES2/gl2.h> 88 #endif 89 90 #if defined(QT_GLES_EGL) 91 # include <GLES/egl.h> 87 92 #else 88 #include <GLES/egl.h> 89 #endif 93 # include <EGL/egl.h> 94 #endif 95 90 96 QT_END_INCLUDE_NAMESPACE 91 97 #endif … … 180 186 , eglSurfaceWindowId(0) 181 187 #endif 182 {} 188 { 189 isGLWidget = 1; 190 } 183 191 184 192 ~QGLWidgetPrivate() {} … … 539 547 static QGLTextureCache *instance(); 540 548 static void deleteIfEmpty(); 541 static void imageCleanupHook(qint64 cacheKey);542 static void cleanupTextures (QPixmapData* pixmap);549 static void (qint64 cacheKey); 550 static void cleanupTextures(QPixmapData* pixmap); 543 551 static void cleanupBeforePixmapDestruction(QPixmapData* pixmap); 544 552 … … 571 579 572 580 // One resource per group of shared contexts. 573 class Q_ AUTOTEST_EXPORT QGLContextResource581 class Q__EXPORT QGLContextResource 574 582 { 575 583 public: -
trunk/src/opengl/qgl_qws.cpp
r651 r769 199 199 d->eglContext = new QEglContext(); 200 200 d->eglContext->setApi(QEgl::OpenGL); 201 if (!d->eglContext->openDisplay(device())) {202 delete d->eglContext;203 d->eglContext = 0;204 return false;205 }206 201 207 202 // Construct the configuration we need for this surface. -
trunk/src/opengl/qgl_wince.cpp
r651 r769 156 156 d->eglContext = new QEglContext(); 157 157 d->eglContext->setApi(QEgl::OpenGL); 158 if (!d->eglContext->openDisplay(device())) {159 delete d->eglContext;160 d->eglContext = 0;161 return false;162 }163 158 164 159 // Construct the configuration we need for this surface. -
trunk/src/opengl/qgl_x11.cpp
r651 r769 1657 1657 int screen = xinfo ? xinfo->screen() : X11->defaultScreen; 1658 1658 1659 QGLExtensionMatcher extensions(glXQueryExtensionsString(display, screen)); 1660 if (extensions.match("GLX_EXT_texture_from_pixmap")) { 1659 QGLExtensionMatcher serverExtensions(glXQueryExtensionsString(display, screen)); 1660 QGLExtensionMatcher clientExtensions(glXGetClientString(display, GLX_EXTENSIONS)); 1661 if (serverExtensions.match("GLX_EXT_texture_from_pixmap") 1662 && clientExtensions.match("GLX_EXT_texture_from_pixmap")) 1663 { 1661 1664 glXBindTexImageEXT = (qt_glXBindTexImageEXT) qglx_getProcAddress("glXBindTexImageEXT"); 1662 1665 glXReleaseTexImageEXT = (qt_glXReleaseTexImageEXT) qglx_getProcAddress("glXReleaseTexImageEXT"); -
trunk/src/opengl/qgl_x11egl.cpp
r651 r769 191 191 d->eglContext = new QEglContext(); 192 192 d->eglContext->setApi(QEgl::OpenGL); 193 if (!d->eglContext->openDisplay(device())) {194 delete d->eglContext;195 d->eglContext = 0;196 return false;197 }198 193 199 194 // Construct the configuration we need for this surface. … … 615 610 EGLint configCount = 0; 616 611 do { 617 eglChooseConfig(QEglContext::d efaultDisplay(0), configAttribs.properties(), targetConfig, 1, &configCount);612 eglChooseConfig(QEglContext::d), configAttribs.properties(), targetConfig, 1, &configCount); 618 613 if (configCount > 0) { 619 614 // Got one … … 654 649 655 650 EGLSurface pixmapSurface; 656 pixmapSurface = eglCreatePixmapSurface(QEglContext::d efaultDisplay(0),651 pixmapSurface = eglCreatePixmapSurface(QEglContext::d), 657 652 pixmapConfig, 658 653 (EGLNativePixmapType) pixmapData->handle(), … … 763 758 if (pixmapData->gl_surface) { 764 759 EGLBoolean success; 765 success = eglDestroySurface(QEglContext::d efaultDisplay(0), (EGLSurface)pixmapData->gl_surface);760 success = eglDestroySurface(QEglContext::d), (EGLSurface)pixmapData->gl_surface); 766 761 if (success == EGL_FALSE) { 767 762 qWarning() << "destroyGlSurfaceForPixmap() - Error deleting surface: " … … 778 773 if (pixmapData->gl_surface) { 779 774 EGLBoolean success; 780 success = eglReleaseTexImage(QEglContext::d efaultDisplay(0),775 success = eglReleaseTexImage(QEglContext::d), 781 776 (EGLSurface)pixmapData->gl_surface, 782 777 EGL_BACK_BUFFER); -
trunk/src/opengl/qglframebufferobject.cpp
r651 r769 330 330 fboFormat.setDepth(true); 331 331 } 332 333 334 335 336 337 338 332 339 } 333 340 -
trunk/src/opengl/qglframebufferobject_p.h
r651 r769 112 112 virtual QGLContext* context() const; 113 113 virtual QGLFormat format() const {return fboFormat;} 114 114 115 115 116 void setFBO(QGLFramebufferObject* f, … … 117 118 118 119 private: 119 bool wasBound;120 120 QGLFramebufferObject* fbo; 121 121 QGLFormat fboFormat; 122 123 122 124 }; 123 125 -
trunk/src/opengl/qglpaintdevice.cpp
r651 r769 127 127 { 128 128 return context()->format(); 129 130 131 132 133 129 134 } 130 135 -
trunk/src/opengl/qglpaintdevice_p.h
r651 r769 76 76 virtual QGLFormat format() const; 77 77 virtual QSize size() const = 0; 78 78 79 79 80 // returns the QGLPaintDevice for the given QPaintDevice -
trunk/src/opengl/qglpixelbuffer_egl.cpp
r651 r769 65 65 ctx = new QEglContext(); 66 66 ctx->setApi(QEgl::OpenGL); 67 68 // Open the EGL display.69 if (!ctx->openDisplay(0)) {70 delete ctx;71 ctx = 0;72 return false;73 }74 67 75 68 // Find the shared context. … … 216 209 { 217 210 // See if we have at least 1 configuration that matches the default format. 218 EGLDisplay dpy = QEglContext::d efaultDisplay(0);211 EGLDisplay dpy = QEglContext::d); 219 212 if (dpy == EGL_NO_DISPLAY) 220 213 return false; -
trunk/src/opengl/qglpixelbuffer_x11.cpp
r651 r769 182 182 qt_format_to_attrib_list(f, attribs); 183 183 184 GLXFBConfig *configs = glXChooseFBConfig(X11->display, X11->defaultScreen, attribs, &num_configs); 184 int screen = X11->defaultScreen; 185 if (shareWidget) 186 screen = shareWidget->x11Info().screen(); 187 188 GLXFBConfig *configs = glXChooseFBConfig(X11->display, screen, attribs, &num_configs); 185 189 if (configs && num_configs) { 186 190 int res; -
trunk/src/opengl/qglpixmapfilter.cpp
r651 r769 395 395 if (!hookAdded) { 396 396 QImagePixmapCleanupHooks::instance()->addPixmapDataDestructionHook(pixmapDestroyed); 397 397 398 hookAdded = true; 398 399 } … … 591 592 qt_blurImage(image, r * qreal(0.5), false, 1); 592 593 593 GLuint texture = generateBlurTexture(image.size(), GL_ALPHA); 594 595 glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, image.width(), image.height(), GL_ALPHA, 596 GL_UNSIGNED_BYTE, image.bits()); 594 GLuint texture; 595 glGenTextures(1, &texture); 596 glBindTexture(GL_TEXTURE_2D, texture); 597 glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, image.width(), image.height(), 598 0, GL_ALPHA, GL_UNSIGNED_BYTE, image.bits()); 597 599 598 600 info = new QGLBlurTextureInfo(image, texture, r); -
trunk/src/opengl/qglshaderprogram.cpp
r651 r769 970 970 is linked will be assigned locations automatically. 971 971 972 973 974 972 975 \sa attributeLocation() 973 976 */ … … 975 978 { 976 979 Q_D(QGLShaderProgram); 977 if (!d->linked) { 978 glBindAttribLocation(d->programGuard.id(), location, name); 979 } else { 980 qWarning() << "QGLShaderProgram::bindAttributeLocation(" << name 981 << "): cannot bind after shader program is linked"; 982 } 980 if (!init()) 981 return; 982 glBindAttribLocation(d->programGuard.id(), location, name); 983 d->linked = false; // Program needs to be relinked. 983 984 } 984 985 … … 991 992 is linked will be assigned locations automatically. 992 993 994 995 996 993 997 \sa attributeLocation() 994 998 */ … … 1005 1009 Any attributes that have not been explicitly bound when the program 1006 1010 is linked will be assigned locations automatically. 1011 1012 1013 1007 1014 1008 1015 \sa attributeLocation() -
trunk/src/opengl/qpaintengine_opengl.cpp
r651 r769 1454 1454 qt_mask_texture_cache()->maintainCache(); 1455 1455 1456 1457 1458 1459 1460 1456 1461 return true; 1457 1462 } -
trunk/src/opengl/qpixmapdata_gl.cpp
r651 r769 235 235 } 236 236 237 238 239 240 241 237 242 void QGLPixmapGLPaintDevice::setPixmapData(QGLPixmapData* d) 238 243 { -
trunk/src/opengl/qpixmapdata_gl_p.h
r651 r769 89 89 QGLContext* context() const; 90 90 QSize size() const; 91 91 92 92 93 void setPixmapData(QGLPixmapData*); -
trunk/src/opengl/qpixmapdata_x11gl_egl.cpp
r651 r769 97 97 EGL_NONE 98 98 }; 99 qPixmapARGBSharedEglContext = eglCreateContext(QEglContext::d efaultDisplay(0),99 qPixmapARGBSharedEglContext = eglCreateContext(QEglContext::d), 100 100 argbConfig, 0, contextAttribs); 101 101 … … 104 104 qPixmapRGBSharedEglContext = qPixmapARGBSharedEglContext; 105 105 } else { 106 qPixmapRGBSharedEglContext = eglCreateContext(QEglContext::d efaultDisplay(0),106 qPixmapRGBSharedEglContext = eglCreateContext(QEglContext::d), 107 107 rgbConfig, 0, contextAttribs); 108 108 } … … 115 115 break; 116 116 117 haveX11Pixmaps = eglMakeCurrent(QEglContext::d efaultDisplay(0),117 haveX11Pixmaps = eglMakeCurrent(QEglContext::d), 118 118 (EGLSurface)argbPixmapData->gl_surface, 119 119 (EGLSurface)argbPixmapData->gl_surface, … … 135 135 break; 136 136 137 haveX11Pixmaps = eglMakeCurrent(QEglContext::d efaultDisplay(0),137 haveX11Pixmaps = eglMakeCurrent(QEglContext::d), 138 138 (EGLSurface)rgbPixmapData->gl_surface, 139 139 (EGLSurface)rgbPixmapData->gl_surface, … … 148 148 149 149 if (qPixmapARGBSharedEglContext || qPixmapRGBSharedEglContext) { 150 eglMakeCurrent(QEglContext::d efaultDisplay(0),150 eglMakeCurrent(QEglContext::d