Rename GraphicsContext3D to GraphicsContextGL
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Jan 2020 18:52:42 +0000 (18:52 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Jan 2020 18:52:42 +0000 (18:52 +0000)
https://bugs.webkit.org/show_bug.cgi?id=205778
<rdar://problem/58327597>

Reviewed by Sam Weinig.

Rename all the GraphicsContext3D things to GraphicsContextGL
(includes Extensions3D and GRAPHICS_CONTEXT_3D).

GraphicsContext3DBase now becomes GraphicsContextGL.
GraphicsContext3D is now GraphicsContextGLOpenGL (since it represents
the OpenGL implementation of the API).

.:

* Source/CMakeLists.txt:
* Source/cmake/OptionsFTW.cmake:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsMac.cmake:
* Source/cmake/OptionsPlayStation.cmake:
* Source/cmake/OptionsWPE.cmake:
* Source/cmake/OptionsWinCairo.cmake:

PerformanceTests:

* StitchMarker/wtf/FeatureDefines.h:
* StitchMarker/wtf/Platform.h:

Source/WebCore:

* CMakeLists.txt:
* Headers.cmake:
* PlatformAppleWin.cmake:
* PlatformFTW.cmake:
* PlatformGTK.cmake:
* PlatformMac.cmake:
* PlatformPlayStation.cmake:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* SourcesGTK.txt:
* SourcesWPE.txt:
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLVideoElement.cpp:
* html/HTMLVideoElement.h:
* html/OffscreenCanvas.cpp:
* html/canvas/ANGLEInstancedArrays.cpp:
* html/canvas/OESVertexArrayObject.cpp:
* html/canvas/WebGL2RenderingContext.cpp:
* html/canvas/WebGL2RenderingContext.h:
* html/canvas/WebGLActiveInfo.h:
* html/canvas/WebGLBuffer.cpp:
* html/canvas/WebGLBuffer.h:
* html/canvas/WebGLCompressedTextureASTC.cpp:
* html/canvas/WebGLCompressedTextureATC.cpp:
* html/canvas/WebGLCompressedTextureETC.cpp:
* html/canvas/WebGLCompressedTextureETC1.cpp:
* html/canvas/WebGLCompressedTexturePVRTC.cpp:
* html/canvas/WebGLCompressedTextureS3TC.cpp:
* html/canvas/WebGLContextAttributes.h:
* html/canvas/WebGLContextGroup.cpp:
* html/canvas/WebGLContextGroup.h:
* html/canvas/WebGLContextObject.cpp:
* html/canvas/WebGLContextObject.h:
* html/canvas/WebGLDebugShaders.cpp:
* html/canvas/WebGLDepthTexture.cpp:
* html/canvas/WebGLDepthTexture.h:
* html/canvas/WebGLDrawBuffers.cpp:
* html/canvas/WebGLFramebuffer.cpp:
* html/canvas/WebGLFramebuffer.h:
* html/canvas/WebGLObject.cpp:
* html/canvas/WebGLObject.h:
* html/canvas/WebGLProgram.cpp:
* html/canvas/WebGLProgram.h:
* html/canvas/WebGLQuery.cpp:
* html/canvas/WebGLQuery.h:
* html/canvas/WebGLRenderbuffer.cpp:
* html/canvas/WebGLRenderbuffer.h:
* html/canvas/WebGLRenderingContext.cpp:
* html/canvas/WebGLRenderingContext.h:
* html/canvas/WebGLRenderingContextBase.cpp:
* html/canvas/WebGLRenderingContextBase.h:
* html/canvas/WebGLSampler.cpp:
* html/canvas/WebGLSampler.h:
* html/canvas/WebGLShader.cpp:
* html/canvas/WebGLShader.h:
* html/canvas/WebGLShaderPrecisionFormat.h:
* html/canvas/WebGLSharedObject.cpp:
* html/canvas/WebGLSharedObject.h:
* html/canvas/WebGLSync.cpp:
* html/canvas/WebGLSync.h:
* html/canvas/WebGLTexture.cpp:
* html/canvas/WebGLTexture.h:
* html/canvas/WebGLTransformFeedback.cpp:
* html/canvas/WebGLTransformFeedback.h:
* html/canvas/WebGLVertexArrayObject.cpp:
* html/canvas/WebGLVertexArrayObject.h:
* html/canvas/WebGLVertexArrayObjectBase.cpp:
* html/canvas/WebGLVertexArrayObjectBase.h:
* html/canvas/WebGLVertexArrayObjectOES.cpp:
* html/canvas/WebGLVertexArrayObjectOES.h:
* inspector/InspectorShaderProgram.cpp:
* loader/FrameLoaderClient.h:
* page/Chrome.cpp:
* platform/SourcesCairo.txt:
* platform/TextureMapper.cmake:
* platform/WebGLStateTracker.cpp:
* platform/WebGLStateTracker.h:
* platform/graphics/ANGLEWebKitBridge.cpp:
* platform/graphics/ExtensionsGL.h: Renamed from Source/WebCore/platform/graphics/Extensions3D.h.
* platform/graphics/FormatConverter.cpp:
* platform/graphics/FormatConverter.h:
* platform/graphics/GLContext.cpp:
* platform/graphics/GLContext.h:
* platform/graphics/GraphicsContext.h:
* platform/graphics/GraphicsContext3D.cpp: Removed.
* platform/graphics/GraphicsContext3DBase.cpp: Removed.
* platform/graphics/GraphicsContextGL.cpp: Added.
* platform/graphics/GraphicsContextGL.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DBase.h.
* platform/graphics/GraphicsContextGLAttributes.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DAttributes.h.
* platform/graphics/ImageBuffer.cpp:
* platform/graphics/ImageBuffer.h:
* platform/graphics/MediaPlayer.cpp:
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
* platform/graphics/OpenGLShims.cpp:
* platform/graphics/angle/ExtensionsGLANGLE.cpp: Renamed from Source/WebCore/platform/graphics/angle/Extensions3DANGLE.cpp.
* platform/graphics/angle/ExtensionsGLANGLE.h: Renamed from Source/WebCore/platform/graphics/angle/Extensions3DANGLE.h.
* platform/graphics/angle/GraphicsContextGLANGLE.cpp: Renamed from Source/WebCore/platform/graphics/angle/GraphicsContext3DANGLE.cpp.
* platform/graphics/angle/TemporaryANGLESetting.cpp:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
* platform/graphics/cairo/GraphicsContextGLCairo.cpp: Renamed from Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp.
* platform/graphics/cairo/ImageBufferCairo.cpp:
* platform/graphics/cg/GraphicsContextGLCG.cpp: Renamed from Source/WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp.
* platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: Renamed from Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm.
* platform/graphics/cocoa/IOSurface.mm:
* platform/graphics/cocoa/WebGLLayer.h:
* platform/graphics/cocoa/WebGLLayer.mm:
* platform/graphics/cpu/arm/GraphicsContextGLNEON.h: Renamed from Source/WebCore/platform/graphics/cpu/arm/GraphicsContext3DNEON.h.
* platform/graphics/cv/TextureCacheCV.h:
* platform/graphics/cv/TextureCacheCV.mm:
* platform/graphics/cv/VideoTextureCopierCV.cpp:
* platform/graphics/cv/VideoTextureCopierCV.h:
* platform/graphics/egl/GLContextEGL.cpp:
* platform/graphics/egl/GLContextEGL.h:
* platform/graphics/glx/GLContextGLX.cpp:
* platform/graphics/glx/GLContextGLX.h:
* platform/graphics/gpu/Texture.cpp:
* platform/graphics/gpu/Texture.h:
* platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* platform/graphics/ios/GraphicsContextGLOpenGLESIOS.h: Renamed from Source/WebCore/platform/graphics/ios/GraphicsContext3DIOS.h.
* platform/graphics/nicosia/texmap/NicosiaGC3DANGLELayer.cpp:
* platform/graphics/nicosia/texmap/NicosiaGC3DANGLELayer.h:
* platform/graphics/nicosia/texmap/NicosiaGC3DLayer.cpp:
* platform/graphics/nicosia/texmap/NicosiaGC3DLayer.h:
* platform/graphics/opengl/ExtensionsGLOpenGL.cpp: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp.
* platform/graphics/opengl/ExtensionsGLOpenGL.h: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.h.
* platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp.
* platform/graphics/opengl/ExtensionsGLOpenGLCommon.h: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.h.
* platform/graphics/opengl/ExtensionsGLOpenGLES.cpp: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp.
* platform/graphics/opengl/ExtensionsGLOpenGLES.h: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h.
* platform/graphics/opengl/GraphicsContextGLOpenGL.cpp: Added.
* platform/graphics/opengl/GraphicsContextGLOpenGL.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3D.h.
* platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp: Renamed from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp.
* platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp: Renamed from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp.
* platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp: Renamed from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp.
* platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DManager.cpp.
* platform/graphics/opengl/GraphicsContextGLOpenGLManager.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DManager.h.
* platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.cpp: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DPrivate.cpp.
* platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DPrivate.h.
* platform/graphics/opengl/TemporaryOpenGLSetting.cpp:
* platform/graphics/opengl/TemporaryOpenGLSetting.h:
* platform/graphics/texmap/BitmapTextureGL.cpp:
* platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp: Renamed from Source/WebCore/platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp.
* platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp:
* platform/graphics/texmap/TextureMapperGC3DPlatformLayer.h:
* platform/graphics/texmap/TextureMapperGL.cpp:
* platform/graphics/win/GraphicsContextGLDirect2D.cpp: Renamed from Source/WebCore/platform/graphics/win/GraphicsContext3DDirect2D.cpp.
* testing/Internals.cpp:

Source/WebKit:

* CMakeLists.txt:
* UIProcess/gtk/WaylandCompositor.cpp:
(WebKit::WaylandCompositor::initializeEGL):
* UIProcess/mac/HighPerformanceGPUManager.cpp:
* WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
(WebKit::MediaPlayerPrivateRemote::copyVideoTextureToPlatformTexture):
* WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/mac/WebPageMac.mm:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::displayConfigurationChanged):

Source/WTF:

* wtf/FeatureDefines.h:
* wtf/Platform.h:

Tools:

* Scripts/webkitpy/common/config/watchlist:

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

180 files changed:
ChangeLog
PerformanceTests/ChangeLog
PerformanceTests/StitchMarker/wtf/FeatureDefines.h
PerformanceTests/StitchMarker/wtf/Platform.h
Source/CMakeLists.txt
Source/WTF/ChangeLog
Source/WTF/wtf/FeatureDefines.h
Source/WTF/wtf/Platform.h
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/Headers.cmake
Source/WebCore/PlatformAppleWin.cmake
Source/WebCore/PlatformFTW.cmake
Source/WebCore/PlatformGTK.cmake
Source/WebCore/PlatformMac.cmake
Source/WebCore/PlatformPlayStation.cmake
Source/WebCore/PlatformWin.cmake
Source/WebCore/Sources.txt
Source/WebCore/SourcesCocoa.txt
Source/WebCore/SourcesGTK.txt
Source/WebCore/SourcesWPE.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/html/HTMLVideoElement.cpp
Source/WebCore/html/HTMLVideoElement.h
Source/WebCore/html/OffscreenCanvas.cpp
Source/WebCore/html/canvas/ANGLEInstancedArrays.cpp
Source/WebCore/html/canvas/OESVertexArrayObject.cpp
Source/WebCore/html/canvas/WebGL2RenderingContext.cpp
Source/WebCore/html/canvas/WebGL2RenderingContext.h
Source/WebCore/html/canvas/WebGLActiveInfo.h
Source/WebCore/html/canvas/WebGLBuffer.cpp
Source/WebCore/html/canvas/WebGLBuffer.h
Source/WebCore/html/canvas/WebGLCompressedTextureASTC.cpp
Source/WebCore/html/canvas/WebGLCompressedTextureATC.cpp
Source/WebCore/html/canvas/WebGLCompressedTextureETC.cpp
Source/WebCore/html/canvas/WebGLCompressedTextureETC1.cpp
Source/WebCore/html/canvas/WebGLCompressedTexturePVRTC.cpp
Source/WebCore/html/canvas/WebGLCompressedTextureS3TC.cpp
Source/WebCore/html/canvas/WebGLContextAttributes.h
Source/WebCore/html/canvas/WebGLContextGroup.cpp
Source/WebCore/html/canvas/WebGLContextGroup.h
Source/WebCore/html/canvas/WebGLContextObject.cpp
Source/WebCore/html/canvas/WebGLContextObject.h
Source/WebCore/html/canvas/WebGLDebugShaders.cpp
Source/WebCore/html/canvas/WebGLDepthTexture.cpp
Source/WebCore/html/canvas/WebGLDepthTexture.h
Source/WebCore/html/canvas/WebGLDrawBuffers.cpp
Source/WebCore/html/canvas/WebGLFramebuffer.cpp
Source/WebCore/html/canvas/WebGLFramebuffer.h
Source/WebCore/html/canvas/WebGLObject.cpp
Source/WebCore/html/canvas/WebGLObject.h
Source/WebCore/html/canvas/WebGLProgram.cpp
Source/WebCore/html/canvas/WebGLProgram.h
Source/WebCore/html/canvas/WebGLQuery.cpp
Source/WebCore/html/canvas/WebGLQuery.h
Source/WebCore/html/canvas/WebGLRenderbuffer.cpp
Source/WebCore/html/canvas/WebGLRenderbuffer.h
Source/WebCore/html/canvas/WebGLRenderingContext.cpp
Source/WebCore/html/canvas/WebGLRenderingContext.h
Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
Source/WebCore/html/canvas/WebGLRenderingContextBase.h
Source/WebCore/html/canvas/WebGLSampler.cpp
Source/WebCore/html/canvas/WebGLSampler.h
Source/WebCore/html/canvas/WebGLShader.cpp
Source/WebCore/html/canvas/WebGLShader.h
Source/WebCore/html/canvas/WebGLShaderPrecisionFormat.h
Source/WebCore/html/canvas/WebGLSharedObject.cpp
Source/WebCore/html/canvas/WebGLSharedObject.h
Source/WebCore/html/canvas/WebGLSync.cpp
Source/WebCore/html/canvas/WebGLSync.h
Source/WebCore/html/canvas/WebGLTexture.cpp
Source/WebCore/html/canvas/WebGLTexture.h
Source/WebCore/html/canvas/WebGLTransformFeedback.cpp
Source/WebCore/html/canvas/WebGLTransformFeedback.h
Source/WebCore/html/canvas/WebGLVertexArrayObject.cpp
Source/WebCore/html/canvas/WebGLVertexArrayObject.h
Source/WebCore/html/canvas/WebGLVertexArrayObjectBase.cpp
Source/WebCore/html/canvas/WebGLVertexArrayObjectBase.h
Source/WebCore/html/canvas/WebGLVertexArrayObjectOES.cpp
Source/WebCore/html/canvas/WebGLVertexArrayObjectOES.h
Source/WebCore/inspector/InspectorShaderProgram.cpp
Source/WebCore/loader/FrameLoaderClient.h
Source/WebCore/page/Chrome.cpp
Source/WebCore/platform/SourcesCairo.txt
Source/WebCore/platform/TextureMapper.cmake
Source/WebCore/platform/WebGLStateTracker.cpp
Source/WebCore/platform/WebGLStateTracker.h
Source/WebCore/platform/graphics/ANGLEWebKitBridge.cpp
Source/WebCore/platform/graphics/ExtensionsGL.h [moved from Source/WebCore/platform/graphics/Extensions3D.h with 97% similarity]
Source/WebCore/platform/graphics/FormatConverter.cpp
Source/WebCore/platform/graphics/FormatConverter.h
Source/WebCore/platform/graphics/GLContext.cpp
Source/WebCore/platform/graphics/GLContext.h
Source/WebCore/platform/graphics/GraphicsContext.h
Source/WebCore/platform/graphics/GraphicsContext3D.cpp [deleted file]
Source/WebCore/platform/graphics/GraphicsContext3DBase.cpp [deleted file]
Source/WebCore/platform/graphics/GraphicsContextGL.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/GraphicsContextGL.h [moved from Source/WebCore/platform/graphics/GraphicsContext3DBase.h with 98% similarity]
Source/WebCore/platform/graphics/GraphicsContextGLAttributes.h [moved from Source/WebCore/platform/graphics/GraphicsContext3DAttributes.h with 93% similarity]
Source/WebCore/platform/graphics/ImageBuffer.cpp
Source/WebCore/platform/graphics/ImageBuffer.h
Source/WebCore/platform/graphics/MediaPlayer.cpp
Source/WebCore/platform/graphics/MediaPlayer.h
Source/WebCore/platform/graphics/MediaPlayerPrivate.h
Source/WebCore/platform/graphics/OpenGLShims.cpp
Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.cpp [moved from Source/WebCore/platform/graphics/angle/Extensions3DANGLE.cpp with 80% similarity]
Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.h [moved from Source/WebCore/platform/graphics/angle/Extensions3DANGLE.h with 92% similarity]
Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp [moved from Source/WebCore/platform/graphics/angle/GraphicsContext3DANGLE.cpp with 68% similarity]
Source/WebCore/platform/graphics/angle/TemporaryANGLESetting.cpp
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm
Source/WebCore/platform/graphics/cairo/GraphicsContextGLCairo.cpp [moved from Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp with 91% similarity]
Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp
Source/WebCore/platform/graphics/cg/GraphicsContextGLCG.cpp [moved from Source/WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp with 84% similarity]
Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm [moved from Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm with 83% similarity]
Source/WebCore/platform/graphics/cocoa/IOSurface.mm
Source/WebCore/platform/graphics/cocoa/WebGLLayer.h
Source/WebCore/platform/graphics/cocoa/WebGLLayer.mm
Source/WebCore/platform/graphics/cpu/arm/GraphicsContextGLNEON.h [moved from Source/WebCore/platform/graphics/cpu/arm/GraphicsContext3DNEON.h with 99% similarity]
Source/WebCore/platform/graphics/cv/TextureCacheCV.h
Source/WebCore/platform/graphics/cv/TextureCacheCV.mm
Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp
Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.h
Source/WebCore/platform/graphics/egl/GLContextEGL.cpp
Source/WebCore/platform/graphics/egl/GLContextEGL.h
Source/WebCore/platform/graphics/glx/GLContextGLX.cpp
Source/WebCore/platform/graphics/glx/GLContextGLX.h
Source/WebCore/platform/graphics/gpu/Texture.cpp
Source/WebCore/platform/graphics/gpu/Texture.h
Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h
Source/WebCore/platform/graphics/ios/GraphicsContextGLOpenGLESIOS.h [moved from Source/WebCore/platform/graphics/ios/GraphicsContext3DIOS.h with 100% similarity]
Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGC3DANGLELayer.cpp
Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGC3DANGLELayer.h
Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGC3DLayer.cpp
Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGC3DLayer.h
Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGL.cpp [moved from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp with 87% similarity]
Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGL.h [moved from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.h with 90% similarity]
Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp [moved from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp with 85% similarity]
Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGLCommon.h [moved from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.h with 89% similarity]
Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGLES.cpp [moved from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp with 84% similarity]
Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGLES.h [moved from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h with 95% similarity]
Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h [moved from Source/WebCore/platform/graphics/GraphicsContext3D.h with 91% similarity]
Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp [moved from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp with 87% similarity]
Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp [moved from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp with 73% similarity]
Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp [moved from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp with 76% similarity]
Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp [moved from Source/WebCore/platform/graphics/GraphicsContext3DManager.cpp with 83% similarity]
Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLManager.h [moved from Source/WebCore/platform/graphics/GraphicsContext3DManager.h with 74% similarity]
Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.cpp [moved from Source/WebCore/platform/graphics/GraphicsContext3DPrivate.cpp with 71% similarity]
Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.h [moved from Source/WebCore/platform/graphics/GraphicsContext3DPrivate.h with 74% similarity]
Source/WebCore/platform/graphics/opengl/TemporaryOpenGLSetting.cpp
Source/WebCore/platform/graphics/opengl/TemporaryOpenGLSetting.h
Source/WebCore/platform/graphics/texmap/BitmapTextureGL.cpp
Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp [moved from Source/WebCore/platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp with 78% similarity]
Source/WebCore/platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp
Source/WebCore/platform/graphics/texmap/TextureMapperGC3DPlatformLayer.h
Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp
Source/WebCore/platform/graphics/win/GraphicsContextGLDirect2D.cpp [moved from Source/WebCore/platform/graphics/win/GraphicsContext3DDirect2D.cpp with 77% similarity]
Source/WebCore/testing/Internals.cpp
Source/WebKit/CMakeLists.txt
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/gtk/WaylandCompositor.cpp
Source/WebKit/UIProcess/mac/HighPerformanceGPUManager.cpp
Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp
Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h
Source/WebKit/WebProcess/WebPage/WebPage.cpp
Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm
Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
Source/cmake/OptionsFTW.cmake
Source/cmake/OptionsGTK.cmake
Source/cmake/OptionsMac.cmake
Source/cmake/OptionsPlayStation.cmake
Source/cmake/OptionsWPE.cmake
Source/cmake/OptionsWinCairo.cmake
Tools/ChangeLog
Tools/Scripts/webkitpy/common/config/watchlist

index d55ccfc..6435e7b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2020-01-05  Dean Jackson  <dino@apple.com>
+
+        Rename GraphicsContext3D to GraphicsContextGL
+        https://bugs.webkit.org/show_bug.cgi?id=205778
+        <rdar://problem/58327597>
+
+        Reviewed by Sam Weinig.
+
+        Rename all the GraphicsContext3D things to GraphicsContextGL
+        (includes Extensions3D and GRAPHICS_CONTEXT_3D).
+
+        GraphicsContext3DBase now becomes GraphicsContextGL.
+        GraphicsContext3D is now GraphicsContextGLOpenGL (since it represents
+        the OpenGL implementation of the API).
+
+        * Source/CMakeLists.txt:
+        * Source/cmake/OptionsFTW.cmake:
+        * Source/cmake/OptionsGTK.cmake:
+        * Source/cmake/OptionsMac.cmake:
+        * Source/cmake/OptionsPlayStation.cmake:
+        * Source/cmake/OptionsWPE.cmake:
+        * Source/cmake/OptionsWinCairo.cmake:
+
 2020-01-03  Simon Fraser  <simon.fraser@apple.com>
 
         Add some shared schemes to the WebKit.xcworkspace
index 2ceafed..35d23ad 100644 (file)
@@ -1,3 +1,21 @@
+2020-01-05  Dean Jackson  <dino@apple.com>
+
+        Rename GraphicsContext3D to GraphicsContextGL
+        https://bugs.webkit.org/show_bug.cgi?id=205778
+        <rdar://problem/58327597>
+
+        Reviewed by Sam Weinig.
+
+        Rename all the GraphicsContext3D things to GraphicsContextGL
+        (includes Extensions3D and GRAPHICS_CONTEXT_3D).
+
+        GraphicsContext3DBase now becomes GraphicsContextGL.
+        GraphicsContext3D is now GraphicsContextGLOpenGL (since it represents
+        the OpenGL implementation of the API).
+
+        * StitchMarker/wtf/FeatureDefines.h:
+        * StitchMarker/wtf/Platform.h:
+
 2019-12-16  Antti Koivisto  <antti@apple.com>
 
         Add StyleBench subtest for dynamic media query performance
index ad4b91e..e1b6ffe 100644 (file)
@@ -676,8 +676,8 @@ the public iOS SDK. We will also need to update the FeatureDefines.xcconfig file
 #define ENABLE_WEBGL 0
 #endif
 
-#if !defined(ENABLE_GRAPHICS_CONTEXT_3D)
-#define ENABLE_GRAPHICS_CONTEXT_3D ENABLE_WEBGL
+#if !defined(ENABLE_GRAPHICS_CONTEXT_GL)
+#define ENABLE_GRAPHICS_CONTEXT_GL ENABLE_WEBGL
 #endif
 
 #if !defined(ENABLE_WEB_ANIMATIONS)
@@ -730,8 +730,8 @@ the public iOS SDK. We will also need to update the FeatureDefines.xcconfig file
 #error "ENABLE(IOS_TOUCH_EVENTS) requires ENABLE(TOUCH_EVENTS)"
 #endif
 
-#if ENABLE(WEBGL) && !ENABLE(GRAPHICS_CONTEXT_3D)
-#error "ENABLE(WEBGL) requires ENABLE(GRAPHICS_CONTEXT_3D)"
+#if ENABLE(WEBGL) && !ENABLE(GRAPHICS_CONTEXT_GL)
+#error "ENABLE(WEBGL) requires ENABLE(GRAPHICS_CONTEXT_GL)"
 #endif
 
 #if ENABLE(WEBGL2) && !ENABLE(WEBGL)
index 60be8f3..222ed77 100644 (file)
 #define USE_TEXTURE_MAPPER 1
 #endif
 
-#if USE(TEXTURE_MAPPER) && ENABLE(GRAPHICS_CONTEXT_3D) && !defined(USE_TEXTURE_MAPPER_GL)
+#if USE(TEXTURE_MAPPER) && ENABLE(GRAPHICS_CONTEXT_GL) && !defined(USE_TEXTURE_MAPPER_GL)
 #define USE_TEXTURE_MAPPER_GL 1
 #endif
 
index 8bced68..62b056c 100644 (file)
@@ -13,7 +13,7 @@ endif ()
 
 add_subdirectory(JavaScriptCore)
 
-if (ENABLE_GRAPHICS_CONTEXT_3D)
+if (ENABLE_GRAPHICS_CONTEXT_GL)
     add_subdirectory(ThirdParty/ANGLE)
 endif ()
 
index 02bee5b..e7a46f1 100644 (file)
@@ -1,3 +1,21 @@
+2020-01-05  Dean Jackson  <dino@apple.com>
+
+        Rename GraphicsContext3D to GraphicsContextGL
+        https://bugs.webkit.org/show_bug.cgi?id=205778
+        <rdar://problem/58327597>
+
+        Reviewed by Sam Weinig.
+
+        Rename all the GraphicsContext3D things to GraphicsContextGL
+        (includes Extensions3D and GRAPHICS_CONTEXT_3D).
+
+        GraphicsContext3DBase now becomes GraphicsContextGL.
+        GraphicsContext3D is now GraphicsContextGLOpenGL (since it represents
+        the OpenGL implementation of the API).
+
+        * wtf/FeatureDefines.h:
+        * wtf/Platform.h:
+
 2020-01-05  Sam Weinig  <weinig@apple.com>
 
         Further simplify StringBuilder usage by standardizing hex formating to a single hex() function
index 682a1e8..9804593 100644 (file)
@@ -722,8 +722,8 @@ the public iOS SDK. See <https://webkit.org/b/179167>. */
 #define ENABLE_WEBGL 0
 #endif
 
-#if !defined(ENABLE_GRAPHICS_CONTEXT_3D)
-#define ENABLE_GRAPHICS_CONTEXT_3D ENABLE_WEBGL
+#if !defined(ENABLE_GRAPHICS_CONTEXT_GL)
+#define ENABLE_GRAPHICS_CONTEXT_GL ENABLE_WEBGL
 #endif
 
 #if !defined(ENABLE_WEB_ARCHIVE)
@@ -764,8 +764,8 @@ the public iOS SDK. See <https://webkit.org/b/179167>. */
 #error "ENABLE(IOS_TOUCH_EVENTS) requires ENABLE(TOUCH_EVENTS)"
 #endif
 
-#if ENABLE(WEBGL) && !ENABLE(GRAPHICS_CONTEXT_3D)
-#error "ENABLE(WEBGL) requires ENABLE(GRAPHICS_CONTEXT_3D)"
+#if ENABLE(WEBGL) && !ENABLE(GRAPHICS_CONTEXT_GL)
+#error "ENABLE(WEBGL) requires ENABLE(GRAPHICS_CONTEXT_GL)"
 #endif
 
 #if ENABLE(WEBGL2) && !ENABLE(WEBGL)
index 0d65b36..27b0f4f 100644 (file)
 #endif
 #endif
 
-#if USE(TEXTURE_MAPPER) && ENABLE(GRAPHICS_CONTEXT_3D) && !defined(USE_TEXTURE_MAPPER_GL)
+#if USE(TEXTURE_MAPPER) && ENABLE(GRAPHICS_CONTEXT_GL) && !defined(USE_TEXTURE_MAPPER_GL)
 #define USE_TEXTURE_MAPPER_GL 1
 #endif
 
index 4fc83cf..974875b 100644 (file)
@@ -1488,11 +1488,11 @@ if (ENABLE_QUOTA)
     )
 endif ()
 
-if (ENABLE_GRAPHICS_CONTEXT_3D)
+if (ENABLE_GRAPHICS_CONTEXT_GL)
     list(APPEND WebCore_SOURCES
         platform/graphics/ANGLEWebKitBridge.cpp
         platform/graphics/FormatConverter.cpp
-        platform/graphics/GraphicsContext3D.cpp
+        platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp
     )
 
     list(APPEND WebCore_LIBRARIES ANGLEFramework)
index 3ca5f5a..7d58bf0 100644 (file)
@@ -1,3 +1,173 @@
+2020-01-05  Dean Jackson  <dino@apple.com>
+
+        Rename GraphicsContext3D to GraphicsContextGL
+        https://bugs.webkit.org/show_bug.cgi?id=205778
+        <rdar://problem/58327597>
+
+        Reviewed by Sam Weinig.
+
+        Rename all the GraphicsContext3D things to GraphicsContextGL
+        (includes Extensions3D and GRAPHICS_CONTEXT_3D).
+
+        GraphicsContext3DBase now becomes GraphicsContextGL.
+        GraphicsContext3D is now GraphicsContextGLOpenGL (since it represents
+        the OpenGL implementation of the API).
+
+        * CMakeLists.txt:
+        * Headers.cmake:
+        * PlatformAppleWin.cmake:
+        * PlatformFTW.cmake:
+        * PlatformGTK.cmake:
+        * PlatformMac.cmake:
+        * PlatformPlayStation.cmake:
+        * PlatformWin.cmake:
+        * Sources.txt:
+        * SourcesCocoa.txt:
+        * SourcesGTK.txt:
+        * SourcesWPE.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * html/HTMLVideoElement.cpp:
+        * html/HTMLVideoElement.h:
+        * html/OffscreenCanvas.cpp:
+        * html/canvas/ANGLEInstancedArrays.cpp:
+        * html/canvas/OESVertexArrayObject.cpp:
+        * html/canvas/WebGL2RenderingContext.cpp:
+        * html/canvas/WebGL2RenderingContext.h:
+        * html/canvas/WebGLActiveInfo.h:
+        * html/canvas/WebGLBuffer.cpp:
+        * html/canvas/WebGLBuffer.h:
+        * html/canvas/WebGLCompressedTextureASTC.cpp:
+        * html/canvas/WebGLCompressedTextureATC.cpp:
+        * html/canvas/WebGLCompressedTextureETC.cpp:
+        * html/canvas/WebGLCompressedTextureETC1.cpp:
+        * html/canvas/WebGLCompressedTexturePVRTC.cpp:
+        * html/canvas/WebGLCompressedTextureS3TC.cpp:
+        * html/canvas/WebGLContextAttributes.h:
+        * html/canvas/WebGLContextGroup.cpp:
+        * html/canvas/WebGLContextGroup.h:
+        * html/canvas/WebGLContextObject.cpp:
+        * html/canvas/WebGLContextObject.h:
+        * html/canvas/WebGLDebugShaders.cpp:
+        * html/canvas/WebGLDepthTexture.cpp:
+        * html/canvas/WebGLDepthTexture.h:
+        * html/canvas/WebGLDrawBuffers.cpp:
+        * html/canvas/WebGLFramebuffer.cpp:
+        * html/canvas/WebGLFramebuffer.h:
+        * html/canvas/WebGLObject.cpp:
+        * html/canvas/WebGLObject.h:
+        * html/canvas/WebGLProgram.cpp:
+        * html/canvas/WebGLProgram.h:
+        * html/canvas/WebGLQuery.cpp:
+        * html/canvas/WebGLQuery.h:
+        * html/canvas/WebGLRenderbuffer.cpp:
+        * html/canvas/WebGLRenderbuffer.h:
+        * html/canvas/WebGLRenderingContext.cpp:
+        * html/canvas/WebGLRenderingContext.h:
+        * html/canvas/WebGLRenderingContextBase.cpp:
+        * html/canvas/WebGLRenderingContextBase.h:
+        * html/canvas/WebGLSampler.cpp:
+        * html/canvas/WebGLSampler.h:
+        * html/canvas/WebGLShader.cpp:
+        * html/canvas/WebGLShader.h:
+        * html/canvas/WebGLShaderPrecisionFormat.h:
+        * html/canvas/WebGLSharedObject.cpp:
+        * html/canvas/WebGLSharedObject.h:
+        * html/canvas/WebGLSync.cpp:
+        * html/canvas/WebGLSync.h:
+        * html/canvas/WebGLTexture.cpp:
+        * html/canvas/WebGLTexture.h:
+        * html/canvas/WebGLTransformFeedback.cpp:
+        * html/canvas/WebGLTransformFeedback.h:
+        * html/canvas/WebGLVertexArrayObject.cpp:
+        * html/canvas/WebGLVertexArrayObject.h:
+        * html/canvas/WebGLVertexArrayObjectBase.cpp:
+        * html/canvas/WebGLVertexArrayObjectBase.h:
+        * html/canvas/WebGLVertexArrayObjectOES.cpp:
+        * html/canvas/WebGLVertexArrayObjectOES.h:
+        * inspector/InspectorShaderProgram.cpp:
+        * loader/FrameLoaderClient.h:
+        * page/Chrome.cpp:
+        * platform/SourcesCairo.txt:
+        * platform/TextureMapper.cmake:
+        * platform/WebGLStateTracker.cpp:
+        * platform/WebGLStateTracker.h:
+        * platform/graphics/ANGLEWebKitBridge.cpp:
+        * platform/graphics/ExtensionsGL.h: Renamed from Source/WebCore/platform/graphics/Extensions3D.h.
+        * platform/graphics/FormatConverter.cpp:
+        * platform/graphics/FormatConverter.h:
+        * platform/graphics/GLContext.cpp:
+        * platform/graphics/GLContext.h:
+        * platform/graphics/GraphicsContext.h:
+        * platform/graphics/GraphicsContext3D.cpp: Removed.
+        * platform/graphics/GraphicsContext3DBase.cpp: Removed.
+        * platform/graphics/GraphicsContextGL.cpp: Added.
+        * platform/graphics/GraphicsContextGL.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DBase.h.
+        * platform/graphics/GraphicsContextGLAttributes.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DAttributes.h.
+        * platform/graphics/ImageBuffer.cpp:
+        * platform/graphics/ImageBuffer.h:
+        * platform/graphics/MediaPlayer.cpp:
+        * platform/graphics/MediaPlayer.h:
+        * platform/graphics/MediaPlayerPrivate.h:
+        * platform/graphics/OpenGLShims.cpp:
+        * platform/graphics/angle/ExtensionsGLANGLE.cpp: Renamed from Source/WebCore/platform/graphics/angle/Extensions3DANGLE.cpp.
+        * platform/graphics/angle/ExtensionsGLANGLE.h: Renamed from Source/WebCore/platform/graphics/angle/Extensions3DANGLE.h.
+        * platform/graphics/angle/GraphicsContextGLANGLE.cpp: Renamed from Source/WebCore/platform/graphics/angle/GraphicsContext3DANGLE.cpp.
+        * platform/graphics/angle/TemporaryANGLESetting.cpp:
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
+        * platform/graphics/cairo/GraphicsContextGLCairo.cpp: Renamed from Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp.
+        * platform/graphics/cairo/ImageBufferCairo.cpp:
+        * platform/graphics/cg/GraphicsContextGLCG.cpp: Renamed from Source/WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp.
+        * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: Renamed from Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm.
+        * platform/graphics/cocoa/IOSurface.mm:
+        * platform/graphics/cocoa/WebGLLayer.h:
+        * platform/graphics/cocoa/WebGLLayer.mm:
+        * platform/graphics/cpu/arm/GraphicsContextGLNEON.h: Renamed from Source/WebCore/platform/graphics/cpu/arm/GraphicsContext3DNEON.h.
+        * platform/graphics/cv/TextureCacheCV.h:
+        * platform/graphics/cv/TextureCacheCV.mm:
+        * platform/graphics/cv/VideoTextureCopierCV.cpp:
+        * platform/graphics/cv/VideoTextureCopierCV.h:
+        * platform/graphics/egl/GLContextEGL.cpp:
+        * platform/graphics/egl/GLContextEGL.h:
+        * platform/graphics/glx/GLContextGLX.cpp:
+        * platform/graphics/glx/GLContextGLX.h:
+        * platform/graphics/gpu/Texture.cpp:
+        * platform/graphics/gpu/Texture.h:
+        * platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
+        * platform/graphics/ios/GraphicsContextGLOpenGLESIOS.h: Renamed from Source/WebCore/platform/graphics/ios/GraphicsContext3DIOS.h.
+        * platform/graphics/nicosia/texmap/NicosiaGC3DANGLELayer.cpp:
+        * platform/graphics/nicosia/texmap/NicosiaGC3DANGLELayer.h:
+        * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.cpp:
+        * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.h:
+        * platform/graphics/opengl/ExtensionsGLOpenGL.cpp: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp.
+        * platform/graphics/opengl/ExtensionsGLOpenGL.h: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.h.
+        * platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp.
+        * platform/graphics/opengl/ExtensionsGLOpenGLCommon.h: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.h.
+        * platform/graphics/opengl/ExtensionsGLOpenGLES.cpp: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp.
+        * platform/graphics/opengl/ExtensionsGLOpenGLES.h: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h.
+        * platform/graphics/opengl/GraphicsContextGLOpenGL.cpp: Added.
+        * platform/graphics/opengl/GraphicsContextGLOpenGL.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3D.h.
+        * platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp: Renamed from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp.
+        * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp: Renamed from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp.
+        * platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp: Renamed from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp.
+        * platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DManager.cpp.
+        * platform/graphics/opengl/GraphicsContextGLOpenGLManager.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DManager.h.
+        * platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.cpp: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DPrivate.cpp.
+        * platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DPrivate.h.
+        * platform/graphics/opengl/TemporaryOpenGLSetting.cpp:
+        * platform/graphics/opengl/TemporaryOpenGLSetting.h:
+        * platform/graphics/texmap/BitmapTextureGL.cpp:
+        * platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp: Renamed from Source/WebCore/platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp.
+        * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp:
+        * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.h:
+        * platform/graphics/texmap/TextureMapperGL.cpp:
+        * platform/graphics/win/GraphicsContextGLDirect2D.cpp: Renamed from Source/WebCore/platform/graphics/win/GraphicsContext3DDirect2D.cpp.
+        * testing/Internals.cpp:
+
 2020-01-05  Simon Fraser  <simon.fraser@apple.com>
 
         REGRESSION (r252724): Unable to tap on play button on google video 'See the top search trends of 2019'
