Title: [132629] trunk/Source/WebCore
- Revision
- 132629
- Author
- [email protected]
- Date
- 2012-10-26 05:19:46 -0700 (Fri, 26 Oct 2012)
Log Message
[Qt] Temporarily disable use of QXcbNativeInterface in GraphicsSurfaceGLX.
https://bugs.webkit.org/show_bug.cgi?id=100493
Once QXcbNativeInterface::nativeResourceForContext() can provide the
GLXContext for an existing QOpenGLContext, this patch shall be reverted.
Patch by Zeno Albisser <[email protected]> on 2012-10-26
Reviewed by Simon Hausmann.
* platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
(WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (132628 => 132629)
--- trunk/Source/WebCore/ChangeLog 2012-10-26 12:19:21 UTC (rev 132628)
+++ trunk/Source/WebCore/ChangeLog 2012-10-26 12:19:46 UTC (rev 132629)
@@ -1,5 +1,18 @@
2012-10-26 Zeno Albisser <[email protected]>
+ [Qt] Temporarily disable use of QXcbNativeInterface in GraphicsSurfaceGLX.
+ https://bugs.webkit.org/show_bug.cgi?id=100493
+
+ Once QXcbNativeInterface::nativeResourceForContext() can provide the
+ GLXContext for an existing QOpenGLContext, this patch shall be reverted.
+
+ Reviewed by Simon Hausmann.
+
+ * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
+ (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
+
+2012-10-26 Zeno Albisser <[email protected]>
+
[Qt] Remove QOpenGL specific code from GraphicsSurfaceGLX.
https://bugs.webkit.org/show_bug.cgi?id=100492
Modified: trunk/Source/WebCore/platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp (132628 => 132629)
--- trunk/Source/WebCore/platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp 2012-10-26 12:19:21 UTC (rev 132628)
+++ trunk/Source/WebCore/platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp 2012-10-26 12:19:46 UTC (rev 132629)
@@ -119,16 +119,29 @@
, m_hasAlpha(false)
{
GLXContext shareContextObject = 0;
+ m_display = XOpenDisplay(0);
+
#if PLATFORM(QT)
if (shareContext) {
+#if 0
// This code path requires QXcbNativeInterface::nativeResourceForContext() which is not availble in Qt5 on the build bots yet.
QPlatformNativeInterface* nativeInterface = QGuiApplication::platformNativeInterface();
shareContextObject = static_cast<GLXContext>(nativeInterface->nativeResourceForContext(QByteArrayLiteral("glxcontext"), shareContext));
if (!shareContextObject)
return;
+#else
+ // This code path should be removed as soon as QXcbNativeInterface::nativeResourceForContext() can provide the GLXContext.
+ QOpenGLContext* previousContext = QOpenGLContext::currentContext();
+ QSurface* previousSurface = previousContext->surface();
+ QSurface* currentSurface = shareContext->surface();
+ shareContext->makeCurrent(currentSurface);
+
+ shareContextObject = glxGetCurrentContext();
+
+ previousContext->makeCurrent(previousSurface);
+#endif
}
#endif
- m_display = XOpenDisplay(0);
int attributes[] = {
GLX_LEVEL, 0,
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes