Title: [131720] trunk/Source/WebCore
Revision
131720
Author
[email protected]
Date
2012-10-18 02:48:06 -0700 (Thu, 18 Oct 2012)

Log Message

Temporarily disable use of QCocoaNativeInterface in GraphicsSurfaceMac.
https://bugs.webkit.org/show_bug.cgi?id=99320

The current version of Qt5 deployed on the buildbots does not yet have
an implementation for QCocoaNativeInterface::nativeResourceForContext().
Therefore we disable this code path until Qt5/qtbase has been updated to
a revision above Change-Id: Id00efc88a73d7df04a68c022f19d9d1c4f6d386b.

Once Qt5 has been updated, this patch must be reverted.

Reviewed by Noam Rosenthal.

* platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
(WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (131719 => 131720)


--- trunk/Source/WebCore/ChangeLog	2012-10-18 09:44:11 UTC (rev 131719)
+++ trunk/Source/WebCore/ChangeLog	2012-10-18 09:48:06 UTC (rev 131720)
@@ -1,3 +1,20 @@
+2012-10-19  Zeno Albisser  <[email protected]>
+
+        Temporarily disable use of QCocoaNativeInterface in GraphicsSurfaceMac.
+        https://bugs.webkit.org/show_bug.cgi?id=99320
+
+        The current version of Qt5 deployed on the buildbots does not yet have
+        an implementation for QCocoaNativeInterface::nativeResourceForContext().
+        Therefore we disable this code path until Qt5/qtbase has been updated to
+        a revision above Change-Id: Id00efc88a73d7df04a68c022f19d9d1c4f6d386b.
+
+        Once Qt5 has been updated, this patch must be reverted.
+
+        Reviewed by Noam Rosenthal.
+
+        * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
+        (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
+
 2012-10-18  Zeno Albisser  <[email protected]>
 
         GraphicsSurface should not modify the current GL context.

Modified: trunk/Source/WebCore/platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp (131719 => 131720)


--- trunk/Source/WebCore/platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp	2012-10-18 09:44:11 UTC (rev 131719)
+++ trunk/Source/WebCore/platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp	2012-10-18 09:48:06 UTC (rev 131720)
@@ -91,11 +91,22 @@
         , m_drawFbo(0)
     {
 #if PLATFORM(QT)
+#if 0
+        // This code path requires QCocoaNativeInterface::nativeResourceForContext() which is not availble in Qt5 on the build bots yet.
         QPlatformNativeInterface* nativeInterface = QGuiApplication::platformNativeInterface();
         CGLContextObj shareContextObject = static_cast<CGLContextObj>(nativeInterface->nativeResourceForContext(QByteArrayLiteral("cglContextObj"), shareContext));
         if (!shareContextObject)
             return;
+#else
+        // This code path should be removed as soon as QCocoaNativeInterface::nativeResourceForContext() has become available in Qt5 on the build bots.
+        CGLContextObj previousContext = CGLGetCurrentContext();
+        QSurface* currentSurface = shareContext->surface();
+        shareContext->makeCurrent(currentSurface);
 
+        CGLContextObj shareContextObject = CGLGetCurrentContext();
+
+        CGLSetCurrentContext(previousContext);
+#endif
         CGLPixelFormatObj pixelFormatObject = CGLGetPixelFormat(shareContextObject);
         if (kCGLNoError != CGLCreateContext(pixelFormatObject, shareContextObject, &m_context))
             return;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to