index aa1603c..46619c6 100644 (file)
@@ -1026,7 +1026,7 @@ set(WebCore_PRIVATE_FRAMEWORK_HEADERS
     platform/graphics/DisplayRefreshMonitorClient.h
     platform/graphics/DisplayRefreshMonitorManager.h
     platform/graphics/ExtendedColor.h
-    platform/graphics/Extensions3D.h
+    platform/graphics/ExtensionsGL.h
     platform/graphics/FloatPoint.h
     platform/graphics/FloatPoint3D.h
     platform/graphics/FloatQuad.h
@@ -1057,10 +1057,8 @@ set(WebCore_PRIVATE_FRAMEWORK_HEADERS
     platform/graphics/GlyphPage.h
     platform/graphics/Gradient.h
     platform/graphics/GraphicsContext.h
-    platform/graphics/GraphicsContext3D.h
-    platform/graphics/GraphicsContext3DBase.h
-    platform/graphics/GraphicsContext3DAttributes.h
-    platform/graphics/GraphicsContext3DManager.h
+    platform/graphics/GraphicsContextGL.h
+    platform/graphics/GraphicsContextGLAttributes.h
     platform/graphics/GraphicsContextImpl.h
     platform/graphics/GraphicsLayer.h
     platform/graphics/GraphicsLayerClient.h
@@ -1123,7 +1121,7 @@ set(WebCore_PRIVATE_FRAMEWORK_HEADERS
     platform/graphics/WidthCache.h
     platform/graphics/WindRule.h
 
-    platform/graphics/angle/Extensions3DANGLE.h
+    platform/graphics/angle/ExtensionsGLANGLE.h
 
     platform/graphics/displaylists/DisplayList.h
     platform/graphics/displaylists/DisplayListItems.h
@@ -1142,9 +1140,11 @@ set(WebCore_PRIVATE_FRAMEWORK_HEADERS
 
     platform/graphics/libwpe/PlatformDisplayLibWPE.h
 
-    platform/graphics/opengl/Extensions3DOpenGL.h
-    platform/graphics/opengl/Extensions3DOpenGLCommon.h
-    platform/graphics/opengl/Extensions3DOpenGLES.h
+    platform/graphics/opengl/ExtensionsGLOpenGL.h
+    platform/graphics/opengl/ExtensionsGLOpenGLCommon.h
+    platform/graphics/opengl/ExtensionsGLOpenGLES.h
+    platform/graphics/opengl/GraphicsContextGLOpenGL.h
+    platform/graphics/opengl/GraphicsContextGLOpenGLManager.h
     platform/graphics/opengl/TemporaryOpenGLSetting.h
 
     platform/graphics/opentype/OpenTypeMathData.h
index 1127bed..f712927 100644 (file)
@@ -129,7 +129,7 @@ else ()
         platform/graphics/cg/FloatRectCG.cpp
         platform/graphics/cg/FloatSizeCG.cpp
         platform/graphics/cg/GradientCG.cpp
-        platform/graphics/cg/GraphicsContext3DCG.cpp
+        platform/graphics/cg/GraphicsContextGLCG.cpp
         platform/graphics/cg/GraphicsContextCG.cpp
         platform/graphics/cg/IOSurfacePool.cpp
         platform/graphics/cg/ImageBufferCG.cpp
index 5c0ca38..ae91a76 100644 (file)
@@ -46,16 +46,16 @@ list(APPEND WebCore_SOURCES
     platform/generic/KeyedEncoderGeneric.cpp
 
     platform/graphics/GLContext.cpp
-    platform/graphics/GraphicsContext3DPrivate.cpp
     platform/graphics/GraphicsContextImpl.cpp
     platform/graphics/PlatformDisplay.cpp
 
     platform/graphics/egl/GLContextEGL.cpp
 
-    platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
-    platform/graphics/opengl/Extensions3DOpenGLES.cpp
-    platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
-    platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp
+    platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp
+    platform/graphics/opengl/ExtensionsGLOpenGLES.cpp
+    platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp
+    platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp
+    platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.cpp
     platform/graphics/opengl/TemporaryOpenGLSetting.cpp
 
     platform/graphics/opentype/OpenTypeUtilities.cpp
@@ -78,7 +78,7 @@ list(APPEND WebCore_SOURCES
     platform/graphics/win/FontWin.cpp
     platform/graphics/win/GlyphPageTreeNodeDirect2D.cpp
     platform/graphics/win/GradientDirect2D.cpp
-    platform/graphics/win/GraphicsContext3DDirect2D.cpp
+    platform/graphics/win/GraphicsContextGLDirect2D.cpp
     platform/graphics/win/GraphicsContextDirect2D.cpp
     platform/graphics/win/GraphicsContextImplDirect2D.cpp
     platform/graphics/win/GraphicsContextWin.cpp
index a30a545..cd92531 100644 (file)
@@ -131,28 +131,28 @@ endif ()
 
 if (USE_ANGLE_WEBGL)
     list(APPEND WebCore_SOURCES
-        platform/graphics/angle/Extensions3DANGLE.cpp
-        platform/graphics/angle/GraphicsContext3DANGLE.cpp
+        platform/graphics/angle/ExtensionsGLANGLE.cpp
+        platform/graphics/angle/GraphicsContextGLANGLE.cpp
         platform/graphics/angle/TemporaryANGLESetting.cpp
     )
 else ()
     list(APPEND WebCore_SOURCES
-        platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
-        platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
+        platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp
+        platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp
         platform/graphics/opengl/TemporaryOpenGLSetting.cpp
     )
 
     if (USE_OPENGL_ES)
         list(APPEND WebCore_SOURCES
-            platform/graphics/opengl/Extensions3DOpenGLES.cpp
-            platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp
+            platform/graphics/opengl/ExtensionsGLOpenGLES.cpp
+            platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp
         )
     endif ()
 
     if (USE_OPENGL)
         list(APPEND WebCore_SOURCES
-            platform/graphics/opengl/Extensions3DOpenGL.cpp
-            platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
+            platform/graphics/opengl/ExtensionsGLOpenGL.cpp
+            platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp
         )
     endif ()
 endif ()
index 71f0805..c03ce6b 100644 (file)
@@ -286,7 +286,7 @@ list(APPEND WebCore_SOURCES
     platform/graphics/cg/FloatRectCG.cpp
     platform/graphics/cg/FloatSizeCG.cpp
     platform/graphics/cg/GradientCG.cpp
-    platform/graphics/cg/GraphicsContext3DCG.cpp
+    platform/graphics/cg/GraphicsContextGLCG.cpp
     platform/graphics/cg/GraphicsContextCG.cpp
     platform/graphics/cg/IOSurfacePool.cpp
     platform/graphics/cg/ImageBufferCG.cpp
@@ -304,7 +304,7 @@ list(APPEND WebCore_SOURCES
     platform/graphics/cg/TransformationMatrixCG.cpp
     platform/graphics/cg/UTIRegistry.cpp
 
-    platform/graphics/cocoa/GraphicsContext3DCocoa.mm
+    platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm
     platform/graphics/cocoa/GraphicsContextCocoa.mm
     platform/graphics/cocoa/FontCacheCoreText.cpp
     platform/graphics/cocoa/FontCascadeCocoa.mm
@@ -346,10 +346,10 @@ list(APPEND WebCore_SOURCES
     platform/graphics/mac/SimpleFontDataCoreText.cpp
     platform/graphics/mac/WebLayer.mm
 
-    platform/graphics/opengl/Extensions3DOpenGL.cpp
-    platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
-    platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
-    platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
+    platform/graphics/opengl/ExtensionsGLOpenGL.cpp
+    platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp
+    platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp
+    platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp
     platform/graphics/opengl/TemporaryOpenGLSetting.cpp
 
     platform/graphics/opentype/OpenTypeCG.cpp
index 2678c31..cb1a8b9 100644 (file)
@@ -37,7 +37,6 @@ list(APPEND WebCore_SOURCES
     platform/generic/ScrollAnimatorGeneric.cpp
 
     platform/graphics/GLContext.cpp
-    platform/graphics/GraphicsContext3DPrivate.cpp
     platform/graphics/PlatformDisplay.cpp
 
     platform/graphics/egl/GLContextEGL.cpp
@@ -45,10 +44,11 @@ list(APPEND WebCore_SOURCES
 
     platform/graphics/libwpe/PlatformDisplayLibWPE.cpp
 
-    platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
-    platform/graphics/opengl/Extensions3DOpenGLES.cpp
-    platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
-    platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp
+    platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp
+    platform/graphics/opengl/ExtensionsGLOpenGLES.cpp
+    platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp
+    platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp
+    platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.cpp
     platform/graphics/opengl/TemporaryOpenGLSetting.cpp
 
     platform/libwpe/PasteboardLibWPE.cpp
index d1fd4eb..250a0b3 100644 (file)
@@ -37,14 +37,13 @@ list(APPEND WebCore_SOURCES
 
     platform/audio/PlatformMediaSessionManager.cpp
 
-    platform/graphics/GraphicsContext3DPrivate.cpp
-
     platform/graphics/egl/GLContextEGL.cpp
 
-    platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
-    platform/graphics/opengl/Extensions3DOpenGLES.cpp
-    platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
-    platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp
+    platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp
+    platform/graphics/opengl/ExtensionsGLOpenGLES.cpp
+    platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp
+    platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp
+    platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.cpp
     platform/graphics/opengl/TemporaryOpenGLSetting.cpp
 
     platform/graphics/opentype/OpenTypeUtilities.cpp
index 9297d04..acae6fe 100644 (file)
@@ -1857,8 +1857,7 @@ platform/graphics/GeometryUtilities.cpp
 platform/graphics/Gradient.cpp
 platform/graphics/GradientImage.cpp
 platform/graphics/GraphicsContext.cpp
-platform/graphics/GraphicsContext3DBase.cpp
-platform/graphics/GraphicsContext3DManager.cpp
+platform/graphics/GraphicsContextGL.cpp
 platform/graphics/GraphicsContextImpl.cpp
 platform/graphics/GraphicsLayer.cpp
 platform/graphics/GraphicsLayerTransform.cpp
@@ -1947,6 +1946,8 @@ platform/graphics/iso/ISOSchemeTypeBox.cpp
 platform/graphics/iso/ISOTrackEncryptionBox.cpp
 platform/graphics/iso/ISOVTTCue.cpp
 
+platform/graphics/opengl/GraphicsContextGLOpenGL.cpp
+
 platform/graphics/opentype/OpenTypeMathData.cpp
 
 platform/graphics/transforms/AffineTransform.cpp
index 24f5c05..e453d89 100644 (file)
@@ -226,8 +226,8 @@ platform/graphics/MediaPlaybackTargetPicker.cpp
 
 // These sources can't be unified with others in case they are merged
 // with files that use the system OpenGL.
-platform/graphics/angle/Extensions3DANGLE.cpp @no-unify
-platform/graphics/angle/GraphicsContext3DANGLE.cpp @no-unify
+platform/graphics/angle/ExtensionsGLANGLE.cpp @no-unify
+platform/graphics/angle/GraphicsContextGLANGLE.cpp @no-unify
 platform/graphics/angle/TemporaryANGLESetting.cpp @no-unify
 
 platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm @no-unify
@@ -285,7 +285,7 @@ platform/graphics/cg/FloatPointCG.cpp
 platform/graphics/cg/FloatRectCG.cpp
 platform/graphics/cg/FloatSizeCG.cpp
 platform/graphics/cg/GradientCG.cpp
-platform/graphics/cg/GraphicsContext3DCG.cpp
+platform/graphics/cg/GraphicsContextGLCG.cpp
 platform/graphics/cg/GraphicsContextCG.cpp
 platform/graphics/cg/IOSurfacePool.cpp
 platform/graphics/cg/ImageBufferCG.cpp
@@ -305,7 +305,7 @@ platform/graphics/cg/TransformationMatrixCG.cpp
 platform/graphics/cg/UTIRegistry.cpp
 
 platform/graphics/cocoa/ColorCocoa.mm
-platform/graphics/cocoa/GraphicsContext3DCocoa.mm
+platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm
 platform/graphics/cocoa/GraphicsContextCocoa.mm
 platform/graphics/cocoa/FontCacheCoreText.cpp
 platform/graphics/cocoa/FontCascadeCocoa.mm
@@ -375,10 +375,11 @@ platform/graphics/mac/SwitchingGPUClient.cpp
 platform/graphics/mac/WebLayer.mm
 platform/graphics/mac/WebKitNSImageExtras.mm
 
-platform/graphics/opengl/Extensions3DOpenGL.cpp
-platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
-platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
-platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
+platform/graphics/opengl/ExtensionsGLOpenGL.cpp
+platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp
+platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp
+platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp
+platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp
 platform/graphics/opengl/TemporaryOpenGLSetting.cpp
 
 platform/graphics/opentype/OpenTypeCG.cpp
index c2c2709..7205e20 100644 (file)
@@ -69,7 +69,6 @@ platform/UserAgentQuirks.cpp
 platform/generic/ScrollAnimatorGeneric.cpp
 
 platform/graphics/GLContext.cpp @no-unify
-platform/graphics/GraphicsContext3DPrivate.cpp
 platform/graphics/PlatformDisplay.cpp @no-unify
 
 platform/graphics/cairo/BackingStoreBackendCairoX11.cpp @no-unify
@@ -92,6 +91,8 @@ platform/graphics/gstreamer/ImageGStreamerCairo.cpp
 
 platform/graphics/libwpe/PlatformDisplayLibWPE.cpp
 
+platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.cpp
+
 platform/graphics/opentype/OpenTypeVerticalData.cpp
 
 platform/graphics/wayland/PlatformDisplayWayland.cpp
index 5ab2119..b5c8915 100644 (file)
@@ -62,7 +62,6 @@ page/scrolling/generic/ScrollingThreadGeneric.cpp
 platform/UserAgentQuirks.cpp
 
 platform/graphics/GLContext.cpp
-platform/graphics/GraphicsContext3DPrivate.cpp
 platform/graphics/PlatformDisplay.cpp
 
 platform/graphics/egl/GLContextEGL.cpp
@@ -70,10 +69,11 @@ platform/graphics/egl/GLContextEGLLibWPE.cpp
 
 platform/graphics/libwpe/PlatformDisplayLibWPE.cpp
 
-platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
-platform/graphics/opengl/Extensions3DOpenGLES.cpp @no-unify
-platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
-platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp
+platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp
+platform/graphics/opengl/ExtensionsGLOpenGLES.cpp @no-unify
+platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp
+platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp
+platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.cpp
 platform/graphics/opengl/TemporaryOpenGLSetting.cpp
 
 platform/graphics/opentype/OpenTypeVerticalData.cpp
index 2f93b8b..d4fb0d3 100644 (file)
                3135910A1E7DDC7300F30630 /* RTCSdpType.h in Headers */ = {isa = PBXBuildFile; fileRef = 313591041E7DDC6000F30630 /* RTCSdpType.h */; };
                3135910B1E7DDC7300F30630 /* RTCSignalingState.h in Headers */ = {isa = PBXBuildFile; fileRef = 313591051E7DDC6000F30630 /* RTCSignalingState.h */; };
                313BCE1C235E3BE500FC39E5 /* ElementContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 313BCE1B235E3BDB00FC39E5 /* ElementContext.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               313DE87023A96973008FC47B /* GraphicsContext3DBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 313DE86F23A96967008FC47B /* GraphicsContext3DBase.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               313DE87023A96973008FC47B /* GraphicsContextGL.h in Headers */ = {isa = PBXBuildFile; fileRef = 313DE86F23A96967008FC47B /* GraphicsContextGL.h */; settings = {ATTRIBUTES = (Private, ); }; };
                3140379B124BEA7F00AF40E4 /* WebCoreMotionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 31403797124BEA7F00AF40E4 /* WebCoreMotionManager.h */; settings = {ATTRIBUTES = (Private, ); }; };
                3140379D124BEA7F00AF40E4 /* DeviceOrientationClientIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 31403799124BEA7F00AF40E4 /* DeviceOrientationClientIOS.h */; };
                3140C5201FDF151A00D2A873 /* OffscreenCanvasRenderingContext2D.h in Headers */ = {isa = PBXBuildFile; fileRef = 3140C51E1FDF151A00D2A873 /* OffscreenCanvasRenderingContext2D.h */; };
                31955A88160D199200858025 /* RenderSnapshottedPlugIn.h in Headers */ = {isa = PBXBuildFile; fileRef = 31E8D8BB160BC94C004CE8F5 /* RenderSnapshottedPlugIn.h */; settings = {ATTRIBUTES = (Private, ); }; };
                319848011A1D817B00A13318 /* AnimationEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 319847FF1A1D816700A13318 /* AnimationEvent.h */; };
                3198480C1A1E6CE800A13318 /* JSAnimationEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 319848041A1E6B5D00A13318 /* JSAnimationEvent.h */; };
+               319A728823C267FE0085353C /* GraphicsContextGLOpenGLManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 319A728723C267E70085353C /* GraphicsContextGLOpenGLManager.h */; settings = {ATTRIBUTES = (Private, ); }; };
                319AE064142D6B24006563A1 /* StyleFilterData.h in Headers */ = {isa = PBXBuildFile; fileRef = 319AE062142D6B24006563A1 /* StyleFilterData.h */; settings = {ATTRIBUTES = (Private, ); }; };
                319FBD5F15D2F464009640A6 /* CachedImageClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 319FBD5D15D2F444009640A6 /* CachedImageClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
                31A089561E738D59003B6609 /* JSWebGPUBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 31A0891D1E738D59003B6609 /* JSWebGPUBuffer.h */; };
                31A089891E738D5A003B6609 /* JSWebGPUTexture.h in Headers */ = {isa = PBXBuildFile; fileRef = 31A089501E738D59003B6609 /* JSWebGPUTexture.h */; };
                31A0898C1E738D5A003B6609 /* JSWebGPUTextureDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 31A089531E738D59003B6609 /* JSWebGPUTextureDescriptor.h */; };
                31A795C71888BCB200382F90 /* ANGLEInstancedArrays.h in Headers */ = {isa = PBXBuildFile; fileRef = 31A795C21888B72400382F90 /* ANGLEInstancedArrays.h */; };
-               31AB5000122878A2001A7DB0 /* GraphicsContext3DIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 31AB4FFF122878A2001A7DB0 /* GraphicsContext3DIOS.h */; };
+               31AB5000122878A2001A7DB0 /* GraphicsContextGLOpenGLESIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 31AB4FFF122878A2001A7DB0 /* GraphicsContextGLOpenGLESIOS.h */; };
                31C0FF220E4CEB6E007D6FE5 /* WebKitAnimationEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 31C0FF1C0E4CEB6E007D6FE5 /* WebKitAnimationEvent.h */; };
                31C0FF250E4CEB6E007D6FE5 /* WebKitTransitionEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 31C0FF1F0E4CEB6E007D6FE5 /* WebKitTransitionEvent.h */; };
                31C0FF3E0E4CEFAC007D6FE5 /* JSWebKitAnimationEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 31C0FF3A0E4CEFAC007D6FE5 /* JSWebKitAnimationEvent.h */; };
                44A28AAF12DFB8BF00AE923B /* MathMLNames.h in Headers */ = {isa = PBXBuildFile; fileRef = 44A28AAE12DFB8BF00AE923B /* MathMLNames.h */; };
                44C991860F3D1EBE00586670 /* ScrollbarThemeIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 44C991850F3D1EBE00586670 /* ScrollbarThemeIOS.h */; };
                44C9919F0F3D210E00586670 /* ThemeIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 44C9919D0F3D210E00586670 /* ThemeIOS.h */; };
-               44DAB5B215A623580097C1E4 /* Extensions3DOpenGLCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 44DAB5B015A623580097C1E4 /* Extensions3DOpenGLCommon.h */; };
+               44DAB5B215A623580097C1E4 /* ExtensionsGLOpenGLCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 44DAB5B015A623580097C1E4 /* ExtensionsGLOpenGLCommon.h */; };
                450CEBF115073BBE002BB149 /* LabelableElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 450CEBEF15073BBE002BB149 /* LabelableElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
                4512502315DCE37D002F84E2 /* SpinButtonElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 4512502115DCE37D002F84E2 /* SpinButtonElement.h */; };
                453EB637159C570400001BB7 /* DateTimeFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = 453EB635159C570400001BB7 /* DateTimeFormat.h */; settings = {ATTRIBUTES = (Private, ); }; };
                49C7B9E01042D32F0009D447 /* WebGLRenderingContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 49C7B9C01042D32F0009D447 /* WebGLRenderingContext.h */; };
                49C7B9E31042D32F0009D447 /* WebGLShader.h in Headers */ = {isa = PBXBuildFile; fileRef = 49C7B9C31042D32F0009D447 /* WebGLShader.h */; };
                49C7B9E61042D32F0009D447 /* WebGLTexture.h in Headers */ = {isa = PBXBuildFile; fileRef = 49C7B9C61042D32F0009D447 /* WebGLTexture.h */; };
-               49C7B9FC1042D3650009D447 /* GraphicsContext3D.h in Headers */ = {isa = PBXBuildFile; fileRef = 49C7B9FB1042D3650009D447 /* GraphicsContext3D.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               49C7B9FC1042D3650009D447 /* GraphicsContextGLOpenGL.h in Headers */ = {isa = PBXBuildFile; fileRef = 49C7B9FB1042D3650009D447 /* GraphicsContextGLOpenGL.h */; settings = {ATTRIBUTES = (Private, ); }; };
                49D5DC2C0F423A73008F20FD /* Matrix3DTransformOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 49D5DC280F423A73008F20FD /* Matrix3DTransformOperation.h */; settings = {ATTRIBUTES = (Private, ); }; };
                49D5DC2E0F423A73008F20FD /* PerspectiveTransformOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 49D5DC2A0F423A73008F20FD /* PerspectiveTransformOperation.h */; settings = {ATTRIBUTES = (Private, ); }; };
                49E911C40EF86D47009D0CAF /* TransformationMatrix.h in Headers */ = {isa = PBXBuildFile; fileRef = 49E911B40EF86D47009D0CAF /* TransformationMatrix.h */; settings = {ATTRIBUTES = (Private, ); }; };
                6C638895A96CCEE50C8C946C /* CachedResourceRequestInitiators.h in Headers */ = {isa = PBXBuildFile; fileRef = 6C638893A96CCEE50C8C946C /* CachedResourceRequestInitiators.h */; settings = {ATTRIBUTES = (Private, ); }; };
                6E0B90692321A68D006223B2 /* WebGLCompressedTextureETC1.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E0B90652321A68C006223B2 /* WebGLCompressedTextureETC1.h */; };
                6E0E569C183BFFE600E0E8D5 /* FloatRoundedRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E0E569A183BFFE600E0E8D5 /* FloatRoundedRect.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               6E21C6C01126338500A7BE02 /* GraphicsContext3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E21C6BF1126338500A7BE02 /* GraphicsContext3D.cpp */; };
                6E242B2B23359405002CADD4 /* JSWebGLCompressedTextureETC1.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E242B2A233593D8002CADD4 /* JSWebGLCompressedTextureETC1.h */; };
                6E242B2C23359409002CADD4 /* JSWebGLCompressedTextureETC.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E242B28233593D7002CADD4 /* JSWebGLCompressedTextureETC.h */; };
                6E3FAD3914733F4000E42306 /* JSWebGLCompressedTextureS3TC.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E3FAD3714733F4000E42306 /* JSWebGLCompressedTextureS3TC.h */; };
                6E47E66110B7944B00B186C8 /* WebGLAny.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E47E65F10B7944B00B186C8 /* WebGLAny.h */; settings = {ATTRIBUTES = (Private, ); }; };
                6E4ABCD5138EA0B70071D291 /* JSHTMLUnknownElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E4ABCD3138EA0B70071D291 /* JSHTMLUnknownElement.h */; };
                6E4E91AF10F7FB3100A2779C /* WebGLContextAttributes.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E4E91AA10F7FB3100A2779C /* WebGLContextAttributes.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               6E67D2A71280E8A4008758F7 /* Extensions3DOpenGL.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E67D2A51280E8A4008758F7 /* Extensions3DOpenGL.h */; };
-               6E67D2A91280E8BD008758F7 /* Extensions3D.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E67D2A81280E8BD008758F7 /* Extensions3D.h */; };
-               6E72F54C229DCD0C00B3E151 /* Extensions3DANGLE.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E27F243229C9F8400F1F632 /* Extensions3DANGLE.cpp */; };
-               6E72F54E229DCD1000B3E151 /* GraphicsContext3DANGLE.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E27F2422298CE4B00F1F632 /* GraphicsContext3DANGLE.cpp */; };
+               6E67D2A71280E8A4008758F7 /* ExtensionsGLOpenGL.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E67D2A51280E8A4008758F7 /* ExtensionsGLOpenGL.h */; };
+               6E67D2A91280E8BD008758F7 /* ExtensionsGL.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E67D2A81280E8BD008758F7 /* ExtensionsGL.h */; };
+               6E72F54C229DCD0C00B3E151 /* ExtensionsGLANGLE.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E27F243229C9F8400F1F632 /* ExtensionsGLANGLE.cpp */; };
+               6E72F54E229DCD1000B3E151 /* GraphicsContextGLANGLE.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E27F2422298CE4B00F1F632 /* GraphicsContextGLANGLE.cpp */; };
                6E72F54F229DCD1300B3E151 /* TemporaryANGLESetting.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E290861229DB950000986E2 /* TemporaryANGLESetting.cpp */; };
-               6E72F550229DCD1700B3E151 /* Extensions3DANGLE.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E27F244229C9F8D00F1F632 /* Extensions3DANGLE.h */; };
+               6E72F550229DCD1700B3E151 /* ExtensionsGLANGLE.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E27F244229C9F8D00F1F632 /* ExtensionsGLANGLE.h */; };
                6E72F551229DCD1A00B3E151 /* TemporaryANGLESetting.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E290863229DB970000986E2 /* TemporaryANGLESetting.h */; };
                6E84E9E117668BF100815B68 /* RasterShape.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E84E9DF17668BAD00815B68 /* RasterShape.h */; settings = {ATTRIBUTES = (Private, ); }; };
                6E8ACDED23345CBC0024AAF5 /* WebGLCompressedTextureETC.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E8ACDEB23345CAF0024AAF5 /* WebGLCompressedTextureETC.h */; };
                7C2FA6121EA95A3C00A03108 /* ResourceCryptographicDigest.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C2FA6101EA95A3200A03108 /* ResourceCryptographicDigest.h */; settings = {ATTRIBUTES = (Private, ); }; };
                7C30D9841F815AEC00268356 /* JSAbortController.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C30D9801F815AC100268356 /* JSAbortController.h */; };
                7C30D9861F815AEC00268356 /* JSAbortSignal.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C30D9811F815AC100268356 /* JSAbortSignal.h */; };
-               7C330A021DF8FAC600D3395C /* GraphicsContext3DAttributes.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C330A011DF8FAC600D3395C /* GraphicsContext3DAttributes.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               7C330A021DF8FAC600D3395C /* GraphicsContextGLAttributes.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C330A011DF8FAC600D3395C /* GraphicsContextGLAttributes.h */; settings = {ATTRIBUTES = (Private, ); }; };
                7C330A081DF9F95100D3395C /* JSPositionOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C330A061DF9F95100D3395C /* JSPositionOptions.h */; };
                7C3A91E61C963B8800D1A7E3 /* ClipboardAccessPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C3A91E51C963B8800D1A7E3 /* ClipboardAccessPolicy.h */; settings = {ATTRIBUTES = (Private, ); }; };
                7C3B79711908757B00B47A2D /* UserMessageHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C3B796F1908757B00B47A2D /* UserMessageHandler.cpp */; };
                D05CED2A0A40BB2C00C5AF38 /* FormatBlockCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = D05CED280A40BB2C00C5AF38 /* FormatBlockCommand.h */; };
                D06C0D8F0CFD11460065F43F /* RemoveFormatCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = D06C0D8D0CFD11460065F43F /* RemoveFormatCommand.h */; };
                D07DEABA0A36554A00CA30F8 /* InsertListCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = D07DEAB80A36554A00CA30F8 /* InsertListCommand.h */; };
-               D0843A4B20FEBE3D00FE860E /* GraphicsContext3DManager.h in Headers */ = {isa = PBXBuildFile; fileRef = D0843A4A20FEBE3D00FE860E /* GraphicsContext3DManager.h */; settings = {ATTRIBUTES = (Private, ); }; };
                D086FE9809D53AAB005BC74D /* UnlinkCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = D086FE9609D53AAB005BC74D /* UnlinkCommand.h */; };
                D08B00E420A282590004BC0A /* WebGLCompressedTextureASTC.h in Headers */ = {isa = PBXBuildFile; fileRef = D0A20D542092A0A600E0C259 /* WebGLCompressedTextureASTC.h */; };
                D0A3A7311405A39800FB8ED3 /* ResourceLoaderOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = D0A3A7301405A39800FB8ED3 /* ResourceLoaderOptions.h */; settings = {ATTRIBUTES = (Private, ); }; };
                313591051E7DDC6000F30630 /* RTCSignalingState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCSignalingState.h; sourceTree = "<group>"; };
                3135910C1E7DDCB600F30630 /* RTCBundlePolicy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCBundlePolicy.h; sourceTree = "<group>"; };
                313BCE1B235E3BDB00FC39E5 /* ElementContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ElementContext.h; sourceTree = "<group>"; };
-               313DE86D23A96966008FC47B /* GraphicsContext3DBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContext3DBase.cpp; sourceTree = "<group>"; };
-               313DE86F23A96967008FC47B /* GraphicsContext3DBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsContext3DBase.h; sourceTree = "<group>"; };
+               313DE86D23A96966008FC47B /* GraphicsContextGL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContextGL.cpp; sourceTree = "<group>"; };
+               313DE86F23A96967008FC47B /* GraphicsContextGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsContextGL.h; sourceTree = "<group>"; };
                31403797124BEA7F00AF40E4 /* WebCoreMotionManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreMotionManager.h; sourceTree = "<group>"; };
                31403798124BEA7F00AF40E4 /* WebCoreMotionManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreMotionManager.mm; sourceTree = "<group>"; };
                31403799124BEA7F00AF40E4 /* DeviceOrientationClientIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceOrientationClientIOS.h; sourceTree = "<group>"; };
                319848001A1D816700A13318 /* AnimationEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AnimationEvent.idl; sourceTree = "<group>"; };
                319848031A1E6B5D00A13318 /* JSAnimationEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAnimationEvent.cpp; sourceTree = "<group>"; };
                319848041A1E6B5D00A13318 /* JSAnimationEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAnimationEvent.h; sourceTree = "<group>"; };
+               319A728723C267E70085353C /* GraphicsContextGLOpenGLManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsContextGLOpenGLManager.h; sourceTree = "<group>"; };
                319AE061142D6B24006563A1 /* StyleFilterData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StyleFilterData.cpp; sourceTree = "<group>"; };
                319AE062142D6B24006563A1 /* StyleFilterData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleFilterData.h; sourceTree = "<group>"; };
                319BDE4F1E7A858A00BA296C /* JSRTCIceTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCIceTransport.cpp; sourceTree = "<group>"; };
                31A795C31888B72400382F90 /* ANGLEInstancedArrays.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ANGLEInstancedArrays.idl; sourceTree = "<group>"; };
                31A795C41888BAD100382F90 /* JSANGLEInstancedArrays.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSANGLEInstancedArrays.cpp; sourceTree = "<group>"; };
                31A795C51888BAD100382F90 /* JSANGLEInstancedArrays.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSANGLEInstancedArrays.h; sourceTree = "<group>"; };
-               31AB4FFF122878A2001A7DB0 /* GraphicsContext3DIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsContext3DIOS.h; sourceTree = "<group>"; };
+               31AB4FFF122878A2001A7DB0 /* GraphicsContextGLOpenGLESIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsContextGLOpenGLESIOS.h; sourceTree = "<group>"; };
                31C0FF1B0E4CEB6E007D6FE5 /* WebKitAnimationEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebKitAnimationEvent.cpp; sourceTree = "<group>"; };
                31C0FF1C0E4CEB6E007D6FE5 /* WebKitAnimationEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitAnimationEvent.h; sourceTree = "<group>"; };
                31C0FF1D0E4CEB6E007D6FE5 /* WebKitAnimationEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebKitAnimationEvent.idl; sourceTree = "<group>"; };
                44C9919E0F3D210E00586670 /* ThemeIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ThemeIOS.mm; sourceTree = "<group>"; };
                44D8DA98139545BE00337B75 /* SVGMPathElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SVGMPathElement.idl; sourceTree = "<group>"; };
                44D8DA9A139545CD00337B75 /* SVGAnimateMotionElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SVGAnimateMotionElement.idl; sourceTree = "<group>"; };
-               44DAB5AF15A623580097C1E4 /* Extensions3DOpenGLCommon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Extensions3DOpenGLCommon.cpp; sourceTree = "<group>"; };
-               44DAB5B015A623580097C1E4 /* Extensions3DOpenGLCommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Extensions3DOpenGLCommon.h; sourceTree = "<group>"; };
+               44DAB5AF15A623580097C1E4 /* ExtensionsGLOpenGLCommon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExtensionsGLOpenGLCommon.cpp; sourceTree = "<group>"; };
+               44DAB5B015A623580097C1E4 /* ExtensionsGLOpenGLCommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtensionsGLOpenGLCommon.h; sourceTree = "<group>"; };
                44E88E4C2369128A009B4847 /* HighlightMap.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HighlightMap.idl; sourceTree = "<group>"; };
                44E88E4D2369128B009B4847 /* HighlightRangeGroup.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HighlightRangeGroup.idl; sourceTree = "<group>"; };
                44E88E50236A56AC009B4847 /* HighlightMap.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HighlightMap.h; sourceTree = "<group>"; };
                49C7B9C51042D32F0009D447 /* WebGLTexture.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebGLTexture.cpp; sourceTree = "<group>"; };
                49C7B9C61042D32F0009D447 /* WebGLTexture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGLTexture.h; sourceTree = "<group>"; };
                49C7B9C71042D32F0009D447 /* WebGLTexture.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebGLTexture.idl; sourceTree = "<group>"; };
-               49C7B9FB1042D3650009D447 /* GraphicsContext3D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsContext3D.h; sourceTree = "<group>"; };
+               49C7B9FB1042D3650009D447 /* GraphicsContextGLOpenGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsContextGLOpenGL.h; sourceTree = "<group>"; };
                49C7BA8C1042F5B10009D447 /* JSDocumentCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDocumentCustom.cpp; sourceTree = "<group>"; };
                49D5DC270F423A73008F20FD /* Matrix3DTransformOperation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Matrix3DTransformOperation.cpp; sourceTree = "<group>"; };
                49D5DC280F423A73008F20FD /* Matrix3DTransformOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Matrix3DTransformOperation.h; sourceTree = "<group>"; };
                49EED14B1051971900099FAB /* JSCanvasRenderingContext2DCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCanvasRenderingContext2DCustom.cpp; sourceTree = "<group>"; };
                49EED14C1051971A00099FAB /* JSWebGLRenderingContextCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGLRenderingContextCustom.cpp; sourceTree = "<group>"; };
                49FC7A4F1444AF5F00A5D864 /* DisplayRefreshMonitor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DisplayRefreshMonitor.cpp; sourceTree = "<group>"; };
-               49FFBF1C11C8550E006A7118 /* GraphicsContext3DCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GraphicsContext3DCocoa.mm; sourceTree = "<group>"; };
+               49FFBF1C11C8550E006A7118 /* GraphicsContextGLOpenGLCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GraphicsContextGLOpenGLCocoa.mm; sourceTree = "<group>"; };
                49FFBF3D11C93EE3006A7118 /* WebGLLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGLLayer.h; sourceTree = "<group>"; };
                49FFBF3E11C93EE3006A7118 /* WebGLLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebGLLayer.mm; sourceTree = "<group>"; };
                4A0DA2FC129B241900AB61E1 /* FormAssociatedElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FormAssociatedElement.cpp; sourceTree = "<group>"; };
                6E0B90682321A68D006223B2 /* WebGLCompressedTextureETC1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebGLCompressedTextureETC1.cpp; sourceTree = "<group>"; };
                6E0E5699183BFFE600E0E8D5 /* FloatRoundedRect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FloatRoundedRect.cpp; sourceTree = "<group>"; };
                6E0E569A183BFFE600E0E8D5 /* FloatRoundedRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FloatRoundedRect.h; sourceTree = "<group>"; };
-               6E21C6BF1126338500A7BE02 /* GraphicsContext3D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContext3D.cpp; sourceTree = "<group>"; };
-               6E21C6C11126339900A7BE02 /* GraphicsContext3DCG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContext3DCG.cpp; sourceTree = "<group>"; };
+               6E21C6BF1126338500A7BE02 /* GraphicsContextGLOpenGL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContextGLOpenGL.cpp; sourceTree = "<group>"; };
+               6E21C6C11126339900A7BE02 /* GraphicsContextGLCG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContextGLCG.cpp; sourceTree = "<group>"; };
                6E242B26233593D7002CADD4 /* JSWebGLCompressedTextureETC.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = JSWebGLCompressedTextureETC.cpp; path = ../../../../../../WebKitBuild/Debug/DerivedSources/WebCore/JSWebGLCompressedTextureETC.cpp; sourceTree = "<group>"; };
                6E242B28233593D7002CADD4 /* JSWebGLCompressedTextureETC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JSWebGLCompressedTextureETC.h; path = ../../../../../../WebKitBuild/Debug/DerivedSources/WebCore/JSWebGLCompressedTextureETC.h; sourceTree = "<group>"; };
                6E242B29233593D7002CADD4 /* JSWebGLCompressedTextureETC1.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = JSWebGLCompressedTextureETC1.cpp; path = ../../../../../../WebKitBuild/Debug/DerivedSources/WebCore/JSWebGLCompressedTextureETC1.cpp; sourceTree = "<group>"; };
                6E242B2A233593D8002CADD4 /* JSWebGLCompressedTextureETC1.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JSWebGLCompressedTextureETC1.h; path = ../../../../../../WebKitBuild/Debug/DerivedSources/WebCore/JSWebGLCompressedTextureETC1.h; sourceTree = "<group>"; };
-               6E27F2422298CE4B00F1F632 /* GraphicsContext3DANGLE.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContext3DANGLE.cpp; sourceTree = "<group>"; };
-               6E27F243229C9F8400F1F632 /* Extensions3DANGLE.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Extensions3DANGLE.cpp; sourceTree = "<group>"; };
-               6E27F244229C9F8D00F1F632 /* Extensions3DANGLE.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Extensions3DANGLE.h; sourceTree = "<group>"; };
+               6E27F2422298CE4B00F1F632 /* GraphicsContextGLANGLE.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContextGLANGLE.cpp; sourceTree = "<group>"; };
+               6E27F243229C9F8400F1F632 /* ExtensionsGLANGLE.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExtensionsGLANGLE.cpp; sourceTree = "<group>"; };
+               6E27F244229C9F8D00F1F632 /* ExtensionsGLANGLE.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtensionsGLANGLE.h; sourceTree = "<group>"; };
                6E290861229DB950000986E2 /* TemporaryANGLESetting.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TemporaryANGLESetting.cpp; sourceTree = "<group>"; };
                6E290863229DB970000986E2 /* TemporaryANGLESetting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TemporaryANGLESetting.h; sourceTree = "<group>"; };
                6E3FAD3614733F4000E42306 /* JSWebGLCompressedTextureS3TC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGLCompressedTextureS3TC.cpp; sourceTree = "<group>"; };
                6E4ABCD3138EA0B70071D291 /* JSHTMLUnknownElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHTMLUnknownElement.h; sourceTree = "<group>"; };
                6E4E91AA10F7FB3100A2779C /* WebGLContextAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGLContextAttributes.h; sourceTree = "<group>"; };
                6E4E91AB10F7FB3100A2779C /* WebGLContextAttributes.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebGLContextAttributes.idl; sourceTree = "<group>"; };
-               6E67D2A41280E8A4008758F7 /* Extensions3DOpenGL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Extensions3DOpenGL.cpp; sourceTree = "<group>"; };
-               6E67D2A51280E8A4008758F7 /* Extensions3DOpenGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Extensions3DOpenGL.h; sourceTree = "<group>"; };
-               6E67D2A81280E8BD008758F7 /* Extensions3D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Extensions3D.h; sourceTree = "<group>"; };
+               6E67D2A41280E8A4008758F7 /* ExtensionsGLOpenGL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExtensionsGLOpenGL.cpp; sourceTree = "<group>"; };
+               6E67D2A51280E8A4008758F7 /* ExtensionsGLOpenGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtensionsGLOpenGL.h; sourceTree = "<group>"; };
+               6E67D2A81280E8BD008758F7 /* ExtensionsGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtensionsGL.h; sourceTree = "<group>"; };
                6E84E9DE17668BAD00815B68 /* RasterShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RasterShape.cpp; sourceTree = "<group>"; };
                6E84E9DF17668BAD00815B68 /* RasterShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RasterShape.h; sourceTree = "<group>"; };
                6E8ACDE923345CAF0024AAF5 /* WebGLCompressedTextureETC.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebGLCompressedTextureETC.cpp; sourceTree = "<group>"; };
                7C30D9801F815AC100268356 /* JSAbortController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAbortController.h; sourceTree = "<group>"; };
                7C30D9811F815AC100268356 /* JSAbortSignal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAbortSignal.h; sourceTree = "<group>"; };
                7C30D9821F815AC200268356 /* JSAbortSignal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAbortSignal.cpp; sourceTree = "<group>"; };
-               7C330A011DF8FAC600D3395C /* GraphicsContext3DAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsContext3DAttributes.h; sourceTree = "<group>"; };
+               7C330A011DF8FAC600D3395C /* GraphicsContextGLAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsContextGLAttributes.h; sourceTree = "<group>"; };
                7C330A031DF9E95B00D3395C /* PositionOptions.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = PositionOptions.idl; sourceTree = "<group>"; };
                7C330A051DF9F95100D3395C /* JSPositionOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPositionOptions.cpp; sourceTree = "<group>"; };
                7C330A061DF9F95100D3395C /* JSPositionOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPositionOptions.h; sourceTree = "<group>"; };
                93309DD5099E64910056E581 /* WrapContentsInDummySpanCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WrapContentsInDummySpanCommand.h; sourceTree = "<group>"; };
                93309EA0099EB78C0056E581 /* SharedTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SharedTimer.h; sourceTree = "<group>"; };
                93309EA1099EB78C0056E581 /* Timer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Timer.cpp; sourceTree = "<group>"; };
-               9332AB3D16515D7700D827EC /* GraphicsContext3DNEON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsContext3DNEON.h; sourceTree = "<group>"; };
+               9332AB3D16515D7700D827EC /* GraphicsContextGLNEON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsContextGLNEON.h; sourceTree = "<group>"; };
                9332AB871653A97900D827EC /* FEBlendNEON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FEBlendNEON.h; sourceTree = "<group>"; };
                9332AB881653A97900D827EC /* FECompositeArithmeticNEON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FECompositeArithmeticNEON.h; sourceTree = "<group>"; };
                9332AB891653A97900D827EC /* FEGaussianBlurNEON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FEGaussianBlurNEON.h; sourceTree = "<group>"; };
                952076001F2675F9007D2AAB /* CallTracer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CallTracer.cpp; sourceTree = "<group>"; };
                952076011F2675F9007D2AAB /* CallTracer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CallTracer.h; sourceTree = "<group>"; };
                952076021F2675F9007D2AAB /* CallTracerTypes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CallTracerTypes.h; sourceTree = "<group>"; };
-               96ABA42214BCB80E00D56204 /* GraphicsContext3DOpenGLCommon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContext3DOpenGLCommon.cpp; sourceTree = "<group>"; };
+               96ABA42214BCB80E00D56204 /* GraphicsContextGLOpenGLCommon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContextGLOpenGLCommon.cpp; sourceTree = "<group>"; };
                97059975107D975200A50A7C /* PolicyChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolicyChecker.cpp; sourceTree = "<group>"; };
                97059976107D975200A50A7C /* PolicyChecker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolicyChecker.h; sourceTree = "<group>"; };
                970B7289144FFAC600F00A37 /* EventInterfaces.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EventInterfaces.h; path = DerivedSources/WebCore/EventInterfaces.h; sourceTree = BUILT_PRODUCTS_DIR; };
                D07DEAB80A36554A00CA30F8 /* InsertListCommand.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = InsertListCommand.h; sourceTree = "<group>"; };
                D084033A221CBF5400007205 /* GPUBuffer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GPUBuffer.cpp; sourceTree = "<group>"; };
                D084033D221E186400007205 /* WebGPUBindGroupDescriptor.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebGPUBindGroupDescriptor.cpp; sourceTree = "<group>"; };
-               D0843A4A20FEBE3D00FE860E /* GraphicsContext3DManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GraphicsContext3DManager.h; sourceTree = "<group>"; };
-               D0843A4C20FEC16500FE860E /* GraphicsContext3DManager.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContext3DManager.cpp; sourceTree = "<group>"; };
+               D0843A4C20FEC16500FE860E /* GraphicsContextGLOpenGLManager.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContextGLOpenGLManager.cpp; sourceTree = "<group>"; };
                D085E64A2236DEAE00C3E1E2 /* GPUBindGroupMetal.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = GPUBindGroupMetal.mm; sourceTree = "<group>"; };
                D086FE9609D53AAB005BC74D /* UnlinkCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnlinkCommand.h; sourceTree = "<group>"; };
                D086FE9709D53AAB005BC74D /* UnlinkCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UnlinkCommand.cpp; sourceTree = "<group>"; };
                FB92DF4915FED08700994433 /* ClipPathOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClipPathOperation.h; sourceTree = "<group>"; };
                FB965B8117BBB5F900E835B9 /* CSSFilterImageValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSFilterImageValue.h; sourceTree = "<group>"; };
                FB965B8217BBB62C00E835B9 /* CSSFilterImageValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSFilterImageValue.cpp; sourceTree = "<group>"; };
-               FBC220DE1237FBEB00BCF788 /* GraphicsContext3DOpenGL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContext3DOpenGL.cpp; sourceTree = "<group>"; };
+               FBC220DE1237FBEB00BCF788 /* GraphicsContextGLOpenGLBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContextGLOpenGLBase.cpp; sourceTree = "<group>"; };
                FBD6AF8215EF21A3008B7110 /* BasicShapes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BasicShapes.cpp; sourceTree = "<group>"; };
                FBD6AF8315EF21A3008B7110 /* BasicShapes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BasicShapes.h; sourceTree = "<group>"; };
                FBD6AF8415EF21D4008B7110 /* BasicShapeFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BasicShapeFunctions.cpp; sourceTree = "<group>"; };
                                0F97A657155DA81E00FADD4C /* DisplayRefreshMonitorIOS.mm */,
                                1AC2D89C1B1E291F00D52E87 /* FontAntialiasingStateSaver.h */,
                                3727DFD4142AAE4500D449CB /* FontCacheIOS.mm */,
