From 923f58af4b067179908e38819d5d8c9219602222 Mon Sep 17 00:00:00 2001 From: "don.olmstead@sony.com" Date: Mon, 8 Jan 2018 23:27:52 +0000 Subject: [PATCH] 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): git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226581 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/WebCore/ChangeLog | 16 ++++++++++++++++ Source/WebCore/platform/graphics/ANGLEWebKitBridge.h | 4 +--- Source/WebCore/platform/graphics/GLContext.h | 4 +--- Source/WebCore/platform/graphics/GraphicsContext3D.h | 4 ++-- Source/WebCore/platform/graphics/OpenGLESShims.h | 2 +- .../graphics/opengl/GraphicsContext3DOpenGLCommon.cpp | 2 +- 6 files changed, 22 insertions(+), 10 deletions(-) diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 0b0ccca..bcc8d16 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,19 @@ +2018-01-08 Don Olmstead + + 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 [RenderTreeBuilder] Move SVG addChild logic to RenderTreeBuilder diff --git a/Source/WebCore/platform/graphics/ANGLEWebKitBridge.h b/Source/WebCore/platform/graphics/ANGLEWebKitBridge.h index 884c639..dd4d60e 100644 --- a/Source/WebCore/platform/graphics/ANGLEWebKitBridge.h +++ b/Source/WebCore/platform/graphics/ANGLEWebKitBridge.h @@ -41,15 +41,13 @@ #include #elif PLATFORM(WIN) #include "OpenGLESShims.h" -#elif PLATFORM(GTK) || PLATFORM(WPE) -#if USE(LIBEPOXY) +#elif USE(LIBEPOXY) // already included above. #elif USE(OPENGL_ES_2) #include #else #include "OpenGLShims.h" #endif -#endif namespace WebCore { diff --git a/Source/WebCore/platform/graphics/GLContext.h b/Source/WebCore/platform/graphics/GLContext.h index 354e31f..191727f 100644 --- a/Source/WebCore/platform/graphics/GLContext.h +++ b/Source/WebCore/platform/graphics/GLContext.h @@ -29,10 +29,8 @@ // FIXME: For now default to the GBM EGL platform, but this should really be // somehow deducible from the build configuration. #define __GBM__ 1 -#include -#else -#include "eglplatform.h" #endif // PLATFORM(WPE) +#include typedef EGLNativeWindowType GLNativeWindowType; #else // !USE(EGL) || PLATFORM(GTK) typedef uint64_t GLNativeWindowType; diff --git a/Source/WebCore/platform/graphics/GraphicsContext3D.h b/Source/WebCore/platform/graphics/GraphicsContext3D.h index 62ad52b..872f0bf 100644 --- a/Source/WebCore/platform/graphics/GraphicsContext3D.h +++ b/Source/WebCore/platform/graphics/GraphicsContext3D.h @@ -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 nameHashMapForShaders; -#if ((PLATFORM(GTK) || PLATFORM(WIN) || PLATFORM(WPE)) && USE(OPENGL_ES_2)) +#if USE(OPENGL_ES_2) friend class Extensions3DOpenGLES; std::unique_ptr m_extensions; #else diff --git a/Source/WebCore/platform/graphics/OpenGLESShims.h b/Source/WebCore/platform/graphics/OpenGLESShims.h index ab7c6b8..bdee33a 100644 --- a/Source/WebCore/platform/graphics/OpenGLESShims.h +++ b/Source/WebCore/platform/graphics/OpenGLESShims.h @@ -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 diff --git a/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp b/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp index 0e4ac4b..6d9604e 100644 --- a/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp +++ b/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp @@ -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; -- 1.8.3.1