Title: [121051] trunk
Revision
121051
Author
[email protected]
Date
2012-06-22 13:10:10 -0700 (Fri, 22 Jun 2012)

Log Message

[BlackBerry] Sanitize GLSL code using ANGLE.

BlackBerry port does not sanitize GLSL code with ANGLE
https://bugs.webkit.org/show_bug.cgi?id=89583

Patch by Joshua Netterfield <[email protected]> on 2012-06-22
Reviewed by Rob Buis.

.:

* Source/cmake/OptionsBlackBerry.cmake: Include ANGLE openGL headers as system headers in BlackBerry port.

Source/ThirdParty/ANGLE:

* src/compiler/osinclude.h: Recognises QNX as POSIX

Source/WebCore:

No new tests are required.

* CMakeLists.txt: Added ANGLE requirment for CMake builds with WEBGL
* platform/graphics/ANGLEWebKitBridge.h: Added include for ANGLE/ShaderLang.h in BlackBerry platform.
* platform/graphics/GraphicsContext3D.h: Added include for ANGLEWebKitBridge.h in BlackBerry platform.

Source/WebKit:

* PlatformBlackBerry.cmake: Add ANGLE sources to BlackBerry builds.

Modified Paths

Diff

Modified: trunk/ChangeLog (121050 => 121051)


--- trunk/ChangeLog	2012-06-22 20:06:54 UTC (rev 121050)
+++ trunk/ChangeLog	2012-06-22 20:10:10 UTC (rev 121051)
@@ -1,3 +1,14 @@
+2012-06-22  Joshua Netterfield  <[email protected]>
+
+        [BlackBerry] Sanitize GLSL code using ANGLE.
+
+        BlackBerry port does not sanitize GLSL code with ANGLE
+        https://bugs.webkit.org/show_bug.cgi?id=89583
+
+        Reviewed by Rob Buis.
+
+        * Source/cmake/OptionsBlackBerry.cmake: Include ANGLE openGL headers as system headers in BlackBerry port.
+
 2012-06-21  Kalev Lember  <[email protected]>
 
         [GTK] Fix NPAPI plugins on Windows

Modified: trunk/Source/ThirdParty/ANGLE/ChangeLog (121050 => 121051)


--- trunk/Source/ThirdParty/ANGLE/ChangeLog	2012-06-22 20:06:54 UTC (rev 121050)
+++ trunk/Source/ThirdParty/ANGLE/ChangeLog	2012-06-22 20:10:10 UTC (rev 121051)
@@ -1,3 +1,14 @@
+2012-06-22  Joshua Netterfield  <[email protected]>
+
+        [BlackBerry] Sanitize GLSL code using ANGLE.
+
+        BlackBerry port does not sanitize GLSL code with ANGLE
+        https://bugs.webkit.org/show_bug.cgi?id=89583
+
+        Reviewed by Rob Buis.
+
+        * src/compiler/osinclude.h: Recognises QNX as POSIX
+
 2012-03-26  Dean Jackson  <[email protected]>
 
         Update ANGLE in WebKit

Modified: trunk/Source/ThirdParty/ANGLE/src/compiler/osinclude.h (121050 => 121051)


--- trunk/Source/ThirdParty/ANGLE/src/compiler/osinclude.h	2012-06-22 20:06:54 UTC (rev 121050)
+++ trunk/Source/ThirdParty/ANGLE/src/compiler/osinclude.h	2012-06-22 20:10:10 UTC (rev 121051)
@@ -17,7 +17,7 @@
 #elif defined(__APPLE__) || defined(__linux__) || \
       defined(__FreeBSD__) || defined(__OpenBSD__) || \
       defined(__sun) || defined(ANDROID) || \
-      defined(__GLIBC__) || defined(__GNU__)
+      defined(__GLIBC__) || defined(__GNU__) || defined(__QNX__)
 #define ANGLE_OS_POSIX
 #else
 #error Unsupported platform.

Modified: trunk/Source/WebCore/CMakeLists.txt (121050 => 121051)


--- trunk/Source/WebCore/CMakeLists.txt	2012-06-22 20:06:54 UTC (rev 121050)
+++ trunk/Source/WebCore/CMakeLists.txt	2012-06-22 20:10:10 UTC (rev 121051)
@@ -2296,22 +2296,27 @@
 ENDIF ()
 
 IF (ENABLE_WEBGL)
+    #ANGLE
     LIST(APPEND WebCore_INCLUDE_DIRECTORIES
+        ${OPENGL_INCLUDE_DIR}
         ${THIRDPARTY_DIR}/ANGLE/src
-        ${THIRDPARTY_DIR}/ANGLE/include
+       #${THIRDPARTY_DIR}/ANGLE/include #Defined as SYSTEM include in order to have less priority than actual system headers
         ${THIRDPARTY_DIR}/ANGLE/include/GLSLANG
-        ${WEBCORE_DIR}/platform/graphics/gpu
     )