-                               31AB4FFF122878A2001A7DB0 /* GraphicsContext3DIOS.h */,
+                               31AB4FFF122878A2001A7DB0 /* GraphicsContextGLOpenGLESIOS.h */,
                                FED13D3F0CEA939400D89466 /* IconIOS.mm */,
                        );
                        path = ios;
                6E27F2412298CE2E00F1F632 /* angle */ = {
                        isa = PBXGroup;
                        children = (
-                               6E27F243229C9F8400F1F632 /* Extensions3DANGLE.cpp */,
-                               6E27F244229C9F8D00F1F632 /* Extensions3DANGLE.h */,
-                               6E27F2422298CE4B00F1F632 /* GraphicsContext3DANGLE.cpp */,
+                               6E27F243229C9F8400F1F632 /* ExtensionsGLANGLE.cpp */,
+                               6E27F244229C9F8D00F1F632 /* ExtensionsGLANGLE.h */,
+                               6E27F2422298CE4B00F1F632 /* GraphicsContextGLANGLE.cpp */,
                                6E290861229DB950000986E2 /* TemporaryANGLESetting.cpp */,
                                6E290863229DB970000986E2 /* TemporaryANGLESetting.h */,
                        );
                        isa = PBXGroup;
                        children = (
                                9332AB861653A97900D827EC /* filters */,
-                               9332AB3D16515D7700D827EC /* GraphicsContext3DNEON.h */,
+                               9332AB3D16515D7700D827EC /* GraphicsContextGLNEON.h */,
                        );
                        path = arm;
                        sourceTree = "<group>";
                                B275352C0B053814002CE64F /* FloatRectCG.cpp */,
                                B275352D0B053814002CE64F /* FloatSizeCG.cpp */,
                                BC53C60A0DA56CF10021EB5D /* GradientCG.cpp */,
-                               6E21C6C11126339900A7BE02 /* GraphicsContext3DCG.cpp */,
                                B2ED97700B1F55CE00257D0F /* GraphicsContextCG.cpp */,
                                934907E3125BBBC8007F23A0 /* GraphicsContextCG.h */,
+                               6E21C6C11126339900A7BE02 /* GraphicsContextGLCG.cpp */,
                                A80D67070E9E9DEB00E420F0 /* GraphicsContextPlatformPrivateCG.h */,
                                B2A10B930B3818D700099AA4 /* ImageBufferCG.cpp */,
                                2292B27B1356669400CF11EF /* ImageBufferDataCG.cpp */,
                                2D29ECC4192ECC8300984B78 /* DisplayRefreshMonitorManager.h */,
                                31DCDF411DA1C45400EA5B93 /* ExtendedColor.cpp */,
                                31DCDF421DA1C45400EA5B93 /* ExtendedColor.h */,
-                               6E67D2A81280E8BD008758F7 /* Extensions3D.h */,
+                               6E67D2A81280E8BD008758F7 /* ExtensionsGL.h */,
                                B275353A0B053814002CE64F /* FloatPoint.cpp */,
                                B275353B0B053814002CE64F /* FloatPoint.h */,
                                B2E27C9D0B0F2B0900F17C7B /* FloatPoint3D.cpp */,
                                2D2FC0571460CD6F00263633 /* GradientImage.h */,
                                B2A015920AF6CD53006BCE0E /* GraphicsContext.cpp */,
                                B2A015930AF6CD53006BCE0E /* GraphicsContext.h */,
-                               6E21C6BF1126338500A7BE02 /* GraphicsContext3D.cpp */,
-                               49C7B9FB1042D3650009D447 /* GraphicsContext3D.h */,
-                               7C330A011DF8FAC600D3395C /* GraphicsContext3DAttributes.h */,
-                               313DE86D23A96966008FC47B /* GraphicsContext3DBase.cpp */,
-                               313DE86F23A96967008FC47B /* GraphicsContext3DBase.h */,
-                               D0843A4C20FEC16500FE860E /* GraphicsContext3DManager.cpp */,
-                               D0843A4A20FEBE3D00FE860E /* GraphicsContext3DManager.h */,
+                               313DE86D23A96966008FC47B /* GraphicsContextGL.cpp */,
+                               313DE86F23A96967008FC47B /* GraphicsContextGL.h */,
+                               7C330A011DF8FAC600D3395C /* GraphicsContextGLAttributes.h */,
                                0F0012401FAD881000531D76 /* GraphicsContextImpl.cpp */,
                                0F00123F1FAD87D600531D76 /* GraphicsContextImpl.h */,
                                0F580B090F12A2690051D689 /* GraphicsLayer.cpp */,
                                1C12AC281EE778AE0079E0A0 /* FontFamilySpecificationCoreText.cpp */,
                                1C12AC291EE778AE0079E0A0 /* FontFamilySpecificationCoreText.h */,
                                B5320D6A122A24E9002D1440 /* FontPlatformDataCocoa.mm */,
-                               49FFBF1C11C8550E006A7118 /* GraphicsContext3DCocoa.mm */,
                                B277B4030B22F37C0004BEC6 /* GraphicsContextCocoa.mm */,
+                               49FFBF1C11C8550E006A7118 /* GraphicsContextGLOpenGLCocoa.mm */,
                                CDA595962146DF7800A84185 /* HEVCUtilitiesCocoa.h */,
                                CDA595972146DF7800A84185 /* HEVCUtilitiesCocoa.mm */,
                                2D0B4AA918DA1CCD00434DE1 /* IOSurface.h */,
                FBC220DD1237FBEB00BCF788 /* opengl */ = {
                        isa = PBXGroup;
                        children = (
-                               6E67D2A41280E8A4008758F7 /* Extensions3DOpenGL.cpp */,
-                               6E67D2A51280E8A4008758F7 /* Extensions3DOpenGL.h */,
-                               44DAB5AF15A623580097C1E4 /* Extensions3DOpenGLCommon.cpp */,
-                               44DAB5B015A623580097C1E4 /* Extensions3DOpenGLCommon.h */,
-                               FBC220DE1237FBEB00BCF788 /* GraphicsContext3DOpenGL.cpp */,
-                               96ABA42214BCB80E00D56204 /* GraphicsContext3DOpenGLCommon.cpp */,
+                               6E67D2A41280E8A4008758F7 /* ExtensionsGLOpenGL.cpp */,
+                               6E67D2A51280E8A4008758F7 /* ExtensionsGLOpenGL.h */,
+                               44DAB5AF15A623580097C1E4 /* ExtensionsGLOpenGLCommon.cpp */,
+                               44DAB5B015A623580097C1E4 /* ExtensionsGLOpenGLCommon.h */,
+                               6E21C6BF1126338500A7BE02 /* GraphicsContextGLOpenGL.cpp */,
+                               49C7B9FB1042D3650009D447 /* GraphicsContextGLOpenGL.h */,
+                               FBC220DE1237FBEB00BCF788 /* GraphicsContextGLOpenGLBase.cpp */,
+                               96ABA42214BCB80E00D56204 /* GraphicsContextGLOpenGLCommon.cpp */,
+                               D0843A4C20FEC16500FE860E /* GraphicsContextGLOpenGLManager.cpp */,
+                               319A728723C267E70085353C /* GraphicsContextGLOpenGLManager.h */,
                                7A29BA69187B781C00F29CEB /* TemporaryOpenGLSetting.cpp */,
                                7A29BA67187B732200F29CEB /* TemporaryOpenGLSetting.h */,
                        );
                                93D196311D6CAB7600FC7E47 /* ExceptionOr.h in Headers */,
                                837FB3451F9EA06D00D0FC31 /* ExtendableMessageEvent.h in Headers */,
                                31DCDF441DA1C45400EA5B93 /* ExtendedColor.h in Headers */,
-                               6E67D2A91280E8BD008758F7 /* Extensions3D.h in Headers */,
-                               6E72F550229DCD1700B3E151 /* Extensions3DANGLE.h in Headers */,
-                               6E67D2A71280E8A4008758F7 /* Extensions3DOpenGL.h in Headers */,
-                               44DAB5B215A623580097C1E4 /* Extensions3DOpenGLCommon.h in Headers */,
+                               6E67D2A91280E8BD008758F7 /* ExtensionsGL.h in Headers */,
+                               6E72F550229DCD1700B3E151 /* ExtensionsGLANGLE.h in Headers */,
+                               6E67D2A71280E8A4008758F7 /* ExtensionsGLOpenGL.h in Headers */,
+                               44DAB5B215A623580097C1E4 /* ExtensionsGLOpenGLCommon.h in Headers */,
                                E47E276516036ED200EE2AFB /* ExtensionStyleSheets.h in Headers */,
                                5C4304B1191AC908000E2BC0 /* EXTShaderTextureLOD.h in Headers */,
                                7728694F14F8882500F484DC /* EXTTextureFilterAnisotropic.h in Headers */,
                                B22279640D00BF220071B782 /* GradientAttributes.h in Headers */,
                                2D481F04146B5C6B00AA7834 /* GradientImage.h in Headers */,
                                B2A015A90AF6CD53006BCE0E /* GraphicsContext.h in Headers */,
-                               49C7B9FC1042D3650009D447 /* GraphicsContext3D.h in Headers */,
-                               7C330A021DF8FAC600D3395C /* GraphicsContext3DAttributes.h in Headers */,
-                               313DE87023A96973008FC47B /* GraphicsContext3DBase.h in Headers */,
-                               31AB5000122878A2001A7DB0 /* GraphicsContext3DIOS.h in Headers */,
-                               D0843A4B20FEBE3D00FE860E /* GraphicsContext3DManager.h in Headers */,
                                934907E4125BBBC8007F23A0 /* GraphicsContextCG.h in Headers */,
+                               313DE87023A96973008FC47B /* GraphicsContextGL.h in Headers */,
+                               7C330A021DF8FAC600D3395C /* GraphicsContextGLAttributes.h in Headers */,
+                               49C7B9FC1042D3650009D447 /* GraphicsContextGLOpenGL.h in Headers */,
+                               31AB5000122878A2001A7DB0 /* GraphicsContextGLOpenGLESIOS.h in Headers */,
+                               319A728823C267FE0085353C /* GraphicsContextGLOpenGLManager.h in Headers */,
                                2DACB9E923755D0000B4C185 /* GraphicsContextImpl.h in Headers */,
                                A80D67080E9E9DEB00E420F0 /* GraphicsContextPlatformPrivateCG.h in Headers */,
                                0F580B0D0F12A2690051D689 /* GraphicsLayer.h in Headers */,
                                BE23480C18A9870B00E4B6E8 /* DataCue.cpp in Sources */,
                                4463CF682212FA68001A8577 /* DataDetectorsCoreSoftLink.mm in Sources */,
                                515BE18F1D54F5FB00DD7C68 /* EmptyGamepadProvider.cpp in Sources */,
-                               6E72F54C229DCD0C00B3E151 /* Extensions3DANGLE.cpp in Sources */,
+                               6E72F54C229DCD0C00B3E151 /* ExtensionsGLANGLE.cpp in Sources */,
                                7CE6CBFD187F394900D46BF5 /* FormatConverter.cpp in Sources */,
                                51A4BB0A1954D61600FA5C2E /* Gamepad.cpp in Sources */,
                                518F4FF6194CA4E60081BAAE /* GamepadButton.cpp in Sources */,
                                51A9D9E9195B931F001B2B5C /* GamepadManager.cpp in Sources */,
                                515BE1911D54F5FB00DD7C68 /* GamepadProvider.cpp in Sources */,
                                837964CF1F8DB69D00218EA0 /* GeolocationPositionDataIOS.mm in Sources */,
-                               6E21C6C01126338500A7BE02 /* GraphicsContext3D.cpp in Sources */,
-                               6E72F54E229DCD1000B3E151 /* GraphicsContext3DANGLE.cpp in Sources */,
+                               6E72F54E229DCD1000B3E151 /* GraphicsContextGLANGLE.cpp in Sources */,
                                7C3E510B18DF8F3500C112F7 /* HTMLConverter.mm in Sources */,
                                A8D06B3A0A265DCD005E7203 /* HTMLNames.cpp in Sources */,
                                1AC900C31943C0FC008625B5 /* HTTPHeaderNames.cpp in Sources */,
index 643121b..cc93ada 100644 (file)
@@ -294,7 +294,7 @@ void HTMLVideoElement::paintCurrentFrameInContext(GraphicsContext& context, cons
     player->paintCurrentFrameInContext(context, destRect);
 }
 
-bool HTMLVideoElement::copyVideoTextureToPlatformTexture(GraphicsContext3D* context, Platform3DObject texture, GC3Denum target, GC3Dint level, GC3Denum internalFormat, GC3Denum format, GC3Denum type, bool premultiplyAlpha, bool flipY)
+bool HTMLVideoElement::copyVideoTextureToPlatformTexture(GraphicsContextGLOpenGL* context, Platform3DObject texture, GC3Denum target, GC3Dint level, GC3Denum internalFormat, GC3Denum format, GC3Denum type, bool premultiplyAlpha, bool flipY)
 {
     if (!player())
         return false;
index b3a06dd..4c88208 100644 (file)
@@ -74,7 +74,7 @@ public:
 
     // Used by WebGL to do GPU-GPU textures copy if possible.
     // See more details at MediaPlayer::copyVideoTextureToPlatformTexture() defined in Source/WebCore/platform/graphics/MediaPlayer.h.
-    bool copyVideoTextureToPlatformTexture(GraphicsContext3D*, Platform3DObject texture, GC3Denum target, GC3Dint level, GC3Denum internalFormat, GC3Denum format, GC3Denum type, bool premultiplyAlpha, bool flipY);
+    bool copyVideoTextureToPlatformTexture(GraphicsContextGLOpenGL*, Platform3DObject texture, GC3Denum target, GC3Dint level, GC3Denum internalFormat, GC3Denum format, GC3Denum type, bool premultiplyAlpha, bool flipY);
 
     bool shouldDisplayPosterImage() const { return displayMode() == Poster || displayMode() == PosterWaitingForVideo; }
 
index 9f78e8b..091a369 100644 (file)
@@ -147,7 +147,7 @@ ExceptionOr<RefPtr<ImageBitmap>> OffscreenCanvas::transferToImageBitmap()
         if (!imageBitmap->buffer())
             return { RefPtr<ImageBitmap> { nullptr } };
 
-        auto* gc3d = webGLContext->graphicsContext3D();
+        auto* gc3d = webGLContext->graphicsContextGL();
         gc3d->paintRenderingResultsToCanvas(imageBitmap->buffer());
 
         // FIXME: The transfer algorithm requires that the canvas effectively
@@ -155,9 +155,9 @@ ExceptionOr<RefPtr<ImageBitmap>> OffscreenCanvas::transferToImageBitmap()
         // need to erase what's there.
 
         GC3Dfloat clearColor[4];
-        gc3d->getFloatv(GraphicsContext3D::COLOR_CLEAR_VALUE, clearColor);
+        gc3d->getFloatv(GraphicsContextGL::COLOR_CLEAR_VALUE, clearColor);
         gc3d->clearColor(0, 0, 0, 0);
-        gc3d->clear(GraphicsContext3D::COLOR_BUFFER_BIT | GraphicsContext3D::DEPTH_BUFFER_BIT | GraphicsContext3D::STENCIL_BUFFER_BIT);
+        gc3d->clear(GraphicsContextGL::COLOR_BUFFER_BIT | GraphicsContextGL::DEPTH_BUFFER_BIT | GraphicsContextGL::STENCIL_BUFFER_BIT);
         gc3d->clearColor(clearColor[0], clearColor[1], clearColor[2], clearColor[3]);
 
         return { WTFMove(imageBitmap) };
index 740d54b..8d74e40 100644 (file)
@@ -29,7 +29,7 @@
 #include "ANGLEInstancedArrays.h"
 
 #if PLATFORM(GTK) || USE(ANGLE)
-#include "Extensions3D.h"
+#include "ExtensionsGL.h"
 #endif
 
 namespace WebCore {
@@ -38,7 +38,7 @@ ANGLEInstancedArrays::ANGLEInstancedArrays(WebGLRenderingContextBase& context)
     : WebGLExtension(context)
 {
 #if USE(ANGLE)
-    context.graphicsContext3D()->getExtensions().ensureEnabled("GL_ANGLE_instanced_arrays");
+    context.graphicsContextGL()->getExtensions().ensureEnabled("GL_ANGLE_instanced_arrays");
 #endif
 }
 
@@ -53,13 +53,13 @@ bool ANGLEInstancedArrays::supported(WebGLRenderingContextBase& context)
 {
 #if PLATFORM(COCOA)
 #if USE(ANGLE)
-    return context.graphicsContext3D()->getExtensions().supports("GL_ANGLE_instanced_arrays");
+    return context.graphicsContextGL()->getExtensions().supports("GL_ANGLE_instanced_arrays");
 #else
     UNUSED_PARAM(context);
     return true;
 #endif
 #elif PLATFORM(GTK)
-    return context.graphicsContext3D()->getExtensions().supports("GL_ANGLE_instanced_arrays");
+    return context.graphicsContextGL()->getExtensions().supports("GL_ANGLE_instanced_arrays");
 #else
     UNUSED_PARAM(context);
     return false;
index 42bb3e2..410cea5 100644 (file)
@@ -28,7 +28,7 @@
 
 #if ENABLE(WEBGL)
 
-#include "Extensions3D.h"
+#include "ExtensionsGL.h"
 #include "WebGLRenderingContext.h"
 
 namespace WebCore {
@@ -61,13 +61,13 @@ void OESVertexArrayObject::deleteVertexArrayOES(WebGLVertexArrayObjectOES* array
     if (!arrayObject->isDefaultObject() && arrayObject == static_cast<WebGLRenderingContext&>(m_context).m_boundVertexArrayObject)
         static_cast<WebGLRenderingContext&>(m_context).setBoundVertexArrayObject(nullptr);
 
-    arrayObject->deleteObject(m_context.graphicsContext3D());
+    arrayObject->deleteObject(m_context.graphicsContextGL());
 }
 
 GC3Dboolean OESVertexArrayObject::isVertexArrayOES(WebGLVertexArrayObjectOES* arrayObject)
 {
     return arrayObject && !m_context.isContextLost() && arrayObject->hasEverBeenBound()
-        && m_context.graphicsContext3D()->getExtensions().isVertexArrayOES(arrayObject->object());
+        && m_context.graphicsContextGL()->getExtensions().isVertexArrayOES(arrayObject->object());
 }
 
 void OESVertexArrayObject::bindVertexArrayOES(WebGLVertexArrayObjectOES* arrayObject)
@@ -76,11 +76,11 @@ void OESVertexArrayObject::bindVertexArrayOES(WebGLVertexArrayObjectOES* arrayOb
         return;
 
     if (arrayObject && (arrayObject->isDeleted() || !arrayObject->validate(nullptr, context()))) {
-        m_context.graphicsContext3D()->synthesizeGLError(GraphicsContext3D::INVALID_OPERATION);
+        m_context.graphicsContextGL()->synthesizeGLError(GraphicsContextGL::INVALID_OPERATION);
         return;
     }
 
-    auto& extensions = m_context.graphicsContext3D()->getExtensions();
+    auto& extensions = m_context.graphicsContextGL()->getExtensions();
     auto& context = downcast<WebGLRenderingContext>(m_context);
     if (arrayObject && !arrayObject->isDefaultObject() && arrayObject->object()) {
         extensions.bindVertexArrayOES(arrayObject->object());
index 0b3dbff..e923083 100644 (file)
@@ -30,7 +30,7 @@
 
 #include "CachedImage.h"
 #include "EXTTextureFilterAnisotropic.h"
-#include "Extensions3D.h"
+#include "ExtensionsGL.h"
 #include "HTMLCanvasElement.h"
 #include "HTMLImageElement.h"
 #include "HTMLVideoElement.h"
@@ -67,7 +67,7 @@ namespace WebCore {
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(WebGL2RenderingContext);
 
-std::unique_ptr<WebGL2RenderingContext> WebGL2RenderingContext::create(CanvasBase& canvas, GraphicsContext3DAttributes attributes)
+std::unique_ptr<WebGL2RenderingContext> WebGL2RenderingContext::create(CanvasBase& canvas, GraphicsContextGLAttributes attributes)
 {
     auto renderingContext = std::unique_ptr<WebGL2RenderingContext>(new WebGL2RenderingContext(canvas, attributes));
 
@@ -76,7 +76,7 @@ std::unique_ptr<WebGL2RenderingContext> WebGL2RenderingContext::create(CanvasBas
     return renderingContext;
 }
 
-std::unique_ptr<WebGL2RenderingContext> WebGL2RenderingContext::create(CanvasBase& canvas, Ref<GraphicsContext3D>&& context, GraphicsContext3DAttributes attributes)
+std::unique_ptr<WebGL2RenderingContext> WebGL2RenderingContext::create(CanvasBase& canvas, Ref<GraphicsContextGLOpenGL>&& context, GraphicsContextGLAttributes attributes)
 {
     auto renderingContext = std::unique_ptr<WebGL2RenderingContext>(new WebGL2RenderingContext(canvas, WTFMove(context), attributes));
 
@@ -85,12 +85,12 @@ std::unique_ptr<WebGL2RenderingContext> WebGL2RenderingContext::create(CanvasBas
     return renderingContext;
 }
 
-WebGL2RenderingContext::WebGL2RenderingContext(CanvasBase& canvas, GraphicsContext3DAttributes attributes)
+WebGL2RenderingContext::WebGL2RenderingContext(CanvasBase& canvas, GraphicsContextGLAttributes attributes)
     : WebGLRenderingContextBase(canvas, attributes)
 {
 }
 
-WebGL2RenderingContext::WebGL2RenderingContext(CanvasBase& canvas, Ref<GraphicsContext3D>&& context, GraphicsContext3DAttributes attributes)
+WebGL2RenderingContext::WebGL2RenderingContext(CanvasBase& canvas, Ref<GraphicsContextGLOpenGL>&& context, GraphicsContextGLAttributes attributes)
     : WebGLRenderingContextBase(canvas, WTFMove(context), attributes)
 {
     initializeShaderExtensions();
@@ -142,7 +142,7 @@ void WebGL2RenderingContext::bufferData(GC3Denum target, const ArrayBufferView&
 {
     auto optionalElementSize = arrayBufferViewElementSize(data);
     if (!optionalElementSize) {
-        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "bufferData", "Invalid type of Array Buffer View");
+        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "bufferData", "Invalid type of Array Buffer View");
         return;
     }
     auto elementSize = optionalElementSize.value();
@@ -157,13 +157,13 @@ void WebGL2RenderingContext::bufferData(GC3Denum target, const ArrayBufferView&
         || checkedByteLength.hasOverflowed()
         || checkedByteSrcOffset.unsafeGet() > data.byteLength()
         || checkedByteLength.unsafeGet() > data.byteLength() - checkedByteSrcOffset.unsafeGet()) {
-        synthesizeGLError(GraphicsContext3D::INVALID_VALUE, "bufferData", "srcOffset or length is out of bounds");
+        synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "bufferData", "srcOffset or length is out of bounds");
         return;
     }
 
     auto slice = Uint8Array::tryCreate(data.possiblySharedBuffer(), data.byteOffset() + checkedByteSrcOffset.unsafeGet(), checkedByteLength.unsafeGet());
     if (!slice) {
-        synthesizeGLError(GraphicsContext3D::OUT_OF_MEMORY, "bufferData", "Could not create intermediate ArrayBufferView");
+        synthesizeGLError(GraphicsContextGL::OUT_OF_MEMORY, "bufferData", "Could not create intermediate ArrayBufferView");
         return;
     }
     WebGLRenderingContextBase::bufferData(target, BufferDataSource(slice.get()), usage);
@@ -173,7 +173,7 @@ void WebGL2RenderingContext::bufferSubData(GC3Denum target, long long offset, co
 {
     auto optionalElementSize = arrayBufferViewElementSize(data);
     if (!optionalElementSize) {
-        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "bufferSubData", "Invalid type of Array Buffer View");
+        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "bufferSubData", "Invalid type of Array Buffer View");
         return;
     }
     auto elementSize = optionalElementSize.value();
@@ -188,13 +188,13 @@ void WebGL2RenderingContext::bufferSubData(GC3Denum target, long long offset, co
         || checkedByteLength.hasOverflowed()
         || checkedByteSrcOffset.unsafeGet() > data.byteLength()
         || checkedByteLength.unsafeGet() > data.byteLength() - checkedByteSrcOffset.unsafeGet()) {
-        synthesizeGLError(GraphicsContext3D::INVALID_VALUE, "bufferSubData", "srcOffset or length is out of bounds");
+        synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "bufferSubData", "srcOffset or length is out of bounds");
         return;
     }
 
     auto slice = Uint8Array::tryCreate(data.possiblySharedBuffer(), data.byteOffset() + checkedByteSrcOffset.unsafeGet(), checkedByteLength.unsafeGet());
     if (!slice) {
-        synthesizeGLError(GraphicsContext3D::OUT_OF_MEMORY, "bufferSubData", "Could not create intermediate ArrayBufferView");
+        synthesizeGLError(GraphicsContextGL::OUT_OF_MEMORY, "bufferSubData", "Could not create intermediate ArrayBufferView");
         return;
     }
 
@@ -205,19 +205,19 @@ void WebGL2RenderingContext::copyBufferSubData(GC3Denum readTarget, GC3Denum wri
 {
     if (isContextLostOrPending())
         return;
-    if ((readTarget == GraphicsContext3D::ELEMENT_ARRAY_BUFFER && writeTarget != GraphicsContext3D::ELEMENT_ARRAY_BUFFER)
-        || (writeTarget == GraphicsContext3D::ELEMENT_ARRAY_BUFFER && readTarget != GraphicsContext3D::ELEMENT_ARRAY_BUFFER)) {
-        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "copyBufferSubData", "Either both targets need to be ELEMENT_ARRAY_BUFFER or neither should be ELEMENT_ARRAY_BUFFER.");
+    if ((readTarget == GraphicsContextGL::ELEMENT_ARRAY_BUFFER && writeTarget != GraphicsContextGL::ELEMENT_ARRAY_BUFFER)
+        || (writeTarget == GraphicsContextGL::ELEMENT_ARRAY_BUFFER && readTarget != GraphicsContextGL::ELEMENT_ARRAY_BUFFER)) {
+        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "copyBufferSubData", "Either both targets need to be ELEMENT_ARRAY_BUFFER or neither should be ELEMENT_ARRAY_BUFFER.");
         return;
     }
     if (readOffset < 0 || writeOffset < 0 || size < 0) {
-        synthesizeGLError(GraphicsContext3D::INVALID_VALUE, "copyBufferSubData", "offset < 0");
+        synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "copyBufferSubData", "offset < 0");
         return;
     }
-    RefPtr<WebGLBuffer> readBuffer = validateBufferDataParameters("copyBufferSubData", readTarget, GraphicsContext3D::STATIC_DRAW);
-    RefPtr<WebGLBuffer> writeBuffer = validateBufferDataParameters("copyBufferSubData", writeTarget, GraphicsContext3D::STATIC_DRAW);
+    RefPtr<WebGLBuffer> readBuffer = validateBufferDataParameters("copyBufferSubData", readTarget, GraphicsContextGL::STATIC_DRAW);
+    RefPtr<WebGLBuffer> writeBuffer = validateBufferDataParameters("copyBufferSubData", writeTarget, GraphicsContextGL::STATIC_DRAW);
     if (!readBuffer || !writeBuffer) {
-        synthesizeGLError(GraphicsContext3D::INVALID_VALUE, "copyBufferSubData", "Invalid readTarget or writeTarget");
+        synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "copyBufferSubData", "Invalid readTarget or writeTarget");
         return;
     }
 
@@ -225,12 +225,12 @@ void WebGL2RenderingContext::copyBufferSubData(GC3Denum readTarget, GC3Denum wri
     Checked<GC3Dintptr, RecordOverflow> checkedWriteOffset(writeOffset);
     Checked<GC3Dsizeiptr, RecordOverflow> checkedSize(size);
     if (checkedReadOffset.hasOverflowed() || checkedWriteOffset.hasOverflowed() || checkedSize.hasOverflowed()) {
-        synthesizeGLError(GraphicsContext3D::INVALID_VALUE, "copyBufferSubData", "Offset or size is too big");
+        synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "copyBufferSubData", "Offset or size is too big");
         return;
     }
 
     if (!writeBuffer->associateCopyBufferSubData(*readBuffer, checkedReadOffset.unsafeGet(), checkedWriteOffset.unsafeGet(), checkedSize.unsafeGet())) {
-        this->synthesizeGLError(GraphicsContext3D::INVALID_VALUE, "copyBufferSubData", "offset out of range");
+        this->synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "copyBufferSubData", "offset out of range");
         return;
     }
 
@@ -248,29 +248,29 @@ void WebGL2RenderingContext::getBufferSubData(GC3Denum target, long long srcByte
 {
     if (isContextLostOrPending())
         return;
-    RefPtr<WebGLBuffer> buffer = validateBufferDataParameters("bufferSubData", target, GraphicsContext3D::STATIC_DRAW);
+    RefPtr<WebGLBuffer> buffer = validateBufferDataParameters("bufferSubData", target, GraphicsContextGL::STATIC_DRAW);
     if (!buffer) {
-        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "getBufferSubData", "No WebGLBuffer is bound to target");
+        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "getBufferSubData", "No WebGLBuffer is bound to target");
         return;
     }
 
     // FIXME: Implement "If target is TRANSFORM_FEEDBACK_BUFFER, and any transform feedback object is currently active, an INVALID_OPERATION error is generated."
 
     if (!dstData) {
-        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "getBufferSubData", "Null dstData");
+        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "getBufferSubData", "Null dstData");
         return;
     }
 
     auto optionalElementSize = arrayBufferViewElementSize(*dstData);
     if (!optionalElementSize) {
-        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "getBufferSubData", "Invalid type of Array Buffer View");
+        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "getBufferSubData", "Invalid type of Array Buffer View");
         return;
     }
     auto elementSize = optionalElementSize.value();
     auto dstDataLength = dstData->byteLength() / elementSize;
 
     if (dstOffset > dstDataLength) {
-        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "getBufferSubData", "dstOffset is larger than the length of the destination buffer.");
+        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "getBufferSubData", "dstOffset is larger than the length of the destination buffer.");
         return;
     }
 
@@ -280,17 +280,17 @@ void WebGL2RenderingContext::getBufferSubData(GC3Denum target, long long srcByte
     Checked<GC3Duint, RecordOverflow> checkedCopyLength(copyLength);
     auto checkedDestinationEnd = checkedDstOffset + checkedCopyLength;
     if (checkedDestinationEnd.hasOverflowed()) {
-        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "getBufferSubData", "dstOffset + copyLength is too high");
+        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "getBufferSubData", "dstOffset + copyLength is too high");
         return;
     }
 
     if (checkedDestinationEnd.unsafeGet() > dstDataLength) {
-        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "getBufferSubData", "end of written destination is past the end of the buffer");
+        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "getBufferSubData", "end of written destination is past the end of the buffer");
         return;
     }
 
     if (srcByteOffset < 0) {
-        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "getBufferSubData", "srcByteOffset is less than 0");
+        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "getBufferSubData", "srcByteOffset is less than 0");
         return;
     }
 
@@ -299,17 +299,17 @@ void WebGL2RenderingContext::getBufferSubData(GC3Denum target, long long srcByte
     Checked<GC3Dintptr, RecordOverflow> checkedElementSize(elementSize);
     auto checkedSourceEnd = checkedSrcByteOffset + checkedCopyLengthPtr * checkedElementSize;
     if (checkedSourceEnd.hasOverflowed() || checkedSourceEnd.unsafeGet() > buffer->byteLength()) {
-        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "getBufferSubData", "Parameters would read outside the bounds of the source buffer");
+        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "getBufferSubData", "Parameters would read outside the bounds of the source buffer");
         return;
     }
 
     m_context->moveErrorsToSyntheticErrorList();
 #if PLATFORM(COCOA)
     // FIXME: Coalesce multiple getBufferSubData() calls to use a single map() call
-    void* ptr = m_context->mapBufferRange(target, checkedSrcByteOffset.unsafeGet(), static_cast<GC3Dsizeiptr>(checkedCopyLengthPtr.unsafeGet() * checkedElementSize.unsafeGet()), GraphicsContext3D::MAP_READ_BIT);
+    void* ptr = m_context->mapBufferRange(target, checkedSrcByteOffset.unsafeGet(), static_cast<GC3Dsizeiptr>(checkedCopyLengthPtr.unsafeGet() * checkedElementSize.unsafeGet()), GraphicsContextGL::MAP_READ_BIT);
     memcpy(static_cast<char*>(dstData->baseAddress()) + dstData->byteOffset() + dstOffset * elementSize, ptr, copyLength * elementSize);
     if (!m_context->unmapBuffer(target))
-        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "getBufferSubData", "Failed while unmapping buffer");
+        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "getBufferSubData", "Failed while unmapping buffer");
 #endif
     m_context->moveErrorsToSyntheticErrorList();
 }
