[Qt][Texmap] Error of cross-compiling webkit with Qt 4.8.1
authornoam.rosenthal@nokia.com <noam.rosenthal@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 28 Apr 2012 18:53:08 +0000 (18:53 +0000)
committernoam.rosenthal@nokia.com <noam.rosenthal@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 28 Apr 2012 18:53:08 +0000 (18:53 +0000)
https://bugs.webkit.org/show_bug.cgi?id=84321

Speculative build-fix for Qt 4.8.
Use QGLContext for Qt 4.x instead of the platform-specific context.

Reviewed by Simon Hausmann.

No new tests, build fix.

* platform/graphics/texmap/TextureMapperGL.cpp:
(SharedGLData):
(WebCore::TextureMapperGLData::SharedGLData::getCurrentGLContext):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115576 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp

index 021711b..f269756 100644 (file)
@@ -1,5 +1,21 @@
 2012-04-28  No'am Rosenthal  <noam.rosenthal@nokia.com>
 
+        [Qt][Texmap] Error of cross-compiling webkit with Qt 4.8.1
+        https://bugs.webkit.org/show_bug.cgi?id=84321
+
+        Speculative build-fix for Qt 4.8.
+        Use QGLContext for Qt 4.x instead of the platform-specific context.
+
+        Reviewed by Simon Hausmann.
+
+        No new tests, build fix.
+
+        * platform/graphics/texmap/TextureMapperGL.cpp:
+        (SharedGLData):
+        (WebCore::TextureMapperGLData::SharedGLData::getCurrentGLContext):
+
+2012-04-28  No'am Rosenthal  <noam.rosenthal@nokia.com>
+
         [Texmap] Falling leaves demo missing opacity fade out animation
         https://bugs.webkit.org/show_bug.cgi?id=83691
 
index 87a3f9b..ff3c8ad 100644 (file)
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 
-#if PLATFORM(QT) && QT_VERSION >= 0x050000
+#if PLATFORM(QT)
+#if QT_VERSION >= 0x050000
 #include <QOpenGLContext>
 #include <QPlatformPixmap>
-#endif
-
-#if OS(WINDOWS)
+#else
+#include <QGLContext>
+#endif // QT_VERSION
+#elif OS(WINDOWS)
 #include <windows.h>
 #elif OS(MAC_OS_X)
 #include <AGL/agl.h>
 #endif
 
 #define GL_CMD(...) do { __VA_ARGS__; ASSERT_ARG(__VA_ARGS__, !glGetError()); } while (0)
-
 namespace WebCore {
 struct TextureMapperGLData {
     struct SharedGLData : public RefCounted<SharedGLData> {
-#if PLATFORM(QT) && QT_VERSION >= 0x050000
+#if PLATFORM(QT)
+#if QT_VERSION >= 0x050000
         typedef QOpenGLContext* GLContext;
         static GLContext getCurrentGLContext()
         {
             return QOpenGLContext::currentContext();
         }
+#else
+        typedef const QGLContext* GLContext;
+        static GLContext getCurrentGLContext()
+        {
+            return QGLContext::currentContext();
+        }
+#endif
 #elif OS(WINDOWS)
         typedef HGLRC GLContext;
         static GLContext getCurrentGLContext()