+    LIST(APPEND WebCore_LIBRARIES
+        ${OPENGL_gl_LIBRARY}
+    )
     LIST(APPEND WebCore_SOURCES
         ${DERIVED_SOURCES_WEBCORE_DIR}/glslang.cpp
         ${DERIVED_SOURCES_WEBCORE_DIR}/glslang_tab.cpp
-        ${THIRDPARTY_DIR}/ANGLE/src/compiler/CodeGenGLSL.cpp
         ${THIRDPARTY_DIR}/ANGLE/src/compiler/BuiltInFunctionEmulator.cpp
         ${THIRDPARTY_DIR}/ANGLE/src/compiler/CodeGenGLSL.cpp
         ${THIRDPARTY_DIR}/ANGLE/src/compiler/Compiler.cpp
         ${THIRDPARTY_DIR}/ANGLE/src/compiler/debug.cpp
         ${THIRDPARTY_DIR}/ANGLE/src/compiler/DetectRecursion.cpp
         ${THIRDPARTY_DIR}/ANGLE/src/compiler/ForLoopUnroll.cpp
+        ${THIRDPARTY_DIR}/ANGLE/src/compiler/glslang_lex.cpp
+        ${THIRDPARTY_DIR}/ANGLE/src/compiler/glslang_tab.cpp
         ${THIRDPARTY_DIR}/ANGLE/src/compiler/InfoSink.cpp
         ${THIRDPARTY_DIR}/ANGLE/src/compiler/Initialize.cpp
         ${THIRDPARTY_DIR}/ANGLE/src/compiler/InitializeDll.cpp
@@ -2339,7 +2344,6 @@
         ${THIRDPARTY_DIR}/ANGLE/src/compiler/SearchSymbol.cpp
         ${THIRDPARTY_DIR}/ANGLE/src/compiler/ShaderLang.cpp
         ${THIRDPARTY_DIR}/ANGLE/src/compiler/SymbolTable.cpp
-        ${THIRDPARTY_DIR}/ANGLE/src/compiler/VersionGLSL.cpp
         ${THIRDPARTY_DIR}/ANGLE/src/compiler/TranslatorESSL.cpp
         ${THIRDPARTY_DIR}/ANGLE/src/compiler/TranslatorGLSL.cpp
         ${THIRDPARTY_DIR}/ANGLE/src/compiler/TranslatorHLSL.cpp
@@ -2347,6 +2351,13 @@
         ${THIRDPARTY_DIR}/ANGLE/src/compiler/util.cpp
         ${THIRDPARTY_DIR}/ANGLE/src/compiler/ValidateLimitations.cpp
         ${THIRDPARTY_DIR}/ANGLE/src/compiler/VariableInfo.cpp
+        ${THIRDPARTY_DIR}/ANGLE/src/compiler/VersionGLSL.cpp
+    )
+
+    LIST(APPEND WebCore_SOURCES
+        html/canvas/OESStandardDerivatives.cpp
+        html/canvas/OESTextureFloat.cpp
+        html/canvas/OESVertexArrayObject.cpp
         html/canvas/WebGLBuffer.cpp
         html/canvas/WebGLCompressedTextureS3TC.cpp
         html/canvas/WebGLContextAttributes.cpp

Modified: trunk/Source/WebCore/ChangeLog (121050 => 121051)


--- trunk/Source/WebCore/ChangeLog	2012-06-22 20:06:54 UTC (rev 121050)
+++ trunk/Source/WebCore/ChangeLog	2012-06-22 20:10:10 UTC (rev 121051)
@@ -1,3 +1,18 @@
+2012-06-22  Joshua Netterfield  <[email protected]>
+
+        [BlackBerry] Sanitize GLSL code using ANGLE.
+
+        BlackBerry port does not sanitize GLSL code with ANGLE
+        https://bugs.webkit.org/show_bug.cgi?id=89583
+
+        Reviewed by Rob Buis.
+
+        No new tests are required.
+
+        * CMakeLists.txt: Added ANGLE requirment for CMake builds with WEBGL
+        * platform/graphics/ANGLEWebKitBridge.h: Added include for ANGLE/ShaderLang.h in BlackBerry platform.
+        * platform/graphics/GraphicsContext3D.h: Added include for ANGLEWebKitBridge.h in BlackBerry platform.
+
 2012-06-22  Dan Bernstein  <[email protected]>
 
         RenderText’s minimum preferred width is incorrect when soft hyphens are used

Modified: trunk/Source/WebCore/platform/graphics/ANGLEWebKitBridge.h (121050 => 121051)


--- trunk/Source/WebCore/platform/graphics/ANGLEWebKitBridge.h	2012-06-22 20:06:54 UTC (rev 121050)
+++ trunk/Source/WebCore/platform/graphics/ANGLEWebKitBridge.h	2012-06-22 20:10:10 UTC (rev 121051)
@@ -31,7 +31,7 @@
 
 #if PLATFORM(QT)
 #include "ANGLE/include/GLSLANG/ShaderLang.h"
-#elif !PLATFORM(GTK) && !PLATFORM(EFL)
+#elif !PLATFORM(GTK) && !PLATFORM(EFL) && !PLATFORM(BLACKBERRY)
 #include "ANGLE/ShaderLang.h"
 #else
 #include "ShaderLang.h"

Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h (121050 => 121051)


--- trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h	2012-06-22 20:06:54 UTC (rev 121050)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h	2012-06-22 20:10:10 UTC (rev 121051)
@@ -43,7 +43,7 @@
 #undef VERSION
 #endif
 
-#if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(EFL)
+#if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(EFL) || PLATFORM(BLACKBERRY)
 #include "ANGLEWebKitBridge.h"
 #endif
 
@@ -91,6 +91,10 @@
 #include <CoreGraphics/CGContext.h>
 #endif
 
+#if PLATFORM(BLACKBERRY)
+#include <GLES2/gl2.h>
+#endif
+
 namespace WebCore {
 class DrawingBuffer;
 class Extensions3D;
@@ -108,6 +112,8 @@
 class IntSize;
 #if USE(CAIRO)
 class PlatformContextCairo;
+#elif PLATFORM(BLACKBERRY)
+class GraphicsContext;
 #endif
 
 struct ActiveInfo {
@@ -940,7 +946,7 @@
     RetainPtr<WebGLLayer> m_webGLLayer;
 #endif
 
-#if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(EFL)
+#if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(EFL) || PLATFORM(BLACKBERRY)
     typedef struct {
         String source;
         String log;

Modified: trunk/Source/WebKit/ChangeLog (121050 => 121051)


--- trunk/Source/WebKit/ChangeLog	2012-06-22 20:06:54 UTC (rev 121050)
+++ trunk/Source/WebKit/ChangeLog	2012-06-22 20:10:10 UTC (rev 121051)
@@ -1,3 +1,14 @@
+2012-06-22  Joshua Netterfield  <[email protected]>
+
+        [BlackBerry] Sanitize GLSL code using ANGLE.
+
+        BlackBerry port does not sanitize GLSL code with ANGLE
+        https://bugs.webkit.org/show_bug.cgi?id=89583
+
+        Reviewed by Rob Buis.
+
+        * PlatformBlackBerry.cmake: Add ANGLE sources to BlackBerry builds.
+
 2012-06-19  Csaba Osztrogonác  <[email protected]>
 
         [CMake] Unreviewed speculative buildfix after r120786.

Modified: trunk/Source/WebKit/PlatformBlackBerry.cmake (121050 => 121051)


--- trunk/Source/WebKit/PlatformBlackBerry.cmake	2012-06-22 20:06:54 UTC (rev 121050)
+++ trunk/Source/WebKit/PlatformBlackBerry.cmake	2012-06-22 20:10:10 UTC (rev 121051)
@@ -107,6 +107,18 @@
     blackberry/WebKitSupport/FatFingers.cpp
 )
 
+
+IF (ENABLE_WEBGL)
+    LIST(APPEND WebKit_INCLUDE_DIRECTORIES
+        ${OPENGL_INCLUDE_DIR}
+        ${THIRDPARTY_DIR}/ANGLE/src
+        ${THIRDPARTY_DIR}/ANGLE/include/GLSLANG
+    )
+    LIST(APPEND WebKit_LIBRARIES
+        ${OPENGL_gl_LIBRARY}
+    )
+ENDIF (ENABLE_WEBGL)
+
 IF (ENABLE_DRT)
     # DumpRenderTree sources
     LIST(APPEND WebKit_SOURCES

Modified: trunk/Source/cmake/OptionsBlackBerry.cmake (121050 => 121051)


--- trunk/Source/cmake/OptionsBlackBerry.cmake	2012-06-22 20:06:54 UTC (rev 121050)
+++ trunk/Source/cmake/OptionsBlackBerry.cmake	2012-06-22 20:10:10 UTC (rev 121051)
@@ -32,6 +32,9 @@
     FOREACH (directory ${ADDITIONAL_SYSTEM_INCLUDE_PATH})
         INCLUDE_DIRECTORIES(SYSTEM ${directory})
     ENDFOREACH ()
+    IF(ENABLE_WEBGL)
+        INCLUDE_DIRECTORIES(SYSTEM ${THIRDPARTY_DIR}/ANGLE/include) #As system so as to be lower-priority than actual system headers
+    ENDIF ()
 ENDIF ()
 
 IF (ENABLE_DRT)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to