@@ -329,39 +329,39 @@ static bool isRenderableInternalformat(GC3Denum internalformat)
 {
     // OpenGL ES 3: internalformat must be a color-renderable, depth-renderable, or stencil-renderable format, as shown in Table 1 below.
     switch (internalformat) {
-    case GraphicsContext3D::R8:
-    case GraphicsContext3D::R8UI:
-    case GraphicsContext3D::R16UI:
-    case GraphicsContext3D::R16I:
-    case GraphicsContext3D::R32UI:
-    case GraphicsContext3D::R32I:
-    case GraphicsContext3D::RG8:
-    case GraphicsContext3D::RG8UI:
-    case GraphicsContext3D::RG8I:
-    case GraphicsContext3D::RG16UI:
-    case GraphicsContext3D::RG16I:
-    case GraphicsContext3D::RG32UI:
-    case GraphicsContext3D::RG32I:
-    case GraphicsContext3D::RGB8:
-    case GraphicsContext3D::RGB565:
-    case GraphicsContext3D::RGBA8:
-    case GraphicsContext3D::SRGB8_ALPHA8:
-    case GraphicsContext3D::RGB5_A1:
-    case GraphicsContext3D::RGBA4:
-    case GraphicsContext3D::RGB10_A2:
-    case GraphicsContext3D::RGBA8UI:
-    case GraphicsContext3D::RGBA8I:
-    case GraphicsContext3D::RGB10_A2UI:
-    case GraphicsContext3D::RGBA16UI:
-    case GraphicsContext3D::RGBA16I:
-    case GraphicsContext3D::RGBA32I:
-    case GraphicsContext3D::RGBA32UI:
-    case GraphicsContext3D::DEPTH_COMPONENT16:
-    case GraphicsContext3D::DEPTH_COMPONENT24:
-    case GraphicsContext3D::DEPTH_COMPONENT32F:
-    case GraphicsContext3D::DEPTH24_STENCIL8:
-    case GraphicsContext3D::DEPTH32F_STENCIL8:
-    case GraphicsContext3D::STENCIL_INDEX8:
+    case GraphicsContextGL::R8:
+    case GraphicsContextGL::R8UI:
+    case GraphicsContextGL::R16UI:
+    case GraphicsContextGL::R16I:
+    case GraphicsContextGL::R32UI:
+    case GraphicsContextGL::R32I:
+    case GraphicsContextGL::RG8:
+    case GraphicsContextGL::RG8UI:
+    case GraphicsContextGL::RG8I:
+    case GraphicsContextGL::RG16UI:
+    case GraphicsContextGL::RG16I:
+    case GraphicsContextGL::RG32UI:
+    case GraphicsContextGL::RG32I:
+    case GraphicsContextGL::RGB8:
+    case GraphicsContextGL::RGB565:
+    case GraphicsContextGL::RGBA8:
+    case GraphicsContextGL::SRGB8_ALPHA8:
+    case GraphicsContextGL::RGB5_A1:
+    case GraphicsContextGL::RGBA4:
+    case GraphicsContextGL::RGB10_A2:
+    case GraphicsContextGL::RGBA8UI:
+    case GraphicsContextGL::RGBA8I:
+    case GraphicsContextGL::RGB10_A2UI:
+    case GraphicsContextGL::RGBA16UI:
+    case GraphicsContextGL::RGBA16I:
+    case GraphicsContextGL::RGBA32I:
+    case GraphicsContextGL::RGBA32UI:
+    case GraphicsContextGL::DEPTH_COMPONENT16:
+    case GraphicsContextGL::DEPTH_COMPONENT24:
+    case GraphicsContextGL::DEPTH_COMPONENT32F:
+    case GraphicsContextGL::DEPTH24_STENCIL8:
+    case GraphicsContextGL::DEPTH32F_STENCIL8:
+    case GraphicsContextGL::STENCIL_INDEX8:
         return true;
     }
     return false;
@@ -373,14 +373,14 @@ WebGLAny WebGL2RenderingContext::getInternalformatParameter(GC3Denum target, GC3
     if (isContextLostOrPending())
         return nullptr;
 
-    if (pname != GraphicsContext3D::SAMPLES) {
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "getInternalformatParameter", "invalid parameter name");
+    if (pname != GraphicsContextGL::SAMPLES) {
+        synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "getInternalformatParameter", "invalid parameter name");
         return nullptr;
     }
 
     int numValues = 0;
 #if USE(OPENGL_ES)
-    m_context->getInternalformativ(target, internalformat, GraphicsContext3D::NUM_SAMPLE_COUNTS, 1, &numValues);
+    m_context->getInternalformativ(target, internalformat, GraphicsContextGL::NUM_SAMPLE_COUNTS, 1, &numValues);
 
     GC3Dint params[numValues];
     m_context->getInternalformativ(target, internalformat, pname, numValues, params);
@@ -388,21 +388,21 @@ WebGLAny WebGL2RenderingContext::getInternalformatParameter(GC3Denum target, GC3
     // On desktop OpenGL 4.1 or below we must emulate glGetInternalformativ.
 
     // GL_INVALID_ENUM is generated if target is not GL_RENDERBUFFER.
-    if (target != GraphicsContext3D::RENDERBUFFER) {
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "getInternalformatParameter", "invalid target");
+    if (target != GraphicsContextGL::RENDERBUFFER) {
+        synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "getInternalformatParameter", "invalid target");
         return nullptr;
     }
 
     // GL_INVALID_ENUM is generated if internalformat is not color-, depth-, or stencil-renderable.
     if (!isRenderableInternalformat(internalformat)) {
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "getInternalformatParameter", "invalid internal format");
+        synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "getInternalformatParameter", "invalid internal format");
         return nullptr;
     }
 
     Vector<GC3Dint> samples;
     // The way I understand this is that this will return a MINIMUM numSamples for all accepeted internalformats.
     // However, the true value of this on supported GL versions is gleaned via a getInternalformativ call that depends on internalformat.
-    int numSamplesMask = getIntParameter(GraphicsContext3D::MAX_SAMPLES);
+    int numSamplesMask = getIntParameter(GraphicsContextGL::MAX_SAMPLES);
 
     while (numSamplesMask > 0) {
         samples.append(numSamplesMask);
@@ -439,57 +439,57 @@ void WebGL2RenderingContext::renderbufferStorageMultisample(GC3Denum target, GC3
 {
     // To be backward compatible with WebGL 1, also accepts internal format DEPTH_STENCIL,
     // which should be mapped to DEPTH24_STENCIL8 by implementations.
-    if (internalformat == GraphicsContext3D::DEPTH_STENCIL)
-        internalformat = GraphicsContext3D::DEPTH24_STENCIL8;
+    if (internalformat == GraphicsContextGL::DEPTH_STENCIL)
+        internalformat = GraphicsContextGL::DEPTH24_STENCIL8;
 
     // ES 3: GL_INVALID_OPERATION is generated if internalformat is a signed or unsigned integer format and samples is greater than 0.
     if (isIntegerFormat(internalformat) && samples > 0) {
-        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "renderbufferStorageMultisample", "multisampling not supported for this format");
+        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "renderbufferStorageMultisample", "multisampling not supported for this format");
         return;
     }
 
     switch (internalformat) {
-    case GraphicsContext3D::DEPTH_COMPONENT16:
-    case GraphicsContext3D::DEPTH_COMPONENT32F:
-    case GraphicsContext3D::DEPTH_COMPONENT24:
-    case GraphicsContext3D::RGBA32I:
-    case GraphicsContext3D::RGBA32UI:
-    case GraphicsContext3D::RGBA16I:
-    case GraphicsContext3D::RGBA16UI:
-    case GraphicsContext3D::RGBA8:
-    case GraphicsContext3D::RGBA8I:
-    case GraphicsContext3D::RGBA8UI:
-    case GraphicsContext3D::RGB10_A2:
-    case GraphicsContext3D::RGB10_A2UI:
-    case GraphicsContext3D::RGBA4:
-    case GraphicsContext3D::RG32I:
-    case GraphicsContext3D::RG32UI:
-    case GraphicsContext3D::RG16I:
-    case GraphicsContext3D::RG16UI:
-    case GraphicsContext3D::RG8:
-    case GraphicsContext3D::RG8I:
-    case GraphicsContext3D::RG8UI:
-    case GraphicsContext3D::R32I:
-    case GraphicsContext3D::R32UI:
-    case GraphicsContext3D::R16I:
-    case GraphicsContext3D::R16UI:
-    case GraphicsContext3D::R8:
-    case GraphicsContext3D::R8I:
-    case GraphicsContext3D::R8UI:
-    case GraphicsContext3D::RGB5_A1:
-    case GraphicsContext3D::RGB565:
-    case GraphicsContext3D::RGB8:
-    case GraphicsContext3D::STENCIL_INDEX8:
-    case GraphicsContext3D::SRGB8_ALPHA8:
+    case GraphicsContextGL::DEPTH_COMPONENT16:
+    case GraphicsContextGL::DEPTH_COMPONENT32F:
+    case GraphicsContextGL::DEPTH_COMPONENT24:
+    case GraphicsContextGL::RGBA32I:
+    case GraphicsContextGL::RGBA32UI:
+    case GraphicsContextGL::RGBA16I:
+    case GraphicsContextGL::RGBA16UI:
+    case GraphicsContextGL::RGBA8:
+    case GraphicsContextGL::RGBA8I:
+    case GraphicsContextGL::RGBA8UI:
+    case GraphicsContextGL::RGB10_A2:
+    case GraphicsContextGL::RGB10_A2UI:
+    case GraphicsContextGL::RGBA4:
+    case GraphicsContextGL::RG32I:
+    case GraphicsContextGL::RG32UI:
+    case GraphicsContextGL::RG16I:
+    case GraphicsContextGL::RG16UI:
+    case GraphicsContextGL::RG8:
+    case GraphicsContextGL::RG8I:
+    case GraphicsContextGL::RG8UI:
+    case GraphicsContextGL::R32I:
+    case GraphicsContextGL::R32UI:
+    case GraphicsContextGL::R16I:
+    case GraphicsContextGL::R16UI:
+    case GraphicsContextGL::R8:
+    case GraphicsContextGL::R8I:
+    case GraphicsContextGL::R8UI:
+    case GraphicsContextGL::RGB5_A1:
+    case GraphicsContextGL::RGB565:
+    case GraphicsContextGL::RGB8:
+    case GraphicsContextGL::STENCIL_INDEX8:
+    case GraphicsContextGL::SRGB8_ALPHA8:
         m_context->renderbufferStorageMultisample(target, samples, internalformat, width, height);
         m_renderbufferBinding->setInternalFormat(internalformat);
         m_renderbufferBinding->setIsValid(true);
         m_renderbufferBinding->setSize(width, height);
         break;
-    case GraphicsContext3D::DEPTH32F_STENCIL8:
-    case GraphicsContext3D::DEPTH24_STENCIL8:
+    case GraphicsContextGL::DEPTH32F_STENCIL8:
+    case GraphicsContextGL::DEPTH24_STENCIL8:
         if (!isDepthStencilSupported()) {
-            synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "renderbufferStorage", "invalid internalformat");
+            synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "renderbufferStorage", "invalid internalformat");
             return;
         }
         m_context->renderbufferStorageMultisample(target, samples, internalformat, width, height);
@@ -498,7 +498,7 @@ void WebGL2RenderingContext::renderbufferStorageMultisample(GC3Denum target, GC3
         m_renderbufferBinding->setInternalFormat(internalformat);
         break;
     default:
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "renderbufferStorage", "invalid internalformat");
+        synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "renderbufferStorage", "invalid internalformat");
         return;
     }
     applyStencilTest();
@@ -507,88 +507,88 @@ void WebGL2RenderingContext::renderbufferStorageMultisample(GC3Denum target, GC3
 bool WebGL2RenderingContext::validateTexStorageFuncParameters(GC3Denum target, GC3Dsizei levels, GC3Denum internalFormat, GC3Dsizei width, GC3Dsizei height, const char* functionName)
 {
     if (width < 0 || height < 0) {
-        synthesizeGLError(GraphicsContext3D::INVALID_VALUE, functionName, "width or height < 0");
+        synthesizeGLError(GraphicsContextGL::INVALID_VALUE, functionName, "width or height < 0");
         return false;
     }
 
     if (width > m_maxTextureSize || height > m_maxTextureSize) {
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, functionName, "texture dimensions are larger than the maximum texture size");
+        synthesizeGLError(GraphicsContextGL::INVALID_ENUM, functionName, "texture dimensions are larger than the maximum texture size");
         return false;
     }
 
-    if (target == GraphicsContext3D::TEXTURE_CUBE_MAP) {
+    if (target == GraphicsContextGL::TEXTURE_CUBE_MAP) {
         if (width != height) {
-            synthesizeGLError(GraphicsContext3D::INVALID_VALUE, functionName, "width != height for cube map");
+            synthesizeGLError(GraphicsContextGL::INVALID_VALUE, functionName, "width != height for cube map");
             return false;
         }
-    } else if (target != GraphicsContext3D::TEXTURE_2D) {
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, functionName, "invalid target");
+    } else if (target != GraphicsContextGL::TEXTURE_2D) {
+        synthesizeGLError(GraphicsContextGL::INVALID_ENUM, functionName, "invalid target");
         return false;
     }
 
     if (levels < 0 || levels > m_maxTextureLevel) {
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, functionName, "number of levels is out of bounds");
+        synthesizeGLError(GraphicsContextGL::INVALID_ENUM, functionName, "number of levels is out of bounds");
         return false;
     }
 
     switch (internalFormat) {
-    case GraphicsContext3D::R8:
-    case GraphicsContext3D::R8_SNORM:
-    case GraphicsContext3D::R16F:
-    case GraphicsContext3D::R32F:
-    case GraphicsContext3D::R8UI:
-    case GraphicsContext3D::R8I:
-    case GraphicsContext3D::R16UI:
-    case GraphicsContext3D::R16I:
-    case GraphicsContext3D::R32UI:
-    case GraphicsContext3D::R32I:
-    case GraphicsContext3D::RG8:
-    case GraphicsContext3D::RG8_SNORM:
-    case GraphicsContext3D::RG16F:
-    case GraphicsContext3D::RG32F:
-    case GraphicsContext3D::RG8UI:
-    case GraphicsContext3D::RG8I:
-    case GraphicsContext3D::RG16UI:
-    case GraphicsContext3D::RG16I:
-    case GraphicsContext3D::RG32UI:
-    case GraphicsContext3D::RG32I:
-    case GraphicsContext3D::RGB8:
-    case GraphicsContext3D::SRGB8:
-    case GraphicsContext3D::RGB565:
-    case GraphicsContext3D::RGB8_SNORM:
-    case GraphicsContext3D::R11F_G11F_B10F:
-    case GraphicsContext3D::RGB9_E5:
-    case GraphicsContext3D::RGB16F:
-    case GraphicsContext3D::RGB32F:
-    case GraphicsContext3D::RGB8UI:
-    case GraphicsContext3D::RGB8I:
-    case GraphicsContext3D::RGB16UI:
-    case GraphicsContext3D::RGB16I:
-    case GraphicsContext3D::RGB32UI:
-    case GraphicsContext3D::RGB32I:
-    case GraphicsContext3D::RGBA8:
-    case GraphicsContext3D::SRGB8_ALPHA8:
-    case GraphicsContext3D::RGBA8_SNORM:
-    case GraphicsContext3D::RGB5_A1:
-    case GraphicsContext3D::RGBA4:
-    case GraphicsContext3D::RGB10_A2:
-    case GraphicsContext3D::RGBA16F:
-    case GraphicsContext3D::RGBA32F:
-    case GraphicsContext3D::RGBA8UI:
-    case GraphicsContext3D::RGBA8I:
-    case GraphicsContext3D::RGB10_A2UI:
-    case GraphicsContext3D::RGBA16UI:
-    case GraphicsContext3D::RGBA16I:
-    case GraphicsContext3D::RGBA32I:
-    case GraphicsContext3D::RGBA32UI:
-    case GraphicsContext3D::DEPTH_COMPONENT16:
-    case GraphicsContext3D::DEPTH_COMPONENT24:
-    case GraphicsContext3D::DEPTH_COMPONENT32F:
-    case GraphicsContext3D::DEPTH24_STENCIL8:
-    case GraphicsContext3D::DEPTH32F_STENCIL8:
+    case GraphicsContextGL::R8:
+    case GraphicsContextGL::R8_SNORM:
+    case GraphicsContextGL::R16F:
+    case GraphicsContextGL::R32F:
+    case GraphicsContextGL::R8UI:
+    case GraphicsContextGL::R8I:
+    case GraphicsContextGL::R16UI:
+    case GraphicsContextGL::R16I:
+    case GraphicsContextGL::R32UI:
+    case GraphicsContextGL::R32I:
+    case GraphicsContextGL::RG8:
+    case GraphicsContextGL::RG8_SNORM:
+    case GraphicsContextGL::RG16F:
+    case GraphicsContextGL::RG32F:
+    case GraphicsContextGL::RG8UI:
+    case GraphicsContextGL::RG8I:
+    case GraphicsContextGL::RG16UI:
+    case GraphicsContextGL::RG16I:
+    case GraphicsContextGL::RG32UI:
+    case GraphicsContextGL::RG32I:
+    case GraphicsContextGL::RGB8:
+    case GraphicsContextGL::SRGB8:
+    case GraphicsContextGL::RGB565:
+    case GraphicsContextGL::RGB8_SNORM:
+    case GraphicsContextGL::R11F_G11F_B10F:
+    case GraphicsContextGL::RGB9_E5:
+    case GraphicsContextGL::RGB16F:
+    case GraphicsContextGL::RGB32F:
+    case GraphicsContextGL::RGB8UI:
+    case GraphicsContextGL::RGB8I:
+    case GraphicsContextGL::RGB16UI:
+    case GraphicsContextGL::RGB16I:
+    case GraphicsContextGL::RGB32UI:
+    case GraphicsContextGL::RGB32I:
+    case GraphicsContextGL::RGBA8:
+    case GraphicsContextGL::SRGB8_ALPHA8:
+    case GraphicsContextGL::RGBA8_SNORM:
+    case GraphicsContextGL::RGB5_A1:
+    case GraphicsContextGL::RGBA4:
+    case GraphicsContextGL::RGB10_A2:
+    case GraphicsContextGL::RGBA16F:
+    case GraphicsContextGL::RGBA32F:
+    case GraphicsContextGL::RGBA8UI:
+    case GraphicsContextGL::RGBA8I:
+    case GraphicsContextGL::RGB10_A2UI:
+    case GraphicsContextGL::RGBA16UI:
+    case GraphicsContextGL::RGBA16I:
+    case GraphicsContextGL::RGBA32I:
+    case GraphicsContextGL::RGBA32UI:
+    case GraphicsContextGL::DEPTH_COMPONENT16:
+    case GraphicsContextGL::DEPTH_COMPONENT24:
+    case GraphicsContextGL::DEPTH_COMPONENT32F:
+    case GraphicsContextGL::DEPTH24_STENCIL8:
+    case GraphicsContextGL::DEPTH32F_STENCIL8:
         break;
     default:
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, functionName, "Unknown internalFormat");
+        synthesizeGLError(GraphicsContextGL::INVALID_ENUM, functionName, "Unknown internalFormat");
         return false;
     }
 
@@ -611,7 +611,7 @@ void WebGL2RenderingContext::texStorage2D(GC3Denum target, GC3Dsizei levels, GC3
         return;
 
     if (texture->immutable()) {
-        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "texStorage2D", "texStorage2D already called on this texture");
+        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "texStorage2D", "texStorage2D already called on this texture");
         return;
     }
     texture->setImmutable();
@@ -621,8 +621,8 @@ void WebGL2RenderingContext::texStorage2D(GC3Denum target, GC3Dsizei levels, GC3
     {
         GC3Denum format;
         GC3Denum type;
-        if (!GraphicsContext3D::possibleFormatAndTypeForInternalFormat(internalFormat, format, type)) {
-            synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "texStorage2D", "Texture has unknown internal format");
+        if (!GraphicsContextGLOpenGL::possibleFormatAndTypeForInternalFormat(internalFormat, format, type)) {
+            synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "texStorage2D", "Texture has unknown internal format");
             return;
         }
 
@@ -631,7 +631,7 @@ void WebGL2RenderingContext::texStorage2D(GC3Denum target, GC3Dsizei levels, GC3
 
         unsigned size;
         GC3Denum error = m_context->computeImageSizeInBytes(format, type, width, height, m_unpackAlignment, &size, nullptr);
-        if (error != GraphicsContext3D::NO_ERROR) {
+        if (error != GraphicsContextGL::NO_ERROR) {
             synthesizeGLError(error, "texStorage2D", "bad dimensions");
             return;
         }
@@ -640,13 +640,13 @@ void WebGL2RenderingContext::texStorage2D(GC3Denum target, GC3Dsizei levels, GC3
         memset(data.data(), 0, size);
 
         for (GC3Dsizei level = 0; level < levels; ++level) {
-            if (target == GraphicsContext3D::TEXTURE_CUBE_MAP) {
-                m_context->texSubImage2D(GraphicsContext3D::TEXTURE_CUBE_MAP_POSITIVE_X, level, 0, 0, levelWidth, levelHeight, format, type, data.data());
-                m_context->texSubImage2D(GraphicsContext3D::TEXTURE_CUBE_MAP_NEGATIVE_X, level, 0, 0, levelWidth, levelHeight, format, type, data.data());
-                m_context->texSubImage2D(GraphicsContext3D::TEXTURE_CUBE_MAP_POSITIVE_Y, level, 0, 0, levelWidth, levelHeight, format, type, data.data());
-                m_context->texSubImage2D(GraphicsContext3D::TEXTURE_CUBE_MAP_NEGATIVE_Y, level, 0, 0, levelWidth, levelHeight, format, type, data.data());
-                m_context->texSubImage2D(GraphicsContext3D::TEXTURE_CUBE_MAP_POSITIVE_Z, level, 0, 0, levelWidth, levelHeight, format, type, data.data());
-                m_context->texSubImage2D(GraphicsContext3D::TEXTURE_CUBE_MAP_NEGATIVE_Z, level, 0, 0, levelWidth, levelHeight, format, type, data.data());
+            if (target == GraphicsContextGL::TEXTURE_CUBE_MAP) {
+                m_context->texSubImage2D(GraphicsContextGL::TEXTURE_CUBE_MAP_POSITIVE_X, level, 0, 0, levelWidth, levelHeight, format, type, data.data());
+                m_context->texSubImage2D(GraphicsContextGL::TEXTURE_CUBE_MAP_NEGATIVE_X, level, 0, 0, levelWidth, levelHeight, format, type, data.data());
+                m_context->texSubImage2D(GraphicsContextGL::TEXTURE_CUBE_MAP_POSITIVE_Y, level, 0, 0, levelWidth, levelHeight, format, type, data.data());
+                m_context->texSubImage2D(GraphicsContextGL::TEXTURE_CUBE_MAP_NEGATIVE_Y, level, 0, 0, levelWidth, levelHeight, format, type, data.data());
+                m_context->texSubImage2D(GraphicsContextGL::TEXTURE_CUBE_MAP_POSITIVE_Z, level, 0, 0, levelWidth, levelHeight, format, type, data.data());
+                m_context->texSubImage2D(GraphicsContextGL::TEXTURE_CUBE_MAP_NEGATIVE_Z, level, 0, 0, levelWidth, levelHeight, format, type, data.data());
             } else
                 m_context->texSubImage2D(target, level, 0, 0, levelWidth, levelHeight, format, type, data.data());
             levelWidth = std::max(1, levelWidth / 2);
@@ -655,15 +655,15 @@ void WebGL2RenderingContext::texStorage2D(GC3Denum target, GC3Dsizei levels, GC3
     }
 
     for (GC3Dsizei level = 0; level < levels; ++level) {
-        if (target == GraphicsContext3D::TEXTURE_CUBE_MAP) {
-            texture->setLevelInfo(GraphicsContext3D::TEXTURE_CUBE_MAP_POSITIVE_X, level, internalFormat, width, height, GraphicsContext3D::UNSIGNED_BYTE);
-            texture->setLevelInfo(GraphicsContext3D::TEXTURE_CUBE_MAP_NEGATIVE_X, level, internalFormat, width, height, GraphicsContext3D::UNSIGNED_BYTE);
-            texture->setLevelInfo(GraphicsContext3D::TEXTURE_CUBE_MAP_POSITIVE_Y, level, internalFormat, width, height, GraphicsContext3D::UNSIGNED_BYTE);
-            texture->setLevelInfo(GraphicsContext3D::TEXTURE_CUBE_MAP_NEGATIVE_Y, level, internalFormat, width, height, GraphicsContext3D::UNSIGNED_BYTE);
-            texture->setLevelInfo(GraphicsContext3D::TEXTURE_CUBE_MAP_POSITIVE_Z, level, internalFormat, width, height, GraphicsContext3D::UNSIGNED_BYTE);
-            texture->setLevelInfo(GraphicsContext3D::TEXTURE_CUBE_MAP_NEGATIVE_Z, level, internalFormat, width, height, GraphicsContext3D::UNSIGNED_BYTE);
+        if (target == GraphicsContextGL::TEXTURE_CUBE_MAP) {
+            texture->setLevelInfo(GraphicsContextGL::TEXTURE_CUBE_MAP_POSITIVE_X, level, internalFormat, width, height, GraphicsContextGL::UNSIGNED_BYTE);
+            texture->setLevelInfo(GraphicsContextGL::TEXTURE_CUBE_MAP_NEGATIVE_X, level, internalFormat, width, height, GraphicsContextGL::UNSIGNED_BYTE);
+            texture->setLevelInfo(GraphicsContextGL::TEXTURE_CUBE_MAP_POSITIVE_Y, level, internalFormat, width, height, GraphicsContextGL::UNSIGNED_BYTE);
+            texture->setLevelInfo(GraphicsContextGL::TEXTURE_CUBE_MAP_NEGATIVE_Y, level, internalFormat, width, height, GraphicsContextGL::UNSIGNED_BYTE);
+            texture->setLevelInfo(GraphicsContextGL::TEXTURE_CUBE_MAP_POSITIVE_Z, level, internalFormat, width, height, GraphicsContextGL::UNSIGNED_BYTE);
+            texture->setLevelInfo(GraphicsContextGL::TEXTURE_CUBE_MAP_NEGATIVE_Z, level, internalFormat, width, height, GraphicsContextGL::UNSIGNED_BYTE);
         } else
-            texture->setLevelInfo(target, level, internalFormat, width, height, GraphicsContext3D::UNSIGNED_BYTE);
+            texture->setLevelInfo(target, level, internalFormat, width, height, GraphicsContextGL::UNSIGNED_BYTE);
     }
 }
 
@@ -877,17 +877,17 @@ void WebGL2RenderingContext::clear(GC3Dbitfield mask)
 {
     if (isContextLostOrPending())
         return;
-    if (mask & ~(GraphicsContext3D::COLOR_BUFFER_BIT | GraphicsContext3D::DEPTH_BUFFER_BIT | GraphicsContext3D::STENCIL_BUFFER_BIT)) {
-        synthesizeGLError(GraphicsContext3D::INVALID_VALUE, "clear", "invalid mask");
+    if (mask & ~(GraphicsContextGL::COLOR_BUFFER_BIT | GraphicsContextGL::DEPTH_BUFFER_BIT | GraphicsContextGL::STENCIL_BUFFER_BIT)) {
+        synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "clear", "invalid mask");
         return;
     }
     const char* reason = "framebuffer incomplete";
-    if (m_framebufferBinding && !m_framebufferBinding->onAccess(graphicsContext3D(), &reason)) {
-        synthesizeGLError(GraphicsContext3D::INVALID_FRAMEBUFFER_OPERATION, "clear", reason);
+    if (m_framebufferBinding && !m_framebufferBinding->onAccess(graphicsContextGL(), &reason)) {
+        synthesizeGLError(GraphicsContextGL::INVALID_FRAMEBUFFER_OPERATION, "clear", reason);
         return;
     }
-    if (m_framebufferBinding && (mask & GraphicsContext3D::COLOR_BUFFER_BIT) && isIntegerFormat(m_framebufferBinding->getColorBufferFormat())) {
-        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "clear", "cannot clear an integer buffer");
+    if (m_framebufferBinding && (mask & GraphicsContextGL::COLOR_BUFFER_BIT) && isIntegerFormat(m_framebufferBinding->getColorBufferFormat())) {
+        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "clear", "cannot clear an integer buffer");
         return;
     }
     if (!clearIfComposited(mask))
@@ -932,25 +932,25 @@ void WebGL2RenderingContext::drawBuffers(const Vector<GC3Denum>& buffers)
     const GC3Denum* bufs = buffers.data();
     if (!m_framebufferBinding) {
         if (n != 1) {
-            synthesizeGLError(GraphicsContext3D::INVALID_VALUE, "drawBuffers", "more than one buffer");
+            synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "drawBuffers", "more than one buffer");
             return;
         }
-        if (bufs[0] != GraphicsContext3D::BACK && bufs[0] != GraphicsContext3D::NONE) {
-            synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "drawBuffers", "BACK or NONE");
+        if (bufs[0] != GraphicsContextGL::BACK && bufs[0] != GraphicsContextGL::NONE) {
+            synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "drawBuffers", "BACK or NONE");
             return;
         }
         // Because the backbuffer is simulated on all current WebKit ports, we need to change BACK to COLOR_ATTACHMENT0.
-        GC3Denum value = (bufs[0] == GraphicsContext3D::BACK) ? GraphicsContext3D::COLOR_ATTACHMENT0 : GraphicsContext3D::NONE;
-        graphicsContext3D()->getExtensions().drawBuffersEXT(1, &value);
+        GC3Denum value = (bufs[0] == GraphicsContextGL::BACK) ? GraphicsContextGL::COLOR_ATTACHMENT0 : GraphicsContextGL::NONE;
+        graphicsContextGL()->getExtensions().drawBuffersEXT(1, &value);
         setBackDrawBuffer(bufs[0]);
     } else {
         if (n > getMaxDrawBuffers()) {
-            synthesizeGLError(GraphicsContext3D::INVALID_VALUE, "drawBuffers", "more than max draw buffers");
+            synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "drawBuffers", "more than max draw buffers");
             return;
         }
         for (GC3Dsizei i = 0; i < n; ++i) {
-            if (bufs[i] != GraphicsContext3D::NONE && bufs[i] != static_cast<GC3Denum>(GraphicsContext3D::COLOR_ATTACHMENT0 + i)) {
-                synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "drawBuffers", "COLOR_ATTACHMENTi or NONE");
+            if (bufs[i] != GraphicsContextGL::NONE && bufs[i] != static_cast<GC3Denum>(GraphicsContextGL::COLOR_ATTACHMENT0 + i)) {
+                synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "drawBuffers", "COLOR_ATTACHMENTi or NONE");
                 return;
             }
         }
@@ -961,24 +961,24 @@ void WebGL2RenderingContext::drawBuffers(const Vector<GC3Denum>& buffers)
 void WebGL2RenderingContext::clearBufferiv(GC3Denum buffer, GC3Dint drawbuffer, Int32List&&, GC3Duint)
 {
     switch (buffer) {
-    case GraphicsContext3D::COLOR:
+    case GraphicsContextGL::COLOR:
         if (drawbuffer < 0 || drawbuffer >= getMaxDrawBuffers()) {
-            synthesizeGLError(GraphicsContext3D::INVALID_VALUE, "clearBufferiv", "buffer index out of range");
+            synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "clearBufferiv", "buffer index out of range");
             return;
         }
         // TODO: Call clearBufferiv, requires gl3.h and ES3/gl.h
         break;
-    case GraphicsContext3D::STENCIL:
+    case GraphicsContextGL::STENCIL:
         if (drawbuffer) {
-            synthesizeGLError(GraphicsContext3D::INVALID_VALUE, "clearBufferiv", "buffer index must be 0");
+            synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "clearBufferiv", "buffer index must be 0");
             return;
         }
         // TODO: Call clearBufferiv, requires gl3.h and ES3/gl.h
         break;
-    case GraphicsContext3D::DEPTH:
-    case GraphicsContext3D::DEPTH_STENCIL:
+    case GraphicsContextGL::DEPTH:
+    case GraphicsContextGL::DEPTH_STENCIL:
     default:
-        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "clearBufferiv", "buffer argument must be COLOR or STENCIL");
+        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "clearBufferiv", "buffer argument must be COLOR or STENCIL");
         break;
     }
 }
@@ -986,18 +986,18 @@ void WebGL2RenderingContext::clearBufferiv(GC3Denum buffer, GC3Dint drawbuffer,
 void WebGL2RenderingContext::clearBufferuiv(GC3Denum buffer, GC3Dint drawbuffer, Uint32List&&, GC3Duint)
 {
     switch (buffer) {
-    case GraphicsContext3D::COLOR:
+    case GraphicsContextGL::COLOR:
         if (drawbuffer < 0 || drawbuffer >= getMaxDrawBuffers()) {
-            synthesizeGLError(GraphicsContext3D::INVALID_VALUE, "clearBufferuiv", "buffer index out of range");
+            synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "clearBufferuiv", "buffer index out of range");
             return;
         }
         // TODO: Call clearBufferuiv, requires gl3.h and ES3/gl.h
         break;
-    case GraphicsContext3D::DEPTH:
-    case GraphicsContext3D::STENCIL:
-    case GraphicsContext3D::DEPTH_STENCIL:
+    case GraphicsContextGL::DEPTH:
+    case GraphicsContextGL::STENCIL:
+    case GraphicsContextGL::DEPTH_STENCIL:
     default:
-        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "clearBufferuiv", "buffer argument must be COLOR");
+        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "clearBufferuiv", "buffer argument must be COLOR");
         break;
     }
 }
@@ -1005,24 +1005,24 @@ void WebGL2RenderingContext::clearBufferuiv(GC3Denum buffer, GC3Dint drawbuffer,
 void WebGL2RenderingContext::clearBufferfv(GC3Denum buffer, GC3Dint drawbuffer, Float32List&&, GC3Duint)
 {
     switch (buffer) {
-    case GraphicsContext3D::COLOR:
+    case GraphicsContextGL::COLOR:
         if (drawbuffer < 0 || drawbuffer >= getMaxDrawBuffers()) {
-            synthesizeGLError(GraphicsContext3D::INVALID_VALUE, "clearBufferfv", "buffer index out of range");
+            synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "clearBufferfv", "buffer index out of range");
             return;
         }
         // TODO: Call clearBufferfv, requires gl3.h and ES3/gl.h
         break;
-    case GraphicsContext3D::DEPTH:
+    case GraphicsContextGL::DEPTH:
         if (drawbuffer) {
-            synthesizeGLError(GraphicsContext3D::INVALID_VALUE, "clearBufferfv", "buffer index must be 0");
+            synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "clearBufferfv", "buffer index must be 0");
             return;
         }
         // TODO: Call clearBufferfv, requires gl3.h and ES3/gl.h
         break;
-    case GraphicsContext3D::STENCIL:
-    case GraphicsContext3D::DEPTH_STENCIL:
+    case GraphicsContextGL::STENCIL:
+    case GraphicsContextGL::DEPTH_STENCIL:
     default:
-        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "clearBufferfv", "buffer argument must be COLOR OR DEPTH");
+        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "clearBufferfv", "buffer argument must be COLOR OR DEPTH");
         break;
     }
 }
@@ -1030,18 +1030,18 @@ void WebGL2RenderingContext::clearBufferfv(GC3Denum buffer, GC3Dint drawbuffer,
 void WebGL2RenderingContext::clearBufferfi(GC3Denum buffer, GC3Dint drawbuffer, GC3Dfloat, GC3Dint)
 {
     switch (buffer) {
-    case GraphicsContext3D::DEPTH_STENCIL:
+    case GraphicsContextGL::DEPTH_STENCIL:
         if (drawbuffer) {
-            synthesizeGLError(GraphicsContext3D::INVALID_VALUE, "clearBufferfv", "buffer index must be 0");
+            synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "clearBufferfv", "buffer index must be 0");
             return;
         }
         // TODO: Call clearBufferfi, requires gl3.h and ES3/gl.h
         break;
-    case GraphicsContext3D::COLOR:
-    case GraphicsContext3D::DEPTH:
-    case GraphicsContext3D::STENCIL:
+    case GraphicsContextGL::COLOR:
+    case GraphicsContextGL::DEPTH:
+    case GraphicsContextGL::STENCIL:
     default:
-        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "clearBufferfv", "buffer argument must be DEPTH_STENCIL");
+        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "clearBufferfv", "buffer argument must be DEPTH_STENCIL");
         break;
     }
 }
@@ -1227,16 +1227,16 @@ void WebGL2RenderingContext::bindBufferRange(GC3Denum, GC3Duint, WebGLBuffer*, G
 WebGLAny WebGL2RenderingContext::getIndexedParameter(GC3Denum target, GC3Duint)
 {
     switch (target) {
-    case GraphicsContext3D::TRANSFORM_FEEDBACK_BUFFER_BINDING:
-    case GraphicsContext3D::TRANSFORM_FEEDBACK_BUFFER_SIZE:
-    case GraphicsContext3D::TRANSFORM_FEEDBACK_BUFFER_START:
-    case GraphicsContext3D::UNIFORM_BUFFER_BINDING:
-    case GraphicsContext3D::UNIFORM_BUFFER_SIZE:
-    case GraphicsContext3D::UNIFORM_BUFFER_START:
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "getIndexedParameter", "parameter name not yet supported");
+    case GraphicsContextGL::TRANSFORM_FEEDBACK_BUFFER_BINDING:
+    case GraphicsContextGL::TRANSFORM_FEEDBACK_BUFFER_SIZE:
+    case GraphicsContextGL::TRANSFORM_FEEDBACK_BUFFER_START:
+    case GraphicsContextGL::UNIFORM_BUFFER_BINDING:
+    case GraphicsContextGL::UNIFORM_BUFFER_SIZE:
+    case GraphicsContextGL::UNIFORM_BUFFER_START:
+        synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "getIndexedParameter", "parameter name not yet supported");
         return nullptr;
     default:
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "getIndexedParameter", "invalid parameter name");
+        synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "getIndexedParameter", "invalid parameter name");
         return nullptr;
     }
 }
@@ -1253,20 +1253,20 @@ WebGLAny WebGL2RenderingContext::getActiveUniforms(WebGLProgram& program, const
         return nullptr;
 
     switch (pname) {
-    case GraphicsContext3D::UNIFORM_TYPE:
-    case GraphicsContext3D::UNIFORM_SIZE:
-    case GraphicsContext3D::UNIFORM_BLOCK_INDEX:
-    case GraphicsContext3D::UNIFORM_OFFSET:
-    case GraphicsContext3D::UNIFORM_ARRAY_STRIDE:
-    case GraphicsContext3D::UNIFORM_MATRIX_STRIDE:
-    case GraphicsContext3D::UNIFORM_IS_ROW_MAJOR:
+    case GraphicsContextGL::UNIFORM_TYPE:
+    case GraphicsContextGL::UNIFORM_SIZE:
+    case GraphicsContextGL::UNIFORM_BLOCK_INDEX:
+    case GraphicsContextGL::UNIFORM_OFFSET:
+    case GraphicsContextGL::UNIFORM_ARRAY_STRIDE:
+    case GraphicsContextGL::UNIFORM_MATRIX_STRIDE:
+    case GraphicsContextGL::UNIFORM_IS_ROW_MAJOR:
         {
             Vector<GC3Dint> params(uniformIndices.size(), 0);
             m_context->getActiveUniforms(program.object(), uniformIndices, pname, params);
             return WTFMove(params);
         }
     default:
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "getActiveUniforms", "invalid parameter name");
+        synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "getActiveUniforms", "invalid parameter name");
         return nullptr;
     }
 }
