Modified: trunk/Source/WebCore/ChangeLog (275857 => 275858)
--- trunk/Source/WebCore/ChangeLog 2021-04-13 02:06:28 UTC (rev 275857)
+++ trunk/Source/WebCore/ChangeLog 2021-04-13 02:25:18 UTC (rev 275858)
@@ -1,3 +1,27 @@
+2021-04-12 Don Olmstead <[email protected]>
+
+ Remove GraphicsContextGLOpenGLPrivate
+ https://bugs.webkit.org/show_bug.cgi?id=224446
+
+ Reviewed by Myles C. Maxfield.
+
+ GraphicsContextGLOpenGLPrivate is dead code. It requires AppleWin to turn on WebGL which
+ it does not. This removes all references to it.
+
+ * platform/graphics/opengl/GraphicsContextGLOpenGL.h:
+ * platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp:
+ (WebCore::GraphicsContextGLOpenGL::create): Deleted.
+ (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL): Deleted.
+ (WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL): Deleted.
+ (WebCore::GraphicsContextGLOpenGL::setContextLostCallback): Deleted.
+ (WebCore::GraphicsContextGLOpenGL::setErrorMessageCallback): Deleted.
+ (WebCore::GraphicsContextGLOpenGL::makeContextCurrent): Deleted.
+ (WebCore::GraphicsContextGLOpenGL::checkGPUStatus): Deleted.
+ (WebCore::GraphicsContextGLOpenGL::isGLES2Compliant const): Deleted.
+ (WebCore::GraphicsContextGLOpenGL::platformLayer const): Deleted.
+ * platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.cpp: Removed.
+ * platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.h: Removed.
+
2021-04-12 Commit Queue <[email protected]>
Unreviewed, reverting r275793.
Modified: trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h (275857 => 275858)
--- trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h 2021-04-13 02:06:28 UTC (rev 275857)
+++ trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h 2021-04-13 02:25:18 UTC (rev 275858)
@@ -94,8 +94,6 @@
typedef WTF::HashMap<CString, uint64_t> ShaderNameHash;
-class GraphicsContextGLOpenGLPrivate;
-
class WEBCORE_EXPORT GraphicsContextGLOpenGL final : public GraphicsContextGL
{
public:
@@ -755,9 +753,6 @@
#elif USE(TEXTURE_MAPPER)
friend class TextureMapperGCGLPlatformLayer;
std::unique_ptr<TextureMapperGCGLPlatformLayer> m_texmapLayer;
-#elif PLATFORM(WIN) && USE(CA)
- friend class GraphicsContextGLOpenGLPrivate;
- std::unique_ptr<GraphicsContextGLOpenGLPrivate> m_private;
#endif
bool m_isForWebGL2 { false };
Modified: trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp (275857 => 275858)
--- trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp 2021-04-13 02:06:28 UTC (rev 275857)
+++ trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp 2021-04-13 02:25:18 UTC (rev 275858)
@@ -275,148 +275,6 @@
}
#endif
-#if PLATFORM(WIN) && USE(CA)
-RefPtr<GraphicsContextGLOpenGL> GraphicsContextGLOpenGL::create(GraphicsContextGLAttributes attributes, HostWindow* hostWindow)
-{
- static bool initialized = false;
- static bool success = true;
- if (!initialized) {
-#if !USE(OPENGL_ES)
- success = initializeOpenGLShims();
-#endif
- initialized = true;
- }
- if (!success)
- return nullptr;
-
- return adoptRef(new GraphicsContextGLOpenGL(attributes, hostWindow, renderStyle));
}
-GraphicsContextGLOpenGL::GraphicsContextGLOpenGL(GraphicsContextGLAttributes attributes, HostWindow*, GraphicsContextGLOpenGL* sharedContext)
- : GraphicsContextGL(attributes, sharedContext)
- , m_compiler(isGLES2Compliant() ? SH_ESSL_OUTPUT : SH_GLSL_COMPATIBILITY_OUTPUT)
- , m_private(makeUnique<GraphicsContextGLOpenGLPrivate>(this))
-{
- ASSERT_UNUSED(sharedContext, !sharedContext);
- if (!makeContextCurrent())
- return;
-
-
- validateAttributes();
- attributes = contextAttributes(); // They may have changed during validation.
-
- // Create a texture to render into.
- ::glGenTextures(1, &m_texture);
- ::glBindTexture(GL_TEXTURE_2D, m_texture);
- ::glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- ::glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- ::glBindTexture(GL_TEXTURE_2D, 0);
-
- // Create an FBO.
- ::glGenFramebuffers(1, &m_fbo);
- ::glBindFramebuffer(GL_FRAMEBUFFER, m_fbo);
-
- m_state.boundDrawFBO = m_state.boundReadFbo = m_fbo;
- if (!attributes.antialias && (attributes.stencil || attributes.depth))
- ::glGenRenderbuffers(1, &m_depthStencilBuffer);
-
- // Create a multisample FBO.
- if (attributes.antialias) {
- ::glGenFramebuffers(1, &m_multisampleFBO);
- ::glBindFramebuffer(GL_FRAMEBUFFER, m_multisampleFBO);
- m_state.boundDrawFBO = m_state.boundReadFBO = m_multisampleFBO;
- ::glGenRenderbuffers(1, &m_multisampleColorBuffer);
- if (attributes.stencil || attributes.depth)
- ::glGenRenderbuffers(1, &m_multisampleDepthStencilBuffer);
- }
-
- // ANGLE initialization.
- ShBuiltInResources ANGLEResources;
- ShInitBuiltInResources(&ANGLEResources);
-
- ::glGetIntegerv(GraphicsContextGLOpenGL::MAX_VERTEX_ATTRIBS, &ANGLEResources.MaxVertexAttribs);
- ::glGetIntegerv(GraphicsContextGLOpenGL::MAX_VERTEX_UNIFORM_VECTORS, &ANGLEResources.MaxVertexUniformVectors);
- ::glGetIntegerv(GraphicsContextGLOpenGL::MAX_VARYING_VECTORS, &ANGLEResources.MaxVaryingVectors);
- ::glGetIntegerv(GraphicsContextGLOpenGL::MAX_VERTEX_TEXTURE_IMAGE_UNITS, &ANGLEResources.MaxVertexTextureImageUnits);
- ::glGetIntegerv(GraphicsContextGLOpenGL::MAX_COMBINED_TEXTURE_IMAGE_UNITS, &ANGLEResources.MaxCombinedTextureImageUnits);
- ::glGetIntegerv(GraphicsContextGLOpenGL::MAX_TEXTURE_IMAGE_UNITS, &ANGLEResources.MaxTextureImageUnits);
- ::glGetIntegerv(GraphicsContextGLOpenGL::MAX_FRAGMENT_UNIFORM_VECTORS, &ANGLEResources.MaxFragmentUniformVectors);
-
- // Always set to 1 for OpenGL ES.
- ANGLEResources.MaxDrawBuffers = 1;
-
- GCGLint range[2] { };
- GCGLint precision = 0;
- getShaderPrecisionFormat(GraphicsContextGLOpenGL::FRAGMENT_SHADER, GraphicsContextGLOpenGL::HIGH_FLOAT, range, &precision);
- ANGLEResources.FragmentPrecisionHigh = (range[0] || range[1] || precision);
-
- m_compiler.setResources(ANGLEResources);
-
-#if !USE(OPENGL_ES)
- ::glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
- ::glEnable(GL_POINT_SPRITE);
-#endif
-
- ::glClearColor(0, 0, 0, 0);
-}
-
-GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL()
-{
- if (!makeContextCurrent())
- return;
-
- ::glDeleteTextures(1, &m_texture);
-
- auto attributes = contextAttributes();
-
- if (attributes.antialias) {
- ::glDeleteRenderbuffers(1, &m_multisampleColorBuffer);
- if (attributes.stencil || attributes.depth)
- ::glDeleteRenderbuffers(1, &m_multisampleDepthStencilBuffer);
- ::glDeleteFramebuffers(1, &m_multisampleFBO);
- } else {
- if (attributes.stencil || attributes.depth)
- ::glDeleteRenderbuffers(1, &m_depthStencilBuffer);
- }
- ::glDeleteFramebuffers(1, &m_fbo);
-}
-
-void GraphicsContextGLOpenGL::setContextLostCallback(std::unique_ptr<ContextLostCallback>)
-{
-}
-
-void GraphicsContextGLOpenGL::setErrorMessageCallback(std::unique_ptr<ErrorMessageCallback>)
-{
-}
-
-bool GraphicsContextGLOpenGL::makeContextCurrent()
-{
- if (!m_private)
- return false;
- return m_private->makeContextCurrent();
-}
-
-void GraphicsContextGLOpenGL::checkGPUStatus()
-{
-}
-
-bool GraphicsContextGLOpenGL::isGLES2Compliant() const
-{
-#if USE(OPENGL_ES)
- return true;
-#else
- return false;
-#endif
-}
-
-PlatformLayer* GraphicsContextGLOpenGL::platformLayer() const
-{
- return m_webGLLayer->platformLayer();
-}
-#endif
-
-}
-
#endif // ENABLE(WEBGL) && USE(OPENGL_ES)
Deleted: trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.cpp (275857 => 275858)
--- trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.cpp 2021-04-13 02:06:28 UTC (rev 275857)
+++ trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.cpp 2021-04-13 02:25:18 UTC (rev 275858)
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2011, 2012 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA
- */
-
-#include "config.h"
-
-#if ENABLE(WEBGL) && PLATFORM(WIN) && USE(CA)
-#include "GraphicsContextGLOpenGLPrivate.h"
-
-#include "HostWindow.h"
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
-#include <wtf/StdLibExtras.h>
-
-namespace WebCore {
-
-GraphicsContextGLOpenGLPrivate::GraphicsContextGLOpenGLPrivate(GraphicsContextGLOpenGL*)
-{
- m_glContext = GLContext::createOffscreenContext(&PlatformDisplay::sharedDisplayForCompositing());
-}
-
-GraphicsContextGLOpenGLPrivate::~GraphicsContextGLOpenGLPrivate() = default;
-
-bool GraphicsContextGLOpenGLPrivate::makeContextCurrent()
-{
- return m_glContext ? m_glContext->makeContextCurrent() : false;
-}
-
-PlatformGraphicsContextGL GraphicsContextGLOpenGLPrivate::platformContext()
-{
- return m_glContext ? m_glContext->platformContext() : GLContext::current()->platformContext();
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(WEBGL) && PLATFORM(WIN) && USE(CA)
Deleted: trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.h (275857 => 275858)
--- trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.h 2021-04-13 02:06:28 UTC (rev 275857)
+++ trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.h 2021-04-13 02:25:18 UTC (rev 275858)
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2011 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA
- */
-
-#pragma once
-
-#if PLATFORM(WIN) && USE(CA)
-
-#include "GLContext.h"
-#include "GraphicsContextGLOpenGL.h"
-
-namespace WebCore {
-
-class BitmapTextureGL;
-
-class GraphicsContextGLOpenGLPrivate {
- WTF_MAKE_FAST_ALLOCATED;
-public:
- GraphicsContextGLOpenGLPrivate(GraphicsContextGLOpenGL*);
- ~GraphicsContextGLOpenGLPrivate();
- bool makeContextCurrent();
- PlatformGraphicsContextGL platformContext();
-
-private:
- std::unique_ptr<GLContext> m_glContext;
-};
-
-}
-
-#endif