Title: [149355] trunk
Revision
149355
Author
[email protected]
Date
2013-04-30 01:23:07 -0700 (Tue, 30 Apr 2013)

Log Message

Fix the USE(3D_GRAPHICS) build with the standard OpenGL on Windows
https://bugs.webkit.org/show_bug.cgi?id=114684

Reviewed by Simon Hausmann.

Source/WebCore:

Currently USE(3D_GRAPHICS) is only supported with OpenGLES through ANGLE
on Windows. Allow building with the stock opengl32.lib on Windows by adding
missing glCompressedTex* entries in OpenGLShims.
Those are used in Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
and will be substituted by the preprocessor.

* platform/graphics/OpenGLShims.cpp:
(WebCore::initializeOpenGLShims):
* platform/graphics/OpenGLShims.h:
(_OpenGLFunctionTable):

Tools:

Remove the ANGLE requirement for USE(3D_GRAPHICS).
This enables WebKit2 in the build when using a "-opengl desktop" configured Qt.

* qmake/mkspecs/features/features.prf:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (149354 => 149355)


--- trunk/Source/WebCore/ChangeLog	2013-04-30 07:40:38 UTC (rev 149354)
+++ trunk/Source/WebCore/ChangeLog	2013-04-30 08:23:07 UTC (rev 149355)
@@ -1,3 +1,21 @@
+2013-04-30  Jocelyn Turcotte  <[email protected]>
+
+        Fix the USE(3D_GRAPHICS) build with the standard OpenGL on Windows
+        https://bugs.webkit.org/show_bug.cgi?id=114684
+
+        Reviewed by Simon Hausmann.
+
+        Currently USE(3D_GRAPHICS) is only supported with OpenGLES through ANGLE
+        on Windows. Allow building with the stock opengl32.lib on Windows by adding
+        missing glCompressedTex* entries in OpenGLShims.
+        Those are used in Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
+        and will be substituted by the preprocessor.
+
+        * platform/graphics/OpenGLShims.cpp:
+        (WebCore::initializeOpenGLShims):
+        * platform/graphics/OpenGLShims.h:
+        (_OpenGLFunctionTable):
+
 2013-04-29  Alberto Garcia  <[email protected]>
 
         Remove all remaining Skia code

Modified: trunk/Source/WebCore/platform/graphics/OpenGLShims.cpp (149354 => 149355)


--- trunk/Source/WebCore/platform/graphics/OpenGLShims.cpp	2013-04-30 07:40:38 UTC (rev 149354)
+++ trunk/Source/WebCore/platform/graphics/OpenGLShims.cpp	2013-04-30 08:23:07 UTC (rev 149355)
@@ -144,6 +144,8 @@
     ASSIGN_FUNCTION_TABLE_ENTRY(glBufferSubData, success);
     ASSIGN_FUNCTION_TABLE_ENTRY(glCheckFramebufferStatus, success);
     ASSIGN_FUNCTION_TABLE_ENTRY(glCompileShader, success);
+    ASSIGN_FUNCTION_TABLE_ENTRY(glCompressedTexImage2D, success);
+    ASSIGN_FUNCTION_TABLE_ENTRY(glCompressedTexSubImage2D, success);
     ASSIGN_FUNCTION_TABLE_ENTRY(glCreateProgram, success);
     ASSIGN_FUNCTION_TABLE_ENTRY(glCreateShader, success);
     ASSIGN_FUNCTION_TABLE_ENTRY(glDeleteBuffers, success);

Modified: trunk/Source/WebCore/platform/graphics/OpenGLShims.h (149354 => 149355)


--- trunk/Source/WebCore/platform/graphics/OpenGLShims.h	2013-04-30 07:40:38 UTC (rev 149354)
+++ trunk/Source/WebCore/platform/graphics/OpenGLShims.h	2013-04-30 08:23:07 UTC (rev 149355)
@@ -63,6 +63,8 @@
 typedef void (GLAPIENTRY *glBufferSubDataType) (GLenum, GLintptr, GLsizeiptr, const GLvoid*);
 typedef GLenum (GLAPIENTRY *glCheckFramebufferStatusType) (GLenum);
 typedef void (GLAPIENTRY *glCompileShaderType) (GLuint);