@@ -1319,7 +1319,7 @@ void WebGL2RenderingContext::deleteVertexArray(WebGLVertexArrayObject* arrayObje
         bindVertexArray(nullptr); // The default VAO was removed in OpenGL 3.3 but not from WebGL 2; bind the default for WebGL to use.
 #endif
     
-    arrayObject->deleteObject(graphicsContext3D());
+    arrayObject->deleteObject(graphicsContextGL());
 }
 
 GC3Dboolean WebGL2RenderingContext::isVertexArray(WebGLVertexArrayObject* arrayObject)
@@ -1339,7 +1339,7 @@ void WebGL2RenderingContext::bindVertexArray(WebGLVertexArrayObject* arrayObject
         return;
     
     if (arrayObject && (arrayObject->isDeleted() || !arrayObject->validate(0, *this) || !m_contextObjects.contains(arrayObject))) {
-        m_context->synthesizeGLError(GraphicsContext3D::INVALID_OPERATION);
+        m_context->synthesizeGLError(GraphicsContextGL::INVALID_OPERATION);
         return;
     }
     if (arrayObject && !arrayObject->isDefaultObject() && arrayObject->object()) {
@@ -1380,7 +1380,7 @@ WebGLExtension* WebGL2RenderingContext::getExtension(const String& name)
     ENABLE_IF_REQUESTED(WebGLCompressedTextureETC1, m_webglCompressedTextureETC1, "WEBGL_compressed_texture_etc1", WebGLCompressedTextureETC1::supported(*this));
     ENABLE_IF_REQUESTED(WebGLCompressedTexturePVRTC, m_webglCompressedTexturePVRTC, "WEBKIT_WEBGL_compressed_texture_pvrtc", WebGLCompressedTexturePVRTC::supported(*this));
     ENABLE_IF_REQUESTED(WebGLCompressedTextureS3TC, m_webglCompressedTextureS3TC, "WEBGL_compressed_texture_s3tc", WebGLCompressedTextureS3TC::supported(*this));
-    ENABLE_IF_REQUESTED(WebGLDepthTexture, m_webglDepthTexture, "WEBGL_depth_texture", WebGLDepthTexture::supported(*graphicsContext3D()));
+    ENABLE_IF_REQUESTED(WebGLDepthTexture, m_webglDepthTexture, "WEBGL_depth_texture", WebGLDepthTexture::supported(*graphicsContextGL()));
     ENABLE_IF_REQUESTED(WebGLDebugRendererInfo, m_webglDebugRendererInfo, "WEBGL_debug_renderer_info", true);
     ENABLE_IF_REQUESTED(WebGLDebugShaders, m_webglDebugShaders, "WEBGL_debug_shaders", m_context->getExtensions().supports("GL_ANGLE_translated_shader_source"_s));
     return nullptr;
@@ -1419,7 +1419,7 @@ Optional<Vector<String>> WebGL2RenderingContext::getSupportedExtensions()
         result.append("WEBKIT_WEBGL_compressed_texture_pvrtc"_s);
     if (WebGLCompressedTextureS3TC::supported(*this))
         result.append("WEBGL_compressed_texture_s3tc"_s);
-    if (WebGLDepthTexture::supported(*graphicsContext3D()))
+    if (WebGLDepthTexture::supported(*graphicsContextGL()))
         result.append("WEBGL_depth_texture"_s);
     result.append("WEBGL_lose_context"_s);
     if (extensions.supports("GL_ANGLE_translated_shader_source"_s))
@@ -1432,12 +1432,12 @@ Optional<Vector<String>> WebGL2RenderingContext::getSupportedExtensions()
 static bool validateDefaultFramebufferAttachment(GC3Denum& attachment)
 {
     switch (attachment) {
-    case GraphicsContext3D::BACK:
+    case GraphicsContextGL::BACK:
         // Because the backbuffer is simulated on all current WebKit ports, we need to change BACK to COLOR_ATTACHMENT0.
-        attachment = GraphicsContext3D::COLOR_ATTACHMENT0;
+        attachment = GraphicsContextGL::COLOR_ATTACHMENT0;
         return true;
-    case GraphicsContext3D::DEPTH:
-    case GraphicsContext3D::STENCIL:
+    case GraphicsContextGL::DEPTH:
+    case GraphicsContextGL::STENCIL:
         return true;
     }
 
@@ -1450,12 +1450,12 @@ WebGLAny WebGL2RenderingContext::getFramebufferAttachmentParameter(GC3Denum targ
     if (isContextLostOrPending() || !validateFramebufferTarget(functionName, target))
         return nullptr;
 
-    auto targetFramebuffer = (target == GraphicsContext3D::READ_FRAMEBUFFER) ? m_readFramebufferBinding : m_framebufferBinding;
+    auto targetFramebuffer = (target == GraphicsContextGL::READ_FRAMEBUFFER) ? m_readFramebufferBinding : m_framebufferBinding;
 
     if (!targetFramebuffer) {
         // OpenGL ES 3: Default framebuffer is bound.
         if (!validateDefaultFramebufferAttachment(attachment)) {
-            synthesizeGLError(GraphicsContext3D::INVALID_ENUM, functionName, "invalid attachment");
+            synthesizeGLError(GraphicsContextGL::INVALID_ENUM, functionName, "invalid attachment");
             return nullptr;
         }
         GC3Dint value = 0;
@@ -1467,20 +1467,20 @@ WebGLAny WebGL2RenderingContext::getFramebufferAttachmentParameter(GC3Denum targ
 
     auto object = makeRefPtr(targetFramebuffer->getAttachmentObject(attachment));
     if (!object) {
-        if (pname == GraphicsContext3D::FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE)
-            return static_cast<unsigned>(GraphicsContext3D::NONE);
-        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, functionName, "invalid parameter name");
+        if (pname == GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE)
+            return static_cast<unsigned>(GraphicsContextGL::NONE);
+        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, functionName, "invalid parameter name");
         return nullptr;
     }
 
     switch (pname) {
-    case GraphicsContext3D::FRAMEBUFFER_ATTACHMENT_RED_SIZE:
-    case GraphicsContext3D::FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:
-    case GraphicsContext3D::FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:
-    case GraphicsContext3D::FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:
-    case GraphicsContext3D::FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:
-    case GraphicsContext3D::FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:
-    case GraphicsContext3D::FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: {
+    case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_RED_SIZE:
+    case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:
+    case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:
+    case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:
+    case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:
+    case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:
+    case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: {
         GC3Dint value = 0;
         m_context->getFramebufferAttachmentParameteriv(target, attachment, pname, &value);
         return value;
@@ -1489,41 +1489,41 @@ WebGLAny WebGL2RenderingContext::getFramebufferAttachmentParameter(GC3Denum targ
     
     if (object->isTexture()) {
         switch (pname) {
-        case GraphicsContext3D::FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:
-            return static_cast<unsigned>(GraphicsContext3D::TEXTURE);
-        case GraphicsContext3D::FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:
+        case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:
+            return static_cast<unsigned>(GraphicsContextGL::TEXTURE);
+        case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:
             return makeRefPtr(reinterpret_cast<WebGLTexture&>(*object));
-        case GraphicsContext3D::FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:
-        case GraphicsContext3D::FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:
-        case GraphicsContext3D::FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: {
+        case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:
+        case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:
+        case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: {
             GC3Dint value = 0;
             m_context->getFramebufferAttachmentParameteriv(target, attachment, pname, &value);
             return value;
         }
         default:
-            synthesizeGLError(GraphicsContext3D::INVALID_ENUM, functionName, "invalid parameter name for texture attachment");
+            synthesizeGLError(GraphicsContextGL::INVALID_ENUM, functionName, "invalid parameter name for texture attachment");
             return nullptr;
         }
     } else {
         ASSERT(object->isRenderbuffer());
         switch (pname) {
-        case GraphicsContext3D::FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:
-            return static_cast<unsigned>(GraphicsContext3D::RENDERBUFFER);
-        case GraphicsContext3D::FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:
+        case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:
+            return static_cast<unsigned>(GraphicsContextGL::RENDERBUFFER);
+        case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:
             return makeRefPtr(reinterpret_cast<WebGLRenderbuffer&>(*object));
-        case GraphicsContext3D::FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING : {
+        case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING : {
             auto& renderBuffer = reinterpret_cast<WebGLRenderbuffer&>(*object);
             auto format = renderBuffer.getInternalFormat();
-            if (format == GraphicsContext3D::SRGB8_ALPHA8
-                || format == GraphicsContext3D::COMPRESSED_SRGB8_ETC2
-                || format == GraphicsContext3D::COMPRESSED_SRGB8_ALPHA8_ETC2_EAC
-                || format == GraphicsContext3D::COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2) {
-                return static_cast<unsigned>(GraphicsContext3D::SRGB);
+            if (format == GraphicsContextGL::SRGB8_ALPHA8
+                || format == GraphicsContextGL::COMPRESSED_SRGB8_ETC2
+                || format == GraphicsContextGL::COMPRESSED_SRGB8_ALPHA8_ETC2_EAC
+                || format == GraphicsContextGL::COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2) {
+                return static_cast<unsigned>(GraphicsContextGL::SRGB);
             }
-            return static_cast<unsigned>(GraphicsContext3D::LINEAR);
+            return static_cast<unsigned>(GraphicsContextGL::LINEAR);
         }
         default:
-            synthesizeGLError(GraphicsContext3D::INVALID_ENUM, functionName, "invalid parameter name for renderbuffer attachment");
+            synthesizeGLError(GraphicsContextGL::INVALID_ENUM, functionName, "invalid parameter name for renderbuffer attachment");
             return nullptr;
         }
     }
@@ -1537,36 +1537,36 @@ bool WebGL2RenderingContext::validateFramebufferFuncParameters(const char* funct
 bool WebGL2RenderingContext::validateFramebufferTarget(const char* functionName, GC3Denum target)
 {
     switch (target) {
-    case GraphicsContext3D::FRAMEBUFFER:
-    case GraphicsContext3D::DRAW_FRAMEBUFFER:
-    case GraphicsContext3D::READ_FRAMEBUFFER:
+    case GraphicsContextGL::FRAMEBUFFER:
+    case GraphicsContextGL::DRAW_FRAMEBUFFER:
+    case GraphicsContextGL::READ_FRAMEBUFFER:
         return true;
     }
 
-    synthesizeGLError(GraphicsContext3D::INVALID_ENUM, functionName, "invalid target");
+    synthesizeGLError(GraphicsContextGL::INVALID_ENUM, functionName, "invalid target");
     return false;
 }
 
 bool WebGL2RenderingContext::validateNonDefaultFramebufferAttachment(const char* functionName, GC3Denum attachment)
 {
     switch (attachment) {
-    case GraphicsContext3D::DEPTH_ATTACHMENT:
-    case GraphicsContext3D::STENCIL_ATTACHMENT:
-    case GraphicsContext3D::DEPTH_STENCIL_ATTACHMENT:
+    case GraphicsContextGL::DEPTH_ATTACHMENT:
+    case GraphicsContextGL::STENCIL_ATTACHMENT:
+    case GraphicsContextGL::DEPTH_STENCIL_ATTACHMENT:
         return true;
     default:
-        if (attachment >= GraphicsContext3D::COLOR_ATTACHMENT0 && attachment < static_cast<GC3Denum>(GraphicsContext3D::COLOR_ATTACHMENT0 + getMaxColorAttachments()))
+        if (attachment >= GraphicsContextGL::COLOR_ATTACHMENT0 && attachment < static_cast<GC3Denum>(GraphicsContextGL::COLOR_ATTACHMENT0 + getMaxColorAttachments()))
             return true;
     }
 
-    synthesizeGLError(GraphicsContext3D::INVALID_ENUM, functionName, "invalid attachment");
+    synthesizeGLError(GraphicsContextGL::INVALID_ENUM, functionName, "invalid attachment");
     return false;
 }
 
 GC3Dint WebGL2RenderingContext::getMaxDrawBuffers()
 {
     if (!m_maxDrawBuffers)
-        m_context->getIntegerv(GraphicsContext3D::MAX_DRAW_BUFFERS, &m_maxDrawBuffers);
+        m_context->getIntegerv(GraphicsContextGL::MAX_DRAW_BUFFERS, &m_maxDrawBuffers);
     return m_maxDrawBuffers;
 }
 
@@ -1574,7 +1574,7 @@ GC3Dint WebGL2RenderingContext::getMaxColorAttachments()
 {
     // DrawBuffers requires MAX_COLOR_ATTACHMENTS == MAX_DRAW_BUFFERS
     if (!m_maxColorAttachments)
-        m_context->getIntegerv(GraphicsContext3D::MAX_DRAW_BUFFERS, &m_maxColorAttachments);
+        m_context->getIntegerv(GraphicsContextGL::MAX_DRAW_BUFFERS, &m_maxColorAttachments);
     return m_maxColorAttachments;
 }
 
@@ -1582,58 +1582,58 @@ void WebGL2RenderingContext::renderbufferStorage(GC3Denum target, GC3Denum inter
 {
     if (isContextLostOrPending())
         return;
-    if (target != GraphicsContext3D::RENDERBUFFER) {
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "renderbufferStorage", "invalid target");
+    if (target != GraphicsContextGL::RENDERBUFFER) {
+        synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "renderbufferStorage", "invalid target");
         return;
     }
     if (!m_renderbufferBinding || !m_renderbufferBinding->object()) {
-        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "renderbufferStorage", "no bound renderbuffer");
+        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "renderbufferStorage", "no bound renderbuffer");
         return;
     }
     if (!validateSize("renderbufferStorage", width, height))
         return;
     switch (internalformat) {
-    case GraphicsContext3D::DEPTH_COMPONENT16:
-    case GraphicsContext3D::DEPTH_COMPONENT32F:
-    case GraphicsContext3D::DEPTH_COMPONENT24:
-    case GraphicsContext3D::RGBA32I:
-    case GraphicsContext3D::RGBA32UI:
-    case GraphicsContext3D::RGBA16I:
-    case GraphicsContext3D::RGBA16UI:
-    case GraphicsContext3D::RGBA8:
-    case GraphicsContext3D::RGBA8I:
-    case GraphicsContext3D::RGBA8UI:
-    case GraphicsContext3D::RGB10_A2:
-    case GraphicsContext3D::RGB10_A2UI:
-    case GraphicsContext3D::RGBA4:
-    case GraphicsContext3D::RG32I:
-    case GraphicsContext3D::RG32UI:
-    case GraphicsContext3D::RG16I:
-    case GraphicsContext3D::RG16UI:
-    case GraphicsContext3D::RG8:
-    case GraphicsContext3D::RG8I:
-    case GraphicsContext3D::RG8UI:
-    case GraphicsContext3D::R32I:
-    case GraphicsContext3D::R32UI:
-    case GraphicsContext3D::R16I:
-    case GraphicsContext3D::R16UI:
-    case GraphicsContext3D::R8:
-    case GraphicsContext3D::R8I:
-    case GraphicsContext3D::R8UI:
-    case GraphicsContext3D::RGB5_A1:
-    case GraphicsContext3D::RGB565:
-    case GraphicsContext3D::RGB8:
-    case GraphicsContext3D::STENCIL_INDEX8:
-    case GraphicsContext3D::SRGB8_ALPHA8:
+    case GraphicsContextGL::DEPTH_COMPONENT16:
+    case GraphicsContextGL::DEPTH_COMPONENT32F:
+    case GraphicsContextGL::DEPTH_COMPONENT24:
+    case GraphicsContextGL::RGBA32I:
+    case GraphicsContextGL::RGBA32UI:
+    case GraphicsContextGL::RGBA16I:
+    case GraphicsContextGL::RGBA16UI:
+    case GraphicsContextGL::RGBA8:
+    case GraphicsContextGL::RGBA8I:
+    case GraphicsContextGL::RGBA8UI:
+    case GraphicsContextGL::RGB10_A2:
+    case GraphicsContextGL::RGB10_A2UI:
+    case GraphicsContextGL::RGBA4:
+    case GraphicsContextGL::RG32I:
+    case GraphicsContextGL::RG32UI:
+    case GraphicsContextGL::RG16I:
+    case GraphicsContextGL::RG16UI:
+    case GraphicsContextGL::RG8:
+    case GraphicsContextGL::RG8I:
+    case GraphicsContextGL::RG8UI:
+    case GraphicsContextGL::R32I:
+    case GraphicsContextGL::R32UI:
+    case GraphicsContextGL::R16I:
+    case GraphicsContextGL::R16UI:
+    case GraphicsContextGL::R8:
+    case GraphicsContextGL::R8I:
+    case GraphicsContextGL::R8UI:
+    case GraphicsContextGL::RGB5_A1:
+    case GraphicsContextGL::RGB565:
+    case GraphicsContextGL::RGB8:
+    case GraphicsContextGL::STENCIL_INDEX8:
+    case GraphicsContextGL::SRGB8_ALPHA8:
         m_context->renderbufferStorage(target, internalformat, width, height);
         m_renderbufferBinding->setInternalFormat(internalformat);
         m_renderbufferBinding->setIsValid(true);
         m_renderbufferBinding->setSize(width, height);
         break;
-    case GraphicsContext3D::DEPTH32F_STENCIL8:
-    case GraphicsContext3D::DEPTH24_STENCIL8:
+    case GraphicsContextGL::DEPTH32F_STENCIL8:
+    case GraphicsContextGL::DEPTH24_STENCIL8:
         if (!isDepthStencilSupported()) {
-            synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "renderbufferStorage", "invalid internalformat");
+            synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "renderbufferStorage", "invalid internalformat");
             return;
         }
         m_context->renderbufferStorage(target, internalformat, width, height);
@@ -1642,7 +1642,7 @@ void WebGL2RenderingContext::renderbufferStorage(GC3Denum target, GC3Denum inter
         m_renderbufferBinding->setInternalFormat(internalformat);
         break;
     default:
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "renderbufferStorage", "invalid internalformat");
+        synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "renderbufferStorage", "invalid internalformat");
         return;
     }
     applyStencilTest();
@@ -1654,13 +1654,13 @@ void WebGL2RenderingContext::hint(GC3Denum target, GC3Denum mode)
         return;
     bool isValid = false;
     switch (target) {
-    case GraphicsContext3D::GENERATE_MIPMAP_HINT:
-    case GraphicsContext3D::FRAGMENT_SHADER_DERIVATIVE_HINT:
+    case GraphicsContextGL::GENERATE_MIPMAP_HINT:
+    case GraphicsContextGL::FRAGMENT_SHADER_DERIVATIVE_HINT:
         isValid = true;
         break;
     }
     if (!isValid) {
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "hint", "invalid target");
+        synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "hint", "invalid target");
         return;
     }
     m_context->hint(target, mode);
@@ -1670,97 +1670,97 @@ GC3Denum WebGL2RenderingContext::baseInternalFormatFromInternalFormat(GC3Denum i
 {
     // Handles sized, unsized, and compressed internal formats.
     switch (internalformat) {
-    case GraphicsContext3D::R8:
-    case GraphicsContext3D::R8_SNORM:
-    case GraphicsContext3D::R16F:
-    case GraphicsContext3D::R32F:
-    case GraphicsContext3D::COMPRESSED_R11_EAC:
-    case GraphicsContext3D::COMPRESSED_SIGNED_R11_EAC:
-        return GraphicsContext3D::RED;
-    case GraphicsContext3D::R8I:
-    case GraphicsContext3D::R8UI:
-    case GraphicsContext3D::R16I:
-    case GraphicsContext3D::R16UI:
-    case GraphicsContext3D::R32I:
-    case GraphicsContext3D::R32UI:
-        return GraphicsContext3D::RED_INTEGER;
-    case GraphicsContext3D::RG8:
-    case GraphicsContext3D::RG8_SNORM:
-    case GraphicsContext3D::RG16F:
-    case GraphicsContext3D::RG32F:
-    case GraphicsContext3D::COMPRESSED_RG11_EAC:
-    case GraphicsContext3D::COMPRESSED_SIGNED_RG11_EAC:
-        return GraphicsContext3D::RG;
-    case GraphicsContext3D::RG8I:
-    case GraphicsContext3D::RG8UI:
-    case GraphicsContext3D::RG16I:
-    case GraphicsContext3D::RG16UI:
-    case GraphicsContext3D::RG32I:
-    case GraphicsContext3D::RG32UI:
-        return GraphicsContext3D::RG_INTEGER;
-    case GraphicsContext3D::RGB8:
-    case GraphicsContext3D::RGB8_SNORM:
-    case GraphicsContext3D::RGB565:
-    case GraphicsContext3D::SRGB8:
-    case GraphicsContext3D::RGB16F:
-    case GraphicsContext3D::RGB32F:
-    case GraphicsContext3D::RGB:
-    case GraphicsContext3D::COMPRESSED_RGB8_ETC2:
-    case GraphicsContext3D::COMPRESSED_SRGB8_ETC2:
-        return GraphicsContext3D::RGB;
-    case GraphicsContext3D::RGB8I:
-    case GraphicsContext3D::RGB8UI:
-    case GraphicsContext3D::RGB16I:
-    case GraphicsContext3D::RGB16UI:
-    case GraphicsContext3D::RGB32I:
-    case GraphicsContext3D::RGB32UI:
-        return GraphicsContext3D::RGB_INTEGER;
-    case GraphicsContext3D::RGBA4:
-    case GraphicsContext3D::RGB5_A1:
-    case GraphicsContext3D::RGBA8:
-    case GraphicsContext3D::RGBA8_SNORM:
-    case GraphicsContext3D::RGB10_A2:
-    case GraphicsContext3D::SRGB8_ALPHA8:
-    case GraphicsContext3D::RGBA16F:
-    case GraphicsContext3D::RGBA32F:
-    case GraphicsContext3D::RGBA:
-    case GraphicsContext3D::COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:
-    case GraphicsContext3D::COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:
-    case GraphicsContext3D::COMPRESSED_RGBA8_ETC2_EAC:
-    case GraphicsContext3D::COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:
-        return GraphicsContext3D::RGBA;
-    case GraphicsContext3D::RGBA8I:
-    case GraphicsContext3D::RGBA8UI:
-    case GraphicsContext3D::RGB10_A2UI:
-    case GraphicsContext3D::RGBA16I:
-    case GraphicsContext3D::RGBA16UI:
-    case GraphicsContext3D::RGBA32I:
-    case GraphicsContext3D::RGBA32UI:
-        return GraphicsContext3D::RGBA_INTEGER;
-    case GraphicsContext3D::DEPTH_COMPONENT16:
-    case GraphicsContext3D::DEPTH_COMPONENT24:
-    case GraphicsContext3D::DEPTH_COMPONENT32F:
-        return GraphicsContext3D::DEPTH_COMPONENT;
-    case GraphicsContext3D::DEPTH24_STENCIL8:
-    case GraphicsContext3D::DEPTH32F_STENCIL8:
-        return GraphicsContext3D::DEPTH_STENCIL;
-    case GraphicsContext3D::LUMINANCE:
-    case GraphicsContext3D::LUMINANCE_ALPHA:
-    case GraphicsContext3D::ALPHA:
+    case GraphicsContextGL::R8:
+    case GraphicsContextGL::R8_SNORM:
+    case GraphicsContextGL::R16F:
+    case GraphicsContextGL::R32F:
+    case GraphicsContextGL::COMPRESSED_R11_EAC:
+    case GraphicsContextGL::COMPRESSED_SIGNED_R11_EAC:
+        return GraphicsContextGL::RED;
+    case GraphicsContextGL::R8I:
+    case GraphicsContextGL::R8UI:
+    case GraphicsContextGL::R16I:
+    case GraphicsContextGL::R16UI:
+    case GraphicsContextGL::R32I:
+    case GraphicsContextGL::R32UI:
+        return GraphicsContextGL::RED_INTEGER;
+    case GraphicsContextGL::RG8:
+    case GraphicsContextGL::RG8_SNORM:
+    case GraphicsContextGL::RG16F:
+    case GraphicsContextGL::RG32F:
+    case GraphicsContextGL::COMPRESSED_RG11_EAC:
+    case GraphicsContextGL::COMPRESSED_SIGNED_RG11_EAC:
+        return GraphicsContextGL::RG;
+    case GraphicsContextGL::RG8I:
+    case GraphicsContextGL::RG8UI:
+    case GraphicsContextGL::RG16I:
+    case GraphicsContextGL::RG16UI:
+    case GraphicsContextGL::RG32I:
+    case GraphicsContextGL::RG32UI:
+        return GraphicsContextGL::RG_INTEGER;
+    case GraphicsContextGL::RGB8:
+    case GraphicsContextGL::RGB8_SNORM:
+    case GraphicsContextGL::RGB565:
+    case GraphicsContextGL::SRGB8:
+    case GraphicsContextGL::RGB16F:
+    case GraphicsContextGL::RGB32F:
+    case GraphicsContextGL::RGB:
+    case GraphicsContextGL::COMPRESSED_RGB8_ETC2:
+    case GraphicsContextGL::COMPRESSED_SRGB8_ETC2:
+        return GraphicsContextGL::RGB;
+    case GraphicsContextGL::RGB8I:
+    case GraphicsContextGL::RGB8UI:
+    case GraphicsContextGL::RGB16I:
+    case GraphicsContextGL::RGB16UI:
+    case GraphicsContextGL::RGB32I:
+    case GraphicsContextGL::RGB32UI:
+        return GraphicsContextGL::RGB_INTEGER;
+    case GraphicsContextGL::RGBA4:
+    case GraphicsContextGL::RGB5_A1:
+    case GraphicsContextGL::RGBA8:
+    case GraphicsContextGL::RGBA8_SNORM:
+    case GraphicsContextGL::RGB10_A2:
+    case GraphicsContextGL::SRGB8_ALPHA8:
+    case GraphicsContextGL::RGBA16F:
+    case GraphicsContextGL::RGBA32F:
+    case GraphicsContextGL::RGBA:
+    case GraphicsContextGL::COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:
+    case GraphicsContextGL::COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:
+    case GraphicsContextGL::COMPRESSED_RGBA8_ETC2_EAC:
+    case GraphicsContextGL::COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:
+        return GraphicsContextGL::RGBA;
+    case GraphicsContextGL::RGBA8I:
+    case GraphicsContextGL::RGBA8UI:
+    case GraphicsContextGL::RGB10_A2UI:
+    case GraphicsContextGL::RGBA16I:
+    case GraphicsContextGL::RGBA16UI:
+    case GraphicsContextGL::RGBA32I:
+    case GraphicsContextGL::RGBA32UI:
+        return GraphicsContextGL::RGBA_INTEGER;
+    case GraphicsContextGL::DEPTH_COMPONENT16:
+    case GraphicsContextGL::DEPTH_COMPONENT24:
+    case GraphicsContextGL::DEPTH_COMPONENT32F:
+        return GraphicsContextGL::DEPTH_COMPONENT;
+    case GraphicsContextGL::DEPTH24_STENCIL8:
+    case GraphicsContextGL::DEPTH32F_STENCIL8:
+        return GraphicsContextGL::DEPTH_STENCIL;
+    case GraphicsContextGL::LUMINANCE:
+    case GraphicsContextGL::LUMINANCE_ALPHA:
+    case GraphicsContextGL::ALPHA:
         return internalformat;
     default:
         ASSERT_NOT_REACHED();
-        return GraphicsContext3D::NONE;
+        return GraphicsContextGL::NONE;
     }
 }
 
 bool WebGL2RenderingContext::isIntegerFormat(GC3Denum internalformat)
 {
     switch (baseInternalFormatFromInternalFormat(internalformat)) {
-    case GraphicsContext3D::RED_INTEGER:
-    case GraphicsContext3D::RG_INTEGER:
-    case GraphicsContext3D::RGB_INTEGER:
-    case GraphicsContext3D::RGBA_INTEGER:
+    case GraphicsContextGL::RED_INTEGER:
+    case GraphicsContextGL::RG_INTEGER:
+    case GraphicsContextGL::RGB_INTEGER:
+    case GraphicsContextGL::RGBA_INTEGER:
         return true;
     }
     return false;
@@ -1771,329 +1771,329 @@ WebGLAny WebGL2RenderingContext::getParameter(GC3Denum pname)
     if (isContextLostOrPending())
         return nullptr;
     switch (pname) {
-    case GraphicsContext3D::ACTIVE_TEXTURE:
+    case GraphicsContextGL::ACTIVE_TEXTURE:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::ALIASED_LINE_WIDTH_RANGE:
+    case GraphicsContextGL::ALIASED_LINE_WIDTH_RANGE:
         return getWebGLFloatArrayParameter(pname);
-    case GraphicsContext3D::ALIASED_POINT_SIZE_RANGE:
+    case GraphicsContextGL::ALIASED_POINT_SIZE_RANGE:
         return getWebGLFloatArrayParameter(pname);
-    case GraphicsContext3D::ALPHA_BITS:
+    case GraphicsContextGL::ALPHA_BITS:
         if (!m_framebufferBinding && !m_attributes.alpha)
             return 0;
         return getIntParameter(pname);
-    case GraphicsContext3D::ARRAY_BUFFER_BINDING:
+    case GraphicsContextGL::ARRAY_BUFFER_BINDING:
         return m_boundArrayBuffer;
-    case GraphicsContext3D::BLEND:
+    case GraphicsContextGL::BLEND:
         return getBooleanParameter(pname);
-    case GraphicsContext3D::BLEND_COLOR:
+    case GraphicsContextGL::BLEND_COLOR:
         return getWebGLFloatArrayParameter(pname);
-    case GraphicsContext3D::BLEND_DST_ALPHA:
+    case GraphicsContextGL::BLEND_DST_ALPHA:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::BLEND_DST_RGB:
+    case GraphicsContextGL::BLEND_DST_RGB:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::BLEND_EQUATION_ALPHA:
+    case GraphicsContextGL::BLEND_EQUATION_ALPHA:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::BLEND_EQUATION_RGB:
+    case GraphicsContextGL::BLEND_EQUATION_RGB:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::BLEND_SRC_ALPHA:
+    case GraphicsContextGL::BLEND_SRC_ALPHA:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::BLEND_SRC_RGB:
+    case GraphicsContextGL::BLEND_SRC_RGB:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::BLUE_BITS:
+    case GraphicsContextGL::BLUE_BITS:
         return getIntParameter(pname);
-    case GraphicsContext3D::COLOR_CLEAR_VALUE:
+    case GraphicsContextGL::COLOR_CLEAR_VALUE:
         return getWebGLFloatArrayParameter(pname);
-    case GraphicsContext3D::COLOR_WRITEMASK:
+    case GraphicsContextGL::COLOR_WRITEMASK:
         return getBooleanArrayParameter(pname);
-    case GraphicsContext3D::COMPRESSED_TEXTURE_FORMATS:
+    case GraphicsContextGL::COMPRESSED_TEXTURE_FORMATS:
         return Uint32Array::tryCreate(m_compressedTextureFormats.data(), m_compressedTextureFormats.size());
-    case GraphicsContext3D::CULL_FACE:
+    case GraphicsContextGL::CULL_FACE:
         return getBooleanParameter(pname);
-    case GraphicsContext3D::CULL_FACE_MODE:
+    case GraphicsContextGL::CULL_FACE_MODE:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::CURRENT_PROGRAM:
+    case GraphicsContextGL::CURRENT_PROGRAM:
         return m_currentProgram;
-    case GraphicsContext3D::DEPTH_BITS:
+    case GraphicsContextGL::DEPTH_BITS:
         if (!m_framebufferBinding && !m_attributes.depth)
             return 0;
         return getIntParameter(pname);
-    case GraphicsContext3D::DEPTH_CLEAR_VALUE:
+    case GraphicsContextGL::DEPTH_CLEAR_VALUE:
         return getFloatParameter(pname);
-    case GraphicsContext3D::DEPTH_FUNC:
+    case GraphicsContextGL::DEPTH_FUNC:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::DEPTH_RANGE:
+    case GraphicsContextGL::DEPTH_RANGE:
         return getWebGLFloatArrayParameter(pname);
-    case GraphicsContext3D::DEPTH_TEST:
+    case GraphicsContextGL::DEPTH_TEST:
         return getBooleanParameter(pname);
-    case GraphicsContext3D::DEPTH_WRITEMASK:
+    case GraphicsContextGL::DEPTH_WRITEMASK:
         return getBooleanParameter(pname);
-    case GraphicsContext3D::DITHER:
+    case GraphicsContextGL::DITHER:
         return getBooleanParameter(pname);
-    case GraphicsContext3D::ELEMENT_ARRAY_BUFFER_BINDING:
+    case GraphicsContextGL::ELEMENT_ARRAY_BUFFER_BINDING:
         return makeRefPtr(m_boundVertexArrayObject->getElementArrayBuffer());
-    case GraphicsContext3D::FRAMEBUFFER_BINDING:
+    case GraphicsContextGL::FRAMEBUFFER_BINDING:
         return m_framebufferBinding;
-    case GraphicsContext3D::FRONT_FACE:
+    case GraphicsContextGL::FRONT_FACE:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::GENERATE_MIPMAP_HINT:
+    case GraphicsContextGL::GENERATE_MIPMAP_HINT:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::GREEN_BITS:
+    case GraphicsContextGL::GREEN_BITS:
         return getIntParameter(pname);
-    case GraphicsContext3D::IMPLEMENTATION_COLOR_READ_FORMAT:
+    case GraphicsContextGL::IMPLEMENTATION_COLOR_READ_FORMAT:
         return getIntParameter(pname);
-    case GraphicsContext3D::IMPLEMENTATION_COLOR_READ_TYPE:
+    case GraphicsContextGL::IMPLEMENTATION_COLOR_READ_TYPE:
         return getIntParameter(pname);
-    case GraphicsContext3D::LINE_WIDTH:
+    case GraphicsContextGL::LINE_WIDTH:
         return getFloatParameter(pname);
-    case GraphicsContext3D::MAX_COMBINED_TEXTURE_IMAGE_UNITS:
+    case GraphicsContextGL::MAX_COMBINED_TEXTURE_IMAGE_UNITS:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_CUBE_MAP_TEXTURE_SIZE:
+    case GraphicsContextGL::MAX_CUBE_MAP_TEXTURE_SIZE:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_FRAGMENT_UNIFORM_VECTORS:
+    case GraphicsContextGL::MAX_FRAGMENT_UNIFORM_VECTORS:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_RENDERBUFFER_SIZE:
+    case GraphicsContextGL::MAX_RENDERBUFFER_SIZE:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_TEXTURE_IMAGE_UNITS:
+    case GraphicsContextGL::MAX_TEXTURE_IMAGE_UNITS:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_TEXTURE_SIZE:
+    case GraphicsContextGL::MAX_TEXTURE_SIZE:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_VARYING_VECTORS:
+    case GraphicsContextGL::MAX_VARYING_VECTORS:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_VERTEX_ATTRIBS:
+    case GraphicsContextGL::MAX_VERTEX_ATTRIBS:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_VERTEX_TEXTURE_IMAGE_UNITS:
+    case GraphicsContextGL::MAX_VERTEX_TEXTURE_IMAGE_UNITS:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_VERTEX_UNIFORM_VECTORS:
+    case GraphicsContextGL::MAX_VERTEX_UNIFORM_VECTORS:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_VIEWPORT_DIMS:
+    case GraphicsContextGL::MAX_VIEWPORT_DIMS:
         return getWebGLIntArrayParameter(pname);
-    case GraphicsContext3D::NUM_SHADER_BINARY_FORMATS:
+    case GraphicsContextGL::NUM_SHADER_BINARY_FORMATS:
         return getIntParameter(pname);
-    case GraphicsContext3D::PACK_ALIGNMENT:
+    case GraphicsContextGL::PACK_ALIGNMENT:
         return getIntParameter(pname);
-    case GraphicsContext3D::POLYGON_OFFSET_FACTOR:
+    case GraphicsContextGL::POLYGON_OFFSET_FACTOR:
         return getFloatParameter(pname);
-    case GraphicsContext3D::POLYGON_OFFSET_FILL:
+    case GraphicsContextGL::POLYGON_OFFSET_FILL:
         return getBooleanParameter(pname);
-    case GraphicsContext3D::POLYGON_OFFSET_UNITS:
+    case GraphicsContextGL::POLYGON_OFFSET_UNITS:
         return getFloatParameter(pname);
-    case GraphicsContext3D::RED_BITS:
+    case GraphicsContextGL::RED_BITS:
         return getIntParameter(pname);
-    case GraphicsContext3D::RENDERBUFFER_BINDING:
+    case GraphicsContextGL::RENDERBUFFER_BINDING:
         return m_renderbufferBinding;
-    case GraphicsContext3D::RENDERER:
+    case GraphicsContextGL::RENDERER:
         return "WebKit WebGL"_str;
-    case GraphicsContext3D::SAMPLE_BUFFERS:
+    case GraphicsContextGL::SAMPLE_BUFFERS:
         return getIntParameter(pname);
-    case GraphicsContext3D::SAMPLE_COVERAGE_INVERT:
+    case GraphicsContextGL::SAMPLE_COVERAGE_INVERT:
         return getBooleanParameter(pname);
-    case GraphicsContext3D::SAMPLE_COVERAGE_VALUE:
+    case GraphicsContextGL::SAMPLE_COVERAGE_VALUE:
         return getFloatParameter(pname);
-    case GraphicsContext3D::SAMPLES:
+    case GraphicsContextGL::SAMPLES:
         return getIntParameter(pname);
-    case GraphicsContext3D::SCISSOR_BOX:
+    case GraphicsContextGL::SCISSOR_BOX:
         return getWebGLIntArrayParameter(pname);
-    case GraphicsContext3D::SCISSOR_TEST:
+    case GraphicsContextGL::SCISSOR_TEST:
         return getBooleanParameter(pname);
-    case GraphicsContext3D::SHADING_LANGUAGE_VERSION:
-        return "WebGL GLSL ES 1.0 (" + m_context->getString(GraphicsContext3D::SHADING_LANGUAGE_VERSION) + ")";
-    case GraphicsContext3D::STENCIL_BACK_FAIL:
+    case GraphicsContextGL::SHADING_LANGUAGE_VERSION:
+        return "WebGL GLSL ES 1.0 (" + m_context->getString(GraphicsContextGL::SHADING_LANGUAGE_VERSION) + ")";
+    case GraphicsContextGL::STENCIL_BACK_FAIL:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::STENCIL_BACK_FUNC:
+    case GraphicsContextGL::STENCIL_BACK_FUNC:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::STENCIL_BACK_PASS_DEPTH_FAIL:
+    case GraphicsContextGL::STENCIL_BACK_PASS_DEPTH_FAIL:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::STENCIL_BACK_PASS_DEPTH_PASS:
+    case GraphicsContextGL::STENCIL_BACK_PASS_DEPTH_PASS:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::STENCIL_BACK_REF:
+    case GraphicsContextGL::STENCIL_BACK_REF:
         return getIntParameter(pname);
-    case GraphicsContext3D::STENCIL_BACK_VALUE_MASK:
+    case GraphicsContextGL::STENCIL_BACK_VALUE_MASK:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::STENCIL_BACK_WRITEMASK:
+    case GraphicsContextGL::STENCIL_BACK_WRITEMASK:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::STENCIL_BITS:
+    case GraphicsContextGL::STENCIL_BITS:
         if (!m_framebufferBinding && !m_attributes.stencil)
             return 0;
         return getIntParameter(pname);
-    case GraphicsContext3D::STENCIL_CLEAR_VALUE:
+    case GraphicsContextGL::STENCIL_CLEAR_VALUE:
         return getIntParameter(pname);
-    case GraphicsContext3D::STENCIL_FAIL:
+    case GraphicsContextGL::STENCIL_FAIL:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::STENCIL_FUNC:
+    case GraphicsContextGL::STENCIL_FUNC:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::STENCIL_PASS_DEPTH_FAIL:
+    case GraphicsContextGL::STENCIL_PASS_DEPTH_FAIL:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::STENCIL_PASS_DEPTH_PASS:
+    case GraphicsContextGL::STENCIL_PASS_DEPTH_PASS:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::STENCIL_REF:
+    case GraphicsContextGL::STENCIL_REF:
         return getIntParameter(pname);
-    case GraphicsContext3D::STENCIL_TEST:
+    case GraphicsContextGL::STENCIL_TEST:
         return getBooleanParameter(pname);
-    case GraphicsContext3D::STENCIL_VALUE_MASK:
+    case GraphicsContextGL::STENCIL_VALUE_MASK:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::STENCIL_WRITEMASK:
+    case GraphicsContextGL::STENCIL_WRITEMASK:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::SUBPIXEL_BITS:
+    case GraphicsContextGL::SUBPIXEL_BITS:
         return getIntParameter(pname);
-    case GraphicsContext3D::TEXTURE_BINDING_2D:
+    case GraphicsContextGL::TEXTURE_BINDING_2D:
         return m_textureUnits[m_activeTextureUnit].texture2DBinding;
-    case GraphicsContext3D::TEXTURE_BINDING_CUBE_MAP:
+    case GraphicsContextGL::TEXTURE_BINDING_CUBE_MAP:
         return m_textureUnits[m_activeTextureUnit].textureCubeMapBinding;
-    case GraphicsContext3D::UNPACK_ALIGNMENT:
+    case GraphicsContextGL::UNPACK_ALIGNMENT:
         return getIntParameter(pname);
-    case GraphicsContext3D::UNPACK_FLIP_Y_WEBGL:
+    case GraphicsContextGL::UNPACK_FLIP_Y_WEBGL:
         return m_unpackFlipY;
-    case GraphicsContext3D::UNPACK_PREMULTIPLY_ALPHA_WEBGL:
+    case GraphicsContextGL::UNPACK_PREMULTIPLY_ALPHA_WEBGL:
         return m_unpackPremultiplyAlpha;
-    case GraphicsContext3D::UNPACK_COLORSPACE_CONVERSION_WEBGL:
+    case GraphicsContextGL::UNPACK_COLORSPACE_CONVERSION_WEBGL:
         return m_unpackColorspaceConversion;
-    case GraphicsContext3D::VENDOR:
+    case GraphicsContextGL::VENDOR:
         return "WebKit"_str;
-    case GraphicsContext3D::VERSION:
+    case GraphicsContextGL::VERSION:
         return "WebGL 2.0"_str;
-    case GraphicsContext3D::VIEWPORT:
+    case GraphicsContextGL::VIEWPORT:
         return getWebGLIntArrayParameter(pname);
     case WebGLDebugRendererInfo::UNMASKED_RENDERER_WEBGL:
         if (m_webglDebugRendererInfo) {
 #if PLATFORM(IOS_FAMILY)
             return "Apple GPU"_str;
 #else
-            return m_context->getString(GraphicsContext3D::RENDERER);
+            return m_context->getString(GraphicsContextGL::RENDERER);
 #endif
         }
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "getParameter", "invalid parameter name, WEBGL_debug_renderer_info not enabled");
+        synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "getParameter", "invalid parameter name, WEBGL_debug_renderer_info not enabled");
         return nullptr;
     case WebGLDebugRendererInfo::UNMASKED_VENDOR_WEBGL:
         if (m_webglDebugRendererInfo)
-            return m_context->getString(GraphicsContext3D::VENDOR);
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "getParameter", "invalid parameter name, WEBGL_debug_renderer_info not enabled");
+            return m_context->getString(GraphicsContextGL::VENDOR);
+        synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "getParameter", "invalid parameter name, WEBGL_debug_renderer_info not enabled");
         return nullptr;
-    case Extensions3D::MAX_TEXTURE_MAX_ANISOTROPY_EXT: // EXT_texture_filter_anisotropic
+    case ExtensionsGL::MAX_TEXTURE_MAX_ANISOTROPY_EXT: // EXT_texture_filter_anisotropic
         if (m_extTextureFilterAnisotropic)
-            return getFloatParameter(Extensions3D::MAX_TEXTURE_MAX_ANISOTROPY_EXT);
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "getParameter", "invalid parameter name, EXT_texture_filter_anisotropic not enabled");
+            return getFloatParameter(ExtensionsGL::MAX_TEXTURE_MAX_ANISOTROPY_EXT);
+        synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "getParameter", "invalid parameter name, EXT_texture_filter_anisotropic not enabled");
         return nullptr;
-    case GraphicsContext3D::FRAGMENT_SHADER_DERIVATIVE_HINT:
+    case GraphicsContextGL::FRAGMENT_SHADER_DERIVATIVE_HINT:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_3D_TEXTURE_SIZE:
+    case GraphicsContextGL::MAX_3D_TEXTURE_SIZE:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_ARRAY_TEXTURE_LAYERS:
+    case GraphicsContextGL::MAX_ARRAY_TEXTURE_LAYERS:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_COLOR_ATTACHMENTS:
+    case GraphicsContextGL::MAX_COLOR_ATTACHMENTS:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:
+    case GraphicsContextGL::MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:
         return getInt64Parameter(pname);
-    case GraphicsContext3D::MAX_COMBINED_UNIFORM_BLOCKS:
+    case GraphicsContextGL::MAX_COMBINED_UNIFORM_BLOCKS:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:
+    case GraphicsContextGL::MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:
         return getInt64Parameter(pname);
-    case GraphicsContext3D::MAX_DRAW_BUFFERS:
+    case GraphicsContextGL::MAX_DRAW_BUFFERS:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_ELEMENT_INDEX:
+    case GraphicsContextGL::MAX_ELEMENT_INDEX:
         return getInt64Parameter(pname);
-    case GraphicsContext3D::MAX_ELEMENTS_INDICES:
+    case GraphicsContextGL::MAX_ELEMENTS_INDICES:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_ELEMENTS_VERTICES:
+    case GraphicsContextGL::MAX_ELEMENTS_VERTICES:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_FRAGMENT_UNIFORM_COMPONENTS:
+    case GraphicsContextGL::MAX_FRAGMENT_UNIFORM_COMPONENTS:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_FRAGMENT_UNIFORM_BLOCKS:
+    case GraphicsContextGL::MAX_FRAGMENT_UNIFORM_BLOCKS:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_PROGRAM_TEXEL_OFFSET:
+    case GraphicsContextGL::MAX_PROGRAM_TEXEL_OFFSET:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_SAMPLES:
+    case GraphicsContextGL::MAX_SAMPLES:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_SERVER_WAIT_TIMEOUT:
+    case GraphicsContextGL::MAX_SERVER_WAIT_TIMEOUT:
         return getInt64Parameter(pname);
-    case GraphicsContext3D::MAX_TEXTURE_LOD_BIAS:
+    case GraphicsContextGL::MAX_TEXTURE_LOD_BIAS:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:
+    case GraphicsContextGL::MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:
+    case GraphicsContextGL::MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:
+    case GraphicsContextGL::MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_UNIFORM_BLOCK_SIZE:
+    case GraphicsContextGL::MAX_UNIFORM_BLOCK_SIZE:
         return getInt64Parameter(pname);
-    case GraphicsContext3D::MAX_UNIFORM_BUFFER_BINDINGS:
+    case GraphicsContextGL::MAX_UNIFORM_BUFFER_BINDINGS:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_VARYING_COMPONENTS:
+    case GraphicsContextGL::MAX_VARYING_COMPONENTS:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_VERTEX_OUTPUT_COMPONENTS:
+    case GraphicsContextGL::MAX_VERTEX_OUTPUT_COMPONENTS:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_VERTEX_UNIFORM_BLOCKS:
+    case GraphicsContextGL::MAX_VERTEX_UNIFORM_BLOCKS:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_VERTEX_UNIFORM_COMPONENTS: 
+    case GraphicsContextGL::MAX_VERTEX_UNIFORM_COMPONENTS: 
         return getIntParameter(pname);                            
-    case GraphicsContext3D::MIN_PROGRAM_TEXEL_OFFSET:
+    case GraphicsContextGL::MIN_PROGRAM_TEXEL_OFFSET:
         return getIntParameter(pname);
-    case GraphicsContext3D::PACK_ROW_LENGTH:
+    case GraphicsContextGL::PACK_ROW_LENGTH:
         return getIntParameter(pname);
-    case GraphicsContext3D::PACK_SKIP_PIXELS:
+    case GraphicsContextGL::PACK_SKIP_PIXELS:
         return getIntParameter(pname);
-    case GraphicsContext3D::PACK_SKIP_ROWS:
+    case GraphicsContextGL::PACK_SKIP_ROWS:
         return getIntParameter(pname);
-    case GraphicsContext3D::UNPACK_IMAGE_HEIGHT:
+    case GraphicsContextGL::UNPACK_IMAGE_HEIGHT:
         return getIntParameter(pname);
-    case GraphicsContext3D::UNPACK_ROW_LENGTH:
+    case GraphicsContextGL::UNPACK_ROW_LENGTH:
         return getIntParameter(pname);
-    case GraphicsContext3D::UNPACK_SKIP_IMAGES:
+    case GraphicsContextGL::UNPACK_SKIP_IMAGES:
         return getIntParameter(pname);
-    case GraphicsContext3D::UNPACK_SKIP_PIXELS:
+    case GraphicsContextGL::UNPACK_SKIP_PIXELS:
         return getIntParameter(pname);
-    case GraphicsContext3D::UNPACK_SKIP_ROWS:
+    case GraphicsContextGL::UNPACK_SKIP_ROWS:
         return getIntParameter(pname);
-    case GraphicsContext3D::RASTERIZER_DISCARD:
+    case GraphicsContextGL::RASTERIZER_DISCARD:
         return getBooleanParameter(pname);
-    case GraphicsContext3D::SAMPLE_ALPHA_TO_COVERAGE:
+    case GraphicsContextGL::SAMPLE_ALPHA_TO_COVERAGE:
         return getBooleanParameter(pname);
-    case GraphicsContext3D::SAMPLE_COVERAGE:
+    case GraphicsContextGL::SAMPLE_COVERAGE:
         return getBooleanParameter(pname);
-    case GraphicsContext3D::TRANSFORM_FEEDBACK_ACTIVE:
+    case GraphicsContextGL::TRANSFORM_FEEDBACK_ACTIVE:
         return getBooleanParameter(pname);
-    case GraphicsContext3D::TRANSFORM_FEEDBACK_PAUSED:
+    case GraphicsContextGL::TRANSFORM_FEEDBACK_PAUSED:
         return getBooleanParameter(pname);
-    case GraphicsContext3D::UNIFORM_BUFFER_OFFSET_ALIGNMENT:
+    case GraphicsContextGL::UNIFORM_BUFFER_OFFSET_ALIGNMENT:
         return getIntParameter(pname);
-    case GraphicsContext3D::VERTEX_ARRAY_BINDING:
+    case GraphicsContextGL::VERTEX_ARRAY_BINDING:
         if (m_boundVertexArrayObject->isDefaultObject())
             return nullptr;
         return makeRefPtr(static_cast<WebGLVertexArrayObject&>(*m_boundVertexArrayObject));
-    case GraphicsContext3D::DRAW_BUFFER0:
-    case GraphicsContext3D::DRAW_BUFFER1:
-    case GraphicsContext3D::DRAW_BUFFER2:
-    case GraphicsContext3D::DRAW_BUFFER3:
-    case GraphicsContext3D::DRAW_BUFFER4:
-    case GraphicsContext3D::DRAW_BUFFER5:
-    case GraphicsContext3D::DRAW_BUFFER6:
-    case GraphicsContext3D::DRAW_BUFFER7:
-    case GraphicsContext3D::DRAW_BUFFER8:
-    case GraphicsContext3D::DRAW_BUFFER9:
-    case GraphicsContext3D::DRAW_BUFFER10:
-    case GraphicsContext3D::DRAW_BUFFER11:
-    case GraphicsContext3D::DRAW_BUFFER12:
-    case GraphicsContext3D::DRAW_BUFFER13:
-    case GraphicsContext3D::DRAW_BUFFER14:
-    case GraphicsContext3D::DRAW_BUFFER15:
+    case GraphicsContextGL::DRAW_BUFFER0:
+    case GraphicsContextGL::DRAW_BUFFER1:
+    case GraphicsContextGL::DRAW_BUFFER2:
+    case GraphicsContextGL::DRAW_BUFFER3:
+    case GraphicsContextGL::DRAW_BUFFER4:
+    case GraphicsContextGL::DRAW_BUFFER5:
+    case GraphicsContextGL::DRAW_BUFFER6:
+    case GraphicsContextGL::DRAW_BUFFER7:
+    case GraphicsContextGL::DRAW_BUFFER8:
+    case GraphicsContextGL::DRAW_BUFFER9:
+    case GraphicsContextGL::DRAW_BUFFER10:
+    case GraphicsContextGL::DRAW_BUFFER11:
+    case GraphicsContextGL::DRAW_BUFFER12:
+    case GraphicsContextGL::DRAW_BUFFER13:
+    case GraphicsContextGL::DRAW_BUFFER14:
+    case GraphicsContextGL::DRAW_BUFFER15:
         if (m_framebufferBinding)
             return m_framebufferBinding->getDrawBuffer(pname);
         return m_backDrawBuffer; // emulated backbuffer
-    case GraphicsContext3D::READ_FRAMEBUFFER_BINDING:
+    case GraphicsContextGL::READ_FRAMEBUFFER_BINDING:
         return m_readFramebufferBinding;
-    case GraphicsContext3D::COPY_READ_BUFFER:
-    case GraphicsContext3D::COPY_WRITE_BUFFER:
-    case GraphicsContext3D::PIXEL_PACK_BUFFER_BINDING:   
-    case GraphicsContext3D::PIXEL_UNPACK_BUFFER_BINDING:
-    case GraphicsContext3D::READ_BUFFER:
-    case GraphicsContext3D::SAMPLER_BINDING:
-    case GraphicsContext3D::TEXTURE_BINDING_2D_ARRAY:
-    case GraphicsContext3D::TEXTURE_BINDING_3D:
-    case GraphicsContext3D::TRANSFORM_FEEDBACK_BUFFER_BINDING:
-    case GraphicsContext3D::UNIFORM_BUFFER_BINDING:
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "getParameter", "parameter name not yet supported");
+    case GraphicsContextGL::COPY_READ_BUFFER:
+    case GraphicsContextGL::COPY_WRITE_BUFFER:
+    case GraphicsContextGL::PIXEL_PACK_BUFFER_BINDING:   
+    case GraphicsContextGL::PIXEL_UNPACK_BUFFER_BINDING:
+    case GraphicsContextGL::READ_BUFFER:
+    case GraphicsContextGL::SAMPLER_BINDING:
+    case GraphicsContextGL::TEXTURE_BINDING_2D_ARRAY:
+    case GraphicsContextGL::TEXTURE_BINDING_3D:
+    case GraphicsContextGL::TRANSFORM_FEEDBACK_BUFFER_BINDING:
+    case GraphicsContextGL::UNIFORM_BUFFER_BINDING:
+        synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "getParameter", "parameter name not yet supported");
         return nullptr;
     default:
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "getParameter", "invalid parameter name");
+        synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "getParameter", "invalid parameter name");
         return nullptr;
     }
 }
