Simplify platform checks in Graphics Context
authordon.olmstead@sony.com <don.olmstead@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 Jan 2018 23:27:52 +0000 (23:27 +0000)
committerdon.olmstead@sony.com <don.olmstead@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 Jan 2018 23:27:52 +0000 (23:27 +0000)
https://bugs.webkit.org/show_bug.cgi?id=181344

Reviewed by Alex Christensen.

No new tests. No change in behavior.

* platform/graphics/ANGLEWebKitBridge.h:
* platform/graphics/GLContext.h:
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/OpenGLESShims.h:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::checkVaryingsPacking const):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/ANGLEWebKitBridge.h
Source/WebCore/platform/graphics/GLContext.h
Source/WebCore/platform/graphics/GraphicsContext3D.h
Source/WebCore/platform/graphics/OpenGLESShims.h
Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp

index 0b0ccca..bcc8d16 100644 (file)
@@ -1,3 +1,19 @@
+2018-01-08  Don Olmstead  <don.olmstead@sony.com>
+
+        Simplify platform checks in Graphics Context
+        https://bugs.webkit.org/show_bug.cgi?id=181344
+
+        Reviewed by Alex Christensen.
+
+        No new tests. No change in behavior.
+
+        * platform/graphics/ANGLEWebKitBridge.h:
+        * platform/graphics/GLContext.h:
+        * platform/graphics/GraphicsContext3D.h:
+        * platform/graphics/OpenGLESShims.h:
+        * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
+        (WebCore::GraphicsContext3D::checkVaryingsPacking const):
+
 2018-01-08  Zalan Bujtas  <zalan@apple.com>
 
         [RenderTreeBuilder] Move SVG addChild logic to RenderTreeBuilder
index 884c639..dd4d60e 100644 (file)
 #include <OpenGL/gl.h>
 #elif PLATFORM(WIN)
 #include "OpenGLESShims.h"
-#elif PLATFORM(GTK) || PLATFORM(WPE)
-#if USE(LIBEPOXY)
+#elif USE(LIBEPOXY)
 // <epoxy/gl.h> already included above.
 #elif USE(OPENGL_ES_2)
 #include <GLES2/gl2.h>
 #else
 #include "OpenGLShims.h"
 #endif
-#endif
 
 namespace WebCore {
 
index 354e31f..191727f 100644 (file)
 // FIXME: For now default to the GBM EGL platform, but this should really be
 // somehow deducible from the build configuration.
 #define __GBM__ 1
-#include <EGL/eglplatform.h>
-#else
-#include "eglplatform.h"
 #endif // PLATFORM(WPE)
+#include <EGL/eglplatform.h>
 typedef EGLNativeWindowType GLNativeWindowType;
 #else // !USE(EGL) || PLATFORM(GTK)
 typedef uint64_t GLNativeWindowType;
index 62ad52b..872f0bf 100644 (file)
@@ -61,7 +61,7 @@
 OBJC_CLASS CALayer;
 OBJC_CLASS WebGLLayer;
 typedef struct __IOSurface* IOSurfaceRef;
-#elif PLATFORM(GTK) || PLATFORM(WIN_CAIRO) || PLATFORM(WPE)
+#else
 typedef unsigned int GLuint;
 #endif
 
@@ -1402,7 +1402,7 @@ private:
 
     std::unique_ptr<ShaderNameHash> nameHashMapForShaders;
 
-#if ((PLATFORM(GTK) || PLATFORM(WIN) || PLATFORM(WPE)) && USE(OPENGL_ES_2))
+#if USE(OPENGL_ES_2)
     friend class Extensions3DOpenGLES;
     std::unique_ptr<Extensions3DOpenGLES> m_extensions;
 #else
index ab7c6b8..bdee33a 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef OpenGLESShims_h
 #define OpenGLESShims_h
 
-#if PLATFORM(GTK) || PLATFORM(WIN) || PLATFORM(WPE)
+#if USE(OPENGL_ES_2)
 #define glBindFramebufferEXT glBindFramebuffer
 #define glFramebufferTexture2DEXT glFramebufferTexture2D
 #define glBindRenderbufferEXT glBindRenderbuffer
index 0e4ac4b..6d9604e 100644 (file)
@@ -397,7 +397,7 @@ bool GraphicsContext3D::checkVaryingsPacking(Platform3DObject vertexShader, Plat
         variables.push_back(varyingSymbol);
 
     GC3Dint maxVaryingVectors = 0;
-#if !PLATFORM(IOS) && !((PLATFORM(WIN) || PLATFORM(GTK) || PLATFORM(WPE)) && USE(OPENGL_ES_2))
+#if !PLATFORM(IOS) && !USE(OPENGL_ES_2)
     GC3Dint maxVaryingFloats = 0;
     ::glGetIntegerv(GL_MAX_VARYING_FLOATS, &maxVaryingFloats);
     maxVaryingVectors = maxVaryingFloats / 4;