Skip to content
Permalink
Browse files
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):


Canonical link: https://commits.webkit.org/197255@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226581 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
donny-dont committed Jan 8, 2018
1 parent 3032a34 commit ad9ae0f50eb5016a2af98bee1a5531f4dc5c4d1e
@@ -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
@@ -41,15 +41,13 @@
#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 {

@@ -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 <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;
@@ -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 @@ class GraphicsContext3D : public RefCounted<GraphicsContext3D> {

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
@@ -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
@@ -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;

0 comments on commit ad9ae0f

Please sign in to comment.