@@ -2122,13 +2122,13 @@ bool WebGL2RenderingContext::validateIndexArrayConservative(GC3Denum type, unsig
     if (!maxIndex) {
         // Compute the maximum index in the entire buffer for the given type of index.
         switch (type) {
-        case GraphicsContext3D::UNSIGNED_BYTE:
+        case GraphicsContextGL::UNSIGNED_BYTE:
             maxIndex = getMaxIndex<GC3Dubyte>(buffer, 0, numElements);
             break;
-        case GraphicsContext3D::UNSIGNED_SHORT:
+        case GraphicsContextGL::UNSIGNED_SHORT:
             maxIndex = getMaxIndex<GC3Dushort>(buffer, 0, numElements / sizeof(GC3Dushort));
             break;
-        case GraphicsContext3D::UNSIGNED_INT:
+        case GraphicsContextGL::UNSIGNED_INT:
             maxIndex = getMaxIndex<GC3Duint>(buffer, 0, numElements / sizeof(GC3Duint));
             break;
         default:
@@ -2154,14 +2154,14 @@ bool WebGL2RenderingContext::validateIndexArrayConservative(GC3Denum type, unsig
 bool WebGL2RenderingContext::validateBlendEquation(const char* functionName, GC3Denum mode)
 {
     switch (mode) {
-    case GraphicsContext3D::FUNC_ADD:
-    case GraphicsContext3D::FUNC_SUBTRACT:
-    case GraphicsContext3D::FUNC_REVERSE_SUBTRACT:
-    case GraphicsContext3D::MIN:
-    case GraphicsContext3D::MAX:
+    case GraphicsContextGL::FUNC_ADD:
+    case GraphicsContextGL::FUNC_SUBTRACT:
+    case GraphicsContextGL::FUNC_REVERSE_SUBTRACT:
+    case GraphicsContextGL::MIN:
+    case GraphicsContextGL::MAX:
         return true;
     default:
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, functionName, "invalid mode");
+        synthesizeGLError(GraphicsContextGL::INVALID_ENUM, functionName, "invalid mode");
         return false;
     }
 }
@@ -2169,19 +2169,19 @@ bool WebGL2RenderingContext::validateBlendEquation(const char* functionName, GC3
 bool WebGL2RenderingContext::validateCapability(const char* functionName, GC3Denum cap)
 {
     switch (cap) {
-    case GraphicsContext3D::BLEND:
-    case GraphicsContext3D::CULL_FACE:
-    case GraphicsContext3D::DEPTH_TEST:
-    case GraphicsContext3D::DITHER:
-    case GraphicsContext3D::POLYGON_OFFSET_FILL:
-    case GraphicsContext3D::SAMPLE_ALPHA_TO_COVERAGE:
-    case GraphicsContext3D::SAMPLE_COVERAGE:
-    case GraphicsContext3D::SCISSOR_TEST:
-    case GraphicsContext3D::STENCIL_TEST:
-    case GraphicsContext3D::RASTERIZER_DISCARD:
+    case GraphicsContextGL::BLEND:
+    case GraphicsContextGL::CULL_FACE:
+    case GraphicsContextGL::DEPTH_TEST:
+    case GraphicsContextGL::DITHER:
+    case GraphicsContextGL::POLYGON_OFFSET_FILL:
+    case GraphicsContextGL::SAMPLE_ALPHA_TO_COVERAGE:
+    case GraphicsContextGL::SAMPLE_COVERAGE:
+    case GraphicsContextGL::SCISSOR_TEST:
+    case GraphicsContextGL::STENCIL_TEST:
+    case GraphicsContextGL::RASTERIZER_DISCARD:
         return true;
     default:
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, functionName, "invalid capability");
+        synthesizeGLError(GraphicsContextGL::INVALID_ENUM, functionName, "invalid capability");
         return false;
     }
 }
index 92c1832..ced18cd 100644 (file)
@@ -41,8 +41,8 @@ class WebGLVertexArrayObject;
 class WebGL2RenderingContext final : public WebGLRenderingContextBase {
     WTF_MAKE_ISO_ALLOCATED(WebGL2RenderingContext);
 public:
-    static std::unique_ptr<WebGL2RenderingContext> create(CanvasBase&, GraphicsContext3DAttributes);
-    static std::unique_ptr<WebGL2RenderingContext> create(CanvasBase&, Ref<GraphicsContext3D>&&, GraphicsContext3DAttributes);
+    static std::unique_ptr<WebGL2RenderingContext> create(CanvasBase&, GraphicsContextGLAttributes);
+    static std::unique_ptr<WebGL2RenderingContext> create(CanvasBase&, Ref<GraphicsContextGLOpenGL>&&, GraphicsContextGLAttributes);
 
     // Buffer objects
     using WebGLRenderingContextBase::bufferData;
@@ -206,8 +206,8 @@ public:
     void hint(GC3Denum target, GC3Denum mode) final;
 
 private:
-    WebGL2RenderingContext(CanvasBase&, GraphicsContext3DAttributes);
-    WebGL2RenderingContext(CanvasBase&, Ref<GraphicsContext3D>&&, GraphicsContext3DAttributes);
+    WebGL2RenderingContext(CanvasBase&, GraphicsContextGLAttributes);
+    WebGL2RenderingContext(CanvasBase&, Ref<GraphicsContextGLOpenGL>&&, GraphicsContextGLAttributes);
 
     bool isWebGL2() const final { return true; }
 
index 65c0834..6f43c04 100644 (file)
@@ -27,7 +27,7 @@
 
 #if ENABLE(WEBGL)
 
-#include "GraphicsContext3D.h"
+#include "GraphicsContextGLOpenGL.h"
 #include <wtf/RefCounted.h>
 #include <wtf/text/WTFString.h>
 
index d87cae2..b8ee25f 100644 (file)
@@ -42,7 +42,7 @@ Ref<WebGLBuffer> WebGLBuffer::create(WebGLRenderingContextBase& ctx)
 WebGLBuffer::WebGLBuffer(WebGLRenderingContextBase& ctx)
     : WebGLSharedObject(ctx)
 {
-    setObject(ctx.graphicsContext3D()->createBuffer());
+    setObject(ctx.graphicsContextGL()->createBuffer());
     clearCachedMaxIndices();
 }
 
@@ -51,7 +51,7 @@ WebGLBuffer::~WebGLBuffer()
     deleteObject(0);
 }
 
-void WebGLBuffer::deleteObjectImpl(GraphicsContext3D* context3d, Platform3DObject object)
+void WebGLBuffer::deleteObjectImpl(GraphicsContextGLOpenGL* context3d, Platform3DObject object)
 {
     context3d->deleteBuffer(object);
 }
@@ -62,7 +62,7 @@ bool WebGLBuffer::associateBufferDataImpl(const void* data, GC3Dsizeiptr byteLen
         return false;
 
     switch (m_target) {
-    case GraphicsContext3D::ELEMENT_ARRAY_BUFFER:
+    case GraphicsContextGL::ELEMENT_ARRAY_BUFFER:
         if (byteLength > std::numeric_limits<unsigned>::max())
             return false;
         m_byteLength = byteLength;
@@ -82,18 +82,18 @@ bool WebGLBuffer::associateBufferDataImpl(const void* data, GC3Dsizeiptr byteLen
         } else
             m_elementArrayBuffer = nullptr;
         return true;
-    case GraphicsContext3D::ARRAY_BUFFER:
+    case GraphicsContextGL::ARRAY_BUFFER:
         m_byteLength = byteLength;
         return true;
     default:
 #if ENABLE(WEBGL2)
         switch (m_target) {
-        case GraphicsContext3D::COPY_READ_BUFFER:
-        case GraphicsContext3D::COPY_WRITE_BUFFER:
-        case GraphicsContext3D::PIXEL_PACK_BUFFER:
-        case GraphicsContext3D::PIXEL_UNPACK_BUFFER:
-        case GraphicsContext3D::TRANSFORM_FEEDBACK_BUFFER:
-        case GraphicsContext3D::UNIFORM_BUFFER:
+        case GraphicsContextGL::COPY_READ_BUFFER:
+        case GraphicsContextGL::COPY_WRITE_BUFFER:
+        case GraphicsContextGL::PIXEL_PACK_BUFFER:
+        case GraphicsContextGL::PIXEL_UNPACK_BUFFER:
+        case GraphicsContextGL::TRANSFORM_FEEDBACK_BUFFER:
+        case GraphicsContextGL::UNIFORM_BUFFER:
             m_byteLength = byteLength;
             return true;
         }
@@ -135,7 +135,7 @@ bool WebGLBuffer::associateBufferSubDataImpl(GC3Dintptr offset, const void* data
     }
 
     switch (m_target) {
-    case GraphicsContext3D::ELEMENT_ARRAY_BUFFER:
+    case GraphicsContextGL::ELEMENT_ARRAY_BUFFER:
         clearCachedMaxIndices();
         if (byteLength) {
             if (!m_elementArrayBuffer)
@@ -143,17 +143,17 @@ bool WebGLBuffer::associateBufferSubDataImpl(GC3Dintptr offset, const void* data
             memcpy(static_cast<unsigned char*>(m_elementArrayBuffer->data()) + offset, data, byteLength);
         }
         return true;
-    case GraphicsContext3D::ARRAY_BUFFER:
+    case GraphicsContextGL::ARRAY_BUFFER:
         return true;
     default:
 #if ENABLE(WEBGL2)
         switch (m_target) {
-        case GraphicsContext3D::COPY_READ_BUFFER:
-        case GraphicsContext3D::COPY_WRITE_BUFFER:
-        case GraphicsContext3D::PIXEL_PACK_BUFFER:
-        case GraphicsContext3D::PIXEL_UNPACK_BUFFER:
-        case GraphicsContext3D::TRANSFORM_FEEDBACK_BUFFER:
-        case GraphicsContext3D::UNIFORM_BUFFER:
+        case GraphicsContextGL::COPY_READ_BUFFER:
+        case GraphicsContextGL::COPY_WRITE_BUFFER:
+        case GraphicsContextGL::PIXEL_PACK_BUFFER:
+        case GraphicsContextGL::PIXEL_UNPACK_BUFFER:
+        case GraphicsContextGL::TRANSFORM_FEEDBACK_BUFFER:
+        case GraphicsContextGL::UNIFORM_BUFFER:
             return true;
         }
 #endif
@@ -194,7 +194,7 @@ bool WebGLBuffer::associateCopyBufferSubData(const WebGLBuffer& readBuffer, GC3D
     }
 
     switch (m_target) {
-    case GraphicsContext3D::ELEMENT_ARRAY_BUFFER:
+    case GraphicsContextGL::ELEMENT_ARRAY_BUFFER:
         clearCachedMaxIndices();
         if (size) {
             if (!m_elementArrayBuffer)
@@ -202,17 +202,17 @@ bool WebGLBuffer::associateCopyBufferSubData(const WebGLBuffer& readBuffer, GC3D
             memcpy(static_cast<unsigned char*>(m_elementArrayBuffer->data()) + writeOffset, static_cast<const unsigned char*>(readBuffer.elementArrayBuffer()->data()) + readOffset, size);
         }
         return true;
-    case GraphicsContext3D::ARRAY_BUFFER:
+    case GraphicsContextGL::ARRAY_BUFFER:
         return true;
     default:
 #if ENABLE(WEBGL2)
         switch (m_target) {
-        case GraphicsContext3D::COPY_READ_BUFFER:
-        case GraphicsContext3D::COPY_WRITE_BUFFER:
-        case GraphicsContext3D::PIXEL_PACK_BUFFER:
-        case GraphicsContext3D::PIXEL_UNPACK_BUFFER:
-        case GraphicsContext3D::TRANSFORM_FEEDBACK_BUFFER:
-        case GraphicsContext3D::UNIFORM_BUFFER:
+        case GraphicsContextGL::COPY_READ_BUFFER:
+        case GraphicsContextGL::COPY_WRITE_BUFFER:
+        case GraphicsContextGL::PIXEL_PACK_BUFFER:
+        case GraphicsContextGL::PIXEL_UNPACK_BUFFER:
+        case GraphicsContextGL::TRANSFORM_FEEDBACK_BUFFER:
+        case GraphicsContextGL::UNIFORM_BUFFER:
             return true;
         }
 #endif
@@ -258,17 +258,17 @@ void WebGLBuffer::setTarget(GC3Denum target, bool forWebGL2)
     // In WebGL, a buffer is bound to one target in its lifetime
     if (m_target)
         return;
-    if (target == GraphicsContext3D::ARRAY_BUFFER || target == GraphicsContext3D::ELEMENT_ARRAY_BUFFER)
+    if (target == GraphicsContextGL::ARRAY_BUFFER || target == GraphicsContextGL::ELEMENT_ARRAY_BUFFER)
         m_target = target;
     else if (forWebGL2) {
 #if ENABLE(WEBGL2)
         switch (target) {
-        case GraphicsContext3D::COPY_READ_BUFFER:
-        case GraphicsContext3D::COPY_WRITE_BUFFER:
-        case GraphicsContext3D::PIXEL_PACK_BUFFER:
-        case GraphicsContext3D::PIXEL_UNPACK_BUFFER:
-        case GraphicsContext3D::TRANSFORM_FEEDBACK_BUFFER:
-        case GraphicsContext3D::UNIFORM_BUFFER:
+        case GraphicsContextGL::COPY_READ_BUFFER:
+        case GraphicsContextGL::COPY_WRITE_BUFFER:
+        case GraphicsContextGL::PIXEL_PACK_BUFFER:
+        case GraphicsContextGL::PIXEL_UNPACK_BUFFER:
+        case GraphicsContextGL::TRANSFORM_FEEDBACK_BUFFER:
+        case GraphicsContextGL::UNIFORM_BUFFER:
             m_target = target;
         }
 #endif
index e33d973..bd43cdd 100644 (file)
@@ -67,7 +67,7 @@ public:
 protected:
     WebGLBuffer(WebGLRenderingContextBase&);
 
-    void deleteObjectImpl(GraphicsContext3D*, Platform3DObject) override;
+    void deleteObjectImpl(GraphicsContextGLOpenGL*, Platform3DObject) override;
 
 private:
     GC3Denum m_target { 0 };
index 132f3e6..1bff43b 100644 (file)
@@ -28,7 +28,7 @@
 
 #if ENABLE(WEBGL)
 
-#include "Extensions3D.h"
+#include "ExtensionsGL.h"
 #include "RuntimeEnabledFeatures.h"
 #include "WebGLRenderingContextBase.h"
 
@@ -36,41 +36,41 @@ namespace WebCore {
     
 WebGLCompressedTextureASTC::WebGLCompressedTextureASTC(WebGLRenderingContextBase& context)
     : WebGLExtension(context)
-    , m_isHDRSupported(context.graphicsContext3D()->getExtensions().supports("GL_KHR_texture_compression_astc_hdr"_s))
-    , m_isLDRSupported(context.graphicsContext3D()->getExtensions().supports("GL_KHR_texture_compression_astc_ldr"_s))
+    , m_isHDRSupported(context.graphicsContextGL()->getExtensions().supports("GL_KHR_texture_compression_astc_hdr"_s))
+    , m_isLDRSupported(context.graphicsContextGL()->getExtensions().supports("GL_KHR_texture_compression_astc_ldr"_s))
 {
-    context.graphicsContext3D()->getExtensions().ensureEnabled("GL_KHR_texture_compression_astc_hdr"_s);
-    context.graphicsContext3D()->getExtensions().ensureEnabled("GL_KHR_texture_compression_astc_ldr"_s);
+    context.graphicsContextGL()->getExtensions().ensureEnabled("GL_KHR_texture_compression_astc_hdr"_s);
+    context.graphicsContextGL()->getExtensions().ensureEnabled("GL_KHR_texture_compression_astc_ldr"_s);
 
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RGBA_ASTC_4x4_KHR);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RGBA_ASTC_5x4_KHR);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RGBA_ASTC_5x5_KHR);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RGBA_ASTC_6x5_KHR);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RGBA_ASTC_6x6_KHR);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RGBA_ASTC_8x5_KHR);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RGBA_ASTC_8x6_KHR);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RGBA_ASTC_8x8_KHR);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RGBA_ASTC_10x5_KHR);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RGBA_ASTC_10x6_KHR);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RGBA_ASTC_10x8_KHR);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RGBA_ASTC_10x10_KHR);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RGBA_ASTC_12x10_KHR);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RGBA_ASTC_12x12_KHR);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_RGBA_ASTC_4x4_KHR);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_RGBA_ASTC_5x4_KHR);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_RGBA_ASTC_5x5_KHR);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_RGBA_ASTC_6x5_KHR);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_RGBA_ASTC_6x6_KHR);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_RGBA_ASTC_8x5_KHR);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_RGBA_ASTC_8x6_KHR);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_RGBA_ASTC_8x8_KHR);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_RGBA_ASTC_10x5_KHR);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_RGBA_ASTC_10x6_KHR);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_RGBA_ASTC_10x8_KHR);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_RGBA_ASTC_10x10_KHR);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_RGBA_ASTC_12x10_KHR);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_RGBA_ASTC_12x12_KHR);
     
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR);
 }
 
 WebGLCompressedTextureASTC::~WebGLCompressedTextureASTC() = default;
@@ -94,8 +94,8 @@ Vector<String> WebGLCompressedTextureASTC::getSupportedProfiles()
 
 bool WebGLCompressedTextureASTC::supported(const WebGLRenderingContextBase& context)
 {
-    return context.graphicsContext3D()->getExtensions().supports("GL_KHR_texture_compression_astc_hdr"_s)
-        || context.graphicsContext3D()->getExtensions().supports("GL_KHR_texture_compression_astc_ldr"_s);
+    return context.graphicsContextGL()->getExtensions().supports("GL_KHR_texture_compression_astc_hdr"_s)
+        || context.graphicsContextGL()->getExtensions().supports("GL_KHR_texture_compression_astc_ldr"_s);
 }
 
 } // namespace WebCore
index 2168da3..9f81fb0 100644 (file)
 
 #include "WebGLCompressedTextureATC.h"
 
-#include "Extensions3D.h"
+#include "ExtensionsGL.h"
 
 namespace WebCore {
 
 WebGLCompressedTextureATC::WebGLCompressedTextureATC(WebGLRenderingContextBase& context)
     : WebGLExtension(context)
 {
-    context.graphicsContext3D()->getExtensions().ensureEnabled("GL_AMD_compressed_ATC_texture");
+    context.graphicsContextGL()->getExtensions().ensureEnabled("GL_AMD_compressed_ATC_texture");
 
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_ATC_RGB_AMD);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_ATC_RGBA_EXPLICIT_ALPHA_AMD);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_ATC_RGBA_INTERPOLATED_ALPHA_AMD);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_ATC_RGB_AMD);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_ATC_RGBA_EXPLICIT_ALPHA_AMD);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_ATC_RGBA_INTERPOLATED_ALPHA_AMD);
 }
 
 WebGLCompressedTextureATC::~WebGLCompressedTextureATC() = default;
@@ -52,7 +52,7 @@ WebGLExtension::ExtensionName WebGLCompressedTextureATC::getName() const
 
 bool WebGLCompressedTextureATC::supported(WebGLRenderingContextBase& context)
 {
-    return context.graphicsContext3D()->getExtensions().supports("GL_AMD_compressed_ATC_texture");
+    return context.graphicsContextGL()->getExtensions().supports("GL_AMD_compressed_ATC_texture");
 }
 
 } // namespace WebCore
index f4c94a6..a6a54aa 100644 (file)
@@ -28,7 +28,7 @@
 #if ENABLE(WEBGL)
 #include "WebGLCompressedTextureETC.h"
 
-#include "Extensions3D.h"
+#include "ExtensionsGL.h"
 #include "WebGLRenderingContextBase.h"
 
 namespace WebCore {
@@ -36,18 +36,18 @@ namespace WebCore {
 WebGLCompressedTextureETC::WebGLCompressedTextureETC(WebGLRenderingContextBase& context)
     : WebGLExtension(context)
 {
-    context.graphicsContext3D()->getExtensions().ensureEnabled("GL_ANGLE_compressed_texture_etc");
+    context.graphicsContextGL()->getExtensions().ensureEnabled("GL_ANGLE_compressed_texture_etc");
 
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_R11_EAC);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_SIGNED_R11_EAC);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RG11_EAC);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_SIGNED_RG11_EAC);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RGB8_ETC2);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_SRGB8_ETC2);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RGBA8_ETC2_EAC);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_SRGB8_ALPHA8_ETC2_EAC);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_R11_EAC);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_SIGNED_R11_EAC);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_RG11_EAC);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_SIGNED_RG11_EAC);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_RGB8_ETC2);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_SRGB8_ETC2);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_RGBA8_ETC2_EAC);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_SRGB8_ALPHA8_ETC2_EAC);
 }
 
 WebGLCompressedTextureETC::~WebGLCompressedTextureETC() = default;
@@ -59,7 +59,7 @@ WebGLExtension::ExtensionName WebGLCompressedTextureETC::getName() const
 
 bool WebGLCompressedTextureETC::supported(WebGLRenderingContextBase& context)
 {
-    return context.graphicsContext3D()->getExtensions().supports("GL_ANGLE_compressed_texture_etc");
+    return context.graphicsContextGL()->getExtensions().supports("GL_ANGLE_compressed_texture_etc");
 }
 
 } // namespace WebCore
index bdc3bee..fb3dfea 100644 (file)
@@ -28,7 +28,7 @@
 #if ENABLE(WEBGL)
 #include "WebGLCompressedTextureETC1.h"
 
-#include "Extensions3D.h"
+#include "ExtensionsGL.h"
 #include "WebGLRenderingContextBase.h"
 
 namespace WebCore {
@@ -36,9 +36,9 @@ namespace WebCore {
 WebGLCompressedTextureETC1::WebGLCompressedTextureETC1(WebGLRenderingContextBase& context)
     : WebGLExtension(context)
 {
-    context.graphicsContext3D()->getExtensions().ensureEnabled("GL_OES_compressed_ETC1_RGB8_texture");
+    context.graphicsContextGL()->getExtensions().ensureEnabled("GL_OES_compressed_ETC1_RGB8_texture");
 
-    context.addCompressedTextureFormat(Extensions3D::ETC1_RGB8_OES);
+    context.addCompressedTextureFormat(ExtensionsGL::ETC1_RGB8_OES);
 }
 
 WebGLCompressedTextureETC1::~WebGLCompressedTextureETC1() = default;
@@ -50,7 +50,7 @@ WebGLExtension::ExtensionName WebGLCompressedTextureETC1::getName() const
 
 bool WebGLCompressedTextureETC1::supported(WebGLRenderingContextBase& context)
 {
-    return context.graphicsContext3D()->getExtensions().supports("GL_OES_compressed_ETC1_RGB8_texture");
+    return context.graphicsContextGL()->getExtensions().supports("GL_OES_compressed_ETC1_RGB8_texture");
 }
 
 } // namespace WebCore
index 4bd0af4..93599ac 100644 (file)
@@ -29,7 +29,7 @@
 
 #include "WebGLCompressedTexturePVRTC.h"
 
-#include "Extensions3D.h"
+#include "ExtensionsGL.h"
 #include "WebGLRenderingContextBase.h"
 
 namespace WebCore {
@@ -37,12 +37,12 @@ namespace WebCore {
 WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC(WebGLRenderingContextBase& context)
     : WebGLExtension(context)
 {
-    context.graphicsContext3D()->getExtensions().ensureEnabled("GL_IMG_texture_compression_pvrtc");
+    context.graphicsContextGL()->getExtensions().ensureEnabled("GL_IMG_texture_compression_pvrtc");
 
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RGB_PVRTC_4BPPV1_IMG);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RGB_PVRTC_2BPPV1_IMG);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RGBA_PVRTC_4BPPV1_IMG);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RGBA_PVRTC_2BPPV1_IMG);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_RGB_PVRTC_4BPPV1_IMG);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_RGB_PVRTC_2BPPV1_IMG);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_RGBA_PVRTC_4BPPV1_IMG);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_RGBA_PVRTC_2BPPV1_IMG);
 }
 
 WebGLCompressedTexturePVRTC::~WebGLCompressedTexturePVRTC() = default;
@@ -54,7 +54,7 @@ WebGLExtension::ExtensionName WebGLCompressedTexturePVRTC::getName() const
 
 bool WebGLCompressedTexturePVRTC::supported(WebGLRenderingContextBase& context)
 {
-    return context.graphicsContext3D()->getExtensions().supports("GL_IMG_texture_compression_pvrtc");
+    return context.graphicsContextGL()->getExtensions().supports("GL_IMG_texture_compression_pvrtc");
 }
 
 } // namespace WebCore