+typedef void (GLAPIENTRY *glCompressedTexImage2DType) (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid*);
+typedef void (GLAPIENTRY *glCompressedTexSubImage2DType) (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid*);
 typedef GLuint (GLAPIENTRY *glCreateProgramType) ();
 typedef GLuint (GLAPIENTRY *glCreateShaderType) (GLenum);
 typedef void (GLAPIENTRY *glDeleteBuffersType) (GLsizei, const GLuint*);
@@ -163,6 +165,8 @@
     FUNCTION_TABLE_ENTRY(glBufferSubData);
     FUNCTION_TABLE_ENTRY(glCheckFramebufferStatus);
     FUNCTION_TABLE_ENTRY(glCompileShader);
+    FUNCTION_TABLE_ENTRY(glCompressedTexImage2D);
+    FUNCTION_TABLE_ENTRY(glCompressedTexSubImage2D);
     FUNCTION_TABLE_ENTRY(glCreateProgram);
     FUNCTION_TABLE_ENTRY(glCreateShader);
     FUNCTION_TABLE_ENTRY(glDeleteBuffers);
@@ -269,6 +273,8 @@
 #define glCheckFramebufferStatusEXT            glCheckFramebufferStatus
 #define glCheckFramebufferStatus               LOOKUP_GL_FUNCTION(glCheckFramebufferStatus)
 #define glCompileShader                        LOOKUP_GL_FUNCTION(glCompileShader)
+#define glCompressedTexImage2D                 LOOKUP_GL_FUNCTION(glCompressedTexImage2D)
+#define glCompressedTexSubImage2D              LOOKUP_GL_FUNCTION(glCompressedTexSubImage2D)
 #define glCreateProgram                        LOOKUP_GL_FUNCTION(glCreateProgram)
 #define glCreateShader                         LOOKUP_GL_FUNCTION(glCreateShader)
 #define glDeleteBuffers                        LOOKUP_GL_FUNCTION(glDeleteBuffers)

Modified: trunk/Tools/ChangeLog (149354 => 149355)


--- trunk/Tools/ChangeLog	2013-04-30 07:40:38 UTC (rev 149354)
+++ trunk/Tools/ChangeLog	2013-04-30 08:23:07 UTC (rev 149355)
@@ -1,3 +1,15 @@
+2013-04-30  Jocelyn Turcotte  <[email protected]>
+
+        Fix the USE(3D_GRAPHICS) build with the standard OpenGL on Windows
+        https://bugs.webkit.org/show_bug.cgi?id=114684
+
+        Reviewed by Simon Hausmann.
+
+        Remove the ANGLE requirement for USE(3D_GRAPHICS).
+        This enables WebKit2 in the build when using a "-opengl desktop" configured Qt.
+
+        * qmake/mkspecs/features/features.prf:
+
 2013-04-29  Zan Dobersek  <[email protected]>
 
         [GTK] Disable Shadow DOM feature

Modified: trunk/Tools/qmake/mkspecs/features/features.prf (149354 => 149355)


--- trunk/Tools/qmake/mkspecs/features/features.prf	2013-04-30 07:40:38 UTC (rev 149354)
+++ trunk/Tools/qmake/mkspecs/features/features.prf	2013-04-30 08:23:07 UTC (rev 149355)
@@ -84,10 +84,7 @@
 
     # Enable the USE(3D_GRAPHICS) flag when QtOpenGL is enabled.
     # Disable on Windows CE for now, as ANGLE won't compile.
-    !wince*:contains(QT_CONFIG, opengl) {
-        # On Windows we require GLES2/EGL through ANGLE.
-        !win32|contains(QT_CONFIG, opengles2): WEBKIT_CONFIG += use_3d_graphics
-    }
+    !wince*:contains(QT_CONFIG, opengl): WEBKIT_CONFIG += use_3d_graphics
 
     # Temporarily disable FTPDIR on Windows CE (missing functions from time.h)
     wince* {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to