Modified: trunk/Source/WebCore/ChangeLog (92129 => 92130)
--- trunk/Source/WebCore/ChangeLog 2011-08-01 16:09:37 UTC (rev 92129)
+++ trunk/Source/WebCore/ChangeLog 2011-08-01 16:10:12 UTC (rev 92130)
@@ -1,3 +1,22 @@
+2011-08-01 Benjamin Poulain <benja...@webkit.org>
+
+ [Qt] OpenGLShims does not build on ARM
+ https://bugs.webkit.org/show_bug.cgi?id=65465
+
+ Reviewed by Noam Rosenthal.
+
+ Fix the build with OpenGL ES 2:
+ -lookupOpenGLFunctionAddress() was defined but not used for OpenGL ES.
+ -glBlitFramebuffer() and glRenderbufferStorageMultisample() are not part of the specification.
+ When those are available as platform extension, the extension has been added.
+ -GLchar is not defined on some platform. The patch adds the same typedef as the official definition
+ to avoid conflicts.
+
+ * platform/graphics/cairo/OpenGLShims.cpp:
+ (lookupOpenGLFunctionAddress):
+ (WebCore::initializeOpenGLShims):
+ * platform/graphics/cairo/OpenGLShims.h:
+
2011-08-01 Yury Semikhatsky <yu...@chromium.org>
Unreviewed. Trivial fix for inspector/debugger/debugger-completions-on-call-frame.html after r92122.
Modified: trunk/Source/WebCore/platform/graphics/cairo/OpenGLShims.cpp (92129 => 92130)
--- trunk/Source/WebCore/platform/graphics/cairo/OpenGLShims.cpp 2011-08-01 16:09:37 UTC (rev 92129)
+++ trunk/Source/WebCore/platform/graphics/cairo/OpenGLShims.cpp 2011-08-01 16:10:12 UTC (rev 92130)
@@ -26,16 +26,19 @@
#include <wtf/text/CString.h>
#include <wtf/text/WTFString.h>
+namespace WebCore {
+
+OpenGLFunctionTable* openGLFunctionTable()
+{
+ static OpenGLFunctionTable table;
+ return &table;
+}
+
#if PLATFORM(QT) && defined(QT_OPENGL_ES_2)
#define ASSIGN_FUNCTION_TABLE_ENTRY(FunctionName, success) \
openGLFunctionTable()->FunctionName = ::FunctionName
#else
-#define ASSIGN_FUNCTION_TABLE_ENTRY(FunctionName, success) \
- openGLFunctionTable()->FunctionName = reinterpret_cast<FunctionName##Type>(lookupOpenGLFunctionAddress(#FunctionName, success))
-#endif
-namespace WebCore {
-
#if PLATFORM(QT)
static void* getProcAddress(const char* procName)
{
@@ -86,11 +89,9 @@
return target;
}
-OpenGLFunctionTable* openGLFunctionTable()
-{
- static OpenGLFunctionTable table;
- return &table;
-}
+#define ASSIGN_FUNCTION_TABLE_ENTRY(FunctionName, success) \
+ openGLFunctionTable()->FunctionName = reinterpret_cast<FunctionName##Type>(lookupOpenGLFunctionAddress(#FunctionName, success))
+#endif
bool initializeOpenGLShims()
{
@@ -110,7 +111,17 @@
ASSIGN_FUNCTION_TABLE_ENTRY(glBlendEquation, success);
ASSIGN_FUNCTION_TABLE_ENTRY(glBlendEquationSeparate, success);
ASSIGN_FUNCTION_TABLE_ENTRY(glBlendFuncSeparate, success);
+#if defined(GL_ES_VERSION_2_0)
+
+#if defined(GL_ANGLE_framebuffer_blit)
+ openGLFunctionTable()->glBlitFramebuffer = ::GL_ANGLE_framebuffer_blit;
+#else
+ openGLFunctionTable()->glBlitFramebuffer = 0;
+#endif
+
+#else
ASSIGN_FUNCTION_TABLE_ENTRY(glBlitFramebuffer, success);
+#endif
ASSIGN_FUNCTION_TABLE_ENTRY(glBufferData, success);
ASSIGN_FUNCTION_TABLE_ENTRY(glBufferSubData, success);
ASSIGN_FUNCTION_TABLE_ENTRY(glCheckFramebufferStatus, success);
@@ -156,7 +167,19 @@
ASSIGN_FUNCTION_TABLE_ENTRY(glIsShader, success);
ASSIGN_FUNCTION_TABLE_ENTRY(glLinkProgram, success);
ASSIGN_FUNCTION_TABLE_ENTRY(glRenderbufferStorage, success);
+#if defined(GL_ES_VERSION_2_0)
+
+#if defined(GL_APPLE_framebuffer_multisample)
+ openGLFunctionTable()->glRenderbufferStorageMultisample = ::glRenderbufferStorageMultisampleAPPLE;
+#elif defined(GL_ANGLE_framebuffer_multisample)
+ openGLFunctionTable()->glRenderbufferStorageMultisample = ::glRenderbufferStorageMultisampleANGLE;
+#else
+ openGLFunctionTable()->glRenderbufferStorageMultisample = 0;
+#endif
+
+#else
ASSIGN_FUNCTION_TABLE_ENTRY(glRenderbufferStorageMultisample, success);
+#endif
ASSIGN_FUNCTION_TABLE_ENTRY(glSampleCoverage, success);
ASSIGN_FUNCTION_TABLE_ENTRY(glShaderSource, success);
ASSIGN_FUNCTION_TABLE_ENTRY(glStencilFuncSeparate, success);
Modified: trunk/Source/WebCore/platform/graphics/cairo/OpenGLShims.h (92129 => 92130)
--- trunk/Source/WebCore/platform/graphics/cairo/OpenGLShims.h 2011-08-01 16:09:37 UTC (rev 92129)
+++ trunk/Source/WebCore/platform/graphics/cairo/OpenGLShims.h 2011-08-01 16:10:12 UTC (rev 92130)
@@ -23,6 +23,11 @@
#include <GL/gl.h>
#endif
+#if defined(GL_ES_VERSION_2_0)
+// Some openGL ES systems miss this typedef.
+typedef char GLchar;
+#endif
+
typedef struct _OpenGLFunctionTable OpenGLFunctionTable;
namespace WebCore {