index 5dff190..a3d151e 100644 (file)
@@ -29,7 +29,7 @@
 
 #include "WebGLCompressedTextureS3TC.h"
 
-#include "Extensions3D.h"
+#include "ExtensionsGL.h"
 #include "WebGLRenderingContextBase.h"
 
 namespace WebCore {
@@ -37,15 +37,15 @@ namespace WebCore {
 WebGLCompressedTextureS3TC::WebGLCompressedTextureS3TC(WebGLRenderingContextBase& context)
     : WebGLExtension(context)
 {
-    auto& extensions = context.graphicsContext3D()->getExtensions();
+    auto& extensions = context.graphicsContextGL()->getExtensions();
     extensions.ensureEnabled("GL_EXT_texture_compression_dxt1");
     extensions.ensureEnabled("GL_ANGLE_texture_compression_dxt3");
     extensions.ensureEnabled("GL_ANGLE_texture_compression_dxt5");
 
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RGB_S3TC_DXT1_EXT);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RGBA_S3TC_DXT1_EXT);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RGBA_S3TC_DXT3_EXT);
-    context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RGBA_S3TC_DXT5_EXT);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_RGB_S3TC_DXT1_EXT);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_RGBA_S3TC_DXT1_EXT);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_RGBA_S3TC_DXT3_EXT);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_RGBA_S3TC_DXT5_EXT);
 }
 
 WebGLCompressedTextureS3TC::~WebGLCompressedTextureS3TC() = default;
@@ -57,7 +57,7 @@ WebGLExtension::ExtensionName WebGLCompressedTextureS3TC::getName() const
 
 bool WebGLCompressedTextureS3TC::supported(WebGLRenderingContextBase& context)
 {
-    auto& extensions = context.graphicsContext3D()->getExtensions();
+    auto& extensions = context.graphicsContextGL()->getExtensions();
 #if USE(ANGLE)
     return extensions.supports("GL_EXT_texture_compression_dxt1")
         && extensions.supports("GL_ANGLE_texture_compression_dxt3")
index ea67423..988d368 100644 (file)
 
 #if ENABLE(WEBGL)
 
-#include "GraphicsContext3DAttributes.h"
+#include "GraphicsContextGLAttributes.h"
 
 namespace WebCore {
 
-using WebGLPowerPreference = GraphicsContext3DPowerPreference;
-using WebGLContextAttributes = GraphicsContext3DAttributes;
+using WebGLPowerPreference = GraphicsContextGLPowerPreference;
+using WebGLContextAttributes = GraphicsContextGLAttributes;
 
 } // namespace WebCore
 
index 9ddef15..42b9ccf 100644 (file)
@@ -28,7 +28,7 @@
 
 #if ENABLE(WEBGL)
 
-#include "GraphicsContext3D.h"
+#include "GraphicsContextGLOpenGL.h"
 #include "WebGLRenderingContextBase.h"
 #include "WebGLSharedObject.h"
 
@@ -44,10 +44,10 @@ WebGLContextGroup::~WebGLContextGroup()
     detachAndRemoveAllObjects();
 }
 
-GraphicsContext3D& WebGLContextGroup::getAGraphicsContext3D()
+GraphicsContextGLOpenGL& WebGLContextGroup::getAGraphicsContextGL()
 {
     ASSERT(!m_contexts.isEmpty());
-    return *(*m_contexts.begin())->graphicsContext3D();
+    return *(*m_contexts.begin())->graphicsContextGL();
 }
 
 void WebGLContextGroup::addContext(WebGLRenderingContextBase& context)
index eacd22e..63d1d29 100644 (file)
@@ -42,7 +42,7 @@ public:
     void addObject(WebGLSharedObject&);
     void removeObject(WebGLSharedObject&);
 
-    GraphicsContext3D& getAGraphicsContext3D();
+    GraphicsContextGLOpenGL& getAGraphicsContextGL();
 
     void loseContextGroup(WebGLRenderingContextBase::LostContextMode);
 
index 6a1c7ab..4514128 100644 (file)
@@ -47,15 +47,15 @@ void WebGLContextObject::detachContext()
 {
     detach();
     if (m_context) {
-        deleteObject(m_context->graphicsContext3D());
+        deleteObject(m_context->graphicsContextGL());
         m_context->removeContextObject(*this);
         m_context = nullptr;
     }
 }
 
-GraphicsContext3D* WebGLContextObject::getAGraphicsContext3D() const
+GraphicsContextGLOpenGL* WebGLContextObject::getAGraphicsContextGL() const
 {
-    return m_context ? m_context->graphicsContext3D() : nullptr;
+    return m_context ? m_context->graphicsContextGL() : nullptr;
 }
 
 }
index 36f2248..c38e648 100644 (file)
@@ -31,7 +31,7 @@
 
 namespace WebCore {
 
-class GraphicsContext3D;
+class GraphicsContextGLOpenGL;
 class WebGLRenderingContextBase;
 
 // WebGLContextObject the base class for objects that are owned by a specific
@@ -57,7 +57,7 @@ protected:
         return m_context;
     }
 
-    GraphicsContext3D* getAGraphicsContext3D() const override;
+    GraphicsContextGLOpenGL* getAGraphicsContextGL() const override;
 
 private:
     WebGLRenderingContextBase* m_context;
index b8a821b..c55848b 100644 (file)
@@ -29,7 +29,7 @@
 
 #include "WebGLDebugShaders.h"
 
-#include "Extensions3D.h"
+#include "ExtensionsGL.h"
 #include "WebGLRenderingContextBase.h"
 #include "WebGLShader.h"
 
@@ -38,7 +38,7 @@ namespace WebCore {
 WebGLDebugShaders::WebGLDebugShaders(WebGLRenderingContextBase& context)
     : WebGLExtension(context)
 {
-    context.graphicsContext3D()->getExtensions().ensureEnabled("GL_ANGLE_translated_shader_source");
+    context.graphicsContextGL()->getExtensions().ensureEnabled("GL_ANGLE_translated_shader_source");
 }
 
 WebGLDebugShaders::~WebGLDebugShaders() = default;
@@ -54,7 +54,7 @@ String WebGLDebugShaders::getTranslatedShaderSource(WebGLShader& shader)
         return String();
     if (!m_context.validateWebGLObject("getTranslatedShaderSource", &shader))
         return emptyString();
-    return m_context.graphicsContext3D()->getExtensions().getTranslatedShaderSourceANGLE(shader.object());
+    return m_context.graphicsContextGL()->getExtensions().getTranslatedShaderSourceANGLE(shader.object());
 }
 
 } // namespace WebCore
index 0d1b7a7..4531e9f 100644 (file)
 
 #include "WebGLDepthTexture.h"
 
-#include "Extensions3D.h"
+#include "ExtensionsGL.h"
 
 namespace WebCore {
 
 WebGLDepthTexture::WebGLDepthTexture(WebGLRenderingContextBase& context)
     : WebGLExtension(context)
 {
-    context.graphicsContext3D()->getExtensions().ensureEnabled("GL_OES_depth_texture");
-    context.graphicsContext3D()->getExtensions().ensureEnabled("GL_ARB_depth_texture");
+    context.graphicsContextGL()->getExtensions().ensureEnabled("GL_OES_depth_texture");
+    context.graphicsContextGL()->getExtensions().ensureEnabled("GL_ARB_depth_texture");
 }
 
 WebGLDepthTexture::~WebGLDepthTexture() = default;
@@ -47,9 +47,9 @@ WebGLExtension::ExtensionName WebGLDepthTexture::getName() const
     return WebGLDepthTextureName;
 }
 
-bool WebGLDepthTexture::supported(GraphicsContext3D& context)
+bool WebGLDepthTexture::supported(GraphicsContextGLOpenGL& context)
 {
-    Extensions3D& extensions = context.getExtensions();
+    ExtensionsGL& extensions = context.getExtensions();
     return extensions.supports("GL_OES_depth_texture")
         || extensions.supports("GL_ARB_depth_texture");
 }
index 52ce96d..0f8b99d 100644 (file)
@@ -36,7 +36,7 @@ public:
     explicit WebGLDepthTexture(WebGLRenderingContextBase&);
     virtual ~WebGLDepthTexture();
 
-    static bool supported(GraphicsContext3D&);
+    static bool supported(GraphicsContextGLOpenGL&);
 
     ExtensionName getName() const override;
 };
index 6509a92..ce345e6 100644 (file)
 #if ENABLE(WEBGL)
 #include "WebGLDrawBuffers.h"
 
-#include "Extensions3D.h"
+#include "ExtensionsGL.h"
 
 namespace WebCore {
 
 WebGLDrawBuffers::WebGLDrawBuffers(WebGLRenderingContextBase& context)
     : WebGLExtension(context)
 {
-    context.graphicsContext3D()->getExtensions().ensureEnabled("GL_EXT_draw_buffers");
+    context.graphicsContextGL()->getExtensions().ensureEnabled("GL_EXT_draw_buffers");
 }
 
 WebGLDrawBuffers::~WebGLDrawBuffers() = default;
@@ -48,9 +48,9 @@ WebGLExtension::ExtensionName WebGLDrawBuffers::getName() const
 bool WebGLDrawBuffers::supported(WebGLRenderingContextBase& context)
 {
 #if USE(ANGLE)
-    return context.graphicsContext3D()->getExtensions().supports("GL_EXT_draw_buffers");
+    return context.graphicsContextGL()->getExtensions().supports("GL_EXT_draw_buffers");
 #else
-    return context.graphicsContext3D()->getExtensions().supports("GL_EXT_draw_buffers")
+    return context.graphicsContextGL()->getExtensions().supports("GL_EXT_draw_buffers")
         && satisfiesWebGLRequirements(context);
 #endif
 }
@@ -63,25 +63,25 @@ void WebGLDrawBuffers::drawBuffersWEBGL(const Vector<GC3Denum>& buffers)
     const GC3Denum* bufs = buffers.data();
     if (!m_context.m_framebufferBinding) {
         if (n != 1) {
-            m_context.synthesizeGLError(GraphicsContext3D::INVALID_VALUE, "drawBuffersWEBGL", "more than one buffer");
+            m_context.synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "drawBuffersWEBGL", "more than one buffer");
             return;
         }
-        if (bufs[0] != GraphicsContext3D::BACK && bufs[0] != GraphicsContext3D::NONE) {
-            m_context.synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "drawBuffersWEBGL", "BACK or NONE");
+        if (bufs[0] != GraphicsContextGL::BACK && bufs[0] != GraphicsContextGL::NONE) {
+            m_context.synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "drawBuffersWEBGL", "BACK or NONE");
             return;
         }
         // Because the backbuffer is simulated on all current WebKit ports, we need to change BACK to COLOR_ATTACHMENT0.
-        GC3Denum value = (bufs[0] == GraphicsContext3D::BACK) ? GraphicsContext3D::COLOR_ATTACHMENT0 : GraphicsContext3D::NONE;
-        m_context.graphicsContext3D()->getExtensions().drawBuffersEXT(1, &value);
+        GC3Denum value = (bufs[0] == GraphicsContextGL::BACK) ? GraphicsContextGL::COLOR_ATTACHMENT0 : GraphicsContextGL::NONE;
+        m_context.graphicsContextGL()->getExtensions().drawBuffersEXT(1, &value);
         m_context.setBackDrawBuffer(bufs[0]);
     } else {
         if (n > m_context.getMaxDrawBuffers()) {
-            m_context.synthesizeGLError(GraphicsContext3D::INVALID_VALUE, "drawBuffersWEBGL", "more than max draw buffers");
+            m_context.synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "drawBuffersWEBGL", "more than max draw buffers");
             return;
         }
         for (GC3Dsizei i = 0; i < n; ++i) {
-            if (bufs[i] != GraphicsContext3D::NONE && bufs[i] != static_cast<GC3Denum>(Extensions3D::COLOR_ATTACHMENT0_EXT + i)) {
-                m_context.synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "drawBuffersWEBGL", "COLOR_ATTACHMENTi_EXT or NONE");
+            if (bufs[i] != GraphicsContextGL::NONE && bufs[i] != static_cast<GC3Denum>(ExtensionsGL::COLOR_ATTACHMENT0_EXT + i)) {
+                m_context.synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "drawBuffersWEBGL", "COLOR_ATTACHMENTi_EXT or NONE");
                 return;
             }
         }
@@ -92,18 +92,18 @@ void WebGLDrawBuffers::drawBuffersWEBGL(const Vector<GC3Denum>& buffers)
 // static
 bool WebGLDrawBuffers::satisfiesWebGLRequirements(WebGLRenderingContextBase& webglContext)
 {
-    GraphicsContext3D* context = webglContext.graphicsContext3D();
+    GraphicsContextGLOpenGL* context = webglContext.graphicsContextGL();
 
     // This is called after we make sure GL_EXT_draw_buffers is supported.
     GC3Dint maxDrawBuffers = 0;
     GC3Dint maxColorAttachments = 0;
-    context->getIntegerv(Extensions3D::MAX_DRAW_BUFFERS_EXT, &maxDrawBuffers);
-    context->getIntegerv(Extensions3D::MAX_COLOR_ATTACHMENTS_EXT, &maxColorAttachments);
+    context->getIntegerv(ExtensionsGL::MAX_DRAW_BUFFERS_EXT, &maxDrawBuffers);
+    context->getIntegerv(ExtensionsGL::MAX_COLOR_ATTACHMENTS_EXT, &maxColorAttachments);
     if (maxDrawBuffers < 4 || maxColorAttachments < 4)
         return false;
 
     Platform3DObject fbo = context->createFramebuffer();
-    context->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, fbo);
+    context->bindFramebuffer(GraphicsContextGL::FRAMEBUFFER, fbo);
 
     const unsigned char buffer[4] = { 0, 0, 0, 0 }; // textures are required to be initialized for other ports.
     bool supportsDepth = context->getExtensions().supports("GL_OES_depth_texture")
@@ -113,14 +113,14 @@ bool WebGLDrawBuffers::satisfiesWebGLRequirements(WebGLRenderingContextBase& web
     Platform3DObject depthStencil = 0;
     if (supportsDepthStencil) {
         depthStencil = context->createTexture();
-        context->bindTexture(GraphicsContext3D::TEXTURE_2D, depthStencil);
-        context->texImage2D(GraphicsContext3D::TEXTURE_2D, 0, GraphicsContext3D::DEPTH_STENCIL, 1, 1, 0, GraphicsContext3D::DEPTH_STENCIL, GraphicsContext3D::UNSIGNED_INT_24_8, buffer);
+        context->bindTexture(GraphicsContextGL::TEXTURE_2D, depthStencil);
+        context->texImage2D(GraphicsContextGL::TEXTURE_2D, 0, GraphicsContextGL::DEPTH_STENCIL, 1, 1, 0, GraphicsContextGL::DEPTH_STENCIL, GraphicsContextGL::UNSIGNED_INT_24_8, buffer);
     }
     Platform3DObject depth = 0;
     if (supportsDepth) {
         depth = context->createTexture();
-        context->bindTexture(GraphicsContext3D::TEXTURE_2D, depth);
-        context->texImage2D(GraphicsContext3D::TEXTURE_2D, 0, GraphicsContext3D::DEPTH_COMPONENT, 1, 1, 0, GraphicsContext3D::DEPTH_COMPONENT, GraphicsContext3D::UNSIGNED_INT, buffer);
+        context->bindTexture(GraphicsContextGL::TEXTURE_2D, depth);
+        context->texImage2D(GraphicsContextGL::TEXTURE_2D, 0, GraphicsContextGL::DEPTH_COMPONENT, 1, 1, 0, GraphicsContextGL::DEPTH_COMPONENT, GraphicsContextGL::UNSIGNED_INT, buffer);
     }
 
     Vector<Platform3DObject> colors;
@@ -129,30 +129,30 @@ bool WebGLDrawBuffers::satisfiesWebGLRequirements(WebGLRenderingContextBase& web
     for (GC3Dint i = 0; i < maxAllowedBuffers; ++i) {
         Platform3DObject color = context->createTexture();
         colors.append(color);
-        context->bindTexture(GraphicsContext3D::TEXTURE_2D, color);
-        context->texImage2D(GraphicsContext3D::TEXTURE_2D, 0, GraphicsContext3D::RGBA, 1, 1, 0, GraphicsContext3D::RGBA, GraphicsContext3D::UNSIGNED_BYTE, buffer);
-        context->framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::COLOR_ATTACHMENT0 + i, GraphicsContext3D::TEXTURE_2D, color, 0);
-        if (context->checkFramebufferStatus(GraphicsContext3D::FRAMEBUFFER) != GraphicsContext3D::FRAMEBUFFER_COMPLETE) {
+        context->bindTexture(GraphicsContextGL::TEXTURE_2D, color);
+        context->texImage2D(GraphicsContextGL::TEXTURE_2D, 0, GraphicsContextGL::RGBA, 1, 1, 0, GraphicsContextGL::RGBA, GraphicsContextGL::UNSIGNED_BYTE, buffer);
+        context->framebufferTexture2D(GraphicsContextGL::FRAMEBUFFER, GraphicsContextGL::COLOR_ATTACHMENT0 + i, GraphicsContextGL::TEXTURE_2D, color, 0);
+        if (context->checkFramebufferStatus(GraphicsContextGL::FRAMEBUFFER) != GraphicsContextGL::FRAMEBUFFER_COMPLETE) {
             ok = false;
             break;
         }
         if (supportsDepth) {
-            context->framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::DEPTH_ATTACHMENT, GraphicsContext3D::TEXTURE_2D, depth, 0);
-            if (context->checkFramebufferStatus(GraphicsContext3D::FRAMEBUFFER) != GraphicsContext3D::FRAMEBUFFER_COMPLETE) {
+            context->framebufferTexture2D(GraphicsContextGL::FRAMEBUFFER, GraphicsContextGL::DEPTH_ATTACHMENT, GraphicsContextGL::TEXTURE_2D, depth, 0);
+            if (context->checkFramebufferStatus(GraphicsContextGL::FRAMEBUFFER) != GraphicsContextGL::FRAMEBUFFER_COMPLETE) {
                 ok = false;
                 break;
             }
-            context->framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::DEPTH_ATTACHMENT, GraphicsContext3D::TEXTURE_2D, 0, 0);
+            context->framebufferTexture2D(GraphicsContextGL::FRAMEBUFFER, GraphicsContextGL::DEPTH_ATTACHMENT, GraphicsContextGL::TEXTURE_2D, 0, 0);
         }
         if (supportsDepthStencil) {
-            context->framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::DEPTH_ATTACHMENT, GraphicsContext3D::TEXTURE_2D, depthStencil, 0);
-            context->framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::STENCIL_ATTACHMENT, GraphicsContext3D::TEXTURE_2D, depthStencil, 0);
-            if (context->checkFramebufferStatus(GraphicsContext3D::FRAMEBUFFER) != GraphicsContext3D::FRAMEBUFFER_COMPLETE) {
+            context->framebufferTexture2D(GraphicsContextGL::FRAMEBUFFER, GraphicsContextGL::DEPTH_ATTACHMENT, GraphicsContextGL::TEXTURE_2D, depthStencil, 0);
+            context->framebufferTexture2D(GraphicsContextGL::FRAMEBUFFER, GraphicsContextGL::STENCIL_ATTACHMENT, GraphicsContextGL::TEXTURE_2D, depthStencil, 0);
+            if (context->checkFramebufferStatus(GraphicsContextGL::FRAMEBUFFER) != GraphicsContextGL::FRAMEBUFFER_COMPLETE) {
                 ok = false;
                 break;
             }
-            context->framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::DEPTH_ATTACHMENT, GraphicsContext3D::TEXTURE_2D, 0, 0);
-            context->framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::STENCIL_ATTACHMENT, GraphicsContext3D::TEXTURE_2D, 0, 0);
+            context->framebufferTexture2D(GraphicsContextGL::FRAMEBUFFER, GraphicsContextGL::DEPTH_ATTACHMENT, GraphicsContextGL::TEXTURE_2D, 0, 0);
+            context->framebufferTexture2D(GraphicsContextGL::FRAMEBUFFER, GraphicsContextGL::STENCIL_ATTACHMENT, GraphicsContextGL::TEXTURE_2D, 0, 0);
         }
     }
 
index fc0cde6..b9369f8 100644 (file)
@@ -28,7 +28,7 @@
 
 #if ENABLE(WEBGL)
 
-#include "Extensions3D.h"
+#include "ExtensionsGL.h"
 #include "WebGLContextGroup.h"
 #include "WebGLDrawBuffers.h"
 #include "WebGLRenderingContextBase.h"
@@ -51,9 +51,9 @@ namespace {
         bool isValid() const override;
         bool isInitialized() const override;
         void setInitialized() override;
-        void onDetached(GraphicsContext3D*) override;
-        void attach(GraphicsContext3D*, GC3Denum attachment) override;
-        void unattach(GraphicsContext3D*, GC3Denum attachment) override;
+        void onDetached(GraphicsContextGLOpenGL*) override;
+        void attach(GraphicsContextGLOpenGL*, GC3Denum attachment) override;
+        void unattach(GraphicsContextGLOpenGL*, GC3Denum attachment) override;
 
         WebGLRenderbufferAttachment() { };
 
@@ -111,26 +111,26 @@ namespace {
             m_renderbuffer->setInitialized();
     }
 
-    void WebGLRenderbufferAttachment::onDetached(GraphicsContext3D* context)
+    void WebGLRenderbufferAttachment::onDetached(GraphicsContextGLOpenGL* context)
     {
         m_renderbuffer->onDetached(context);
     }
 
-    void WebGLRenderbufferAttachment::attach(GraphicsContext3D* context, GC3Denum attachment)
+    void WebGLRenderbufferAttachment::attach(GraphicsContextGLOpenGL* context, GC3Denum attachment)
     {
         Platform3DObject object = objectOrZero(m_renderbuffer.get());
-        context->framebufferRenderbuffer(GraphicsContext3D::FRAMEBUFFER, attachment, GraphicsContext3D::RENDERBUFFER, object);
+        context->framebufferRenderbuffer(GraphicsContextGL::FRAMEBUFFER, attachment, GraphicsContextGL::RENDERBUFFER, object);
     }
 
-    void WebGLRenderbufferAttachment::unattach(GraphicsContext3D* context, GC3Denum attachment)
+    void WebGLRenderbufferAttachment::unattach(GraphicsContextGLOpenGL* context, GC3Denum attachment)
     {
 #if !USE(ANGLE)
-        if (attachment == GraphicsContext3D::DEPTH_STENCIL_ATTACHMENT) {
-            context->framebufferRenderbuffer(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::DEPTH_ATTACHMENT, GraphicsContext3D::RENDERBUFFER, 0);
-            context->framebufferRenderbuffer(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::STENCIL_ATTACHMENT, GraphicsContext3D::RENDERBUFFER, 0);
+        if (attachment == GraphicsContextGL::DEPTH_STENCIL_ATTACHMENT) {
+            context->framebufferRenderbuffer(GraphicsContextGL::FRAMEBUFFER, GraphicsContextGL::DEPTH_ATTACHMENT, GraphicsContextGL::RENDERBUFFER, 0);
+            context->framebufferRenderbuffer(GraphicsContextGL::FRAMEBUFFER, GraphicsContextGL::STENCIL_ATTACHMENT, GraphicsContextGL::RENDERBUFFER, 0);
         } else
 #endif
-            context->framebufferRenderbuffer(GraphicsContext3D::FRAMEBUFFER, attachment, GraphicsContext3D::RENDERBUFFER, 0);
+            context->framebufferRenderbuffer(GraphicsContextGL::FRAMEBUFFER, attachment, GraphicsContextGL::RENDERBUFFER, 0);
     }
 
     class WebGLTextureAttachment : public WebGLFramebuffer::WebGLAttachment {
@@ -147,9 +147,9 @@ namespace {
         bool isValid() const override;
         bool isInitialized() const override;
         void setInitialized() override;
-        void onDetached(GraphicsContext3D*) override;
-        void attach(GraphicsContext3D*, GC3Denum attachment) override;
-        void unattach(GraphicsContext3D*, GC3Denum attachment) override;
+        void onDetached(GraphicsContextGLOpenGL*) override;
+        void attach(GraphicsContextGLOpenGL*, GC3Denum attachment) override;
+        void unattach(GraphicsContextGLOpenGL*, GC3Denum attachment) override;
 
         WebGLTextureAttachment() { };
 
@@ -211,26 +211,26 @@ namespace {
         // Textures are assumed to be initialized.
     }
 
-    void WebGLTextureAttachment::onDetached(GraphicsContext3D* context)
+    void WebGLTextureAttachment::onDetached(GraphicsContextGLOpenGL* context)
     {
         m_texture->onDetached(context);
     }
 
-    void WebGLTextureAttachment::attach(GraphicsContext3D* context, GC3Denum attachment)
+    void WebGLTextureAttachment::attach(GraphicsContextGLOpenGL* context, GC3Denum attachment)
     {
         Platform3DObject object = objectOrZero(m_texture.get());
-        context->framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, attachment, m_target, object, m_level);
+        context->framebufferTexture2D(GraphicsContextGL::FRAMEBUFFER, attachment, m_target, object, m_level);
     }
 
-    void WebGLTextureAttachment::unattach(GraphicsContext3D* context, GC3Denum attachment)
+    void WebGLTextureAttachment::unattach(GraphicsContextGLOpenGL* context, GC3Denum attachment)
     {
 #if !USE(ANGLE)
-        if (attachment == GraphicsContext3D::DEPTH_STENCIL_ATTACHMENT) {
-            context->framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::DEPTH_ATTACHMENT, m_target, 0, m_level);
-            context->framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::STENCIL_ATTACHMENT, m_target, 0, m_level);
+        if (attachment == GraphicsContextGL::DEPTH_STENCIL_ATTACHMENT) {
+            context->framebufferTexture2D(GraphicsContextGL::FRAMEBUFFER, GraphicsContextGL::DEPTH_ATTACHMENT, m_target, 0, m_level);
+            context->framebufferTexture2D(GraphicsContextGL::FRAMEBUFFER, GraphicsContextGL::STENCIL_ATTACHMENT, m_target, 0, m_level);
         } else
 #endif
-            context->framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, attachment, m_target, 0, m_level);
+            context->framebufferTexture2D(GraphicsContextGL::FRAMEBUFFER, attachment, m_target, 0, m_level);
     }
 
     bool isAttachmentComplete(WebGLFramebuffer::WebGLAttachment* attachedObject, GC3Denum attachment, const char** reason)
@@ -238,8 +238,8 @@ namespace {
         ASSERT(attachedObject && attachedObject->isValid());
         ASSERT(reason);
         GC3Denum format = attachedObject->getFormat();
-        unsigned need = GraphicsContext3D::getClearBitsByAttachmentType(attachment);
-        unsigned have = GraphicsContext3D::getClearBitsByFormat(format);
+        unsigned need = GraphicsContextGLOpenGL::getClearBitsByAttachmentType(attachment);
+        unsigned have = GraphicsContextGLOpenGL::getClearBitsByFormat(format);
 
         if ((need & have) != need) {
             *reason = "attachment type is not correct for attachment";
@@ -249,8 +249,8 @@ namespace {
             *reason = "attachment has a 0 dimension";
             return false;
         }
-        if ((attachment == GraphicsContext3D::DEPTH_ATTACHMENT || attachment == GraphicsContext3D::STENCIL_ATTACHMENT)
-            && format == GraphicsContext3D::DEPTH_STENCIL) {
+        if ((attachment == GraphicsContextGL::DEPTH_ATTACHMENT || attachment == GraphicsContextGL::STENCIL_ATTACHMENT)
+            && format == GraphicsContextGL::DEPTH_STENCIL) {
           *reason = "attachment DEPTH_STENCIL not allowed on DEPTH or STENCIL attachment";
           return false;
         }
@@ -272,7 +272,7 @@ WebGLFramebuffer::WebGLFramebuffer(WebGLRenderingContextBase& ctx)
     : WebGLContextObject(ctx)
     , m_hasEverBeenBound(false)
 {
-    setObject(ctx.graphicsContext3D()->createFramebuffer());
+    setObject(ctx.graphicsContextGL()->createFramebuffer());
 }
 
 WebGLFramebuffer::~WebGLFramebuffer()
@@ -311,7 +311,7 @@ void WebGLFramebuffer::attach(GC3Denum attachment, GC3Denum attachmentPoint)
     ASSERT(isBound());
     RefPtr<WebGLAttachment> attachmentObject = getAttachment(attachment);
     if (attachmentObject)
-        attachmentObject->attach(context()->graphicsContext3D(), attachmentPoint);
+        attachmentObject->attach(context()->graphicsContextGL(), attachmentPoint);
 }
 
 WebGLSharedObject* WebGLFramebuffer::getAttachmentObject(GC3Denum attachment) const
@@ -336,20 +336,20 @@ void WebGLFramebuffer::removeAttachmentFromBoundFramebuffer(GC3Denum attachment)
 
     RefPtr<WebGLAttachment> attachmentObject = getAttachment(attachment);
     if (attachmentObject) {
-        attachmentObject->onDetached(context()->graphicsContext3D());
+        attachmentObject->onDetached(context()->graphicsContextGL());
         m_attachments.remove(attachment);
         drawBuffersIfNecessary(false);
 #if !USE(ANGLE)
         switch (attachment) {
-        case GraphicsContext3D::DEPTH_STENCIL_ATTACHMENT:
-            attach(GraphicsContext3D::DEPTH_ATTACHMENT, GraphicsContext3D::DEPTH_ATTACHMENT);
-            attach(GraphicsContext3D::STENCIL_ATTACHMENT, GraphicsContext3D::STENCIL_ATTACHMENT);
+        case GraphicsContextGL::DEPTH_STENCIL_ATTACHMENT:
+            attach(GraphicsContextGL::DEPTH_ATTACHMENT, GraphicsContextGL::DEPTH_ATTACHMENT);
+            attach(GraphicsContextGL::STENCIL_ATTACHMENT, GraphicsContextGL::STENCIL_ATTACHMENT);
             break;
-        case GraphicsContext3D::DEPTH_ATTACHMENT:
-            attach(GraphicsContext3D::DEPTH_STENCIL_ATTACHMENT, GraphicsContext3D::DEPTH_ATTACHMENT);
+        case GraphicsContextGL::DEPTH_ATTACHMENT:
+            attach(GraphicsContextGL::DEPTH_STENCIL_ATTACHMENT, GraphicsContextGL::DEPTH_ATTACHMENT);
             break;
-        case GraphicsContext3D::STENCIL_ATTACHMENT:
-            attach(GraphicsContext3D::DEPTH_STENCIL_ATTACHMENT, GraphicsContext3D::STENCIL_ATTACHMENT);
+        case GraphicsContextGL::STENCIL_ATTACHMENT:
+            attach(GraphicsContextGL::DEPTH_STENCIL_ATTACHMENT, GraphicsContextGL::STENCIL_ATTACHMENT);
             break;
         }
 #endif
@@ -371,7 +371,7 @@ void WebGLFramebuffer::removeAttachmentFromBoundFramebuffer(WebGLSharedObject* a
             RefPtr<WebGLAttachment> attachmentObject = entry.value.get();
             if (attachmentObject->isSharedObject(attachment)) {
                 GC3Denum attachmentType = entry.key;
-                attachmentObject->unattach(context()->graphicsContext3D(), attachmentType);
+                attachmentObject->unattach(context()->graphicsContextGL(), attachmentType);
                 removeAttachmentFromBoundFramebuffer(attachmentType);
                 checkMore = true;
                 break;
@@ -384,7 +384,7 @@ GC3Dsizei WebGLFramebuffer::getColorBufferWidth() const
 {
     if (!object())
         return 0;
-    RefPtr<WebGLAttachment> attachment = getAttachment(GraphicsContext3D::COLOR_ATTACHMENT0);
+    RefPtr<WebGLAttachment> attachment = getAttachment(GraphicsContextGL::COLOR_ATTACHMENT0);
     if (!attachment)
         return 0;
 
@@ -395,7 +395,7 @@ GC3Dsizei WebGLFramebuffer::getColorBufferHeight() const
 {
     if (!object())
         return 0;
-    RefPtr<WebGLAttachment> attachment = getAttachment(GraphicsContext3D::COLOR_ATTACHMENT0);
+    RefPtr<WebGLAttachment> attachment = getAttachment(GraphicsContextGL::COLOR_ATTACHMENT0);
     if (!attachment)
         return 0;
 
@@ -406,7 +406,7 @@ GC3Denum WebGLFramebuffer::getColorBufferFormat() const
 {
     if (!object())
         return 0;
-    RefPtr<WebGLAttachment> attachment = getAttachment(GraphicsContext3D::COLOR_ATTACHMENT0);
+    RefPtr<WebGLAttachment> attachment = getAttachment(GraphicsContextGL::COLOR_ATTACHMENT0);
     if (!attachment)
         return 0;
     return attachment->getFormat();
@@ -422,29 +422,29 @@ GC3Denum WebGLFramebuffer::checkStatus(const char** reason) const
     for (auto& entry : m_attachments) {
         RefPtr<WebGLAttachment> attachment = entry.value.get();
         if (!isAttachmentComplete(attachment.get(), entry.key, reason))
-            return GraphicsContext3D::FRAMEBUFFER_INCOMPLETE_ATTACHMENT;
+            return GraphicsContextGL::FRAMEBUFFER_INCOMPLETE_ATTACHMENT;
         if (!attachment->isValid()) {
             *reason = "attachment is not valid";
-            return GraphicsContext3D::FRAMEBUFFER_UNSUPPORTED;
+            return GraphicsContextGL::FRAMEBUFFER_UNSUPPORTED;
         }
         GC3Denum attachmentFormat = attachment->getFormat();
 
         // Attaching an SRGB_EXT format attachment to a framebuffer is invalid.
-        if (attachmentFormat == Extensions3D::SRGB_EXT)
+        if (attachmentFormat == ExtensionsGL::SRGB_EXT)
             attachmentFormat = 0;
 
         if (!attachmentFormat) {
             *reason = "attachment is an unsupported format";
-            return GraphicsContext3D::FRAMEBUFFER_INCOMPLETE_ATTACHMENT;
+            return GraphicsContextGL::FRAMEBUFFER_INCOMPLETE_ATTACHMENT;
         }
         switch (entry.key) {
-        case GraphicsContext3D::DEPTH_ATTACHMENT:
+        case GraphicsContextGL::DEPTH_ATTACHMENT:
             haveDepth = true;
             break;
-        case GraphicsContext3D::STENCIL_ATTACHMENT:
+        case GraphicsContextGL::STENCIL_ATTACHMENT:
             haveStencil = true;
             break;
-        case GraphicsContext3D::DEPTH_STENCIL_ATTACHMENT:
+        case GraphicsContextGL::DEPTH_STENCIL_ATTACHMENT:
             haveDepthStencil = true;
             break;
         }
@@ -454,43 +454,43 @@ GC3Denum WebGLFramebuffer::checkStatus(const char** reason) const
         } else {
             if (width != attachment->getWidth() || height != attachment->getHeight()) {
                 *reason = "attachments do not have the same dimensions";
-                return GraphicsContext3D::FRAMEBUFFER_INCOMPLETE_DIMENSIONS;
+                return GraphicsContextGL::FRAMEBUFFER_INCOMPLETE_DIMENSIONS;
             }
         }
         ++count;
     }
     if (!count) {
         *reason = "no attachments";
-        return GraphicsContext3D::FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT;
+        return GraphicsContextGL::FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT;
     }
     if (!width || !height) {
         *reason = "framebuffer has a 0 dimension";
-        return GraphicsContext3D::FRAMEBUFFER_INCOMPLETE_ATTACHMENT;
+        return GraphicsContextGL::FRAMEBUFFER_INCOMPLETE_ATTACHMENT;
     }
     // WebGL specific: no conflicting DEPTH/STENCIL/DEPTH_STENCIL attachments.
     if ((haveDepthStencil && (haveDepth || haveStencil)) || (haveDepth && haveStencil)) {
         *reason = "conflicting DEPTH/STENCIL/DEPTH_STENCIL attachments";
-        return GraphicsContext3D::FRAMEBUFFER_UNSUPPORTED;
+        return GraphicsContextGL::FRAMEBUFFER_UNSUPPORTED;
     }
-    return GraphicsContext3D::FRAMEBUFFER_COMPLETE;
+    return GraphicsContextGL::FRAMEBUFFER_COMPLETE;
 }
 
-bool WebGLFramebuffer::onAccess(GraphicsContext3D* context3d, const char** reason)
+bool WebGLFramebuffer::onAccess(GraphicsContextGLOpenGL* context3d, const char** reason)
 {
-    if (checkStatus(reason) != GraphicsContext3D::FRAMEBUFFER_COMPLETE)
+    if (checkStatus(reason) != GraphicsContextGL::FRAMEBUFFER_COMPLETE)
         return false;
     return initializeAttachments(context3d, reason);
 }
 
 bool WebGLFramebuffer::hasStencilBuffer() const
 {
-    RefPtr<WebGLAttachment> attachment = getAttachment(GraphicsContext3D::STENCIL_ATTACHMENT);
+    RefPtr<WebGLAttachment> attachment = getAttachment(GraphicsContextGL::STENCIL_ATTACHMENT);
     if (!attachment)
-        attachment = getAttachment(GraphicsContext3D::DEPTH_STENCIL_ATTACHMENT);
+        attachment = getAttachment(GraphicsContextGL::DEPTH_STENCIL_ATTACHMENT);
     return attachment && attachment->isValid();
 }
 
-void WebGLFramebuffer::deleteObjectImpl(GraphicsContext3D* context3d, Platform3DObject object)
+void WebGLFramebuffer::deleteObjectImpl(GraphicsContextGLOpenGL* context3d, Platform3DObject object)
 {
     for (auto& attachment : m_attachments.values())
         attachment->onDetached(context3d);
@@ -498,7 +498,7 @@ void WebGLFramebuffer::deleteObjectImpl(GraphicsContext3D* context3d, Platform3D
     context3d->deleteFramebuffer(object);
 }
 
-bool WebGLFramebuffer::initializeAttachments(GraphicsContext3D* g3d, const char** reason)
+bool WebGLFramebuffer::initializeAttachments(GraphicsContextGLOpenGL* g3d, const char** reason)
 {
     ASSERT(object());
     GC3Dbitfield mask = 0;
@@ -507,21 +507,21 @@ bool WebGLFramebuffer::initializeAttachments(GraphicsContext3D* g3d, const char*
         GC3Denum attachmentType = entry.key;
         RefPtr<WebGLAttachment> attachment = entry.value.get();
         if (!attachment->isInitialized())
-           mask |= GraphicsContext3D::getClearBitsByAttachmentType(attachmentType);
+            mask |= GraphicsContextGLOpenGL::getClearBitsByAttachmentType(attachmentType);
     }
     if (!mask)
         return true;
 
     // We only clear un-initialized renderbuffers when they are ready to be
     // read, i.e., when the framebuffer is complete.
-    if (g3d->checkFramebufferStatus(GraphicsContext3D::FRAMEBUFFER) != GraphicsContext3D::FRAMEBUFFER_COMPLETE) {
+    if (g3d->checkFramebufferStatus(GraphicsContextGL::FRAMEBUFFER) != GraphicsContextGL::FRAMEBUFFER_COMPLETE) {
         *reason = "framebuffer not complete";
         return false;
     }
 
-    bool initColor = mask & GraphicsContext3D::COLOR_BUFFER_BIT;
-    bool initDepth = mask & GraphicsContext3D::DEPTH_BUFFER_BIT;
-    bool initStencil = mask & GraphicsContext3D::STENCIL_BUFFER_BIT;
+    bool initColor = mask & GraphicsContextGL::COLOR_BUFFER_BIT;
+    bool initDepth = mask & GraphicsContextGL::DEPTH_BUFFER_BIT;
+    bool initStencil = mask & GraphicsContextGL::STENCIL_BUFFER_BIT;
 
     GC3Dfloat colorClearValue[] = {0, 0, 0, 0}, depthClearValue = 0;
     GC3Dint stencilClearValue = 0;
@@ -530,27 +530,27 @@ bool WebGLFramebuffer::initializeAttachments(GraphicsContext3D* g3d, const char*
     GC3Dboolean isScissorEnabled = 0;
     GC3Dboolean isDitherEnabled = 0;
     if (initColor) {
-        g3d->getFloatv(GraphicsContext3D::COLOR_CLEAR_VALUE, colorClearValue);
-        g3d->getBooleanv(GraphicsContext3D::COLOR_WRITEMASK, colorMask);
+        g3d->getFloatv(GraphicsContextGL::COLOR_CLEAR_VALUE, colorClearValue);
+        g3d->getBooleanv(GraphicsContextGL::COLOR_WRITEMASK, colorMask);
         g3d->clearColor(0, 0, 0, 0);
         g3d->colorMask(true, true, true, true);
     }
     if (initDepth) {
-        g3d->getFloatv(GraphicsContext3D::DEPTH_CLEAR_VALUE, &depthClearValue);
-        g3d->getBooleanv(GraphicsContext3D::DEPTH_WRITEMASK, &depthMask);
+        g3d->getFloatv(GraphicsContextGL::DEPTH_CLEAR_VALUE, &depthClearValue);
+        g3d->getBooleanv(GraphicsContextGL::DEPTH_WRITEMASK, &depthMask);
         g3d->clearDepth(1.0f);
         g3d->depthMask(true);
     }
     if (initStencil) {
-        g3d->getIntegerv(GraphicsContext3D::STENCIL_CLEAR_VALUE, &stencilClearValue);
-        g3d->getIntegerv(GraphicsContext3D::STENCIL_WRITEMASK, reinterpret_cast<GC3Dint*>(&stencilMask));
+        g3d->getIntegerv(GraphicsContextGL::STENCIL_CLEAR_VALUE, &stencilClearValue);
+        g3d->getIntegerv(GraphicsContextGL::STENCIL_WRITEMASK, reinterpret_cast<GC3Dint*>(&stencilMask));
         g3d->clearStencil(0);
         g3d->stencilMask(0xffffffff);
     }
-    isScissorEnabled = g3d->isEnabled(GraphicsContext3D::SCISSOR_TEST);
-    g3d->disable(GraphicsContext3D::SCISSOR_TEST);
-    isDitherEnabled = g3d->isEnabled(GraphicsContext3D::DITHER);
-    g3d->disable(GraphicsContext3D::DITHER);
+    isScissorEnabled = g3d->isEnabled(GraphicsContextGL::SCISSOR_TEST);
+    g3d->disable(GraphicsContextGL::SCISSOR_TEST);
+    isDitherEnabled = g3d->isEnabled(GraphicsContextGL::DITHER);
+    g3d->disable(GraphicsContextGL::DITHER);
 
     g3d->clear(mask);
 
@@ -567,18 +567,18 @@ bool WebGLFramebuffer::initializeAttachments(GraphicsContext3D* g3d, const char*
         g3d->stencilMask(stencilMask);
     }
     if (isScissorEnabled)
-        g3d->enable(GraphicsContext3D::SCISSOR_TEST);
+        g3d->enable(GraphicsContextGL::SCISSOR_TEST);
     else
-        g3d->disable(GraphicsContext3D::SCISSOR_TEST);
+        g3d->disable(GraphicsContextGL::SCISSOR_TEST);
     if (isDitherEnabled)
-        g3d->enable(GraphicsContext3D::DITHER);
+        g3d->enable(GraphicsContextGL::DITHER);
     else
-        g3d->disable(GraphicsContext3D::DITHER);
+        g3d->disable(GraphicsContextGL::DITHER);
 
     for (AttachmentMap::iterator it = m_attachments.begin(); it != m_attachments.end(); ++it) {
         GC3Denum attachmentType = it->key;
         auto attachment = it->value;
-        GC3Dbitfield bits = GraphicsContext3D::getClearBitsByAttachmentType(attachmentType);
+        GC3Dbitfield bits = GraphicsContextGLOpenGL::getClearBitsByAttachmentType(attachmentType);
         if (bits & mask)
             attachment->setInitialized();
     }
@@ -595,7 +595,7 @@ void WebGLFramebuffer::drawBuffers(const Vector<GC3Denum>& bufs)
     m_drawBuffers = bufs;
     m_filteredDrawBuffers.resize(m_drawBuffers.size());
     for (auto& buffer : m_filteredDrawBuffers)
-        buffer = GraphicsContext3D::NONE;
+        buffer = GraphicsContextGL::NONE;
     drawBuffersIfNecessary(true);
 }
 
@@ -611,33 +611,33 @@ void WebGLFramebuffer::drawBuffersIfNecessary(bool force)
     bool reset = force;
     // This filtering works around graphics driver bugs on Mac OS X.
     for (size_t i = 0; i < m_drawBuffers.size(); ++i) {
-        if (m_drawBuffers[i] != GraphicsContext3D::NONE && getAttachment(m_drawBuffers[i])) {
+        if (m_drawBuffers[i] != GraphicsContextGL::NONE && getAttachment(m_drawBuffers[i])) {
             if (m_filteredDrawBuffers[i] != m_drawBuffers[i]) {
                 m_filteredDrawBuffers[i] = m_drawBuffers[i];
                 reset = true;
             }
         } else {
-            if (m_filteredDrawBuffers[i] != GraphicsContext3D::NONE) {
-                m_filteredDrawBuffers[i] = GraphicsContext3D::NONE;
+            if (m_filteredDrawBuffers[i] != GraphicsContextGL::NONE) {
+                m_filteredDrawBuffers[i] = GraphicsContextGL::NONE;
                 reset = true;
             }
         }
     }
     if (reset) {
-        context()->graphicsContext3D()->getExtensions().drawBuffersEXT(
+        context()->graphicsContextGL()->getExtensions().drawBuffersEXT(
             m_filteredDrawBuffers.size(), m_filteredDrawBuffers.data());
     }
 }
 
 GC3Denum WebGLFramebuffer::getDrawBuffer(GC3Denum drawBuffer)
 {
-    int index = static_cast<int>(drawBuffer - Extensions3D::DRAW_BUFFER0_EXT);
+    int index = static_cast<int>(drawBuffer - ExtensionsGL::DRAW_BUFFER0_EXT);
     ASSERT(index >= 0);
     if (index < static_cast<int>(m_drawBuffers.size()))
         return m_drawBuffers[index];
-    if (drawBuffer == Extensions3D::DRAW_BUFFER0_EXT)
-        return GraphicsContext3D::COLOR_ATTACHMENT0;
-    return GraphicsContext3D::NONE;
+    if (drawBuffer == ExtensionsGL::DRAW_BUFFER0_EXT)
+        return GraphicsContextGL::COLOR_ATTACHMENT0;
+    return GraphicsContextGL::NONE;
 }
 
 }
index ee0a943..8b4b95a 100644 (file)
@@ -52,9 +52,9 @@ public:
         virtual bool isValid() const = 0;
         virtual bool isInitialized() const = 0;
         virtual void setInitialized() = 0;
-        virtual void onDetached(GraphicsContext3D*) = 0;
-        virtual void attach(GraphicsContext3D*, GC3Denum attachment) = 0;
-        virtual void unattach(GraphicsContext3D*, GC3Denum attachment) = 0;
+        virtual void onDetached(GraphicsContextGLOpenGL*) = 0;
+        virtual void attach(GraphicsContextGLOpenGL*, GC3Denum attachment) = 0;
+        virtual void unattach(GraphicsContextGLOpenGL*, GC3Denum attachment) = 0;
 
     protected:
         WebGLAttachment();
@@ -82,7 +82,7 @@ public:
     // Return false if the framebuffer is incomplete; otherwise initialize
     // the buffers if they haven't been initialized and
     // needToInitializeAttachments is true.
-    bool onAccess(GraphicsContext3D*, const char** reason);
+    bool onAccess(GraphicsContextGLOpenGL*, const char** reason);
 
     // Software version of glCheckFramebufferStatus(), except that when
     // FRAMEBUFFER_COMPLETE is returned, it is still possible for
@@ -104,13 +104,13 @@ public:
 protected:
     WebGLFramebuffer(WebGLRenderingContextBase&);
 
-    void deleteObjectImpl(GraphicsContext3D*, Platform3DObject) override;
+    void deleteObjectImpl(GraphicsContextGLOpenGL*, Platform3DObject) override;
 
 private:
     WebGLAttachment* getAttachment(GC3Denum) const;
 
     // Return false if framebuffer is incomplete.
-    bool initializeAttachments(GraphicsContext3D*, const char** reason);
+    bool initializeAttachments(GraphicsContextGLOpenGL*, const char** reason);
 
     // Check if the framebuffer is currently bound.
     bool isBound() const;
index 48f939e..af2849c 100644 (file)
@@ -44,7 +44,7 @@ void WebGLObject::setObject(Platform3DObject object)
     m_object = object;
 }
 
-void WebGLObject::deleteObject(GraphicsContext3D* context3d)
+void WebGLObject::deleteObject(GraphicsContextGLOpenGL* context3d)
 {
     m_deleted = true;
     if (!m_object)
@@ -55,7 +55,7 @@ void WebGLObject::deleteObject(GraphicsContext3D* context3d)
 
     if (!m_attachmentCount) {
         if (!context3d)
-            context3d = getAGraphicsContext3D();
+            context3d = getAGraphicsContextGL();
 
         if (context3d)
             deleteObjectImpl(context3d, m_object);
@@ -69,7 +69,7 @@ void WebGLObject::detach()
     m_attachmentCount = 0; // Make sure OpenGL resource is deleted.
 }
 
-void WebGLObject::onDetached(GraphicsContext3D* context3d)
+void WebGLObject::onDetached(GraphicsContextGLOpenGL* context3d)
 {
     if (m_attachmentCount)
         --m_attachmentCount;
index 0da5d71..4924ff8 100644 (file)
@@ -32,7 +32,7 @@
 
 namespace WebCore {
 
-class GraphicsContext3D;
+class GraphicsContextGLOpenGL;
 class WebGLContextGroup;
 class WebGLRenderingContextBase;
 
@@ -45,10 +45,10 @@ public:
     // deleteObject may not always delete the OpenGL resource.  For programs and
     // shaders, deletion is delayed until they are no longer attached.
     // FIXME: revisit this when resource sharing between contexts are implemented.
-    void deleteObject(GraphicsContext3D*);
+    void deleteObject(GraphicsContextGLOpenGL*);
 
     void onAttached() { ++m_attachmentCount; }
-    void onDetached(GraphicsContext3D*);
+    void onDetached(GraphicsContextGLOpenGL*);
 
     // This indicates whether the client side issue a delete call already, not
     // whether the OpenGL resource is deleted.
@@ -65,13 +65,13 @@ protected:
     void setObject(Platform3DObject);
 
     // deleteObjectImpl should be only called once to delete the OpenGL resource.
-    virtual void deleteObjectImpl(GraphicsContext3D*, Platform3DObject) = 0;
+    virtual void deleteObjectImpl(GraphicsContextGLOpenGL*, Platform3DObject) = 0;
 
     virtual bool hasGroupOrContext() const = 0;
 
     virtual void detach();
 
-    virtual GraphicsContext3D* getAGraphicsContext3D() const = 0;
+    virtual GraphicsContextGLOpenGL* getAGraphicsContextGL() const = 0;
 
 private:
     Platform3DObject m_object { 0 };
index deeac75..3efeffb 100644 (file)
@@ -70,7 +70,7 @@ WebGLProgram::WebGLProgram(WebGLRenderingContextBase& ctx)
         instances(lock).add(this, &ctx);
     }
 
-    setObject(ctx.graphicsContext3D()->createProgram());
+    setObject(ctx.graphicsContextGL()->createProgram());
 }
 
 WebGLProgram::~WebGLProgram()
@@ -93,7 +93,7 @@ void WebGLProgram::contextDestroyed()
     ContextDestructionObserver::contextDestroyed();
 }
 
-void WebGLProgram::deleteObjectImpl(GraphicsContext3D* context3d, Platform3DObject obj)
+void WebGLProgram::deleteObjectImpl(GraphicsContextGLOpenGL* context3d, Platform3DObject obj)
 {
     context3d->deleteProgram(obj);
     if (m_vertexShader) {
@@ -151,9 +151,9 @@ void WebGLProgram::increaseLinkCount()
 WebGLShader* WebGLProgram::getAttachedShader(GC3Denum type)
 {
     switch (type) {
-    case GraphicsContext3D::VERTEX_SHADER:
+    case GraphicsContextGL::VERTEX_SHADER:
         return m_vertexShader.get();
-    case GraphicsContext3D::FRAGMENT_SHADER:
+    case GraphicsContextGL::FRAGMENT_SHADER:
         return m_fragmentShader.get();
     default:
         return 0;
@@ -165,12 +165,12 @@ bool WebGLProgram::attachShader(WebGLShader* shader)
     if (!shader || !shader->object())
         return false;
     switch (shader->getType()) {
-    case GraphicsContext3D::VERTEX_SHADER:
+    case GraphicsContextGL::VERTEX_SHADER:
         if (m_vertexShader)
             return false;
         m_vertexShader = shader;
         return true;
-    case GraphicsContext3D::FRAGMENT_SHADER:
+    case GraphicsContextGL::FRAGMENT_SHADER:
         if (m_fragmentShader)
             return false;
         m_fragmentShader = shader;
@@ -185,12 +185,12 @@ bool WebGLProgram::detachShader(WebGLShader* shader)
     if (!shader || !shader->object())
         return false;
     switch (shader->getType()) {
-    case GraphicsContext3D::VERTEX_SHADER:
+    case GraphicsContextGL::VERTEX_SHADER:
         if (m_vertexShader != shader)
             return false;
         m_vertexShader = nullptr;
         return true;
-    case GraphicsContext3D::FRAGMENT_SHADER:
+    case GraphicsContextGL::FRAGMENT_SHADER:
         if (m_fragmentShader != shader)
             return false;
         m_fragmentShader = nullptr;
@@ -200,15 +200,15 @@ bool WebGLProgram::detachShader(WebGLShader* shader)
     }
 }
 
-void WebGLProgram::cacheActiveAttribLocations(GraphicsContext3D* context3d)
+void WebGLProgram::cacheActiveAttribLocations(GraphicsContextGLOpenGL* context3d)
 {
     m_activeAttribLocations.clear();
 
     GC3Dint numAttribs = 0;
-    context3d->getProgramiv(object(), GraphicsContext3D::ACTIVE_ATTRIBUTES, &numAttribs);
+    context3d->getProgramiv(object(), GraphicsContextGL::ACTIVE_ATTRIBUTES, &numAttribs);
     m_activeAttribLocations.resize(static_cast<size_t>(numAttribs));
     for (int i = 0; i < numAttribs; ++i) {
-        GraphicsContext3D::ActiveInfo info;
+        GraphicsContextGL::ActiveInfo info;
         context3d->getActiveAttribImpl(object(), i, info);
         m_activeAttribLocations[i] = context3d->getAttribLocation(object(), info.name);
     }
@@ -222,11 +222,11 @@ void WebGLProgram::cacheInfoIfNeeded()
     if (!object())
         return;
 
-    GraphicsContext3D* context = getAGraphicsContext3D();
+    GraphicsContextGLOpenGL* context = getAGraphicsContextGL();
     if (!context)
         return;
     GC3Dint linkStatus = 0;
-    context->getProgramiv(object(), GraphicsContext3D::LINK_STATUS, &linkStatus);
+    context->getProgramiv(object(), GraphicsContextGL::LINK_STATUS, &linkStatus);
     m_linkStatus = linkStatus;
     if (m_linkStatus)
         cacheActiveAttribLocations(context);
index 3e082fc..89b460c 100644 (file)
@@ -73,10 +73,10 @@ public:
 protected:
     WebGLProgram(WebGLRenderingContextBase&);
 
-    void deleteObjectImpl(GraphicsContext3D*, Platform3DObject) override;
+    void deleteObjectImpl(GraphicsContextGLOpenGL*, Platform3DObject) override;
 
 private:
-    void cacheActiveAttribLocations(GraphicsContext3D*);
+    void cacheActiveAttribLocations(GraphicsContextGLOpenGL*);
     void cacheInfoIfNeeded();
 
     Vector<GC3Dint> m_activeAttribLocations;
index 8ca5251..cb64452 100644 (file)
@@ -46,14 +46,14 @@ WebGLQuery::~WebGLQuery()
 WebGLQuery::WebGLQuery(WebGLRenderingContextBase& ctx)
     : WebGLSharedObject(ctx)
 {
-    // FIXME: Call createQuery from GraphicsContext3D.
+    // FIXME: Call createQuery from GraphicsContextGLOpenGL.
 }
 
-void WebGLQuery::deleteObjectImpl(GraphicsContext3D* context3d, Platform3DObject object)
+void WebGLQuery::deleteObjectImpl(GraphicsContextGLOpenGL* context3d, Platform3DObject object)
 {
     UNUSED_PARAM(context3d);
     UNUSED_PARAM(object);
-    // FIXME: Call deleteQuery from GraphicsContext3D.
+    // FIXME: Call deleteQuery from GraphicsContextGLOpenGL.
 }
 
 }
index fd644d2..087c041 100644 (file)
@@ -38,7 +38,7 @@ public:
 
 protected:
     explicit WebGLQuery(WebGLRenderingContextBase&);
-    void deleteObjectImpl(GraphicsContext3D*, Platform3DObject) override;
+    void deleteObjectImpl(GraphicsContextGLOpenGL*, Platform3DObject) override;
 };
 
 } // namespace WebCore
index 6996d9b..06ee07b 100644 (file)
@@ -46,17 +46,17 @@ WebGLRenderbuffer::~WebGLRenderbuffer()
 
 WebGLRenderbuffer::WebGLRenderbuffer(WebGLRenderingContextBase& ctx)
     : WebGLSharedObject(ctx)
-    , m_internalFormat(GraphicsContext3D::RGBA4)
+    , m_internalFormat(GraphicsContextGL::RGBA4)
     , m_initialized(false)
     , m_width(0)
     , m_height(0)
     , m_isValid(true)
     , m_hasEverBeenBound(false)
 {
-    setObject(ctx.graphicsContext3D()->createRenderbuffer());
+    setObject(ctx.graphicsContextGL()->createRenderbuffer());
 }
 
-void WebGLRenderbuffer::deleteObjectImpl(GraphicsContext3D* context3d, Platform3DObject object)
+void WebGLRenderbuffer::deleteObjectImpl(GraphicsContextGLOpenGL* context3d, Platform3DObject object)
 {
     context3d->deleteRenderbuffer(object);
 }
index 37a938e..c28027e 100644 (file)
@@ -65,7 +65,7 @@ public:
 protected:
     WebGLRenderbuffer(WebGLRenderingContextBase&);
 
-    void deleteObjectImpl(GraphicsContext3D*, Platform3DObject) override;
+    void deleteObjectImpl(GraphicsContextGLOpenGL*, Platform3DObject) override;
 
 private:
     bool isRenderbuffer() const override { return true; }
index 3a50ffc..2843d46 100644 (file)
@@ -35,7 +35,7 @@
 #include "EXTShaderTextureLOD.h"
 #include "EXTTextureFilterAnisotropic.h"
 #include "EXTsRGB.h"
-#include "Extensions3D.h"
+#include "ExtensionsGL.h"
 #include "HTMLCanvasElement.h"
 #include "HTMLImageElement.h"
 #include "HTMLVideoElement.h"
@@ -72,7 +72,7 @@ namespace WebCore {
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(WebGLRenderingContext);
 
-std::unique_ptr<WebGLRenderingContext> WebGLRenderingContext::create(CanvasBase& canvas, GraphicsContext3DAttributes attributes)
+std::unique_ptr<WebGLRenderingContext> WebGLRenderingContext::create(CanvasBase& canvas, GraphicsContextGLAttributes attributes)
 {
     auto renderingContext = std::unique_ptr<WebGLRenderingContext>(new WebGLRenderingContext(canvas, attributes));
 
@@ -81,7 +81,7 @@ std::unique_ptr<WebGLRenderingContext> WebGLRenderingContext::create(CanvasBase&
     return renderingContext;
 }
 
-std::unique_ptr<WebGLRenderingContext> WebGLRenderingContext::create(CanvasBase& canvas, Ref<GraphicsContext3D>&& context, GraphicsContext3DAttributes attributes)
+std::unique_ptr<WebGLRenderingContext> WebGLRenderingContext::create(CanvasBase& canvas, Ref<GraphicsContextGLOpenGL>&& context, GraphicsContextGLAttributes attributes)
 {
     auto renderingContext = std::unique_ptr<WebGLRenderingContext>(new WebGLRenderingContext(canvas, WTFMove(context), attributes));
 
@@ -90,12 +90,12 @@ std::unique_ptr<WebGLRenderingContext> WebGLRenderingContext::create(CanvasBase&
     return renderingContext;
 }
 
-WebGLRenderingContext::WebGLRenderingContext(CanvasBase& canvas, GraphicsContext3DAttributes attributes)
+WebGLRenderingContext::WebGLRenderingContext(CanvasBase& canvas, GraphicsContextGLAttributes attributes)
     : WebGLRenderingContextBase(canvas, attributes)
 {
 }
 
-WebGLRenderingContext::WebGLRenderingContext(CanvasBase& canvas, Ref<GraphicsContext3D>&& context, GraphicsContext3DAttributes attributes)
+WebGLRenderingContext::WebGLRenderingContext(CanvasBase& canvas, Ref<GraphicsContextGLOpenGL>&& context, GraphicsContextGLAttributes attributes)
     : WebGLRenderingContextBase(canvas, WTFMove(context), attributes)
 {
     initializeVertexArrayObjects();
@@ -251,58 +251,58 @@ WebGLAny WebGLRenderingContext::getFramebufferAttachmentParameter(GC3Denum targe
         return nullptr;
     
     if (!m_framebufferBinding || !m_framebufferBinding->object()) {
-        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "getFramebufferAttachmentParameter", "no framebuffer bound");
+        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "getFramebufferAttachmentParameter", "no framebuffer bound");
         return nullptr;
     }
     
     auto object = makeRefPtr(m_framebufferBinding->getAttachmentObject(attachment));
     if (!object) {
-        if (pname == GraphicsContext3D::FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE)
-            return static_cast<unsigned>(GraphicsContext3D::NONE);
+        if (pname == GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE)
+            return static_cast<unsigned>(GraphicsContextGL::NONE);
         // OpenGL ES 2.0 specifies INVALID_ENUM in this case, while desktop GL
         // specifies INVALID_OPERATION.
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "getFramebufferAttachmentParameter", "invalid parameter name");
+        synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "getFramebufferAttachmentParameter", "invalid parameter name");
         return nullptr;
     }
     
     if (object->isTexture()) {
         switch (pname) {
-        case GraphicsContext3D::FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:
-            return static_cast<unsigned>(GraphicsContext3D::TEXTURE);
-        case GraphicsContext3D::FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:
+        case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:
+            return static_cast<unsigned>(GraphicsContextGL::TEXTURE);
+        case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:
             return makeRefPtr(reinterpret_cast<WebGLTexture&>(*object));
-        case GraphicsContext3D::FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:
-        case GraphicsContext3D::FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:
-        case Extensions3D::FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT: {
+        case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:
+        case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:
+        case ExtensionsGL::FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT: {
             GC3Dint value = 0;
             m_context->getFramebufferAttachmentParameteriv(target, attachment, pname, &value);
             return value;
         }
         default:
-            synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "getFramebufferAttachmentParameter", "invalid parameter name for texture attachment");
+            synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "getFramebufferAttachmentParameter", "invalid parameter name for texture attachment");
             return nullptr;
         }
     } else {
         ASSERT(object->isRenderbuffer());
         switch (pname) {
-        case GraphicsContext3D::FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:
-            return static_cast<unsigned>(GraphicsContext3D::RENDERBUFFER);
-        case GraphicsContext3D::FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:
+        case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:
+            return static_cast<unsigned>(GraphicsContextGL::RENDERBUFFER);
+        case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:
             return makeRefPtr(reinterpret_cast<WebGLRenderbuffer&>(*object));
-        case Extensions3D::FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT: {
+        case ExtensionsGL::FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT: {
             if (!m_extsRGB) {
-                synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "getFramebufferAttachmentParameter", "invalid parameter name for renderbuffer attachment");
+                synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "getFramebufferAttachmentParameter", "invalid parameter name for renderbuffer attachment");
                 return nullptr;
             }
             RefPtr<WebGLRenderbuffer> renderBuffer = reinterpret_cast<WebGLRenderbuffer*>(object.get());
             GC3Denum renderBufferFormat = renderBuffer->getInternalFormat();
-            ASSERT(renderBufferFormat != Extensions3D::SRGB_EXT && renderBufferFormat != Extensions3D::SRGB_ALPHA_EXT);
-            if (renderBufferFormat == Extensions3D::SRGB8_ALPHA8_EXT)
-                return static_cast<unsigned>(Extensions3D::SRGB_EXT);
-            return static_cast<unsigned>(GraphicsContext3D::LINEAR);
+            ASSERT(renderBufferFormat != ExtensionsGL::SRGB_EXT && renderBufferFormat != ExtensionsGL::SRGB_ALPHA_EXT);
+            if (renderBufferFormat == ExtensionsGL::SRGB8_ALPHA8_EXT)
+                return static_cast<unsigned>(ExtensionsGL::SRGB_EXT);
+            return static_cast<unsigned>(GraphicsContextGL::LINEAR);
         }
         default:
-            synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "getFramebufferAttachmentParameter", "invalid parameter name for renderbuffer attachment");
+            synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "getFramebufferAttachmentParameter", "invalid parameter name for renderbuffer attachment");
             return nullptr;
         }
     }
@@ -310,24 +310,24 @@ WebGLAny WebGLRenderingContext::getFramebufferAttachmentParameter(GC3Denum targe
 
 bool WebGLRenderingContext::validateFramebufferFuncParameters(const char* functionName, GC3Denum target, GC3Denum attachment)
 {
-    if (target != GraphicsContext3D::FRAMEBUFFER) {
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, functionName, "invalid target");
+    if (target != GraphicsContextGL::FRAMEBUFFER) {
+        synthesizeGLError(GraphicsContextGL::INVALID_ENUM, functionName, "invalid target");
         return false;
     }
     // FIXME: Why does this return true unconditionally for COLOR_ATTACHMENT0,
     // but false for other COLOR_ATTACHMENT values if m_webglDrawBuffers is false?
     switch (attachment) {
-    case GraphicsContext3D::COLOR_ATTACHMENT0:
-    case GraphicsContext3D::DEPTH_ATTACHMENT:
-    case GraphicsContext3D::STENCIL_ATTACHMENT:
-    case GraphicsContext3D::DEPTH_STENCIL_ATTACHMENT:
+    case GraphicsContextGL::COLOR_ATTACHMENT0:
+    case GraphicsContextGL::DEPTH_ATTACHMENT:
+    case GraphicsContextGL::STENCIL_ATTACHMENT:
+    case GraphicsContextGL::DEPTH_STENCIL_ATTACHMENT:
         return true;
     default:
         if (m_webglDrawBuffers
-            && attachment >= GraphicsContext3D::COLOR_ATTACHMENT0
-            && attachment < static_cast<GC3Denum>(GraphicsContext3D::COLOR_ATTACHMENT0 + getMaxColorAttachments()))
+            && attachment >= GraphicsContextGL::COLOR_ATTACHMENT0
+            && attachment < static_cast<GC3Denum>(GraphicsContextGL::COLOR_ATTACHMENT0 + getMaxColorAttachments()))
             return true;
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, functionName, "invalid attachment");
+        synthesizeGLError(GraphicsContextGL::INVALID_ENUM, functionName, "invalid attachment");
         return false;
     }
 }
@@ -336,25 +336,25 @@ void WebGLRenderingContext::renderbufferStorage(GC3Denum target, GC3Denum intern
 {
     if (isContextLostOrPending())
         return;
-    if (target != GraphicsContext3D::RENDERBUFFER) {
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "renderbufferStorage", "invalid target");
+    if (target != GraphicsContextGL::RENDERBUFFER) {
+        synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "renderbufferStorage", "invalid target");
         return;
     }
     if (!m_renderbufferBinding || !m_renderbufferBinding->object()) {
-        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "renderbufferStorage", "no bound renderbuffer");
+        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "renderbufferStorage", "no bound renderbuffer");
         return;
     }
     if (!validateSize("renderbufferStorage", width, height))
         return;
     switch (internalformat) {
-    case GraphicsContext3D::DEPTH_COMPONENT16:
-    case GraphicsContext3D::RGBA4:
-    case GraphicsContext3D::RGB5_A1:
-    case GraphicsContext3D::RGB565:
-    case GraphicsContext3D::STENCIL_INDEX8:
-    case Extensions3D::SRGB8_ALPHA8_EXT:
-        if (internalformat == Extensions3D::SRGB8_ALPHA8_EXT && !m_extsRGB) {
-            synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "renderbufferStorage", "invalid internalformat");
+    case GraphicsContextGL::DEPTH_COMPONENT16:
+    case GraphicsContextGL::RGBA4:
+    case GraphicsContextGL::RGB5_A1:
+    case GraphicsContextGL::RGB565:
+    case GraphicsContextGL::STENCIL_INDEX8:
+    case ExtensionsGL::SRGB8_ALPHA8_EXT:
+        if (internalformat == ExtensionsGL::SRGB8_ALPHA8_EXT && !m_extsRGB) {
+            synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "renderbufferStorage", "invalid internalformat");
             return;
         }
         m_context->renderbufferStorage(target, internalformat, width, height);
@@ -362,15 +362,15 @@ void WebGLRenderingContext::renderbufferStorage(GC3Denum target, GC3Denum intern
         m_renderbufferBinding->setIsValid(true);
         m_renderbufferBinding->setSize(width, height);
         break;
-    case GraphicsContext3D::DEPTH_STENCIL:
+    case GraphicsContextGL::DEPTH_STENCIL:
         if (isDepthStencilSupported())
-            m_context->renderbufferStorage(target, Extensions3D::DEPTH24_STENCIL8, width, height);
+            m_context->renderbufferStorage(target, ExtensionsGL::DEPTH24_STENCIL8, width, height);
         m_renderbufferBinding->setSize(width, height);
         m_renderbufferBinding->setIsValid(isDepthStencilSupported());
         m_renderbufferBinding->setInternalFormat(internalformat);
         break;
     default:
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "renderbufferStorage", "invalid internalformat");
+        synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "renderbufferStorage", "invalid internalformat");
         return;
     }
     applyStencilTest();
@@ -382,16 +382,16 @@ void WebGLRenderingContext::hint(GC3Denum target, GC3Denum mode)
         return;
     bool isValid = false;
     switch (target) {
-    case GraphicsContext3D::GENERATE_MIPMAP_HINT:
+    case GraphicsContextGL::GENERATE_MIPMAP_HINT:
         isValid = true;
         break;
-    case Extensions3D::FRAGMENT_SHADER_DERIVATIVE_HINT_OES: // OES_standard_derivatives
+    case ExtensionsGL::FRAGMENT_SHADER_DERIVATIVE_HINT_OES: // OES_standard_derivatives
         if (m_oesStandardDerivatives)
             isValid = true;
         break;
     }
     if (!isValid) {
-        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "hint", "invalid target");
+        synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "hint", "invalid target");
         return;
     }
     m_context->hint(target, mode);
@@ -401,13 +401,13 @@ void WebGLRenderingContext::clear(GC3Dbitfield mask)
 {
     if (isContextLostOrPending())
         return;
-    if (mask & ~(GraphicsContext3D::COLOR_BUFFER_BIT | GraphicsContext3D::DEPTH_BUFFER_BIT | GraphicsContext3D::STENCIL_BUFFER_BIT)) {
-        synthesizeGLError(GraphicsContext3D::INVALID_VALUE, "clear", "invalid mask");
+    if (mask & ~(GraphicsContextGL::COLOR_BUFFER_BIT | GraphicsContextGL::DEPTH_BUFFER_BIT | GraphicsContextGL::STENCIL_BUFFER_BIT)) {
+        synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "clear", "invalid mask");
         return;
     }
     const char* reason = "framebuffer incomplete";
     if (m_framebufferBinding && !m_framebufferBinding->onAccess(m_context.get(), &reason)) {
-        synthesizeGLError(GraphicsContext3D::INVALID_FRAMEBUFFER_OPERATION, "clear", reason);
+        synthesizeGLError(GraphicsContextGL::INVALID_FRAMEBUFFER_OPERATION, "clear", reason);
         return;
     }
     if (!clearIfComposited(mask))
@@ -421,243 +421,243 @@ WebGLAny WebGLRenderingContext::getParameter(GC3Denum pname)
         return nullptr;
 
     switch (pname) {
-    case GraphicsContext3D::ACTIVE_TEXTURE:
+    case GraphicsContextGL::ACTIVE_TEXTURE:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::ALIASED_LINE_WIDTH_RANGE:
+    case GraphicsContextGL::ALIASED_LINE_WIDTH_RANGE:
         return getWebGLFloatArrayParameter(pname);
-    case GraphicsContext3D::ALIASED_POINT_SIZE_RANGE:
+    case GraphicsContextGL::ALIASED_POINT_SIZE_RANGE:
         return getWebGLFloatArrayParameter(pname);
-    case GraphicsContext3D::ALPHA_BITS:
+    case GraphicsContextGL::ALPHA_BITS:
         if (!m_framebufferBinding && !m_attributes.alpha)
             return 0;
         return getIntParameter(pname);
-    case GraphicsContext3D::ARRAY_BUFFER_BINDING:
+    case GraphicsContextGL::ARRAY_BUFFER_BINDING:
         return m_boundArrayBuffer;
-    case GraphicsContext3D::BLEND:
+    case GraphicsContextGL::BLEND:
         return getBooleanParameter(pname);
-    case GraphicsContext3D::BLEND_COLOR:
+    case GraphicsContextGL::BLEND_COLOR:
         return getWebGLFloatArrayParameter(pname);
-    case GraphicsContext3D::BLEND_DST_ALPHA:
+    case GraphicsContextGL::BLEND_DST_ALPHA:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::BLEND_DST_RGB:
+    case GraphicsContextGL::BLEND_DST_RGB:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::BLEND_EQUATION_ALPHA:
+    case GraphicsContextGL::BLEND_EQUATION_ALPHA:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::BLEND_EQUATION_RGB:
+    case GraphicsContextGL::BLEND_EQUATION_RGB:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::BLEND_SRC_ALPHA:
+    case GraphicsContextGL::BLEND_SRC_ALPHA:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::BLEND_SRC_RGB:
+    case GraphicsContextGL::BLEND_SRC_RGB:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::BLUE_BITS:
+    case GraphicsContextGL::BLUE_BITS:
         return getIntParameter(pname);
-    case GraphicsContext3D::COLOR_CLEAR_VALUE:
+    case GraphicsContextGL::COLOR_CLEAR_VALUE:
         return getWebGLFloatArrayParameter(pname);
-    case GraphicsContext3D::COLOR_WRITEMASK:
+    case GraphicsContextGL::COLOR_WRITEMASK:
         return getBooleanArrayParameter(pname);
-    case GraphicsContext3D::COMPRESSED_TEXTURE_FORMATS:
+    case GraphicsContextGL::COMPRESSED_TEXTURE_FORMATS:
         return Uint32Array::tryCreate(m_compressedTextureFormats.data(), m_compressedTextureFormats.size());
-    case GraphicsContext3D::CULL_FACE:
+    case GraphicsContextGL::CULL_FACE:
         return getBooleanParameter(pname);
-    case GraphicsContext3D::CULL_FACE_MODE:
+    case GraphicsContextGL::CULL_FACE_MODE:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::CURRENT_PROGRAM:
+    case GraphicsContextGL::CURRENT_PROGRAM:
         return m_currentProgram;
-    case GraphicsContext3D::DEPTH_BITS:
+    case GraphicsContextGL::DEPTH_BITS:
         if (!m_framebufferBinding && !m_attributes.depth)
             return 0;
         return getIntParameter(pname);
-    case GraphicsContext3D::DEPTH_CLEAR_VALUE:
+    case GraphicsContextGL::DEPTH_CLEAR_VALUE:
         return getFloatParameter(pname);
-    case GraphicsContext3D::DEPTH_FUNC:
+    case GraphicsContextGL::DEPTH_FUNC:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::DEPTH_RANGE:
+    case GraphicsContextGL::DEPTH_RANGE:
         return getWebGLFloatArrayParameter(pname);
-    case GraphicsContext3D::DEPTH_TEST:
+    case GraphicsContextGL::DEPTH_TEST:
         return getBooleanParameter(pname);
-    case GraphicsContext3D::DEPTH_WRITEMASK:
+    case GraphicsContextGL::DEPTH_WRITEMASK:
         return getBooleanParameter(pname);
-    case GraphicsContext3D::DITHER:
+    case GraphicsContextGL::DITHER:
         return getBooleanParameter(pname);
-    case GraphicsContext3D::ELEMENT_ARRAY_BUFFER_BINDING:
+    case GraphicsContextGL::ELEMENT_ARRAY_BUFFER_BINDING:
         return makeRefPtr(m_boundVertexArrayObject->getElementArrayBuffer());
-    case GraphicsContext3D::FRAMEBUFFER_BINDING:
+    case GraphicsContextGL::FRAMEBUFFER_BINDING:
         return m_framebufferBinding;
-    case GraphicsContext3D::FRONT_FACE:
+    case GraphicsContextGL::FRONT_FACE:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::GENERATE_MIPMAP_HINT:
+    case GraphicsContextGL::GENERATE_MIPMAP_HINT:
         return getUnsignedIntParameter(pname);
-    case GraphicsContext3D::GREEN_BITS:
+    case GraphicsContextGL::GREEN_BITS:
         return getIntParameter(pname);
-    case GraphicsContext3D::IMPLEMENTATION_COLOR_READ_FORMAT:
+    case GraphicsContextGL::IMPLEMENTATION_COLOR_READ_FORMAT:
         return getIntParameter(pname);
-    case GraphicsContext3D::IMPLEMENTATION_COLOR_READ_TYPE:
+    case GraphicsContextGL::IMPLEMENTATION_COLOR_READ_TYPE:
         return getIntParameter(pname);
-    case GraphicsContext3D::LINE_WIDTH:
+    case GraphicsContextGL::LINE_WIDTH:
         return getFloatParameter(pname);
-    case GraphicsContext3D::MAX_COMBINED_TEXTURE_IMAGE_UNITS:
+    case GraphicsContextGL::MAX_COMBINED_TEXTURE_IMAGE_UNITS:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_CUBE_MAP_TEXTURE_SIZE:
+    case GraphicsContextGL::MAX_CUBE_MAP_TEXTURE_SIZE:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_FRAGMENT_UNIFORM_VECTORS:
+    case GraphicsContextGL::MAX_FRAGMENT_UNIFORM_VECTORS:
         return getIntParameter(pname);
-    case GraphicsContext3D::MAX_RENDERBUFFER_SIZE:
+    case GraphicsContextGL::MAX_RENDERBUFFER_SIZE:
     &nbs