<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[286293] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/286293">286293</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2021-11-30 06:54:52 -0800 (Tue, 30 Nov 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>GraphicsContextGL should have ANGLE-specific subclass
https://bugs.webkit.org/show_bug.cgi?id=233522

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-11-30
Reviewed by Antti Koivisto.

Source/WebCore:

Add GraphicsContextGLANGLE, rename all relevant GraphicsContextGLOpenGL symbols to this.
Leave the implementations in their respective files for ease of review. Also,
some of the symbols might be moved to GraphicsContextGLANGLE subclasses (GraphicsContextGLCocoa
and GraphicsContextGLTextureMapper ANGLE flavor).

GraphicsContextGLOpenGL now means "GraphicsContextGL implemented with OpenGL and OpenGLES".

GraphicsContextGLANGLE means "GraphicsContextGL implemented with ANGLE".

Move GraphicsContextGLOpenGLCommon.cpp into GraphicsContextGLOpenGL.cpp, these now refer to
just the OpenGL implemetation.

Duplicate "rendering result" and "compositing result" functions from GraphicsContextGLOpenGL.cpp
into GraphicsContextGLANGLE.cpp. These are fairly repetitive functions that most likely will
change in the future for ANGLE backend, so the interim duplicated code should not be a big issue.

This is part of work trying to reduce the ifdef use in GraphicsContextGLOpenGL, in order to make
WebGL easier to maintain correctly.

No new tests, a refactor.

* CMakeLists.txt:
* Headers.cmake:
* PlatformMac.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/GraphicsContextGL.cpp:
(WebCore::GraphicsContextGL::create): Deleted.
* platform/graphics/GraphicsContextGL.h:
* platform/graphics/GraphicsContextGLState.h: Added.
(WebCore::GraphicsContextGLState::currentBoundTexture const):
(WebCore::GraphicsContextGLState::boundTexture const):
(WebCore::GraphicsContextGLState::currentBoundTarget const):
(WebCore::GraphicsContextGLState::boundTarget const):
(WebCore::GraphicsContextGLState::setBoundTexture):
* platform/graphics/angle/ExtensionsGLANGLE.cpp:
(WebCore::ExtensionsGLANGLE::ExtensionsGLANGLE):
* platform/graphics/angle/ExtensionsGLANGLE.h:
* platform/graphics/angle/GraphicsContextGLANGLE.cpp:
(WebCore::GraphicsContextGLANGLE::drawingBufferTextureTarget):
(WebCore::GraphicsContextGLANGLE::drawingBufferTextureTargetQueryForDrawingTarget):
(WebCore::GraphicsContextGLANGLE::EGLDrawingBufferTextureTargetForDrawingTarget):
(WebCore::GraphicsContextGLANGLE::releaseThreadResources):
(WebCore::GraphicsContextGLANGLE::readPixelsForPaintResults):
(WebCore::GraphicsContextGLANGLE::validateAttributes):
(WebCore::GraphicsContextGLANGLE::reshapeFBOs):
(WebCore::GraphicsContextGLANGLE::attachDepthAndStencilBufferIfNeeded):
(WebCore::GraphicsContextGLANGLE::resolveMultisamplingIfNecessary):
(WebCore::GraphicsContextGLANGLE::renderbufferStorage):
(WebCore::GraphicsContextGLANGLE::getIntegerv):
(WebCore::GraphicsContextGLANGLE::getShaderPrecisionFormat):
(WebCore::GraphicsContextGLANGLE::texImage2D):
(WebCore::GraphicsContextGLANGLE::texSubImage2D):
(WebCore::GraphicsContextGLANGLE::compressedTexImage2D):
(WebCore::GraphicsContextGLANGLE::compressedTexSubImage2D):
(WebCore::GraphicsContextGLANGLE::depthRange):
(WebCore::GraphicsContextGLANGLE::clearDepth):
(WebCore::GraphicsContextGLANGLE::getExtensions):
(WebCore::GraphicsContextGLANGLE::readnPixels):
(WebCore::GraphicsContextGLANGLE::readnPixelsImpl):
(WebCore::GraphicsContextGLANGLE::validateDepthStencil):
(WebCore::GraphicsContextGLANGLE::prepareTexture):
(WebCore::GraphicsContextGLANGLE::prepareTextureImpl):
(WebCore::GraphicsContextGLANGLE::readRenderingResults):
(WebCore::GraphicsContextGLANGLE::reshape):
(WebCore::GraphicsContextGLANGLE::activeTexture):
(WebCore::GraphicsContextGLANGLE::attachShader):
(WebCore::GraphicsContextGLANGLE::bindAttribLocation):
(WebCore::GraphicsContextGLANGLE::bindBuffer):
(WebCore::GraphicsContextGLANGLE::bindFramebuffer):
(WebCore::GraphicsContextGLANGLE::bindRenderbuffer):
(WebCore::GraphicsContextGLANGLE::bindTexture):
(WebCore::GraphicsContextGLANGLE::blendColor):
(WebCore::GraphicsContextGLANGLE::blendEquation):
(WebCore::GraphicsContextGLANGLE::blendEquationSeparate):
(WebCore::GraphicsContextGLANGLE::blendFunc):
(WebCore::GraphicsContextGLANGLE::blendFuncSeparate):
(WebCore::GraphicsContextGLANGLE::bufferData):
(WebCore::GraphicsContextGLANGLE::bufferSubData):
(WebCore::GraphicsContextGLANGLE::getBufferSubData):
(WebCore::GraphicsContextGLANGLE::copyBufferSubData):
(WebCore::GraphicsContextGLANGLE::getInternalformativ):
(WebCore::GraphicsContextGLANGLE::renderbufferStorageMultisample):
(WebCore::GraphicsContextGLANGLE::texStorage2D):
(WebCore::GraphicsContextGLANGLE::texStorage3D):
(WebCore::GraphicsContextGLANGLE::texImage3D):
(WebCore::GraphicsContextGLANGLE::texSubImage3D):
(WebCore::GraphicsContextGLANGLE::compressedTexImage3D):
(WebCore::GraphicsContextGLANGLE::compressedTexSubImage3D):
(WebCore::GraphicsContextGLANGLE::getActiveUniforms):
(WebCore::GraphicsContextGLANGLE::checkFramebufferStatus):
(WebCore::GraphicsContextGLANGLE::clearColor):
(WebCore::GraphicsContextGLANGLE::clear):
(WebCore::GraphicsContextGLANGLE::clearStencil):
(WebCore::GraphicsContextGLANGLE::colorMask):
(WebCore::GraphicsContextGLANGLE::compileShader):
(WebCore::GraphicsContextGLANGLE::compileShaderDirect):
(WebCore::GraphicsContextGLANGLE::texImage2DDirect):
(WebCore::GraphicsContextGLANGLE::copyTexImage2D):
(WebCore::GraphicsContextGLANGLE::copyTexSubImage2D):
(WebCore::GraphicsContextGLANGLE::cullFace):
(WebCore::GraphicsContextGLANGLE::depthFunc):
(WebCore::GraphicsContextGLANGLE::depthMask):
(WebCore::GraphicsContextGLANGLE::detachShader):
(WebCore::GraphicsContextGLANGLE::disable):
(WebCore::GraphicsContextGLANGLE::disableVertexAttribArray):
(WebCore::GraphicsContextGLANGLE::drawArrays):
(WebCore::GraphicsContextGLANGLE::drawElements):
(WebCore::GraphicsContextGLANGLE::enable):
(WebCore::GraphicsContextGLANGLE::enableVertexAttribArray):
(WebCore::GraphicsContextGLANGLE::finish):
(WebCore::GraphicsContextGLANGLE::flush):
(WebCore::GraphicsContextGLANGLE::framebufferRenderbuffer):
(WebCore::GraphicsContextGLANGLE::framebufferTexture2D):
(WebCore::GraphicsContextGLANGLE::frontFace):
(WebCore::GraphicsContextGLANGLE::generateMipmap):
(WebCore::GraphicsContextGLANGLE::getActiveAttribImpl):
(WebCore::GraphicsContextGLANGLE::getActiveAttrib):
(WebCore::GraphicsContextGLANGLE::getActiveUniformImpl):
(WebCore::GraphicsContextGLANGLE::getActiveUniform):
(WebCore::GraphicsContextGLANGLE::getAttachedShaders):
(WebCore::GraphicsContextGLANGLE::getAttribLocation):
(WebCore::GraphicsContextGLANGLE::getAttribLocationDirect):
(WebCore::GraphicsContextGLANGLE::moveErrorsToSyntheticErrorList):
(WebCore::GraphicsContextGLANGLE::getError):
(WebCore::GraphicsContextGLANGLE::getString):
(WebCore::GraphicsContextGLANGLE::hint):
(WebCore::GraphicsContextGLANGLE::isBuffer):
(WebCore::GraphicsContextGLANGLE::isEnabled):
(WebCore::GraphicsContextGLANGLE::isFramebuffer):
(WebCore::GraphicsContextGLANGLE::isProgram):
(WebCore::GraphicsContextGLANGLE::isRenderbuffer):
(WebCore::GraphicsContextGLANGLE::isShader):
(WebCore::GraphicsContextGLANGLE::isTexture):
(WebCore::GraphicsContextGLANGLE::lineWidth):
(WebCore::GraphicsContextGLANGLE::linkProgram):
(WebCore::GraphicsContextGLANGLE::pixelStorei):
(WebCore::GraphicsContextGLANGLE::polygonOffset):
(WebCore::GraphicsContextGLANGLE::sampleCoverage):
(WebCore::GraphicsContextGLANGLE::scissor):
(WebCore::GraphicsContextGLANGLE::shaderSource):
(WebCore::GraphicsContextGLANGLE::stencilFunc):
(WebCore::GraphicsContextGLANGLE::stencilFuncSeparate):
(WebCore::GraphicsContextGLANGLE::stencilMask):
(WebCore::GraphicsContextGLANGLE::stencilMaskSeparate):
(WebCore::GraphicsContextGLANGLE::stencilOp):
(WebCore::GraphicsContextGLANGLE::stencilOpSeparate):
(WebCore::GraphicsContextGLANGLE::texParameterf):
(WebCore::GraphicsContextGLANGLE::texParameteri):
(WebCore::GraphicsContextGLANGLE::uniform1f):
(WebCore::GraphicsContextGLANGLE::uniform1fv):
(WebCore::GraphicsContextGLANGLE::uniform2f):
(WebCore::GraphicsContextGLANGLE::uniform2fv):
(WebCore::GraphicsContextGLANGLE::uniform3f):
(WebCore::GraphicsContextGLANGLE::uniform3fv):
(WebCore::GraphicsContextGLANGLE::uniform4f):
(WebCore::GraphicsContextGLANGLE::uniform4fv):
(WebCore::GraphicsContextGLANGLE::uniform1i):
(WebCore::GraphicsContextGLANGLE::uniform1iv):
(WebCore::GraphicsContextGLANGLE::uniform2i):
(WebCore::GraphicsContextGLANGLE::uniform2iv):
(WebCore::GraphicsContextGLANGLE::uniform3i):
(WebCore::GraphicsContextGLANGLE::uniform3iv):
(WebCore::GraphicsContextGLANGLE::uniform4i):
(WebCore::GraphicsContextGLANGLE::uniform4iv):
(WebCore::GraphicsContextGLANGLE::uniformMatrix2fv):
(WebCore::GraphicsContextGLANGLE::uniformMatrix3fv):
(WebCore::GraphicsContextGLANGLE::uniformMatrix4fv):
(WebCore::GraphicsContextGLANGLE::useProgram):
(WebCore::GraphicsContextGLANGLE::validateProgram):
(WebCore::GraphicsContextGLANGLE::vertexAttrib1f):
(WebCore::GraphicsContextGLANGLE::vertexAttrib1fv):
(WebCore::GraphicsContextGLANGLE::vertexAttrib2f):
(WebCore::GraphicsContextGLANGLE::vertexAttrib2fv):
(WebCore::GraphicsContextGLANGLE::vertexAttrib3f):
(WebCore::GraphicsContextGLANGLE::vertexAttrib3fv):
(WebCore::GraphicsContextGLANGLE::vertexAttrib4f):
(WebCore::GraphicsContextGLANGLE::vertexAttrib4fv):
(WebCore::GraphicsContextGLANGLE::vertexAttribPointer):
(WebCore::GraphicsContextGLANGLE::vertexAttribIPointer):
(WebCore::GraphicsContextGLANGLE::viewport):
(WebCore::GraphicsContextGLANGLE::createVertexArray):
(WebCore::GraphicsContextGLANGLE::deleteVertexArray):
(WebCore::GraphicsContextGLANGLE::isVertexArray):
(WebCore::GraphicsContextGLANGLE::bindVertexArray):
(WebCore::GraphicsContextGLANGLE::getBooleanv):
(WebCore::GraphicsContextGLANGLE::getBufferParameteri):
(WebCore::GraphicsContextGLANGLE::getFloatv):
(WebCore::GraphicsContextGLANGLE::getInteger64):
(WebCore::GraphicsContextGLANGLE::getInteger64i):
(WebCore::GraphicsContextGLANGLE::getFramebufferAttachmentParameteri):
(WebCore::GraphicsContextGLANGLE::getProgrami):
(WebCore::GraphicsContextGLANGLE::getUnmangledInfoLog):
(WebCore::GraphicsContextGLANGLE::getProgramInfoLog):
(WebCore::GraphicsContextGLANGLE::getRenderbufferParameteri):
(WebCore::GraphicsContextGLANGLE::getShaderi):
(WebCore::GraphicsContextGLANGLE::getShaderInfoLog):
(WebCore::GraphicsContextGLANGLE::getShaderSource):
(WebCore::GraphicsContextGLANGLE::getTexParameterf):
(WebCore::GraphicsContextGLANGLE::getTexParameteri):
(WebCore::GraphicsContextGLANGLE::getUniformfv):
(WebCore::GraphicsContextGLANGLE::getUniformiv):
(WebCore::GraphicsContextGLANGLE::getUniformuiv):
(WebCore::GraphicsContextGLANGLE::getUniformLocation):
(WebCore::GraphicsContextGLANGLE::getVertexAttribOffset):
(WebCore::GraphicsContextGLANGLE::createBuffer):
(WebCore::GraphicsContextGLANGLE::createFramebuffer):
(WebCore::GraphicsContextGLANGLE::createProgram):
(WebCore::GraphicsContextGLANGLE::createRenderbuffer):
(WebCore::GraphicsContextGLANGLE::createShader):
(WebCore::GraphicsContextGLANGLE::createTexture):
(WebCore::GraphicsContextGLANGLE::deleteBuffer):
(WebCore::GraphicsContextGLANGLE::deleteFramebuffer):
(WebCore::GraphicsContextGLANGLE::deleteProgram):
(WebCore::GraphicsContextGLANGLE::deleteRenderbuffer):
(WebCore::GraphicsContextGLANGLE::deleteShader):
(WebCore::GraphicsContextGLANGLE::deleteTexture):
(WebCore::GraphicsContextGLANGLE::synthesizeGLError):
(WebCore::GraphicsContextGLANGLE::forceContextLost):
(WebCore::GraphicsContextGLANGLE::recycleContext):
(WebCore::GraphicsContextGLANGLE::dispatchContextChangedNotification):
(WebCore::GraphicsContextGLANGLE::drawArraysInstanced):
(WebCore::GraphicsContextGLANGLE::drawElementsInstanced):
(WebCore::GraphicsContextGLANGLE::vertexAttribDivisor):
(WebCore::GraphicsContextGLANGLE::getUniformBlockIndex):
(WebCore::GraphicsContextGLANGLE::getActiveUniformBlockName):
(WebCore::GraphicsContextGLANGLE::uniformBlockBinding):
(WebCore::GraphicsContextGLANGLE::createQuery):
(WebCore::GraphicsContextGLANGLE::beginQuery):
(WebCore::GraphicsContextGLANGLE::endQuery):
(WebCore::GraphicsContextGLANGLE::getQueryObjectui):
(WebCore::GraphicsContextGLANGLE::createTransformFeedback):
(WebCore::GraphicsContextGLANGLE::deleteTransformFeedback):
(WebCore::GraphicsContextGLANGLE::isTransformFeedback):
(WebCore::GraphicsContextGLANGLE::bindTransformFeedback):
(WebCore::GraphicsContextGLANGLE::beginTransformFeedback):
(WebCore::GraphicsContextGLANGLE::endTransformFeedback):
(WebCore::GraphicsContextGLANGLE::transformFeedbackVaryings):
(WebCore::GraphicsContextGLANGLE::getTransformFeedbackVarying):
(WebCore::GraphicsContextGLANGLE::bindBufferBase):
(WebCore::GraphicsContextGLANGLE::blitFramebuffer):
(WebCore::GraphicsContextGLANGLE::framebufferTextureLayer):
(WebCore::GraphicsContextGLANGLE::invalidateFramebuffer):
(WebCore::GraphicsContextGLANGLE::invalidateSubFramebuffer):
(WebCore::GraphicsContextGLANGLE::readBuffer):
(WebCore::GraphicsContextGLANGLE::copyTexSubImage3D):
(WebCore::GraphicsContextGLANGLE::getFragDataLocation):
(WebCore::GraphicsContextGLANGLE::uniform1ui):
(WebCore::GraphicsContextGLANGLE::uniform2ui):
(WebCore::GraphicsContextGLANGLE::uniform3ui):
(WebCore::GraphicsContextGLANGLE::uniform4ui):
(WebCore::GraphicsContextGLANGLE::uniform1uiv):
(WebCore::GraphicsContextGLANGLE::uniform2uiv):
(WebCore::GraphicsContextGLANGLE::uniform3uiv):
(WebCore::GraphicsContextGLANGLE::uniform4uiv):
(WebCore::GraphicsContextGLANGLE::uniformMatrix2x3fv):
(WebCore::GraphicsContextGLANGLE::uniformMatrix3x2fv):
(WebCore::GraphicsContextGLANGLE::uniformMatrix2x4fv):
(WebCore::GraphicsContextGLANGLE::uniformMatrix4x2fv):
(WebCore::GraphicsContextGLANGLE::uniformMatrix3x4fv):
(WebCore::GraphicsContextGLANGLE::uniformMatrix4x3fv):
(WebCore::GraphicsContextGLANGLE::vertexAttribI4i):
(WebCore::GraphicsContextGLANGLE::vertexAttribI4iv):
(WebCore::GraphicsContextGLANGLE::vertexAttribI4ui):
(WebCore::GraphicsContextGLANGLE::vertexAttribI4uiv):
(WebCore::GraphicsContextGLANGLE::drawRangeElements):
(WebCore::GraphicsContextGLANGLE::drawBuffers):
(WebCore::GraphicsContextGLANGLE::clearBufferiv):
(WebCore::GraphicsContextGLANGLE::clearBufferuiv):
(WebCore::GraphicsContextGLANGLE::clearBufferfv):
(WebCore::GraphicsContextGLANGLE::clearBufferfi):
(WebCore::GraphicsContextGLANGLE::deleteQuery):
(WebCore::GraphicsContextGLANGLE::isQuery):
(WebCore::GraphicsContextGLANGLE::getQuery):
(WebCore::GraphicsContextGLANGLE::createSampler):
(WebCore::GraphicsContextGLANGLE::deleteSampler):
(WebCore::GraphicsContextGLANGLE::isSampler):
(WebCore::GraphicsContextGLANGLE::bindSampler):
(WebCore::GraphicsContextGLANGLE::samplerParameteri):
(WebCore::GraphicsContextGLANGLE::samplerParameterf):
(WebCore::GraphicsContextGLANGLE::getSamplerParameterf):
(WebCore::GraphicsContextGLANGLE::getSamplerParameteri):
(WebCore::GraphicsContextGLANGLE::fenceSync):
(WebCore::GraphicsContextGLANGLE::isSync):
(WebCore::GraphicsContextGLANGLE::deleteSync):
(WebCore::GraphicsContextGLANGLE::clientWaitSync):
(WebCore::GraphicsContextGLANGLE::waitSync):
(WebCore::GraphicsContextGLANGLE::getSynci):
(WebCore::GraphicsContextGLANGLE::pauseTransformFeedback):
(WebCore::GraphicsContextGLANGLE::resumeTransformFeedback):
(WebCore::GraphicsContextGLANGLE::bindBufferRange):
(WebCore::GraphicsContextGLANGLE::getUniformIndices):
(WebCore::GraphicsContextGLANGLE::getActiveUniformBlockiv):
(WebCore::GraphicsContextGLANGLE::multiDrawArraysANGLE):
(WebCore::GraphicsContextGLANGLE::multiDrawArraysInstancedANGLE):
(WebCore::GraphicsContextGLANGLE::multiDrawElementsANGLE):
(WebCore::GraphicsContextGLANGLE::multiDrawElementsInstancedANGLE):
(WebCore::GraphicsContextGLANGLE::waitAndUpdateOldestFrame):
(WebCore::GraphicsContextGLANGLE::simulateEventForTesting):
(WebCore::GraphicsContextGLANGLE::isGLES2Compliant const):
(WebCore::GraphicsContextGLANGLE::paintRenderingResultsToCanvas):
(WebCore::GraphicsContextGLANGLE::paintCompositedResultsToCanvas):
(WebCore::GraphicsContextGLANGLE::paintRenderingResultsToPixelBuffer):
(WebCore::GraphicsContextGLANGLE::readRenderingResultsForPainting):
(WebCore::GraphicsContextGLANGLE::readCompositedResultsForPainting):
(WebCore::GraphicsContextGLOpenGL::drawingBufferTextureTarget): Deleted.
(WebCore::GraphicsContextGLOpenGL::drawingBufferTextureTargetQueryForDrawingTarget): Deleted.
(WebCore::GraphicsContextGLOpenGL::EGLDrawingBufferTextureTargetForDrawingTarget): Deleted.
(WebCore::GraphicsContextGLOpenGL::releaseThreadResources): Deleted.
(WebCore::GraphicsContextGLOpenGL::readPixelsForPaintResults): Deleted.
(WebCore::GraphicsContextGLOpenGL::validateAttributes): Deleted.
(WebCore::GraphicsContextGLOpenGL::reshapeFBOs): Deleted.
(WebCore::GraphicsContextGLOpenGL::attachDepthAndStencilBufferIfNeeded): Deleted.
(WebCore::GraphicsContextGLOpenGL::resolveMultisamplingIfNecessary): Deleted.
(WebCore::GraphicsContextGLOpenGL::renderbufferStorage): Deleted.
(WebCore::GraphicsContextGLOpenGL::getIntegerv): Deleted.
(WebCore::GraphicsContextGLOpenGL::getShaderPrecisionFormat): Deleted.
(WebCore::GraphicsContextGLOpenGL::texImage2D): Deleted.
(WebCore::GraphicsContextGLOpenGL::texSubImage2D): Deleted.
(WebCore::GraphicsContextGLOpenGL::compressedTexImage2D): Deleted.
(WebCore::GraphicsContextGLOpenGL::compressedTexSubImage2D): Deleted.
(WebCore::GraphicsContextGLOpenGL::depthRange): Deleted.
(WebCore::GraphicsContextGLOpenGL::clearDepth): Deleted.
(WebCore::GraphicsContextGLOpenGL::getExtensions): Deleted.
(WebCore::GraphicsContextGLOpenGL::readnPixels): Deleted.
(WebCore::GraphicsContextGLOpenGL::readnPixelsImpl): Deleted.
(WebCore::GraphicsContextGLOpenGL::validateDepthStencil): Deleted.
(WebCore::GraphicsContextGLOpenGL::prepareTexture): Deleted.
(WebCore::GraphicsContextGLOpenGL::prepareTextureImpl): Deleted.
(WebCore::GraphicsContextGLOpenGL::readRenderingResults): Deleted.
(WebCore::GraphicsContextGLOpenGL::reshape): Deleted.
(WebCore::GraphicsContextGLOpenGL::activeTexture): Deleted.
(WebCore::GraphicsContextGLOpenGL::attachShader): Deleted.
(WebCore::GraphicsContextGLOpenGL::bindAttribLocation): Deleted.
(WebCore::GraphicsContextGLOpenGL::bindBuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::bindFramebuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::bindRenderbuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::bindTexture): Deleted.
(WebCore::GraphicsContextGLOpenGL::blendColor): Deleted.
(WebCore::GraphicsContextGLOpenGL::blendEquation): Deleted.
(WebCore::GraphicsContextGLOpenGL::blendEquationSeparate): Deleted.
(WebCore::GraphicsContextGLOpenGL::blendFunc): Deleted.
(WebCore::GraphicsContextGLOpenGL::blendFuncSeparate): Deleted.
(WebCore::GraphicsContextGLOpenGL::bufferData): Deleted.
(WebCore::GraphicsContextGLOpenGL::bufferSubData): Deleted.
(WebCore::GraphicsContextGLOpenGL::getBufferSubData): Deleted.
(WebCore::GraphicsContextGLOpenGL::copyBufferSubData): Deleted.
(WebCore::GraphicsContextGLOpenGL::getInternalformativ): Deleted.
(WebCore::GraphicsContextGLOpenGL::renderbufferStorageMultisample): Deleted.
(WebCore::GraphicsContextGLOpenGL::texStorage2D): Deleted.
(WebCore::GraphicsContextGLOpenGL::texStorage3D): Deleted.
(WebCore::GraphicsContextGLOpenGL::texImage3D): Deleted.
(WebCore::GraphicsContextGLOpenGL::texSubImage3D): Deleted.
(WebCore::GraphicsContextGLOpenGL::compressedTexImage3D): Deleted.
(WebCore::GraphicsContextGLOpenGL::compressedTexSubImage3D): Deleted.
(WebCore::GraphicsContextGLOpenGL::getActiveUniforms): Deleted.
(WebCore::GraphicsContextGLOpenGL::checkFramebufferStatus): Deleted.
(WebCore::GraphicsContextGLOpenGL::clearColor): Deleted.
(WebCore::GraphicsContextGLOpenGL::clear): Deleted.
(WebCore::GraphicsContextGLOpenGL::clearStencil): Deleted.
(WebCore::GraphicsContextGLOpenGL::colorMask): Deleted.
(WebCore::GraphicsContextGLOpenGL::compileShader): Deleted.
(WebCore::GraphicsContextGLOpenGL::compileShaderDirect): Deleted.
(WebCore::GraphicsContextGLOpenGL::texImage2DDirect): Deleted.
(WebCore::GraphicsContextGLOpenGL::copyTexImage2D): Deleted.
(WebCore::GraphicsContextGLOpenGL::copyTexSubImage2D): Deleted.
(WebCore::GraphicsContextGLOpenGL::cullFace): Deleted.
(WebCore::GraphicsContextGLOpenGL::depthFunc): Deleted.
(WebCore::GraphicsContextGLOpenGL::depthMask): Deleted.
(WebCore::GraphicsContextGLOpenGL::detachShader): Deleted.
(WebCore::GraphicsContextGLOpenGL::disable): Deleted.
(WebCore::GraphicsContextGLOpenGL::disableVertexAttribArray): Deleted.
(WebCore::GraphicsContextGLOpenGL::drawArrays): Deleted.
(WebCore::GraphicsContextGLOpenGL::drawElements): Deleted.
(WebCore::GraphicsContextGLOpenGL::enable): Deleted.
(WebCore::GraphicsContextGLOpenGL::enableVertexAttribArray): Deleted.
(WebCore::GraphicsContextGLOpenGL::finish): Deleted.
(WebCore::GraphicsContextGLOpenGL::flush): Deleted.
(WebCore::GraphicsContextGLOpenGL::framebufferRenderbuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::framebufferTexture2D): Deleted.
(WebCore::GraphicsContextGLOpenGL::frontFace): Deleted.
(WebCore::GraphicsContextGLOpenGL::generateMipmap): Deleted.
(WebCore::GraphicsContextGLOpenGL::getActiveAttribImpl): Deleted.
(WebCore::GraphicsContextGLOpenGL::getActiveAttrib): Deleted.
(WebCore::GraphicsContextGLOpenGL::getActiveUniformImpl): Deleted.
(WebCore::GraphicsContextGLOpenGL::getActiveUniform): Deleted.
(WebCore::GraphicsContextGLOpenGL::getAttachedShaders): Deleted.
(WebCore::GraphicsContextGLOpenGL::getAttribLocation): Deleted.
(WebCore::GraphicsContextGLOpenGL::getAttribLocationDirect): Deleted.
(WebCore::GraphicsContextGLOpenGL::moveErrorsToSyntheticErrorList): Deleted.
(WebCore::GraphicsContextGLOpenGL::getError): Deleted.
(WebCore::GraphicsContextGLOpenGL::getString): Deleted.
(WebCore::GraphicsContextGLOpenGL::hint): Deleted.
(WebCore::GraphicsContextGLOpenGL::isBuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::isEnabled): Deleted.
(WebCore::GraphicsContextGLOpenGL::isFramebuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::isProgram): Deleted.
(WebCore::GraphicsContextGLOpenGL::isRenderbuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::isShader): Deleted.
(WebCore::GraphicsContextGLOpenGL::isTexture): Deleted.
(WebCore::GraphicsContextGLOpenGL::lineWidth): Deleted.
(WebCore::GraphicsContextGLOpenGL::linkProgram): Deleted.
(WebCore::GraphicsContextGLOpenGL::pixelStorei): Deleted.
(WebCore::GraphicsContextGLOpenGL::polygonOffset): Deleted.
(WebCore::GraphicsContextGLOpenGL::sampleCoverage): Deleted.
(WebCore::GraphicsContextGLOpenGL::scissor): Deleted.
(WebCore::GraphicsContextGLOpenGL::shaderSource): Deleted.
(WebCore::GraphicsContextGLOpenGL::stencilFunc): Deleted.
(WebCore::GraphicsContextGLOpenGL::stencilFuncSeparate): Deleted.
(WebCore::GraphicsContextGLOpenGL::stencilMask): Deleted.
(WebCore::GraphicsContextGLOpenGL::stencilMaskSeparate): Deleted.
(WebCore::GraphicsContextGLOpenGL::stencilOp): Deleted.
(WebCore::GraphicsContextGLOpenGL::stencilOpSeparate): Deleted.
(WebCore::GraphicsContextGLOpenGL::texParameterf): Deleted.
(WebCore::GraphicsContextGLOpenGL::texParameteri): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform1f): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform1fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform2f): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform2fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform3f): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform3fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform4f): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform4fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform1i): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform1iv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform2i): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform2iv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform3i): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform3iv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform4i): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform4iv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniformMatrix2fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniformMatrix3fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniformMatrix4fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::useProgram): Deleted.
(WebCore::GraphicsContextGLOpenGL::validateProgram): Deleted.
(WebCore::GraphicsContextGLOpenGL::vertexAttrib1f): Deleted.
(WebCore::GraphicsContextGLOpenGL::vertexAttrib1fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::vertexAttrib2f): Deleted.
(WebCore::GraphicsContextGLOpenGL::vertexAttrib2fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::vertexAttrib3f): Deleted.
(WebCore::GraphicsContextGLOpenGL::vertexAttrib3fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::vertexAttrib4f): Deleted.
(WebCore::GraphicsContextGLOpenGL::vertexAttrib4fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::vertexAttribPointer): Deleted.
(WebCore::GraphicsContextGLOpenGL::vertexAttribIPointer): Deleted.
(WebCore::GraphicsContextGLOpenGL::viewport): Deleted.
(WebCore::GraphicsContextGLOpenGL::createVertexArray): Deleted.
(WebCore::GraphicsContextGLOpenGL::deleteVertexArray): Deleted.
(WebCore::GraphicsContextGLOpenGL::isVertexArray): Deleted.
(WebCore::GraphicsContextGLOpenGL::bindVertexArray): Deleted.
(WebCore::GraphicsContextGLOpenGL::getBooleanv): Deleted.
(WebCore::GraphicsContextGLOpenGL::getBufferParameteri): Deleted.
(WebCore::GraphicsContextGLOpenGL::getFloatv): Deleted.
(WebCore::GraphicsContextGLOpenGL::getInteger64): Deleted.
(WebCore::GraphicsContextGLOpenGL::getInteger64i): Deleted.
(WebCore::GraphicsContextGLOpenGL::getFramebufferAttachmentParameteri): Deleted.
(WebCore::GraphicsContextGLOpenGL::getProgrami): Deleted.
(WebCore::GraphicsContextGLOpenGL::getUnmangledInfoLog): Deleted.
(WebCore::GraphicsContextGLOpenGL::getProgramInfoLog): Deleted.
(WebCore::GraphicsContextGLOpenGL::getRenderbufferParameteri): Deleted.
(WebCore::GraphicsContextGLOpenGL::getShaderi): Deleted.
(WebCore::GraphicsContextGLOpenGL::getShaderInfoLog): Deleted.
(WebCore::GraphicsContextGLOpenGL::getShaderSource): Deleted.
(WebCore::GraphicsContextGLOpenGL::getTexParameterf): Deleted.
(WebCore::GraphicsContextGLOpenGL::getTexParameteri): Deleted.
(WebCore::GraphicsContextGLOpenGL::getUniformfv): Deleted.
(WebCore::GraphicsContextGLOpenGL::getUniformiv): Deleted.
(WebCore::GraphicsContextGLOpenGL::getUniformuiv): Deleted.
(WebCore::GraphicsContextGLOpenGL::getUniformLocation): Deleted.
(WebCore::GraphicsContextGLOpenGL::getVertexAttribOffset): Deleted.
(WebCore::GraphicsContextGLOpenGL::createBuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::createFramebuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::createProgram): Deleted.
(WebCore::GraphicsContextGLOpenGL::createRenderbuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::createShader): Deleted.
(WebCore::GraphicsContextGLOpenGL::createTexture): Deleted.
(WebCore::GraphicsContextGLOpenGL::deleteBuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::deleteFramebuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::deleteProgram): Deleted.
(WebCore::GraphicsContextGLOpenGL::deleteRenderbuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::deleteShader): Deleted.
(WebCore::GraphicsContextGLOpenGL::deleteTexture): Deleted.
(WebCore::GraphicsContextGLOpenGL::synthesizeGLError): Deleted.
(WebCore::GraphicsContextGLOpenGL::forceContextLost): Deleted.
(WebCore::GraphicsContextGLOpenGL::recycleContext): Deleted.
(WebCore::GraphicsContextGLOpenGL::dispatchContextChangedNotification): Deleted.
(WebCore::GraphicsContextGLOpenGL::drawArraysInstanced): Deleted.
(WebCore::GraphicsContextGLOpenGL::drawElementsInstanced): Deleted.
(WebCore::GraphicsContextGLOpenGL::vertexAttribDivisor): Deleted.
(WebCore::GraphicsContextGLOpenGL::getUniformBlockIndex): Deleted.
(WebCore::GraphicsContextGLOpenGL::getActiveUniformBlockName): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniformBlockBinding): Deleted.
(WebCore::GraphicsContextGLOpenGL::createQuery): Deleted.
(WebCore::GraphicsContextGLOpenGL::beginQuery): Deleted.
(WebCore::GraphicsContextGLOpenGL::endQuery): Deleted.
(WebCore::GraphicsContextGLOpenGL::getQueryObjectui): Deleted.
(WebCore::GraphicsContextGLOpenGL::createTransformFeedback): Deleted.
(WebCore::GraphicsContextGLOpenGL::deleteTransformFeedback): Deleted.
(WebCore::GraphicsContextGLOpenGL::isTransformFeedback): Deleted.
(WebCore::GraphicsContextGLOpenGL::bindTransformFeedback): Deleted.
(WebCore::GraphicsContextGLOpenGL::beginTransformFeedback): Deleted.
(WebCore::GraphicsContextGLOpenGL::endTransformFeedback): Deleted.
(WebCore::GraphicsContextGLOpenGL::transformFeedbackVaryings): Deleted.
(WebCore::GraphicsContextGLOpenGL::getTransformFeedbackVarying): Deleted.
(WebCore::GraphicsContextGLOpenGL::bindBufferBase): Deleted.
(WebCore::GraphicsContextGLOpenGL::blitFramebuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::framebufferTextureLayer): Deleted.
(WebCore::GraphicsContextGLOpenGL::invalidateFramebuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::invalidateSubFramebuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::readBuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::copyTexSubImage3D): Deleted.
(WebCore::GraphicsContextGLOpenGL::getFragDataLocation): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform1ui): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform2ui): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform3ui): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform4ui): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform1uiv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform2uiv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform3uiv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform4uiv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniformMatrix2x3fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniformMatrix3x2fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniformMatrix2x4fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniformMatrix4x2fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniformMatrix3x4fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniformMatrix4x3fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::vertexAttribI4i): Deleted.
(WebCore::GraphicsContextGLOpenGL::vertexAttribI4iv): Deleted.
(WebCore::GraphicsContextGLOpenGL::vertexAttribI4ui): Deleted.
(WebCore::GraphicsContextGLOpenGL::vertexAttribI4uiv): Deleted.
(WebCore::GraphicsContextGLOpenGL::drawRangeElements): Deleted.
(WebCore::GraphicsContextGLOpenGL::drawBuffers): Deleted.
(WebCore::GraphicsContextGLOpenGL::clearBufferiv): Deleted.
(WebCore::GraphicsContextGLOpenGL::clearBufferuiv): Deleted.
(WebCore::GraphicsContextGLOpenGL::clearBufferfv): Deleted.
(WebCore::GraphicsContextGLOpenGL::clearBufferfi): Deleted.
(WebCore::GraphicsContextGLOpenGL::deleteQuery): Deleted.
(WebCore::GraphicsContextGLOpenGL::isQuery): Deleted.
(WebCore::GraphicsContextGLOpenGL::getQuery): Deleted.
(WebCore::GraphicsContextGLOpenGL::createSampler): Deleted.
(WebCore::GraphicsContextGLOpenGL::deleteSampler): Deleted.
(WebCore::GraphicsContextGLOpenGL::isSampler): Deleted.
(WebCore::GraphicsContextGLOpenGL::bindSampler): Deleted.
(WebCore::GraphicsContextGLOpenGL::samplerParameteri): Deleted.
(WebCore::GraphicsContextGLOpenGL::samplerParameterf): Deleted.
(WebCore::GraphicsContextGLOpenGL::getSamplerParameterf): Deleted.
(WebCore::GraphicsContextGLOpenGL::getSamplerParameteri): Deleted.
(WebCore::GraphicsContextGLOpenGL::fenceSync): Deleted.
(WebCore::GraphicsContextGLOpenGL::isSync): Deleted.
(WebCore::GraphicsContextGLOpenGL::deleteSync): Deleted.
(WebCore::GraphicsContextGLOpenGL::clientWaitSync): Deleted.
(WebCore::GraphicsContextGLOpenGL::waitSync): Deleted.
(WebCore::GraphicsContextGLOpenGL::getSynci): Deleted.
(WebCore::GraphicsContextGLOpenGL::pauseTransformFeedback): Deleted.
(WebCore::GraphicsContextGLOpenGL::resumeTransformFeedback): Deleted.
(WebCore::GraphicsContextGLOpenGL::bindBufferRange): Deleted.
(WebCore::GraphicsContextGLOpenGL::getUniformIndices): Deleted.
(WebCore::GraphicsContextGLOpenGL::getActiveUniformBlockiv): Deleted.
(WebCore::GraphicsContextGLOpenGL::multiDrawArraysANGLE): Deleted.
(WebCore::GraphicsContextGLOpenGL::multiDrawArraysInstancedANGLE): Deleted.
(WebCore::GraphicsContextGLOpenGL::multiDrawElementsANGLE): Deleted.
(WebCore::GraphicsContextGLOpenGL::multiDrawElementsInstancedANGLE): Deleted.
(WebCore::GraphicsContextGLOpenGL::waitAndUpdateOldestFrame): Deleted.
* platform/graphics/angle/GraphicsContextGLANGLE.h: Copied from Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h.
* platform/graphics/cairo/GraphicsContextGLCairo.cpp:
(WebCore::GraphicsContextGL::paintToCanvas):
(WebCore::GraphicsContextGLOpenGL::paintToCanvas): Deleted.
* platform/graphics/cg/GraphicsContextGLCG.cpp:
(WebCore::GraphicsContextGL::paintToCanvas):
(WebCore::GraphicsContextGLOpenGL::paintToCanvas): Deleted.
Move paintToCanvas from GraphicsContextGLOpenGL to
GraphicsContextGL. It was a generic static function and did not
have any dependency to the GraphicsContextGLOpenGL.

* platform/graphics/cocoa/GraphicsContextGLCocoa.h:
* platform/graphics/cocoa/GraphicsContextGLCocoa.mm:
(WebCore::initializeEGLDisplay):
(WebCore::GraphicsContextGLCocoa::GraphicsContextGLCocoa):
(WebCore::GraphicsContextGLANGLE::GraphicsContextGLANGLE):
(WebCore::GraphicsContextGLANGLE::~GraphicsContextGLANGLE):
(WebCore::GraphicsContextGLANGLE::platformLayer const):
(WebCore::GraphicsContextGLANGLE::makeContextCurrent):
(WebCore::GraphicsContextGLANGLE::checkGPUStatus):
(WebCore::GraphicsContextGLANGLE::setContextVisibility):
(WebCore::GraphicsContextGLANGLE::displayWasReconfigured):
(WebCore::GraphicsContextGLANGLE::reshapeDisplayBufferBacking):
(WebCore::GraphicsContextGLANGLE::allocateAndBindDisplayBufferBacking):
(WebCore::GraphicsContextGLANGLE::bindDisplayBufferBacking):
(WebCore::GraphicsContextGLANGLE::makeCurrent):
(WebCore::GraphicsContextGLCocoa::createPbufferAndAttachIOSurface):
(WebCore::GraphicsContextGLANGLE::prepareForDisplay):
(WebCore::GraphicsContextGLCocoa::asCV):
(WebCore::GraphicsContextGLANGLE::readCompositedResults):
(WebCore::GraphicsContextGLANGLE::paintCompositedResultsToMediaSample):
(WebCore::GraphicsContextGLANGLE::platformReleaseThreadResources):
(WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL): Deleted.
(WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL): Deleted.
(WebCore::GraphicsContextGLOpenGL::platformLayer const): Deleted.
(WebCore::GraphicsContextGLOpenGL::makeContextCurrent): Deleted.
(WebCore::GraphicsContextGLOpenGL::checkGPUStatus): Deleted.
(WebCore::GraphicsContextGLOpenGL::setContextVisibility): Deleted.
(WebCore::GraphicsContextGLOpenGL::displayWasReconfigured): Deleted.
(WebCore::GraphicsContextGLOpenGL::reshapeDisplayBufferBacking): Deleted.
(WebCore::GraphicsContextGLOpenGL::allocateAndBindDisplayBufferBacking): Deleted.
(WebCore::GraphicsContextGLOpenGL::bindDisplayBufferBacking): Deleted.
(WebCore::GraphicsContextGLOpenGL::makeCurrent): Deleted.
(WebCore::GraphicsContextGLOpenGL::isGLES2Compliant const): Deleted.
(WebCore::GraphicsContextGLOpenGL::simulateEventForTesting): Deleted.
(WebCore::GraphicsContextGLOpenGL::prepareForDisplay): Deleted.
(WebCore::GraphicsContextGLOpenGL::asCV): Deleted.
(WebCore::GraphicsContextGLOpenGL::readCompositedResults): Deleted.
(WebCore::GraphicsContextGLOpenGL::paintCompositedResultsToMediaSample): Deleted.
(WebCore::GraphicsContextGLOpenGL::platformReleaseThreadResources): Deleted.
* platform/graphics/cv/GraphicsContextGLCVCocoa.cpp: Renamed from Source/WebCore/platform/graphics/cv/GraphicsContextGLCVANGLE.cpp.
(WebCore::GraphicsContextGLCVCocoa::create):
(WebCore::GraphicsContextGLCVCocoa::~GraphicsContextGLCVCocoa):
(WebCore::GraphicsContextGLCVCocoa::GraphicsContextGLCVCocoa):
(WebCore::GraphicsContextGLCVCocoa::copyPixelBufferToTexture):
* platform/graphics/cv/GraphicsContextGLCVCocoa.h: Renamed from Source/WebCore/platform/graphics/cv/GraphicsContextGLCVANGLE.h.
* platform/graphics/opengl/GraphicsContextGLOpenGL.cpp:
(WebCore::setCurrentNameHashMapForShader):
(WebCore::nameHashForShader):
(WebCore::GraphicsContextGLOpenGL::validateDepthStencil):
(WebCore::GraphicsContextGLOpenGL::prepareTexture):
(WebCore::GraphicsContextGLOpenGL::readRenderingResults):
(WebCore::GraphicsContextGLOpenGL::reshape):
(WebCore::GraphicsContextGLOpenGL::checkVaryingsPacking const):
(WebCore::GraphicsContextGLOpenGL::precisionsMatch const):
(WebCore::GraphicsContextGLOpenGL::activeTexture):
(WebCore::GraphicsContextGLOpenGL::attachShader):
(WebCore::GraphicsContextGLOpenGL::bindAttribLocation):
(WebCore::GraphicsContextGLOpenGL::bindBuffer):
(WebCore::GraphicsContextGLOpenGL::bindFramebuffer):
(WebCore::GraphicsContextGLOpenGL::bindRenderbuffer):
(WebCore::GraphicsContextGLOpenGL::bindTexture):
(WebCore::GraphicsContextGLOpenGL::blendColor):
(WebCore::GraphicsContextGLOpenGL::blendEquation):
(WebCore::GraphicsContextGLOpenGL::blendEquationSeparate):
(WebCore::GraphicsContextGLOpenGL::blendFunc):
(WebCore::GraphicsContextGLOpenGL::blendFuncSeparate):
(WebCore::GraphicsContextGLOpenGL::bufferData):
(WebCore::GraphicsContextGLOpenGL::bufferSubData):
(WebCore::GraphicsContextGLOpenGL::checkFramebufferStatus):
(WebCore::GraphicsContextGLOpenGL::clearColor):
(WebCore::GraphicsContextGLOpenGL::clear):
(WebCore::GraphicsContextGLOpenGL::clearStencil):
(WebCore::GraphicsContextGLOpenGL::colorMask):
(WebCore::GraphicsContextGLOpenGL::compileShader):
(WebCore::GraphicsContextGLOpenGL::compileShaderDirect):
(WebCore::GraphicsContextGLOpenGL::copyTexImage2D):
(WebCore::GraphicsContextGLOpenGL::copyTexSubImage2D):
(WebCore::GraphicsContextGLOpenGL::cullFace):
(WebCore::GraphicsContextGLOpenGL::depthFunc):
(WebCore::GraphicsContextGLOpenGL::depthMask):
(WebCore::GraphicsContextGLOpenGL::detachShader):
(WebCore::GraphicsContextGLOpenGL::disable):
(WebCore::GraphicsContextGLOpenGL::disableVertexAttribArray):
(WebCore::GraphicsContextGLOpenGL::drawArrays):
(WebCore::GraphicsContextGLOpenGL::drawElements):
(WebCore::GraphicsContextGLOpenGL::enable):
(WebCore::GraphicsContextGLOpenGL::enableVertexAttribArray):
(WebCore::GraphicsContextGLOpenGL::finish):
(WebCore::GraphicsContextGLOpenGL::flush):
(WebCore::GraphicsContextGLOpenGL::framebufferRenderbuffer):
(WebCore::GraphicsContextGLOpenGL::framebufferTexture2D):
(WebCore::GraphicsContextGLOpenGL::frontFace):
(WebCore::GraphicsContextGLOpenGL::generateMipmap):
(WebCore::GraphicsContextGLOpenGL::getActiveAttribImpl):
(WebCore::GraphicsContextGLOpenGL::getActiveAttrib):
(WebCore::GraphicsContextGLOpenGL::getActiveUniformImpl):
(WebCore::GraphicsContextGLOpenGL::getActiveUniform):
(WebCore::GraphicsContextGLOpenGL::getAttachedShaders):
(WebCore::generateHashedName):
(WebCore::GraphicsContextGLOpenGL::mappedSymbolInShaderSourceMap):
(WebCore::GraphicsContextGLOpenGL::mappedSymbolName):
(WebCore::GraphicsContextGLOpenGL::originalSymbolInShaderSourceMap):
(WebCore::GraphicsContextGLOpenGL::originalSymbolName):
(WebCore::GraphicsContextGLOpenGL::getAttribLocation):
(WebCore::GraphicsContextGLOpenGL::getAttribLocationDirect):
(WebCore::GraphicsContextGLOpenGL::moveErrorsToSyntheticErrorList):
(WebCore::GraphicsContextGLOpenGL::getError):
(WebCore::GraphicsContextGLOpenGL::getString):
(WebCore::GraphicsContextGLOpenGL::hint):
(WebCore::GraphicsContextGLOpenGL::isBuffer):
(WebCore::GraphicsContextGLOpenGL::isEnabled):
(WebCore::GraphicsContextGLOpenGL::isFramebuffer):
(WebCore::GraphicsContextGLOpenGL::isProgram):
(WebCore::GraphicsContextGLOpenGL::isRenderbuffer):
(WebCore::GraphicsContextGLOpenGL::isShader):
(WebCore::GraphicsContextGLOpenGL::isTexture):
(WebCore::GraphicsContextGLOpenGL::lineWidth):
(WebCore::GraphicsContextGLOpenGL::linkProgram):
(WebCore::GraphicsContextGLOpenGL::pixelStorei):
(WebCore::GraphicsContextGLOpenGL::polygonOffset):
(WebCore::GraphicsContextGLOpenGL::sampleCoverage):
(WebCore::GraphicsContextGLOpenGL::scissor):
(WebCore::GraphicsContextGLOpenGL::shaderSource):
(WebCore::GraphicsContextGLOpenGL::stencilFunc):
(WebCore::GraphicsContextGLOpenGL::stencilFuncSeparate):
(WebCore::GraphicsContextGLOpenGL::stencilMask):
(WebCore::GraphicsContextGLOpenGL::stencilMaskSeparate):
(WebCore::GraphicsContextGLOpenGL::stencilOp):
(WebCore::GraphicsContextGLOpenGL::stencilOpSeparate):
(WebCore::GraphicsContextGLOpenGL::texParameterf):
(WebCore::GraphicsContextGLOpenGL::texParameteri):
(WebCore::GraphicsContextGLOpenGL::uniform1f):
(WebCore::GraphicsContextGLOpenGL::uniform1fv):
(WebCore::GraphicsContextGLOpenGL::uniform2f):
(WebCore::GraphicsContextGLOpenGL::uniform2fv):
(WebCore::GraphicsContextGLOpenGL::uniform3f):
(WebCore::GraphicsContextGLOpenGL::uniform3fv):
(WebCore::GraphicsContextGLOpenGL::uniform4f):
(WebCore::GraphicsContextGLOpenGL::uniform4fv):
(WebCore::GraphicsContextGLOpenGL::uniform1i):
(WebCore::GraphicsContextGLOpenGL::uniform1iv):
(WebCore::GraphicsContextGLOpenGL::uniform2i):
(WebCore::GraphicsContextGLOpenGL::uniform2iv):
(WebCore::GraphicsContextGLOpenGL::uniform3i):
(WebCore::GraphicsContextGLOpenGL::uniform3iv):
(WebCore::GraphicsContextGLOpenGL::uniform4i):
(WebCore::GraphicsContextGLOpenGL::uniform4iv):
(WebCore::GraphicsContextGLOpenGL::uniformMatrix2fv):
(WebCore::GraphicsContextGLOpenGL::uniformMatrix3fv):
(WebCore::GraphicsContextGLOpenGL::uniformMatrix4fv):
(WebCore::GraphicsContextGLOpenGL::useProgram):
(WebCore::GraphicsContextGLOpenGL::validateProgram):
(WebCore::GraphicsContextGLOpenGL::vertexAttrib1f):
(WebCore::GraphicsContextGLOpenGL::vertexAttrib1fv):
(WebCore::GraphicsContextGLOpenGL::vertexAttrib2f):
(WebCore::GraphicsContextGLOpenGL::vertexAttrib2fv):
(WebCore::GraphicsContextGLOpenGL::vertexAttrib3f):
(WebCore::GraphicsContextGLOpenGL::vertexAttrib3fv):
(WebCore::GraphicsContextGLOpenGL::vertexAttrib4f):
(WebCore::GraphicsContextGLOpenGL::vertexAttrib4fv):
(WebCore::GraphicsContextGLOpenGL::vertexAttribPointer):
(WebCore::GraphicsContextGLOpenGL::viewport):
(WebCore::GraphicsContextGLOpenGL::createVertexArray):
(WebCore::GraphicsContextGLOpenGL::deleteVertexArray):
(WebCore::GraphicsContextGLOpenGL::isVertexArray):
(WebCore::GraphicsContextGLOpenGL::bindVertexArray):
(WebCore::GraphicsContextGLOpenGL::getBooleanv):
(WebCore::GraphicsContextGLOpenGL::getBufferParameteri):
(WebCore::GraphicsContextGLOpenGL::getFloatv):
(WebCore::GraphicsContextGLOpenGL::getInteger64):
(WebCore::GraphicsContextGLOpenGL::getInteger64i):
(WebCore::GraphicsContextGLOpenGL::getFramebufferAttachmentParameteri):
(WebCore::GraphicsContextGLOpenGL::getProgrami):
(WebCore::GraphicsContextGLOpenGL::getNonBuiltInActiveSymbolCount):
(WebCore::GraphicsContextGLOpenGL::getUnmangledInfoLog):
(WebCore::GraphicsContextGLOpenGL::getProgramInfoLog):
(WebCore::GraphicsContextGLOpenGL::getRenderbufferParameteri):
(WebCore::GraphicsContextGLOpenGL::getShaderi):
(WebCore::GraphicsContextGLOpenGL::getShaderInfoLog):
(WebCore::GraphicsContextGLOpenGL::getShaderSource):
(WebCore::GraphicsContextGLOpenGL::getTexParameterf):
(WebCore::GraphicsContextGLOpenGL::getTexParameteri):
(WebCore::GraphicsContextGLOpenGL::getUniformfv):
(WebCore::GraphicsContextGLOpenGL::getUniformiv):
(WebCore::GraphicsContextGLOpenGL::getUniformuiv):
(WebCore::GraphicsContextGLOpenGL::getUniformLocation):
(WebCore::GraphicsContextGLOpenGL::getVertexAttribOffset):
(WebCore::GraphicsContextGLOpenGL::texSubImage2D):
(WebCore::GraphicsContextGLOpenGL::compressedTexImage2D):
(WebCore::GraphicsContextGLOpenGL::compressedTexSubImage2D):
(WebCore::GraphicsContextGLOpenGL::createBuffer):
(WebCore::GraphicsContextGLOpenGL::createFramebuffer):
(WebCore::GraphicsContextGLOpenGL::createProgram):
(WebCore::GraphicsContextGLOpenGL::createRenderbuffer):
(WebCore::GraphicsContextGLOpenGL::createShader):
(WebCore::GraphicsContextGLOpenGL::createTexture):
(WebCore::GraphicsContextGLOpenGL::deleteBuffer):
(WebCore::GraphicsContextGLOpenGL::deleteFramebuffer):
(WebCore::GraphicsContextGLOpenGL::deleteProgram):
(WebCore::GraphicsContextGLOpenGL::deleteRenderbuffer):
(WebCore::GraphicsContextGLOpenGL::deleteShader):
(WebCore::GraphicsContextGLOpenGL::deleteTexture):
(WebCore::GraphicsContextGLOpenGL::synthesizeGLError):
(WebCore::GraphicsContextGLOpenGL::forceContextLost):
(WebCore::GraphicsContextGLOpenGL::recycleContext):
(WebCore::GraphicsContextGLOpenGL::dispatchContextChangedNotification):
(WebCore::GraphicsContextGLOpenGL::texImage2DDirect):
(WebCore::GraphicsContextGLOpenGL::drawArraysInstanced):
(WebCore::GraphicsContextGLOpenGL::drawElementsInstanced):
(WebCore::GraphicsContextGLOpenGL::vertexAttribDivisor):
(WebCore::GraphicsContextGLOpenGL::primitiveRestartIndex):
(WebCore::GraphicsContextGLOpenGL::copyBufferSubData):
(WebCore::GraphicsContextGLOpenGL::getBufferSubData):
(WebCore::GraphicsContextGLOpenGL::blitFramebuffer):
(WebCore::GraphicsContextGLOpenGL::framebufferTextureLayer):
(WebCore::GraphicsContextGLOpenGL::invalidateFramebuffer):
(WebCore::GraphicsContextGLOpenGL::invalidateSubFramebuffer):
(WebCore::GraphicsContextGLOpenGL::readBuffer):
(WebCore::GraphicsContextGLOpenGL::getInternalformativ):
(WebCore::GraphicsContextGLOpenGL::renderbufferStorageMultisample):
(WebCore::GraphicsContextGLOpenGL::texStorage2D):
(WebCore::GraphicsContextGLOpenGL::texStorage3D):
(WebCore::GraphicsContextGLOpenGL::copyTexSubImage3D):
(WebCore::GraphicsContextGLOpenGL::getFragDataLocation):
(WebCore::GraphicsContextGLOpenGL::uniform1ui):
(WebCore::GraphicsContextGLOpenGL::uniform2ui):
(WebCore::GraphicsContextGLOpenGL::uniform3ui):
(WebCore::GraphicsContextGLOpenGL::uniform4ui):
(WebCore::GraphicsContextGLOpenGL::uniform1uiv):
(WebCore::GraphicsContextGLOpenGL::uniform2uiv):
(WebCore::GraphicsContextGLOpenGL::uniform3uiv):
(WebCore::GraphicsContextGLOpenGL::uniform4uiv):
(WebCore::GraphicsContextGLOpenGL::uniformMatrix2x3fv):
(WebCore::GraphicsContextGLOpenGL::uniformMatrix3x2fv):
(WebCore::GraphicsContextGLOpenGL::uniformMatrix2x4fv):
(WebCore::GraphicsContextGLOpenGL::uniformMatrix4x2fv):
(WebCore::GraphicsContextGLOpenGL::uniformMatrix3x4fv):
(WebCore::GraphicsContextGLOpenGL::uniformMatrix4x3fv):
(WebCore::GraphicsContextGLOpenGL::vertexAttribI4i):
(WebCore::GraphicsContextGLOpenGL::vertexAttribI4iv):
(WebCore::GraphicsContextGLOpenGL::vertexAttribI4ui):
(WebCore::GraphicsContextGLOpenGL::vertexAttribI4uiv):
(WebCore::GraphicsContextGLOpenGL::vertexAttribIPointer):
(WebCore::GraphicsContextGLOpenGL::drawRangeElements):
(WebCore::GraphicsContextGLOpenGL::drawBuffers):
(WebCore::GraphicsContextGLOpenGL::clearBufferiv):
(WebCore::GraphicsContextGLOpenGL::clearBufferuiv):
(WebCore::GraphicsContextGLOpenGL::clearBufferfv):
(WebCore::GraphicsContextGLOpenGL::clearBufferfi):
(WebCore::GraphicsContextGLOpenGL::createQuery):
(WebCore::GraphicsContextGLOpenGL::deleteQuery):
(WebCore::GraphicsContextGLOpenGL::isQuery):
(WebCore::GraphicsContextGLOpenGL::beginQuery):
(WebCore::GraphicsContextGLOpenGL::endQuery):
(WebCore::GraphicsContextGLOpenGL::getQuery):
(WebCore::GraphicsContextGLOpenGL::getQueryObjectui):
(WebCore::GraphicsContextGLOpenGL::createSampler):
(WebCore::GraphicsContextGLOpenGL::deleteSampler):
(WebCore::GraphicsContextGLOpenGL::isSampler):
(WebCore::GraphicsContextGLOpenGL::bindSampler):
(WebCore::GraphicsContextGLOpenGL::samplerParameteri):
(WebCore::GraphicsContextGLOpenGL::samplerParameterf):
(WebCore::GraphicsContextGLOpenGL::getSamplerParameterf):
(WebCore::GraphicsContextGLOpenGL::getSamplerParameteri):
(WebCore::GraphicsContextGLOpenGL::fenceSync):
(WebCore::GraphicsContextGLOpenGL::isSync):
(WebCore::GraphicsContextGLOpenGL::deleteSync):
(WebCore::GraphicsContextGLOpenGL::clientWaitSync):
(WebCore::GraphicsContextGLOpenGL::waitSync):
(WebCore::GraphicsContextGLOpenGL::getSynci):
(WebCore::GraphicsContextGLOpenGL::createTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::deleteTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::isTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::bindTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::beginTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::endTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::transformFeedbackVaryings):
(WebCore::GraphicsContextGLOpenGL::getTransformFeedbackVarying):
(WebCore::GraphicsContextGLOpenGL::pauseTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::resumeTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::bindBufferBase):
(WebCore::GraphicsContextGLOpenGL::bindBufferRange):
(WebCore::GraphicsContextGLOpenGL::getUniformIndices):
(WebCore::GraphicsContextGLOpenGL::getActiveUniforms):
(WebCore::GraphicsContextGLOpenGL::getUniformBlockIndex):
(WebCore::GraphicsContextGLOpenGL::getActiveUniformBlockName):
(WebCore::GraphicsContextGLOpenGL::uniformBlockBinding):
(WebCore::GraphicsContextGLOpenGL::readnPixels):
(WebCore::GraphicsContextGLOpenGL::getActiveUniformBlockiv):
(WebCore::GraphicsContextGLOpenGL::texImage2D):
(WebCore::GraphicsContextGLOpenGL::texImage3D):
(WebCore::GraphicsContextGLOpenGL::texSubImage3D):
(WebCore::GraphicsContextGLOpenGL::compressedTexImage3D):
(WebCore::GraphicsContextGLOpenGL::compressedTexSubImage3D):
(WebCore::GraphicsContextGLOpenGL::multiDrawArraysANGLE):
(WebCore::GraphicsContextGLOpenGL::multiDrawArraysInstancedANGLE):
(WebCore::GraphicsContextGLOpenGL::multiDrawElementsANGLE):
(WebCore::GraphicsContextGLOpenGL::multiDrawElementsInstancedANGLE):
(WebCore::GraphicsContextGLOpenGL::texImage2DResourceSafe):
* platform/graphics/opengl/GraphicsContextGLOpenGL.h:
* platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp: Removed.
(): Deleted.
(WebCore::setCurrentNameHashMapForShader): Deleted.
(WebCore::nameHashForShader): Deleted.
(WebCore::GraphicsContextGLOpenGL::validateDepthStencil): Deleted.
(WebCore::GraphicsContextGLOpenGL::prepareTexture): Deleted.
(WebCore::GraphicsContextGLOpenGL::readRenderingResults): Deleted.
(WebCore::GraphicsContextGLOpenGL::reshape): Deleted.
(WebCore::GraphicsContextGLOpenGL::checkVaryingsPacking const): Deleted.
(WebCore::GraphicsContextGLOpenGL::precisionsMatch const): Deleted.
(WebCore::GraphicsContextGLOpenGL::activeTexture): Deleted.
(WebCore::GraphicsContextGLOpenGL::attachShader): Deleted.
(WebCore::GraphicsContextGLOpenGL::bindAttribLocation): Deleted.
(WebCore::GraphicsContextGLOpenGL::bindBuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::bindFramebuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::bindRenderbuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::bindTexture): Deleted.
(WebCore::GraphicsContextGLOpenGL::blendColor): Deleted.
(WebCore::GraphicsContextGLOpenGL::blendEquation): Deleted.
(WebCore::GraphicsContextGLOpenGL::blendEquationSeparate): Deleted.
(WebCore::GraphicsContextGLOpenGL::blendFunc): Deleted.
(WebCore::GraphicsContextGLOpenGL::blendFuncSeparate): Deleted.
(WebCore::GraphicsContextGLOpenGL::bufferData): Deleted.
(WebCore::GraphicsContextGLOpenGL::bufferSubData): Deleted.
(WebCore::GraphicsContextGLOpenGL::checkFramebufferStatus): Deleted.
(WebCore::GraphicsContextGLOpenGL::clearColor): Deleted.
(WebCore::GraphicsContextGLOpenGL::clear): Deleted.
(WebCore::GraphicsContextGLOpenGL::clearStencil): Deleted.
(WebCore::GraphicsContextGLOpenGL::colorMask): Deleted.
(WebCore::GraphicsContextGLOpenGL::compileShader): Deleted.
(WebCore::GraphicsContextGLOpenGL::compileShaderDirect): Deleted.
(WebCore::GraphicsContextGLOpenGL::copyTexImage2D): Deleted.
(WebCore::GraphicsContextGLOpenGL::copyTexSubImage2D): Deleted.
(WebCore::GraphicsContextGLOpenGL::cullFace): Deleted.
(WebCore::GraphicsContextGLOpenGL::depthFunc): Deleted.
(WebCore::GraphicsContextGLOpenGL::depthMask): Deleted.
(WebCore::GraphicsContextGLOpenGL::detachShader): Deleted.
(WebCore::GraphicsContextGLOpenGL::disable): Deleted.
(WebCore::GraphicsContextGLOpenGL::disableVertexAttribArray): Deleted.
(WebCore::GraphicsContextGLOpenGL::drawArrays): Deleted.
(WebCore::GraphicsContextGLOpenGL::drawElements): Deleted.
(WebCore::GraphicsContextGLOpenGL::enable): Deleted.
(WebCore::GraphicsContextGLOpenGL::enableVertexAttribArray): Deleted.
(WebCore::GraphicsContextGLOpenGL::finish): Deleted.
(WebCore::GraphicsContextGLOpenGL::flush): Deleted.
(WebCore::GraphicsContextGLOpenGL::framebufferRenderbuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::framebufferTexture2D): Deleted.
(WebCore::GraphicsContextGLOpenGL::frontFace): Deleted.
(WebCore::GraphicsContextGLOpenGL::generateMipmap): Deleted.
(WebCore::GraphicsContextGLOpenGL::getActiveAttribImpl): Deleted.
(WebCore::GraphicsContextGLOpenGL::getActiveAttrib): Deleted.
(WebCore::GraphicsContextGLOpenGL::getActiveUniformImpl): Deleted.
(WebCore::GraphicsContextGLOpenGL::getActiveUniform): Deleted.
(WebCore::GraphicsContextGLOpenGL::getAttachedShaders): Deleted.
(WebCore::generateHashedName): Deleted.
(WebCore::GraphicsContextGLOpenGL::mappedSymbolInShaderSourceMap): Deleted.
(WebCore::GraphicsContextGLOpenGL::mappedSymbolName): Deleted.
(WebCore::GraphicsContextGLOpenGL::originalSymbolInShaderSourceMap): Deleted.
(WebCore::GraphicsContextGLOpenGL::originalSymbolName): Deleted.
(WebCore::GraphicsContextGLOpenGL::getAttribLocation): Deleted.
(WebCore::GraphicsContextGLOpenGL::getAttribLocationDirect): Deleted.
(WebCore::GraphicsContextGLOpenGL::moveErrorsToSyntheticErrorList): Deleted.
(WebCore::GraphicsContextGLOpenGL::getError): Deleted.
(WebCore::GraphicsContextGLOpenGL::getString): Deleted.
(WebCore::GraphicsContextGLOpenGL::hint): Deleted.
(WebCore::GraphicsContextGLOpenGL::isBuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::isEnabled): Deleted.
(WebCore::GraphicsContextGLOpenGL::isFramebuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::isProgram): Deleted.
(WebCore::GraphicsContextGLOpenGL::isRenderbuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::isShader): Deleted.
(WebCore::GraphicsContextGLOpenGL::isTexture): Deleted.
(WebCore::GraphicsContextGLOpenGL::lineWidth): Deleted.
(WebCore::GraphicsContextGLOpenGL::linkProgram): Deleted.
(WebCore::GraphicsContextGLOpenGL::pixelStorei): Deleted.
(WebCore::GraphicsContextGLOpenGL::polygonOffset): Deleted.
(WebCore::GraphicsContextGLOpenGL::sampleCoverage): Deleted.
(WebCore::GraphicsContextGLOpenGL::scissor): Deleted.
(WebCore::GraphicsContextGLOpenGL::shaderSource): Deleted.
(WebCore::GraphicsContextGLOpenGL::stencilFunc): Deleted.
(WebCore::GraphicsContextGLOpenGL::stencilFuncSeparate): Deleted.
(WebCore::GraphicsContextGLOpenGL::stencilMask): Deleted.
(WebCore::GraphicsContextGLOpenGL::stencilMaskSeparate): Deleted.
(WebCore::GraphicsContextGLOpenGL::stencilOp): Deleted.
(WebCore::GraphicsContextGLOpenGL::stencilOpSeparate): Deleted.
(WebCore::GraphicsContextGLOpenGL::texParameterf): Deleted.
(WebCore::GraphicsContextGLOpenGL::texParameteri): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform1f): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform1fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform2f): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform2fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform3f): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform3fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform4f): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform4fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform1i): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform1iv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform2i): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform2iv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform3i): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform3iv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform4i): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform4iv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniformMatrix2fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniformMatrix3fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniformMatrix4fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::useProgram): Deleted.
(WebCore::GraphicsContextGLOpenGL::validateProgram): Deleted.
(WebCore::GraphicsContextGLOpenGL::vertexAttrib1f): Deleted.
(WebCore::GraphicsContextGLOpenGL::vertexAttrib1fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::vertexAttrib2f): Deleted.
(WebCore::GraphicsContextGLOpenGL::vertexAttrib2fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::vertexAttrib3f): Deleted.
(WebCore::GraphicsContextGLOpenGL::vertexAttrib3fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::vertexAttrib4f): Deleted.
(WebCore::GraphicsContextGLOpenGL::vertexAttrib4fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::vertexAttribPointer): Deleted.
(WebCore::GraphicsContextGLOpenGL::viewport): Deleted.
(WebCore::GraphicsContextGLOpenGL::createVertexArray): Deleted.
(WebCore::GraphicsContextGLOpenGL::deleteVertexArray): Deleted.
(WebCore::GraphicsContextGLOpenGL::isVertexArray): Deleted.
(WebCore::GraphicsContextGLOpenGL::bindVertexArray): Deleted.
(WebCore::GraphicsContextGLOpenGL::getBooleanv): Deleted.
(WebCore::GraphicsContextGLOpenGL::getBufferParameteri): Deleted.
(WebCore::GraphicsContextGLOpenGL::getFloatv): Deleted.
(WebCore::GraphicsContextGLOpenGL::getInteger64): Deleted.
(WebCore::GraphicsContextGLOpenGL::getInteger64i): Deleted.
(WebCore::GraphicsContextGLOpenGL::getFramebufferAttachmentParameteri): Deleted.
(WebCore::GraphicsContextGLOpenGL::getProgrami): Deleted.
(WebCore::GraphicsContextGLOpenGL::getNonBuiltInActiveSymbolCount): Deleted.
(WebCore::GraphicsContextGLOpenGL::getUnmangledInfoLog): Deleted.
(WebCore::GraphicsContextGLOpenGL::getProgramInfoLog): Deleted.
(WebCore::GraphicsContextGLOpenGL::getRenderbufferParameteri): Deleted.
(WebCore::GraphicsContextGLOpenGL::getShaderi): Deleted.
(WebCore::GraphicsContextGLOpenGL::getShaderInfoLog): Deleted.
(WebCore::GraphicsContextGLOpenGL::getShaderSource): Deleted.
(WebCore::GraphicsContextGLOpenGL::getTexParameterf): Deleted.
(WebCore::GraphicsContextGLOpenGL::getTexParameteri): Deleted.
(WebCore::GraphicsContextGLOpenGL::getUniformfv): Deleted.
(WebCore::GraphicsContextGLOpenGL::getUniformiv): Deleted.
(WebCore::GraphicsContextGLOpenGL::getUniformuiv): Deleted.
(WebCore::GraphicsContextGLOpenGL::getUniformLocation): Deleted.
(WebCore::GraphicsContextGLOpenGL::getVertexAttribOffset): Deleted.
(WebCore::GraphicsContextGLOpenGL::texSubImage2D): Deleted.
(WebCore::GraphicsContextGLOpenGL::compressedTexImage2D): Deleted.
(WebCore::GraphicsContextGLOpenGL::compressedTexSubImage2D): Deleted.
(WebCore::GraphicsContextGLOpenGL::createBuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::createFramebuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::createProgram): Deleted.
(WebCore::GraphicsContextGLOpenGL::createRenderbuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::createShader): Deleted.
(WebCore::GraphicsContextGLOpenGL::createTexture): Deleted.
(WebCore::GraphicsContextGLOpenGL::deleteBuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::deleteFramebuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::deleteProgram): Deleted.
(WebCore::GraphicsContextGLOpenGL::deleteRenderbuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::deleteShader): Deleted.
(WebCore::GraphicsContextGLOpenGL::deleteTexture): Deleted.
(WebCore::GraphicsContextGLOpenGL::synthesizeGLError): Deleted.
(WebCore::GraphicsContextGLOpenGL::forceContextLost): Deleted.
(WebCore::GraphicsContextGLOpenGL::recycleContext): Deleted.
(WebCore::GraphicsContextGLOpenGL::dispatchContextChangedNotification): Deleted.
(WebCore::GraphicsContextGLOpenGL::texImage2DDirect): Deleted.
(WebCore::GraphicsContextGLOpenGL::drawArraysInstanced): Deleted.
(WebCore::GraphicsContextGLOpenGL::drawElementsInstanced): Deleted.
(WebCore::GraphicsContextGLOpenGL::vertexAttribDivisor): Deleted.
(WebCore::GraphicsContextGLOpenGL::primitiveRestartIndex): Deleted.
(WebCore::GraphicsContextGLOpenGL::copyBufferSubData): Deleted.
(WebCore::GraphicsContextGLOpenGL::getBufferSubData): Deleted.
(WebCore::GraphicsContextGLOpenGL::blitFramebuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::framebufferTextureLayer): Deleted.
(WebCore::GraphicsContextGLOpenGL::invalidateFramebuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::invalidateSubFramebuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::readBuffer): Deleted.
(WebCore::GraphicsContextGLOpenGL::getInternalformativ): Deleted.
(WebCore::GraphicsContextGLOpenGL::renderbufferStorageMultisample): Deleted.
(WebCore::GraphicsContextGLOpenGL::texStorage2D): Deleted.
(WebCore::GraphicsContextGLOpenGL::texStorage3D): Deleted.
(WebCore::GraphicsContextGLOpenGL::copyTexSubImage3D): Deleted.
(WebCore::GraphicsContextGLOpenGL::getFragDataLocation): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform1ui): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform2ui): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform3ui): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform4ui): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform1uiv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform2uiv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform3uiv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniform4uiv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniformMatrix2x3fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniformMatrix3x2fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniformMatrix2x4fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniformMatrix4x2fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniformMatrix3x4fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniformMatrix4x3fv): Deleted.
(WebCore::GraphicsContextGLOpenGL::vertexAttribI4i): Deleted.
(WebCore::GraphicsContextGLOpenGL::vertexAttribI4iv): Deleted.
(WebCore::GraphicsContextGLOpenGL::vertexAttribI4ui): Deleted.
(WebCore::GraphicsContextGLOpenGL::vertexAttribI4uiv): Deleted.
(WebCore::GraphicsContextGLOpenGL::vertexAttribIPointer): Deleted.
(WebCore::GraphicsContextGLOpenGL::drawRangeElements): Deleted.
(WebCore::GraphicsContextGLOpenGL::drawBuffers): Deleted.
(WebCore::GraphicsContextGLOpenGL::clearBufferiv): Deleted.
(WebCore::GraphicsContextGLOpenGL::clearBufferuiv): Deleted.
(WebCore::GraphicsContextGLOpenGL::clearBufferfv): Deleted.
(WebCore::GraphicsContextGLOpenGL::clearBufferfi): Deleted.
(WebCore::GraphicsContextGLOpenGL::createQuery): Deleted.
(WebCore::GraphicsContextGLOpenGL::deleteQuery): Deleted.
(WebCore::GraphicsContextGLOpenGL::isQuery): Deleted.
(WebCore::GraphicsContextGLOpenGL::beginQuery): Deleted.
(WebCore::GraphicsContextGLOpenGL::endQuery): Deleted.
(WebCore::GraphicsContextGLOpenGL::getQuery): Deleted.
(WebCore::GraphicsContextGLOpenGL::getQueryObjectui): Deleted.
(WebCore::GraphicsContextGLOpenGL::createSampler): Deleted.
(WebCore::GraphicsContextGLOpenGL::deleteSampler): Deleted.
(WebCore::GraphicsContextGLOpenGL::isSampler): Deleted.
(WebCore::GraphicsContextGLOpenGL::bindSampler): Deleted.
(WebCore::GraphicsContextGLOpenGL::samplerParameteri): Deleted.
(WebCore::GraphicsContextGLOpenGL::samplerParameterf): Deleted.
(WebCore::GraphicsContextGLOpenGL::getSamplerParameterf): Deleted.
(WebCore::GraphicsContextGLOpenGL::getSamplerParameteri): Deleted.
(WebCore::GraphicsContextGLOpenGL::fenceSync): Deleted.
(WebCore::GraphicsContextGLOpenGL::isSync): Deleted.
(WebCore::GraphicsContextGLOpenGL::deleteSync): Deleted.
(WebCore::GraphicsContextGLOpenGL::clientWaitSync): Deleted.
(WebCore::GraphicsContextGLOpenGL::waitSync): Deleted.
(WebCore::GraphicsContextGLOpenGL::getSynci): Deleted.
(WebCore::GraphicsContextGLOpenGL::createTransformFeedback): Deleted.
(WebCore::GraphicsContextGLOpenGL::deleteTransformFeedback): Deleted.
(WebCore::GraphicsContextGLOpenGL::isTransformFeedback): Deleted.
(WebCore::GraphicsContextGLOpenGL::bindTransformFeedback): Deleted.
(WebCore::GraphicsContextGLOpenGL::beginTransformFeedback): Deleted.
(WebCore::GraphicsContextGLOpenGL::endTransformFeedback): Deleted.
(WebCore::GraphicsContextGLOpenGL::transformFeedbackVaryings): Deleted.
(WebCore::GraphicsContextGLOpenGL::getTransformFeedbackVarying): Deleted.
(WebCore::GraphicsContextGLOpenGL::pauseTransformFeedback): Deleted.
(WebCore::GraphicsContextGLOpenGL::resumeTransformFeedback): Deleted.
(WebCore::GraphicsContextGLOpenGL::bindBufferBase): Deleted.
(WebCore::GraphicsContextGLOpenGL::bindBufferRange): Deleted.
(WebCore::GraphicsContextGLOpenGL::getUniformIndices): Deleted.
(WebCore::GraphicsContextGLOpenGL::getActiveUniforms): Deleted.
(WebCore::GraphicsContextGLOpenGL::getUniformBlockIndex): Deleted.
(WebCore::GraphicsContextGLOpenGL::getActiveUniformBlockName): Deleted.
(WebCore::GraphicsContextGLOpenGL::uniformBlockBinding): Deleted.
(WebCore::GraphicsContextGLOpenGL::readnPixels): Deleted.
(WebCore::GraphicsContextGLOpenGL::getActiveUniformBlockiv): Deleted.
(WebCore::GraphicsContextGLOpenGL::texImage2D): Deleted.
(WebCore::GraphicsContextGLOpenGL::texImage3D): Deleted.
(WebCore::GraphicsContextGLOpenGL::texSubImage3D): Deleted.
(WebCore::GraphicsContextGLOpenGL::compressedTexImage3D): Deleted.
(WebCore::GraphicsContextGLOpenGL::compressedTexSubImage3D): Deleted.
(WebCore::GraphicsContextGLOpenGL::multiDrawArraysANGLE): Deleted.
(WebCore::GraphicsContextGLOpenGL::multiDrawArraysInstancedANGLE): Deleted.
(WebCore::GraphicsContextGLOpenGL::multiDrawElementsANGLE): Deleted.
(WebCore::GraphicsContextGLOpenGL::multiDrawElementsInstancedANGLE): Deleted.
(WebCore::GraphicsContextGLOpenGL::texImage2DResourceSafe): Deleted.
* platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp:
(WebCore::GraphicsContextGLOpenGLManager::addContext):
(WebCore::GraphicsContextGLOpenGLManager::removeContext):
* platform/graphics/opengl/GraphicsContextGLOpenGLManager.h:
* platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:
(WebCore::GraphicsContextGLOpenGL::isGLES2Compliant const):
* platform/graphics/texmap/GraphicsContextGLTextureMapper.h:
* platform/ios/wak/WebCoreThread.mm:

Source/WebKit:

* GPUProcess/graphics/RemoteGraphicsContextGL.cpp:
(WebKit::RemoteGraphicsContextGL::paintPixelBufferToImageBuffer):
Function paintToCanvas was moved to GraphicsContextGL.

* GPUProcess/graphics/ScopedWebGLRenderingResourcesRequest.cpp:
(WebKit::ScopedWebGLRenderingResourcesRequest::freeWebGLRenderingResources):
Use static functions from GraphicsContextGLANGLE.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreHeaderscmake">trunk/Source/WebCore/Headers.cmake</a></li>
<li><a href="#trunkSourceWebCorePlatformMaccmake">trunk/Source/WebCore/PlatformMac.cmake</a></li>
<li><a href="#trunkSourceWebCoreSourcestxt">trunk/Source/WebCore/Sources.txt</a></li>
<li><a href="#trunkSourceWebCoreSourcesCocoatxt">trunk/Source/WebCore/SourcesCocoa.txt</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsContextGLh">trunk/Source/WebCore/platform/graphics/GraphicsContextGL.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsangleExtensionsGLANGLEcpp">trunk/Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsangleExtensionsGLANGLEh">trunk/Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsangleGraphicsContextGLANGLEcpp">trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscairoGraphicsContextGLCairocpp">trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextGLCairo.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscgGraphicsContextGLCGcpp">trunk/Source/WebCore/platform/graphics/cg/GraphicsContextGLCG.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscocoaGraphicsContextGLCocoah">trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscocoaGraphicsContextGLCocoamm">trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsnicosiatexmapNicosiaGCGLANGLELayercpp">trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsnicosiatexmapNicosiaGCGLANGLELayerh">trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsnicosiatexmapNicosiaGCGLLayercpp">trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLLayer.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsnicosiatexmapNicosiaGCGLLayerh">trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLLayer.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsopenglGraphicsContextGLOpenGLcpp">trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsopenglGraphicsContextGLOpenGLh">trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsopenglGraphicsContextGLOpenGLManagercpp">trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsopenglGraphicsContextGLOpenGLManagerh">trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLManager.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicstexmapGraphicsContextGLTextureMappercpp">trunk/Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicstexmapGraphicsContextGLTextureMapperh">trunk/Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapper.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicstexmapGraphicsContextGLTextureMapperANGLEcpp">trunk/Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicstexmapTextureMapperGCGLPlatformLayercpp">trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGCGLPlatformLayer.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicstexmapTextureMapperGCGLPlatformLayerh">trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGCGLPlatformLayer.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinGraphicsContextGLDirect2Dcpp">trunk/Source/WebCore/platform/graphics/win/GraphicsContextGLDirect2D.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformioswakWebCoreThreadmm">trunk/Source/WebCore/platform/ios/wak/WebCoreThread.mm</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitGPUProcessgraphicsRemoteGraphicsContextGLcpp">trunk/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp</a></li>
<li><a href="#trunkSourceWebKitGPUProcessgraphicsScopedWebGLRenderingResourcesRequestcpp">trunk/Source/WebKit/GPUProcess/graphics/ScopedWebGLRenderingResourcesRequest.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsContextGLStateh">trunk/Source/WebCore/platform/graphics/GraphicsContextGLState.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsangleGraphicsContextGLANGLEh">trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscvGraphicsContextGLCVCocoacpp">trunk/Source/WebCore/platform/graphics/cv/GraphicsContextGLCVCocoa.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscvGraphicsContextGLCVCocoah">trunk/Source/WebCore/platform/graphics/cv/GraphicsContextGLCVCocoa.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformgraphicscvGraphicsContextGLCVANGLEcpp">trunk/Source/WebCore/platform/graphics/cv/GraphicsContextGLCVANGLE.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscvGraphicsContextGLCVANGLEh">trunk/Source/WebCore/platform/graphics/cv/GraphicsContextGLCVANGLE.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsopenglGraphicsContextGLOpenGLCommoncpp">trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (286292 => 286293)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt      2021-11-30 14:23:53 UTC (rev 286292)
+++ trunk/Source/WebCore/CMakeLists.txt 2021-11-30 14:54:52 UTC (rev 286293)
</span><span class="lines">@@ -1894,7 +1894,7 @@
</span><span class="cx">             platform/graphics/ANGLEWebKitBridge.cpp
</span><span class="cx"> 
</span><span class="cx">             platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp
</span><del>-            platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp
</del><ins>+            platform/graphics/opengl/GraphicsContextGLOpenGL.cpp
</ins><span class="cx">             platform/graphics/opengl/TemporaryOpenGLSetting.cpp
</span><span class="cx">         )
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (286292 => 286293)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2021-11-30 14:23:53 UTC (rev 286292)
+++ trunk/Source/WebCore/ChangeLog      2021-11-30 14:54:52 UTC (rev 286293)
</span><span class="lines">@@ -1,3 +1,1150 @@
</span><ins>+2021-11-30  Kimmo Kinnunen  <kkinnunen@apple.com>
+
+        GraphicsContextGL should have ANGLE-specific subclass
+        https://bugs.webkit.org/show_bug.cgi?id=233522
+
+        Reviewed by Antti Koivisto.
+
+        Add GraphicsContextGLANGLE, rename all relevant GraphicsContextGLOpenGL symbols to this.
+        Leave the implementations in their respective files for ease of review. Also,
+        some of the symbols might be moved to GraphicsContextGLANGLE subclasses (GraphicsContextGLCocoa
+        and GraphicsContextGLTextureMapper ANGLE flavor).
+
+        GraphicsContextGLOpenGL now means "GraphicsContextGL implemented with OpenGL and OpenGLES".
+
+        GraphicsContextGLANGLE means "GraphicsContextGL implemented with ANGLE".
+
+        Move GraphicsContextGLOpenGLCommon.cpp into GraphicsContextGLOpenGL.cpp, these now refer to
+        just the OpenGL implemetation.
+
+        Duplicate "rendering result" and "compositing result" functions from GraphicsContextGLOpenGL.cpp
+        into GraphicsContextGLANGLE.cpp. These are fairly repetitive functions that most likely will
+        change in the future for ANGLE backend, so the interim duplicated code should not be a big issue.
+
+        This is part of work trying to reduce the ifdef use in GraphicsContextGLOpenGL, in order to make
+        WebGL easier to maintain correctly.
+
+        No new tests, a refactor.
+
+        * CMakeLists.txt:
+        * Headers.cmake:
+        * PlatformMac.cmake:
+        * Sources.txt:
+        * SourcesCocoa.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/graphics/GraphicsContextGL.cpp:
+        (WebCore::GraphicsContextGL::create): Deleted.
+        * platform/graphics/GraphicsContextGL.h:
+        * platform/graphics/GraphicsContextGLState.h: Added.
+        (WebCore::GraphicsContextGLState::currentBoundTexture const):
+        (WebCore::GraphicsContextGLState::boundTexture const):
+        (WebCore::GraphicsContextGLState::currentBoundTarget const):
+        (WebCore::GraphicsContextGLState::boundTarget const):
+        (WebCore::GraphicsContextGLState::setBoundTexture):
+        * platform/graphics/angle/ExtensionsGLANGLE.cpp:
+        (WebCore::ExtensionsGLANGLE::ExtensionsGLANGLE):
+        * platform/graphics/angle/ExtensionsGLANGLE.h:
+        * platform/graphics/angle/GraphicsContextGLANGLE.cpp:
+        (WebCore::GraphicsContextGLANGLE::drawingBufferTextureTarget):
+        (WebCore::GraphicsContextGLANGLE::drawingBufferTextureTargetQueryForDrawingTarget):
+        (WebCore::GraphicsContextGLANGLE::EGLDrawingBufferTextureTargetForDrawingTarget):
+        (WebCore::GraphicsContextGLANGLE::releaseThreadResources):
+        (WebCore::GraphicsContextGLANGLE::readPixelsForPaintResults):
+        (WebCore::GraphicsContextGLANGLE::validateAttributes):
+        (WebCore::GraphicsContextGLANGLE::reshapeFBOs):
+        (WebCore::GraphicsContextGLANGLE::attachDepthAndStencilBufferIfNeeded):
+        (WebCore::GraphicsContextGLANGLE::resolveMultisamplingIfNecessary):
+        (WebCore::GraphicsContextGLANGLE::renderbufferStorage):
+        (WebCore::GraphicsContextGLANGLE::getIntegerv):
+        (WebCore::GraphicsContextGLANGLE::getShaderPrecisionFormat):
+        (WebCore::GraphicsContextGLANGLE::texImage2D):
+        (WebCore::GraphicsContextGLANGLE::texSubImage2D):
+        (WebCore::GraphicsContextGLANGLE::compressedTexImage2D):
+        (WebCore::GraphicsContextGLANGLE::compressedTexSubImage2D):
+        (WebCore::GraphicsContextGLANGLE::depthRange):
+        (WebCore::GraphicsContextGLANGLE::clearDepth):
+        (WebCore::GraphicsContextGLANGLE::getExtensions):
+        (WebCore::GraphicsContextGLANGLE::readnPixels):
+        (WebCore::GraphicsContextGLANGLE::readnPixelsImpl):
+        (WebCore::GraphicsContextGLANGLE::validateDepthStencil):
+        (WebCore::GraphicsContextGLANGLE::prepareTexture):
+        (WebCore::GraphicsContextGLANGLE::prepareTextureImpl):
+        (WebCore::GraphicsContextGLANGLE::readRenderingResults):
+        (WebCore::GraphicsContextGLANGLE::reshape):
+        (WebCore::GraphicsContextGLANGLE::activeTexture):
+        (WebCore::GraphicsContextGLANGLE::attachShader):
+        (WebCore::GraphicsContextGLANGLE::bindAttribLocation):
+        (WebCore::GraphicsContextGLANGLE::bindBuffer):
+        (WebCore::GraphicsContextGLANGLE::bindFramebuffer):
+        (WebCore::GraphicsContextGLANGLE::bindRenderbuffer):
+        (WebCore::GraphicsContextGLANGLE::bindTexture):
+        (WebCore::GraphicsContextGLANGLE::blendColor):
+        (WebCore::GraphicsContextGLANGLE::blendEquation):
+        (WebCore::GraphicsContextGLANGLE::blendEquationSeparate):
+        (WebCore::GraphicsContextGLANGLE::blendFunc):
+        (WebCore::GraphicsContextGLANGLE::blendFuncSeparate):
+        (WebCore::GraphicsContextGLANGLE::bufferData):
+        (WebCore::GraphicsContextGLANGLE::bufferSubData):
+        (WebCore::GraphicsContextGLANGLE::getBufferSubData):
+        (WebCore::GraphicsContextGLANGLE::copyBufferSubData):
+        (WebCore::GraphicsContextGLANGLE::getInternalformativ):
+        (WebCore::GraphicsContextGLANGLE::renderbufferStorageMultisample):
+        (WebCore::GraphicsContextGLANGLE::texStorage2D):
+        (WebCore::GraphicsContextGLANGLE::texStorage3D):
+        (WebCore::GraphicsContextGLANGLE::texImage3D):
+        (WebCore::GraphicsContextGLANGLE::texSubImage3D):
+        (WebCore::GraphicsContextGLANGLE::compressedTexImage3D):
+        (WebCore::GraphicsContextGLANGLE::compressedTexSubImage3D):
+        (WebCore::GraphicsContextGLANGLE::getActiveUniforms):
+        (WebCore::GraphicsContextGLANGLE::checkFramebufferStatus):
+        (WebCore::GraphicsContextGLANGLE::clearColor):
+        (WebCore::GraphicsContextGLANGLE::clear):
+        (WebCore::GraphicsContextGLANGLE::clearStencil):
+        (WebCore::GraphicsContextGLANGLE::colorMask):
+        (WebCore::GraphicsContextGLANGLE::compileShader):
+        (WebCore::GraphicsContextGLANGLE::compileShaderDirect):
+        (WebCore::GraphicsContextGLANGLE::texImage2DDirect):
+        (WebCore::GraphicsContextGLANGLE::copyTexImage2D):
+        (WebCore::GraphicsContextGLANGLE::copyTexSubImage2D):
+        (WebCore::GraphicsContextGLANGLE::cullFace):
+        (WebCore::GraphicsContextGLANGLE::depthFunc):
+        (WebCore::GraphicsContextGLANGLE::depthMask):
+        (WebCore::GraphicsContextGLANGLE::detachShader):
+        (WebCore::GraphicsContextGLANGLE::disable):
+        (WebCore::GraphicsContextGLANGLE::disableVertexAttribArray):
+        (WebCore::GraphicsContextGLANGLE::drawArrays):
+        (WebCore::GraphicsContextGLANGLE::drawElements):
+        (WebCore::GraphicsContextGLANGLE::enable):
+        (WebCore::GraphicsContextGLANGLE::enableVertexAttribArray):
+        (WebCore::GraphicsContextGLANGLE::finish):
+        (WebCore::GraphicsContextGLANGLE::flush):
+        (WebCore::GraphicsContextGLANGLE::framebufferRenderbuffer):
+        (WebCore::GraphicsContextGLANGLE::framebufferTexture2D):
+        (WebCore::GraphicsContextGLANGLE::frontFace):
+        (WebCore::GraphicsContextGLANGLE::generateMipmap):
+        (WebCore::GraphicsContextGLANGLE::getActiveAttribImpl):
+        (WebCore::GraphicsContextGLANGLE::getActiveAttrib):
+        (WebCore::GraphicsContextGLANGLE::getActiveUniformImpl):
+        (WebCore::GraphicsContextGLANGLE::getActiveUniform):
+        (WebCore::GraphicsContextGLANGLE::getAttachedShaders):
+        (WebCore::GraphicsContextGLANGLE::getAttribLocation):
+        (WebCore::GraphicsContextGLANGLE::getAttribLocationDirect):
+        (WebCore::GraphicsContextGLANGLE::moveErrorsToSyntheticErrorList):
+        (WebCore::GraphicsContextGLANGLE::getError):
+        (WebCore::GraphicsContextGLANGLE::getString):
+        (WebCore::GraphicsContextGLANGLE::hint):
+        (WebCore::GraphicsContextGLANGLE::isBuffer):
+        (WebCore::GraphicsContextGLANGLE::isEnabled):
+        (WebCore::GraphicsContextGLANGLE::isFramebuffer):
+        (WebCore::GraphicsContextGLANGLE::isProgram):
+        (WebCore::GraphicsContextGLANGLE::isRenderbuffer):
+        (WebCore::GraphicsContextGLANGLE::isShader):
+        (WebCore::GraphicsContextGLANGLE::isTexture):
+        (WebCore::GraphicsContextGLANGLE::lineWidth):
+        (WebCore::GraphicsContextGLANGLE::linkProgram):
+        (WebCore::GraphicsContextGLANGLE::pixelStorei):
+        (WebCore::GraphicsContextGLANGLE::polygonOffset):
+        (WebCore::GraphicsContextGLANGLE::sampleCoverage):
+        (WebCore::GraphicsContextGLANGLE::scissor):
+        (WebCore::GraphicsContextGLANGLE::shaderSource):
+        (WebCore::GraphicsContextGLANGLE::stencilFunc):
+        (WebCore::GraphicsContextGLANGLE::stencilFuncSeparate):
+        (WebCore::GraphicsContextGLANGLE::stencilMask):
+        (WebCore::GraphicsContextGLANGLE::stencilMaskSeparate):
+        (WebCore::GraphicsContextGLANGLE::stencilOp):
+        (WebCore::GraphicsContextGLANGLE::stencilOpSeparate):
+        (WebCore::GraphicsContextGLANGLE::texParameterf):
+        (WebCore::GraphicsContextGLANGLE::texParameteri):
+        (WebCore::GraphicsContextGLANGLE::uniform1f):
+        (WebCore::GraphicsContextGLANGLE::uniform1fv):
+        (WebCore::GraphicsContextGLANGLE::uniform2f):
+        (WebCore::GraphicsContextGLANGLE::uniform2fv):
+        (WebCore::GraphicsContextGLANGLE::uniform3f):
+        (WebCore::GraphicsContextGLANGLE::uniform3fv):
+        (WebCore::GraphicsContextGLANGLE::uniform4f):
+        (WebCore::GraphicsContextGLANGLE::uniform4fv):
+        (WebCore::GraphicsContextGLANGLE::uniform1i):
+        (WebCore::GraphicsContextGLANGLE::uniform1iv):
+        (WebCore::GraphicsContextGLANGLE::uniform2i):
+        (WebCore::GraphicsContextGLANGLE::uniform2iv):
+        (WebCore::GraphicsContextGLANGLE::uniform3i):
+        (WebCore::GraphicsContextGLANGLE::uniform3iv):
+        (WebCore::GraphicsContextGLANGLE::uniform4i):
+        (WebCore::GraphicsContextGLANGLE::uniform4iv):
+        (WebCore::GraphicsContextGLANGLE::uniformMatrix2fv):
+        (WebCore::GraphicsContextGLANGLE::uniformMatrix3fv):
+        (WebCore::GraphicsContextGLANGLE::uniformMatrix4fv):
+        (WebCore::GraphicsContextGLANGLE::useProgram):
+        (WebCore::GraphicsContextGLANGLE::validateProgram):
+        (WebCore::GraphicsContextGLANGLE::vertexAttrib1f):
+        (WebCore::GraphicsContextGLANGLE::vertexAttrib1fv):
+        (WebCore::GraphicsContextGLANGLE::vertexAttrib2f):
+        (WebCore::GraphicsContextGLANGLE::vertexAttrib2fv):
+        (WebCore::GraphicsContextGLANGLE::vertexAttrib3f):
+        (WebCore::GraphicsContextGLANGLE::vertexAttrib3fv):
+        (WebCore::GraphicsContextGLANGLE::vertexAttrib4f):
+        (WebCore::GraphicsContextGLANGLE::vertexAttrib4fv):
+        (WebCore::GraphicsContextGLANGLE::vertexAttribPointer):
+        (WebCore::GraphicsContextGLANGLE::vertexAttribIPointer):
+        (WebCore::GraphicsContextGLANGLE::viewport):
+        (WebCore::GraphicsContextGLANGLE::createVertexArray):
+        (WebCore::GraphicsContextGLANGLE::deleteVertexArray):
+        (WebCore::GraphicsContextGLANGLE::isVertexArray):
+        (WebCore::GraphicsContextGLANGLE::bindVertexArray):
+        (WebCore::GraphicsContextGLANGLE::getBooleanv):
+        (WebCore::GraphicsContextGLANGLE::getBufferParameteri):
+        (WebCore::GraphicsContextGLANGLE::getFloatv):
+        (WebCore::GraphicsContextGLANGLE::getInteger64):
+        (WebCore::GraphicsContextGLANGLE::getInteger64i):
+        (WebCore::GraphicsContextGLANGLE::getFramebufferAttachmentParameteri):
+        (WebCore::GraphicsContextGLANGLE::getProgrami):
+        (WebCore::GraphicsContextGLANGLE::getUnmangledInfoLog):
+        (WebCore::GraphicsContextGLANGLE::getProgramInfoLog):
+        (WebCore::GraphicsContextGLANGLE::getRenderbufferParameteri):
+        (WebCore::GraphicsContextGLANGLE::getShaderi):
+        (WebCore::GraphicsContextGLANGLE::getShaderInfoLog):
+        (WebCore::GraphicsContextGLANGLE::getShaderSource):
+        (WebCore::GraphicsContextGLANGLE::getTexParameterf):
+        (WebCore::GraphicsContextGLANGLE::getTexParameteri):
+        (WebCore::GraphicsContextGLANGLE::getUniformfv):
+        (WebCore::GraphicsContextGLANGLE::getUniformiv):
+        (WebCore::GraphicsContextGLANGLE::getUniformuiv):
+        (WebCore::GraphicsContextGLANGLE::getUniformLocation):
+        (WebCore::GraphicsContextGLANGLE::getVertexAttribOffset):
+        (WebCore::GraphicsContextGLANGLE::createBuffer):
+        (WebCore::GraphicsContextGLANGLE::createFramebuffer):
+        (WebCore::GraphicsContextGLANGLE::createProgram):
+        (WebCore::GraphicsContextGLANGLE::createRenderbuffer):
+        (WebCore::GraphicsContextGLANGLE::createShader):
+        (WebCore::GraphicsContextGLANGLE::createTexture):
+        (WebCore::GraphicsContextGLANGLE::deleteBuffer):
+        (WebCore::GraphicsContextGLANGLE::deleteFramebuffer):
+        (WebCore::GraphicsContextGLANGLE::deleteProgram):
+        (WebCore::GraphicsContextGLANGLE::deleteRenderbuffer):
+        (WebCore::GraphicsContextGLANGLE::deleteShader):
+        (WebCore::GraphicsContextGLANGLE::deleteTexture):
+        (WebCore::GraphicsContextGLANGLE::synthesizeGLError):
+        (WebCore::GraphicsContextGLANGLE::forceContextLost):
+        (WebCore::GraphicsContextGLANGLE::recycleContext):
+        (WebCore::GraphicsContextGLANGLE::dispatchContextChangedNotification):
+        (WebCore::GraphicsContextGLANGLE::drawArraysInstanced):
+        (WebCore::GraphicsContextGLANGLE::drawElementsInstanced):
+        (WebCore::GraphicsContextGLANGLE::vertexAttribDivisor):
+        (WebCore::GraphicsContextGLANGLE::getUniformBlockIndex):
+        (WebCore::GraphicsContextGLANGLE::getActiveUniformBlockName):
+        (WebCore::GraphicsContextGLANGLE::uniformBlockBinding):
+        (WebCore::GraphicsContextGLANGLE::createQuery):
+        (WebCore::GraphicsContextGLANGLE::beginQuery):
+        (WebCore::GraphicsContextGLANGLE::endQuery):
+        (WebCore::GraphicsContextGLANGLE::getQueryObjectui):
+        (WebCore::GraphicsContextGLANGLE::createTransformFeedback):
+        (WebCore::GraphicsContextGLANGLE::deleteTransformFeedback):
+        (WebCore::GraphicsContextGLANGLE::isTransformFeedback):
+        (WebCore::GraphicsContextGLANGLE::bindTransformFeedback):
+        (WebCore::GraphicsContextGLANGLE::beginTransformFeedback):
+        (WebCore::GraphicsContextGLANGLE::endTransformFeedback):
+        (WebCore::GraphicsContextGLANGLE::transformFeedbackVaryings):
+        (WebCore::GraphicsContextGLANGLE::getTransformFeedbackVarying):
+        (WebCore::GraphicsContextGLANGLE::bindBufferBase):
+        (WebCore::GraphicsContextGLANGLE::blitFramebuffer):
+        (WebCore::GraphicsContextGLANGLE::framebufferTextureLayer):
+        (WebCore::GraphicsContextGLANGLE::invalidateFramebuffer):
+        (WebCore::GraphicsContextGLANGLE::invalidateSubFramebuffer):
+        (WebCore::GraphicsContextGLANGLE::readBuffer):
+        (WebCore::GraphicsContextGLANGLE::copyTexSubImage3D):
+        (WebCore::GraphicsContextGLANGLE::getFragDataLocation):
+        (WebCore::GraphicsContextGLANGLE::uniform1ui):
+        (WebCore::GraphicsContextGLANGLE::uniform2ui):
+        (WebCore::GraphicsContextGLANGLE::uniform3ui):
+        (WebCore::GraphicsContextGLANGLE::uniform4ui):
+        (WebCore::GraphicsContextGLANGLE::uniform1uiv):
+        (WebCore::GraphicsContextGLANGLE::uniform2uiv):
+        (WebCore::GraphicsContextGLANGLE::uniform3uiv):
+        (WebCore::GraphicsContextGLANGLE::uniform4uiv):
+        (WebCore::GraphicsContextGLANGLE::uniformMatrix2x3fv):
+        (WebCore::GraphicsContextGLANGLE::uniformMatrix3x2fv):
+        (WebCore::GraphicsContextGLANGLE::uniformMatrix2x4fv):
+        (WebCore::GraphicsContextGLANGLE::uniformMatrix4x2fv):
+        (WebCore::GraphicsContextGLANGLE::uniformMatrix3x4fv):
+        (WebCore::GraphicsContextGLANGLE::uniformMatrix4x3fv):
+        (WebCore::GraphicsContextGLANGLE::vertexAttribI4i):
+        (WebCore::GraphicsContextGLANGLE::vertexAttribI4iv):
+        (WebCore::GraphicsContextGLANGLE::vertexAttribI4ui):
+        (WebCore::GraphicsContextGLANGLE::vertexAttribI4uiv):
+        (WebCore::GraphicsContextGLANGLE::drawRangeElements):
+        (WebCore::GraphicsContextGLANGLE::drawBuffers):
+        (WebCore::GraphicsContextGLANGLE::clearBufferiv):
+        (WebCore::GraphicsContextGLANGLE::clearBufferuiv):
+        (WebCore::GraphicsContextGLANGLE::clearBufferfv):
+        (WebCore::GraphicsContextGLANGLE::clearBufferfi):
+        (WebCore::GraphicsContextGLANGLE::deleteQuery):
+        (WebCore::GraphicsContextGLANGLE::isQuery):
+        (WebCore::GraphicsContextGLANGLE::getQuery):
+        (WebCore::GraphicsContextGLANGLE::createSampler):
+        (WebCore::GraphicsContextGLANGLE::deleteSampler):
+        (WebCore::GraphicsContextGLANGLE::isSampler):
+        (WebCore::GraphicsContextGLANGLE::bindSampler):
+        (WebCore::GraphicsContextGLANGLE::samplerParameteri):
+        (WebCore::GraphicsContextGLANGLE::samplerParameterf):
+        (WebCore::GraphicsContextGLANGLE::getSamplerParameterf):
+        (WebCore::GraphicsContextGLANGLE::getSamplerParameteri):
+        (WebCore::GraphicsContextGLANGLE::fenceSync):
+        (WebCore::GraphicsContextGLANGLE::isSync):
+        (WebCore::GraphicsContextGLANGLE::deleteSync):
+        (WebCore::GraphicsContextGLANGLE::clientWaitSync):
+        (WebCore::GraphicsContextGLANGLE::waitSync):
+        (WebCore::GraphicsContextGLANGLE::getSynci):
+        (WebCore::GraphicsContextGLANGLE::pauseTransformFeedback):
+        (WebCore::GraphicsContextGLANGLE::resumeTransformFeedback):
+        (WebCore::GraphicsContextGLANGLE::bindBufferRange):
+        (WebCore::GraphicsContextGLANGLE::getUniformIndices):
+        (WebCore::GraphicsContextGLANGLE::getActiveUniformBlockiv):
+        (WebCore::GraphicsContextGLANGLE::multiDrawArraysANGLE):
+        (WebCore::GraphicsContextGLANGLE::multiDrawArraysInstancedANGLE):
+        (WebCore::GraphicsContextGLANGLE::multiDrawElementsANGLE):
+        (WebCore::GraphicsContextGLANGLE::multiDrawElementsInstancedANGLE):
+        (WebCore::GraphicsContextGLANGLE::waitAndUpdateOldestFrame):
+        (WebCore::GraphicsContextGLANGLE::simulateEventForTesting):
+        (WebCore::GraphicsContextGLANGLE::isGLES2Compliant const):
+        (WebCore::GraphicsContextGLANGLE::paintRenderingResultsToCanvas):
+        (WebCore::GraphicsContextGLANGLE::paintCompositedResultsToCanvas):
+        (WebCore::GraphicsContextGLANGLE::paintRenderingResultsToPixelBuffer):
+        (WebCore::GraphicsContextGLANGLE::readRenderingResultsForPainting):
+        (WebCore::GraphicsContextGLANGLE::readCompositedResultsForPainting):
+        (WebCore::GraphicsContextGLOpenGL::drawingBufferTextureTarget): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::drawingBufferTextureTargetQueryForDrawingTarget): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::EGLDrawingBufferTextureTargetForDrawingTarget): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::releaseThreadResources): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::readPixelsForPaintResults): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::validateAttributes): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::reshapeFBOs): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::attachDepthAndStencilBufferIfNeeded): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::resolveMultisamplingIfNecessary): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::renderbufferStorage): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getIntegerv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getShaderPrecisionFormat): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::texImage2D): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::texSubImage2D): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::compressedTexImage2D): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::compressedTexSubImage2D): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::depthRange): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::clearDepth): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getExtensions): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::readnPixels): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::readnPixelsImpl): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::validateDepthStencil): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::prepareTexture): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::prepareTextureImpl): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::readRenderingResults): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::reshape): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::activeTexture): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::attachShader): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::bindAttribLocation): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::bindBuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::bindFramebuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::bindRenderbuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::bindTexture): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::blendColor): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::blendEquation): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::blendEquationSeparate): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::blendFunc): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::blendFuncSeparate): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::bufferData): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::bufferSubData): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getBufferSubData): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::copyBufferSubData): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getInternalformativ): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::renderbufferStorageMultisample): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::texStorage2D): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::texStorage3D): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::texImage3D): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::texSubImage3D): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::compressedTexImage3D): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::compressedTexSubImage3D): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getActiveUniforms): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::checkFramebufferStatus): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::clearColor): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::clear): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::clearStencil): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::colorMask): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::compileShader): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::compileShaderDirect): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::texImage2DDirect): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::copyTexImage2D): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::copyTexSubImage2D): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::cullFace): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::depthFunc): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::depthMask): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::detachShader): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::disable): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::disableVertexAttribArray): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::drawArrays): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::drawElements): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::enable): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::enableVertexAttribArray): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::finish): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::flush): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::framebufferRenderbuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::framebufferTexture2D): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::frontFace): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::generateMipmap): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getActiveAttribImpl): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getActiveAttrib): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getActiveUniformImpl): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getActiveUniform): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getAttachedShaders): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getAttribLocation): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getAttribLocationDirect): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::moveErrorsToSyntheticErrorList): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getError): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getString): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::hint): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::isBuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::isEnabled): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::isFramebuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::isProgram): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::isRenderbuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::isShader): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::isTexture): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::lineWidth): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::linkProgram): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::pixelStorei): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::polygonOffset): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::sampleCoverage): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::scissor): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::shaderSource): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::stencilFunc): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::stencilFuncSeparate): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::stencilMask): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::stencilMaskSeparate): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::stencilOp): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::stencilOpSeparate): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::texParameterf): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::texParameteri): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform1f): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform1fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform2f): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform2fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform3f): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform3fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform4f): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform4fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform1i): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform1iv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform2i): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform2iv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform3i): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform3iv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform4i): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform4iv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix2fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix3fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix4fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::useProgram): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::validateProgram): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::vertexAttrib1f): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::vertexAttrib1fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::vertexAttrib2f): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::vertexAttrib2fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::vertexAttrib3f): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::vertexAttrib3fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::vertexAttrib4f): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::vertexAttrib4fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::vertexAttribPointer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::vertexAttribIPointer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::viewport): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::createVertexArray): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::deleteVertexArray): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::isVertexArray): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::bindVertexArray): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getBooleanv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getBufferParameteri): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getFloatv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getInteger64): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getInteger64i): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getFramebufferAttachmentParameteri): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getProgrami): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getUnmangledInfoLog): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getProgramInfoLog): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getRenderbufferParameteri): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getShaderi): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getShaderInfoLog): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getShaderSource): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getTexParameterf): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getTexParameteri): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getUniformfv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getUniformiv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getUniformuiv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getUniformLocation): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getVertexAttribOffset): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::createBuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::createFramebuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::createProgram): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::createRenderbuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::createShader): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::createTexture): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::deleteBuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::deleteFramebuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::deleteProgram): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::deleteRenderbuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::deleteShader): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::deleteTexture): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::synthesizeGLError): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::forceContextLost): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::recycleContext): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::dispatchContextChangedNotification): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::drawArraysInstanced): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::drawElementsInstanced): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::vertexAttribDivisor): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getUniformBlockIndex): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getActiveUniformBlockName): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniformBlockBinding): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::createQuery): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::beginQuery): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::endQuery): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getQueryObjectui): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::createTransformFeedback): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::deleteTransformFeedback): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::isTransformFeedback): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::bindTransformFeedback): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::beginTransformFeedback): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::endTransformFeedback): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::transformFeedbackVaryings): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getTransformFeedbackVarying): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::bindBufferBase): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::blitFramebuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::framebufferTextureLayer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::invalidateFramebuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::invalidateSubFramebuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::readBuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::copyTexSubImage3D): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getFragDataLocation): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform1ui): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform2ui): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform3ui): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform4ui): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform1uiv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform2uiv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform3uiv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform4uiv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix2x3fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix3x2fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix2x4fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix4x2fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix3x4fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix4x3fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::vertexAttribI4i): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::vertexAttribI4iv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::vertexAttribI4ui): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::vertexAttribI4uiv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::drawRangeElements): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::drawBuffers): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::clearBufferiv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::clearBufferuiv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::clearBufferfv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::clearBufferfi): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::deleteQuery): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::isQuery): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getQuery): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::createSampler): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::deleteSampler): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::isSampler): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::bindSampler): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::samplerParameteri): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::samplerParameterf): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getSamplerParameterf): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getSamplerParameteri): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::fenceSync): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::isSync): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::deleteSync): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::clientWaitSync): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::waitSync): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getSynci): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::pauseTransformFeedback): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::resumeTransformFeedback): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::bindBufferRange): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getUniformIndices): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getActiveUniformBlockiv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::multiDrawArraysANGLE): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::multiDrawArraysInstancedANGLE): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::multiDrawElementsANGLE): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::multiDrawElementsInstancedANGLE): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::waitAndUpdateOldestFrame): Deleted.
+        * platform/graphics/angle/GraphicsContextGLANGLE.h: Copied from Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h.
+        * platform/graphics/cairo/GraphicsContextGLCairo.cpp:
+        (WebCore::GraphicsContextGL::paintToCanvas):
+        (WebCore::GraphicsContextGLOpenGL::paintToCanvas): Deleted.
+        * platform/graphics/cg/GraphicsContextGLCG.cpp:
+        (WebCore::GraphicsContextGL::paintToCanvas):
+        (WebCore::GraphicsContextGLOpenGL::paintToCanvas): Deleted.
+        Move paintToCanvas from GraphicsContextGLOpenGL to
+        GraphicsContextGL. It was a generic static function and did not
+        have any dependency to the GraphicsContextGLOpenGL.
+
+        * platform/graphics/cocoa/GraphicsContextGLCocoa.h:
+        * platform/graphics/cocoa/GraphicsContextGLCocoa.mm:
+        (WebCore::initializeEGLDisplay):
+        (WebCore::GraphicsContextGLCocoa::GraphicsContextGLCocoa):
+        (WebCore::GraphicsContextGLANGLE::GraphicsContextGLANGLE):
+        (WebCore::GraphicsContextGLANGLE::~GraphicsContextGLANGLE):
+        (WebCore::GraphicsContextGLANGLE::platformLayer const):
+        (WebCore::GraphicsContextGLANGLE::makeContextCurrent):
+        (WebCore::GraphicsContextGLANGLE::checkGPUStatus):
+        (WebCore::GraphicsContextGLANGLE::setContextVisibility):
+        (WebCore::GraphicsContextGLANGLE::displayWasReconfigured):
+        (WebCore::GraphicsContextGLANGLE::reshapeDisplayBufferBacking):
+        (WebCore::GraphicsContextGLANGLE::allocateAndBindDisplayBufferBacking):
+        (WebCore::GraphicsContextGLANGLE::bindDisplayBufferBacking):
+        (WebCore::GraphicsContextGLANGLE::makeCurrent):
+        (WebCore::GraphicsContextGLCocoa::createPbufferAndAttachIOSurface):
+        (WebCore::GraphicsContextGLANGLE::prepareForDisplay):
+        (WebCore::GraphicsContextGLCocoa::asCV):
+        (WebCore::GraphicsContextGLANGLE::readCompositedResults):
+        (WebCore::GraphicsContextGLANGLE::paintCompositedResultsToMediaSample):
+        (WebCore::GraphicsContextGLANGLE::platformReleaseThreadResources):
+        (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::platformLayer const): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::makeContextCurrent): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::checkGPUStatus): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::setContextVisibility): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::displayWasReconfigured): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::reshapeDisplayBufferBacking): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::allocateAndBindDisplayBufferBacking): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::bindDisplayBufferBacking): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::makeCurrent): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::isGLES2Compliant const): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::simulateEventForTesting): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::prepareForDisplay): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::asCV): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::readCompositedResults): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::paintCompositedResultsToMediaSample): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::platformReleaseThreadResources): Deleted.
+        * platform/graphics/cv/GraphicsContextGLCVCocoa.cpp: Renamed from Source/WebCore/platform/graphics/cv/GraphicsContextGLCVANGLE.cpp.
+        (WebCore::GraphicsContextGLCVCocoa::create):
+        (WebCore::GraphicsContextGLCVCocoa::~GraphicsContextGLCVCocoa):
+        (WebCore::GraphicsContextGLCVCocoa::GraphicsContextGLCVCocoa):
+        (WebCore::GraphicsContextGLCVCocoa::copyPixelBufferToTexture):
+        * platform/graphics/cv/GraphicsContextGLCVCocoa.h: Renamed from Source/WebCore/platform/graphics/cv/GraphicsContextGLCVANGLE.h.
+        * platform/graphics/opengl/GraphicsContextGLOpenGL.cpp:
+        (WebCore::setCurrentNameHashMapForShader):
+        (WebCore::nameHashForShader):
+        (WebCore::GraphicsContextGLOpenGL::validateDepthStencil):
+        (WebCore::GraphicsContextGLOpenGL::prepareTexture):
+        (WebCore::GraphicsContextGLOpenGL::readRenderingResults):
+        (WebCore::GraphicsContextGLOpenGL::reshape):
+        (WebCore::GraphicsContextGLOpenGL::checkVaryingsPacking const):
+        (WebCore::GraphicsContextGLOpenGL::precisionsMatch const):
+        (WebCore::GraphicsContextGLOpenGL::activeTexture):
+        (WebCore::GraphicsContextGLOpenGL::attachShader):
+        (WebCore::GraphicsContextGLOpenGL::bindAttribLocation):
+        (WebCore::GraphicsContextGLOpenGL::bindBuffer):
+        (WebCore::GraphicsContextGLOpenGL::bindFramebuffer):
+        (WebCore::GraphicsContextGLOpenGL::bindRenderbuffer):
+        (WebCore::GraphicsContextGLOpenGL::bindTexture):
+        (WebCore::GraphicsContextGLOpenGL::blendColor):
+        (WebCore::GraphicsContextGLOpenGL::blendEquation):
+        (WebCore::GraphicsContextGLOpenGL::blendEquationSeparate):
+        (WebCore::GraphicsContextGLOpenGL::blendFunc):
+        (WebCore::GraphicsContextGLOpenGL::blendFuncSeparate):
+        (WebCore::GraphicsContextGLOpenGL::bufferData):
+        (WebCore::GraphicsContextGLOpenGL::bufferSubData):
+        (WebCore::GraphicsContextGLOpenGL::checkFramebufferStatus):
+        (WebCore::GraphicsContextGLOpenGL::clearColor):
+        (WebCore::GraphicsContextGLOpenGL::clear):
+        (WebCore::GraphicsContextGLOpenGL::clearStencil):
+        (WebCore::GraphicsContextGLOpenGL::colorMask):
+        (WebCore::GraphicsContextGLOpenGL::compileShader):
+        (WebCore::GraphicsContextGLOpenGL::compileShaderDirect):
+        (WebCore::GraphicsContextGLOpenGL::copyTexImage2D):
+        (WebCore::GraphicsContextGLOpenGL::copyTexSubImage2D):
+        (WebCore::GraphicsContextGLOpenGL::cullFace):
+        (WebCore::GraphicsContextGLOpenGL::depthFunc):
+        (WebCore::GraphicsContextGLOpenGL::depthMask):
+        (WebCore::GraphicsContextGLOpenGL::detachShader):
+        (WebCore::GraphicsContextGLOpenGL::disable):
+        (WebCore::GraphicsContextGLOpenGL::disableVertexAttribArray):
+        (WebCore::GraphicsContextGLOpenGL::drawArrays):
+        (WebCore::GraphicsContextGLOpenGL::drawElements):
+        (WebCore::GraphicsContextGLOpenGL::enable):
+        (WebCore::GraphicsContextGLOpenGL::enableVertexAttribArray):
+        (WebCore::GraphicsContextGLOpenGL::finish):
+        (WebCore::GraphicsContextGLOpenGL::flush):
+        (WebCore::GraphicsContextGLOpenGL::framebufferRenderbuffer):
+        (WebCore::GraphicsContextGLOpenGL::framebufferTexture2D):
+        (WebCore::GraphicsContextGLOpenGL::frontFace):
+        (WebCore::GraphicsContextGLOpenGL::generateMipmap):
+        (WebCore::GraphicsContextGLOpenGL::getActiveAttribImpl):
+        (WebCore::GraphicsContextGLOpenGL::getActiveAttrib):
+        (WebCore::GraphicsContextGLOpenGL::getActiveUniformImpl):
+        (WebCore::GraphicsContextGLOpenGL::getActiveUniform):
+        (WebCore::GraphicsContextGLOpenGL::getAttachedShaders):
+        (WebCore::generateHashedName):
+        (WebCore::GraphicsContextGLOpenGL::mappedSymbolInShaderSourceMap):
+        (WebCore::GraphicsContextGLOpenGL::mappedSymbolName):
+        (WebCore::GraphicsContextGLOpenGL::originalSymbolInShaderSourceMap):
+        (WebCore::GraphicsContextGLOpenGL::originalSymbolName):
+        (WebCore::GraphicsContextGLOpenGL::getAttribLocation):
+        (WebCore::GraphicsContextGLOpenGL::getAttribLocationDirect):
+        (WebCore::GraphicsContextGLOpenGL::moveErrorsToSyntheticErrorList):
+        (WebCore::GraphicsContextGLOpenGL::getError):
+        (WebCore::GraphicsContextGLOpenGL::getString):
+        (WebCore::GraphicsContextGLOpenGL::hint):
+        (WebCore::GraphicsContextGLOpenGL::isBuffer):
+        (WebCore::GraphicsContextGLOpenGL::isEnabled):
+        (WebCore::GraphicsContextGLOpenGL::isFramebuffer):
+        (WebCore::GraphicsContextGLOpenGL::isProgram):
+        (WebCore::GraphicsContextGLOpenGL::isRenderbuffer):
+        (WebCore::GraphicsContextGLOpenGL::isShader):
+        (WebCore::GraphicsContextGLOpenGL::isTexture):
+        (WebCore::GraphicsContextGLOpenGL::lineWidth):
+        (WebCore::GraphicsContextGLOpenGL::linkProgram):
+        (WebCore::GraphicsContextGLOpenGL::pixelStorei):
+        (WebCore::GraphicsContextGLOpenGL::polygonOffset):
+        (WebCore::GraphicsContextGLOpenGL::sampleCoverage):
+        (WebCore::GraphicsContextGLOpenGL::scissor):
+        (WebCore::GraphicsContextGLOpenGL::shaderSource):
+        (WebCore::GraphicsContextGLOpenGL::stencilFunc):
+        (WebCore::GraphicsContextGLOpenGL::stencilFuncSeparate):
+        (WebCore::GraphicsContextGLOpenGL::stencilMask):
+        (WebCore::GraphicsContextGLOpenGL::stencilMaskSeparate):
+        (WebCore::GraphicsContextGLOpenGL::stencilOp):
+        (WebCore::GraphicsContextGLOpenGL::stencilOpSeparate):
+        (WebCore::GraphicsContextGLOpenGL::texParameterf):
+        (WebCore::GraphicsContextGLOpenGL::texParameteri):
+        (WebCore::GraphicsContextGLOpenGL::uniform1f):
+        (WebCore::GraphicsContextGLOpenGL::uniform1fv):
+        (WebCore::GraphicsContextGLOpenGL::uniform2f):
+        (WebCore::GraphicsContextGLOpenGL::uniform2fv):
+        (WebCore::GraphicsContextGLOpenGL::uniform3f):
+        (WebCore::GraphicsContextGLOpenGL::uniform3fv):
+        (WebCore::GraphicsContextGLOpenGL::uniform4f):
+        (WebCore::GraphicsContextGLOpenGL::uniform4fv):
+        (WebCore::GraphicsContextGLOpenGL::uniform1i):
+        (WebCore::GraphicsContextGLOpenGL::uniform1iv):
+        (WebCore::GraphicsContextGLOpenGL::uniform2i):
+        (WebCore::GraphicsContextGLOpenGL::uniform2iv):
+        (WebCore::GraphicsContextGLOpenGL::uniform3i):
+        (WebCore::GraphicsContextGLOpenGL::uniform3iv):
+        (WebCore::GraphicsContextGLOpenGL::uniform4i):
+        (WebCore::GraphicsContextGLOpenGL::uniform4iv):
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix2fv):
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix3fv):
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix4fv):
+        (WebCore::GraphicsContextGLOpenGL::useProgram):
+        (WebCore::GraphicsContextGLOpenGL::validateProgram):
+        (WebCore::GraphicsContextGLOpenGL::vertexAttrib1f):
+        (WebCore::GraphicsContextGLOpenGL::vertexAttrib1fv):
+        (WebCore::GraphicsContextGLOpenGL::vertexAttrib2f):
+        (WebCore::GraphicsContextGLOpenGL::vertexAttrib2fv):
+        (WebCore::GraphicsContextGLOpenGL::vertexAttrib3f):
+        (WebCore::GraphicsContextGLOpenGL::vertexAttrib3fv):
+        (WebCore::GraphicsContextGLOpenGL::vertexAttrib4f):
+        (WebCore::GraphicsContextGLOpenGL::vertexAttrib4fv):
+        (WebCore::GraphicsContextGLOpenGL::vertexAttribPointer):
+        (WebCore::GraphicsContextGLOpenGL::viewport):
+        (WebCore::GraphicsContextGLOpenGL::createVertexArray):
+        (WebCore::GraphicsContextGLOpenGL::deleteVertexArray):
+        (WebCore::GraphicsContextGLOpenGL::isVertexArray):
+        (WebCore::GraphicsContextGLOpenGL::bindVertexArray):
+        (WebCore::GraphicsContextGLOpenGL::getBooleanv):
+        (WebCore::GraphicsContextGLOpenGL::getBufferParameteri):
+        (WebCore::GraphicsContextGLOpenGL::getFloatv):
+        (WebCore::GraphicsContextGLOpenGL::getInteger64):
+        (WebCore::GraphicsContextGLOpenGL::getInteger64i):
+        (WebCore::GraphicsContextGLOpenGL::getFramebufferAttachmentParameteri):
+        (WebCore::GraphicsContextGLOpenGL::getProgrami):
+        (WebCore::GraphicsContextGLOpenGL::getNonBuiltInActiveSymbolCount):
+        (WebCore::GraphicsContextGLOpenGL::getUnmangledInfoLog):
+        (WebCore::GraphicsContextGLOpenGL::getProgramInfoLog):
+        (WebCore::GraphicsContextGLOpenGL::getRenderbufferParameteri):
+        (WebCore::GraphicsContextGLOpenGL::getShaderi):
+        (WebCore::GraphicsContextGLOpenGL::getShaderInfoLog):
+        (WebCore::GraphicsContextGLOpenGL::getShaderSource):
+        (WebCore::GraphicsContextGLOpenGL::getTexParameterf):
+        (WebCore::GraphicsContextGLOpenGL::getTexParameteri):
+        (WebCore::GraphicsContextGLOpenGL::getUniformfv):
+        (WebCore::GraphicsContextGLOpenGL::getUniformiv):
+        (WebCore::GraphicsContextGLOpenGL::getUniformuiv):
+        (WebCore::GraphicsContextGLOpenGL::getUniformLocation):
+        (WebCore::GraphicsContextGLOpenGL::getVertexAttribOffset):
+        (WebCore::GraphicsContextGLOpenGL::texSubImage2D):
+        (WebCore::GraphicsContextGLOpenGL::compressedTexImage2D):
+        (WebCore::GraphicsContextGLOpenGL::compressedTexSubImage2D):
+        (WebCore::GraphicsContextGLOpenGL::createBuffer):
+        (WebCore::GraphicsContextGLOpenGL::createFramebuffer):
+        (WebCore::GraphicsContextGLOpenGL::createProgram):
+        (WebCore::GraphicsContextGLOpenGL::createRenderbuffer):
+        (WebCore::GraphicsContextGLOpenGL::createShader):
+        (WebCore::GraphicsContextGLOpenGL::createTexture):
+        (WebCore::GraphicsContextGLOpenGL::deleteBuffer):
+        (WebCore::GraphicsContextGLOpenGL::deleteFramebuffer):
+        (WebCore::GraphicsContextGLOpenGL::deleteProgram):
+        (WebCore::GraphicsContextGLOpenGL::deleteRenderbuffer):
+        (WebCore::GraphicsContextGLOpenGL::deleteShader):
+        (WebCore::GraphicsContextGLOpenGL::deleteTexture):
+        (WebCore::GraphicsContextGLOpenGL::synthesizeGLError):
+        (WebCore::GraphicsContextGLOpenGL::forceContextLost):
+        (WebCore::GraphicsContextGLOpenGL::recycleContext):
+        (WebCore::GraphicsContextGLOpenGL::dispatchContextChangedNotification):
+        (WebCore::GraphicsContextGLOpenGL::texImage2DDirect):
+        (WebCore::GraphicsContextGLOpenGL::drawArraysInstanced):
+        (WebCore::GraphicsContextGLOpenGL::drawElementsInstanced):
+        (WebCore::GraphicsContextGLOpenGL::vertexAttribDivisor):
+        (WebCore::GraphicsContextGLOpenGL::primitiveRestartIndex):
+        (WebCore::GraphicsContextGLOpenGL::copyBufferSubData):
+        (WebCore::GraphicsContextGLOpenGL::getBufferSubData):
+        (WebCore::GraphicsContextGLOpenGL::blitFramebuffer):
+        (WebCore::GraphicsContextGLOpenGL::framebufferTextureLayer):
+        (WebCore::GraphicsContextGLOpenGL::invalidateFramebuffer):
+        (WebCore::GraphicsContextGLOpenGL::invalidateSubFramebuffer):
+        (WebCore::GraphicsContextGLOpenGL::readBuffer):
+        (WebCore::GraphicsContextGLOpenGL::getInternalformativ):
+        (WebCore::GraphicsContextGLOpenGL::renderbufferStorageMultisample):
+        (WebCore::GraphicsContextGLOpenGL::texStorage2D):
+        (WebCore::GraphicsContextGLOpenGL::texStorage3D):
+        (WebCore::GraphicsContextGLOpenGL::copyTexSubImage3D):
+        (WebCore::GraphicsContextGLOpenGL::getFragDataLocation):
+        (WebCore::GraphicsContextGLOpenGL::uniform1ui):
+        (WebCore::GraphicsContextGLOpenGL::uniform2ui):
+        (WebCore::GraphicsContextGLOpenGL::uniform3ui):
+        (WebCore::GraphicsContextGLOpenGL::uniform4ui):
+        (WebCore::GraphicsContextGLOpenGL::uniform1uiv):
+        (WebCore::GraphicsContextGLOpenGL::uniform2uiv):
+        (WebCore::GraphicsContextGLOpenGL::uniform3uiv):
+        (WebCore::GraphicsContextGLOpenGL::uniform4uiv):
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix2x3fv):
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix3x2fv):
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix2x4fv):
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix4x2fv):
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix3x4fv):
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix4x3fv):
+        (WebCore::GraphicsContextGLOpenGL::vertexAttribI4i):
+        (WebCore::GraphicsContextGLOpenGL::vertexAttribI4iv):
+        (WebCore::GraphicsContextGLOpenGL::vertexAttribI4ui):
+        (WebCore::GraphicsContextGLOpenGL::vertexAttribI4uiv):
+        (WebCore::GraphicsContextGLOpenGL::vertexAttribIPointer):
+        (WebCore::GraphicsContextGLOpenGL::drawRangeElements):
+        (WebCore::GraphicsContextGLOpenGL::drawBuffers):
+        (WebCore::GraphicsContextGLOpenGL::clearBufferiv):
+        (WebCore::GraphicsContextGLOpenGL::clearBufferuiv):
+        (WebCore::GraphicsContextGLOpenGL::clearBufferfv):
+        (WebCore::GraphicsContextGLOpenGL::clearBufferfi):
+        (WebCore::GraphicsContextGLOpenGL::createQuery):
+        (WebCore::GraphicsContextGLOpenGL::deleteQuery):
+        (WebCore::GraphicsContextGLOpenGL::isQuery):
+        (WebCore::GraphicsContextGLOpenGL::beginQuery):
+        (WebCore::GraphicsContextGLOpenGL::endQuery):
+        (WebCore::GraphicsContextGLOpenGL::getQuery):
+        (WebCore::GraphicsContextGLOpenGL::getQueryObjectui):
+        (WebCore::GraphicsContextGLOpenGL::createSampler):
+        (WebCore::GraphicsContextGLOpenGL::deleteSampler):
+        (WebCore::GraphicsContextGLOpenGL::isSampler):
+        (WebCore::GraphicsContextGLOpenGL::bindSampler):
+        (WebCore::GraphicsContextGLOpenGL::samplerParameteri):
+        (WebCore::GraphicsContextGLOpenGL::samplerParameterf):
+        (WebCore::GraphicsContextGLOpenGL::getSamplerParameterf):
+        (WebCore::GraphicsContextGLOpenGL::getSamplerParameteri):
+        (WebCore::GraphicsContextGLOpenGL::fenceSync):
+        (WebCore::GraphicsContextGLOpenGL::isSync):
+        (WebCore::GraphicsContextGLOpenGL::deleteSync):
+        (WebCore::GraphicsContextGLOpenGL::clientWaitSync):
+        (WebCore::GraphicsContextGLOpenGL::waitSync):
+        (WebCore::GraphicsContextGLOpenGL::getSynci):
+        (WebCore::GraphicsContextGLOpenGL::createTransformFeedback):
+        (WebCore::GraphicsContextGLOpenGL::deleteTransformFeedback):
+        (WebCore::GraphicsContextGLOpenGL::isTransformFeedback):
+        (WebCore::GraphicsContextGLOpenGL::bindTransformFeedback):
+        (WebCore::GraphicsContextGLOpenGL::beginTransformFeedback):
+        (WebCore::GraphicsContextGLOpenGL::endTransformFeedback):
+        (WebCore::GraphicsContextGLOpenGL::transformFeedbackVaryings):
+        (WebCore::GraphicsContextGLOpenGL::getTransformFeedbackVarying):
+        (WebCore::GraphicsContextGLOpenGL::pauseTransformFeedback):
+        (WebCore::GraphicsContextGLOpenGL::resumeTransformFeedback):
+        (WebCore::GraphicsContextGLOpenGL::bindBufferBase):
+        (WebCore::GraphicsContextGLOpenGL::bindBufferRange):
+        (WebCore::GraphicsContextGLOpenGL::getUniformIndices):
+        (WebCore::GraphicsContextGLOpenGL::getActiveUniforms):
+        (WebCore::GraphicsContextGLOpenGL::getUniformBlockIndex):
+        (WebCore::GraphicsContextGLOpenGL::getActiveUniformBlockName):
+        (WebCore::GraphicsContextGLOpenGL::uniformBlockBinding):
+        (WebCore::GraphicsContextGLOpenGL::readnPixels):
+        (WebCore::GraphicsContextGLOpenGL::getActiveUniformBlockiv):
+        (WebCore::GraphicsContextGLOpenGL::texImage2D):
+        (WebCore::GraphicsContextGLOpenGL::texImage3D):
+        (WebCore::GraphicsContextGLOpenGL::texSubImage3D):
+        (WebCore::GraphicsContextGLOpenGL::compressedTexImage3D):
+        (WebCore::GraphicsContextGLOpenGL::compressedTexSubImage3D):
+        (WebCore::GraphicsContextGLOpenGL::multiDrawArraysANGLE):
+        (WebCore::GraphicsContextGLOpenGL::multiDrawArraysInstancedANGLE):
+        (WebCore::GraphicsContextGLOpenGL::multiDrawElementsANGLE):
+        (WebCore::GraphicsContextGLOpenGL::multiDrawElementsInstancedANGLE):
+        (WebCore::GraphicsContextGLOpenGL::texImage2DResourceSafe):
+        * platform/graphics/opengl/GraphicsContextGLOpenGL.h:
+        * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp: Removed.
+        (): Deleted.
+        (WebCore::setCurrentNameHashMapForShader): Deleted.
+        (WebCore::nameHashForShader): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::validateDepthStencil): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::prepareTexture): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::readRenderingResults): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::reshape): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::checkVaryingsPacking const): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::precisionsMatch const): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::activeTexture): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::attachShader): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::bindAttribLocation): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::bindBuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::bindFramebuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::bindRenderbuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::bindTexture): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::blendColor): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::blendEquation): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::blendEquationSeparate): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::blendFunc): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::blendFuncSeparate): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::bufferData): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::bufferSubData): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::checkFramebufferStatus): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::clearColor): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::clear): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::clearStencil): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::colorMask): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::compileShader): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::compileShaderDirect): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::copyTexImage2D): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::copyTexSubImage2D): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::cullFace): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::depthFunc): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::depthMask): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::detachShader): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::disable): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::disableVertexAttribArray): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::drawArrays): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::drawElements): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::enable): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::enableVertexAttribArray): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::finish): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::flush): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::framebufferRenderbuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::framebufferTexture2D): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::frontFace): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::generateMipmap): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getActiveAttribImpl): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getActiveAttrib): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getActiveUniformImpl): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getActiveUniform): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getAttachedShaders): Deleted.
+        (WebCore::generateHashedName): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::mappedSymbolInShaderSourceMap): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::mappedSymbolName): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::originalSymbolInShaderSourceMap): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::originalSymbolName): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getAttribLocation): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getAttribLocationDirect): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::moveErrorsToSyntheticErrorList): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getError): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getString): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::hint): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::isBuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::isEnabled): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::isFramebuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::isProgram): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::isRenderbuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::isShader): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::isTexture): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::lineWidth): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::linkProgram): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::pixelStorei): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::polygonOffset): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::sampleCoverage): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::scissor): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::shaderSource): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::stencilFunc): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::stencilFuncSeparate): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::stencilMask): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::stencilMaskSeparate): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::stencilOp): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::stencilOpSeparate): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::texParameterf): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::texParameteri): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform1f): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform1fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform2f): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform2fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform3f): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform3fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform4f): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform4fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform1i): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform1iv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform2i): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform2iv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform3i): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform3iv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform4i): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform4iv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix2fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix3fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix4fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::useProgram): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::validateProgram): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::vertexAttrib1f): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::vertexAttrib1fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::vertexAttrib2f): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::vertexAttrib2fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::vertexAttrib3f): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::vertexAttrib3fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::vertexAttrib4f): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::vertexAttrib4fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::vertexAttribPointer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::viewport): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::createVertexArray): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::deleteVertexArray): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::isVertexArray): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::bindVertexArray): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getBooleanv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getBufferParameteri): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getFloatv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getInteger64): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getInteger64i): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getFramebufferAttachmentParameteri): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getProgrami): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getNonBuiltInActiveSymbolCount): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getUnmangledInfoLog): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getProgramInfoLog): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getRenderbufferParameteri): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getShaderi): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getShaderInfoLog): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getShaderSource): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getTexParameterf): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getTexParameteri): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getUniformfv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getUniformiv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getUniformuiv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getUniformLocation): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getVertexAttribOffset): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::texSubImage2D): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::compressedTexImage2D): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::compressedTexSubImage2D): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::createBuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::createFramebuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::createProgram): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::createRenderbuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::createShader): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::createTexture): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::deleteBuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::deleteFramebuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::deleteProgram): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::deleteRenderbuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::deleteShader): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::deleteTexture): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::synthesizeGLError): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::forceContextLost): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::recycleContext): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::dispatchContextChangedNotification): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::texImage2DDirect): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::drawArraysInstanced): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::drawElementsInstanced): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::vertexAttribDivisor): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::primitiveRestartIndex): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::copyBufferSubData): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getBufferSubData): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::blitFramebuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::framebufferTextureLayer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::invalidateFramebuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::invalidateSubFramebuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::readBuffer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getInternalformativ): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::renderbufferStorageMultisample): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::texStorage2D): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::texStorage3D): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::copyTexSubImage3D): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getFragDataLocation): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform1ui): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform2ui): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform3ui): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform4ui): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform1uiv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform2uiv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform3uiv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniform4uiv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix2x3fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix3x2fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix2x4fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix4x2fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix3x4fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix4x3fv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::vertexAttribI4i): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::vertexAttribI4iv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::vertexAttribI4ui): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::vertexAttribI4uiv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::vertexAttribIPointer): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::drawRangeElements): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::drawBuffers): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::clearBufferiv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::clearBufferuiv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::clearBufferfv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::clearBufferfi): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::createQuery): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::deleteQuery): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::isQuery): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::beginQuery): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::endQuery): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getQuery): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getQueryObjectui): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::createSampler): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::deleteSampler): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::isSampler): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::bindSampler): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::samplerParameteri): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::samplerParameterf): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getSamplerParameterf): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getSamplerParameteri): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::fenceSync): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::isSync): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::deleteSync): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::clientWaitSync): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::waitSync): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getSynci): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::createTransformFeedback): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::deleteTransformFeedback): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::isTransformFeedback): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::bindTransformFeedback): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::beginTransformFeedback): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::endTransformFeedback): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::transformFeedbackVaryings): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getTransformFeedbackVarying): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::pauseTransformFeedback): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::resumeTransformFeedback): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::bindBufferBase): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::bindBufferRange): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getUniformIndices): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getActiveUniforms): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getUniformBlockIndex): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getActiveUniformBlockName): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::uniformBlockBinding): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::readnPixels): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::getActiveUniformBlockiv): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::texImage2D): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::texImage3D): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::texSubImage3D): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::compressedTexImage3D): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::compressedTexSubImage3D): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::multiDrawArraysANGLE): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::multiDrawArraysInstancedANGLE): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::multiDrawElementsANGLE): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::multiDrawElementsInstancedANGLE): Deleted.
+        (WebCore::GraphicsContextGLOpenGL::texImage2DResourceSafe): Deleted.
+        * platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp:
+        (WebCore::GraphicsContextGLOpenGLManager::addContext):
+        (WebCore::GraphicsContextGLOpenGLManager::removeContext):
+        * platform/graphics/opengl/GraphicsContextGLOpenGLManager.h:
+        * platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:
+        (WebCore::GraphicsContextGLOpenGL::isGLES2Compliant const):
+        * platform/graphics/texmap/GraphicsContextGLTextureMapper.h:
+        * platform/ios/wak/WebCoreThread.mm:
+
</ins><span class="cx"> 2021-11-30  Philippe Normand  <pnormand@igalia.com>
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, GTK clang build fix after r286226
</span></span></pre></div>
<a id="trunkSourceWebCoreHeaderscmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Headers.cmake (286292 => 286293)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Headers.cmake       2021-11-30 14:23:53 UTC (rev 286292)
+++ trunk/Source/WebCore/Headers.cmake  2021-11-30 14:54:52 UTC (rev 286293)
</span><span class="lines">@@ -1313,6 +1313,7 @@
</span><span class="cx">     platform/graphics/GraphicsContextFlushIdentifier.h
</span><span class="cx">     platform/graphics/GraphicsContextGL.h
</span><span class="cx">     platform/graphics/GraphicsContextGLAttributes.h
</span><ins>+    platform/graphics/GraphicsContextGLState.h
</ins><span class="cx">     platform/graphics/GraphicsLayer.h
</span><span class="cx">     platform/graphics/GraphicsLayerClient.h
</span><span class="cx">     platform/graphics/GraphicsLayerFactory.h
</span><span class="lines">@@ -1405,6 +1406,7 @@
</span><span class="cx"> 
</span><span class="cx">     platform/graphics/angle/ANGLEHeaders.h
</span><span class="cx">     platform/graphics/angle/ANGLEUtilities.h
</span><ins>+    platform/graphics/angle/GraphicsContextGLANGLE.h
</ins><span class="cx">     platform/graphics/angle/ExtensionsGLANGLE.h
</span><span class="cx"> 
</span><span class="cx">     platform/graphics/displaylists/DisplayList.h
</span></span></pre></div>
<a id="trunkSourceWebCorePlatformMaccmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/PlatformMac.cmake (286292 => 286293)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/PlatformMac.cmake   2021-11-30 14:23:53 UTC (rev 286292)
+++ trunk/Source/WebCore/PlatformMac.cmake      2021-11-30 14:54:52 UTC (rev 286293)
</span><span class="lines">@@ -337,7 +337,7 @@
</span><span class="cx">     platform/graphics/coretext/GlyphPageCoreText.cpp
</span><span class="cx"> 
</span><span class="cx">     platform/graphics/cv/CVUtilities.mm
</span><del>-    platform/graphics/cv/GraphicsContextGLCVANGLE.cpp
</del><ins>+    platform/graphics/cv/GraphicsContextGLCVCocoa.cpp
</ins><span class="cx">     platform/graphics/cv/ImageRotationSessionVT.mm
</span><span class="cx">     platform/graphics/cv/PixelBufferConformerCV.cpp
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreSourcestxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Sources.txt (286292 => 286293)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Sources.txt 2021-11-30 14:23:53 UTC (rev 286292)
+++ trunk/Source/WebCore/Sources.txt    2021-11-30 14:54:52 UTC (rev 286293)
</span><span class="lines">@@ -2137,7 +2137,6 @@
</span><span class="cx"> platform/graphics/iso/ISOSchemeTypeBox.cpp
</span><span class="cx"> platform/graphics/iso/ISOTrackEncryptionBox.cpp
</span><span class="cx"> platform/graphics/iso/ISOVTTCue.cpp
</span><del>-platform/graphics/opengl/GraphicsContextGLOpenGL.cpp
</del><span class="cx"> platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp
</span><span class="cx"> platform/graphics/opentype/OpenTypeMathData.cpp
</span><span class="cx"> platform/graphics/transforms/AffineTransform.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreSourcesCocoatxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/SourcesCocoa.txt (286292 => 286293)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/SourcesCocoa.txt    2021-11-30 14:23:53 UTC (rev 286292)
+++ trunk/Source/WebCore/SourcesCocoa.txt       2021-11-30 14:54:52 UTC (rev 286293)
</span><span class="lines">@@ -402,7 +402,7 @@
</span><span class="cx"> platform/graphics/cv/CVUtilities.mm
</span><span class="cx"> platform/graphics/cv/ImageTransferSessionVT.mm
</span><span class="cx"> platform/graphics/cv/PixelBufferConformerCV.cpp
</span><del>-platform/graphics/cv/GraphicsContextGLCVANGLE.cpp
</del><ins>+platform/graphics/cv/GraphicsContextGLCVCocoa.cpp
</ins><span class="cx"> platform/graphics/coreimage/FEColorMatrixCoreImageApplier.mm
</span><span class="cx"> platform/graphics/coreimage/FEComponentTransferCoreImageApplier.mm
</span><span class="cx"> platform/graphics/coreimage/FilterImageCoreImage.mm
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (286292 => 286293)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj   2021-11-30 14:23:53 UTC (rev 286292)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj      2021-11-30 14:54:52 UTC (rev 286293)
</span><span class="lines">@@ -2362,12 +2362,14 @@
</span><span class="cx">          7AF9B20D18CFB5F400C64BEF /* JSVTTRegion.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AF9B20918CFB5F200C64BEF /* JSVTTRegion.h */; };
</span><span class="cx">          7AF9B20F18CFB5F400C64BEF /* JSVTTRegionList.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AF9B20B18CFB5F300C64BEF /* JSVTTRegionList.h */; };
</span><span class="cx">          7B10339E2549721700C8C1AC /* GraphicsContextGLCV.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B10339D2549720100C8C1AC /* GraphicsContextGLCV.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-               7B10339F2549721E00C8C1AC /* GraphicsContextGLCVANGLE.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B10339C2549720100C8C1AC /* GraphicsContextGLCVANGLE.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><ins>+                7B10339F2549721E00C8C1AC /* GraphicsContextGLCVCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B10339C2549720100C8C1AC /* GraphicsContextGLCVCocoa.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">           7B6094DD270C44BD0064835C /* ANGLEUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BB34A1625345CB200029D08 /* ANGLEUtilities.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          7B6DC81925712E9200380C70 /* GraphicsContextGLIOSurfaceSwapChain.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B6DC81725712E9200380C70 /* GraphicsContextGLIOSurfaceSwapChain.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          7B7311FB25C092B7003B2796 /* ScopedHighPerformanceGPURequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B7311FA25C092B7003B2796 /* ScopedHighPerformanceGPURequest.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          7B8ED5F026F0C13D008AC023 /* CVUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B8ED5ED26F0C123008AC023 /* CVUtilities.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          7B90417025501142006EEB8C /* RemoteGraphicsContextGLProxyBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B90416E25501109006EEB8C /* RemoteGraphicsContextGLProxyBase.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+               7B95CFEB2754FF6E000060CE /* GraphicsContextGLState.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B95CFE92754FF6E000060CE /* GraphicsContextGLState.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               7B95CFED2754FF7C000060CE /* GraphicsContextGLANGLE.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B95CFEC2754FF7C000060CE /* GraphicsContextGLANGLE.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">           7BB34A48253776CA00029D08 /* GraphicsContextGLImageExtractor.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BB34A45253776C600029D08 /* GraphicsContextGLImageExtractor.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          7BB680BA25BA1BE4002B8738 /* GraphicsChecksMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BB680B825BA1BE4002B8738 /* GraphicsChecksMac.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          7BDDA31F274FA0210038659E /* GraphicsContextGLCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BDDA31D274F9DA50038659E /* GraphicsContextGLCocoa.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -11350,8 +11352,8 @@
</span><span class="cx">          7AF9B20918CFB5F200C64BEF /* JSVTTRegion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSVTTRegion.h; sourceTree = "<group>"; };
</span><span class="cx">          7AF9B20A18CFB5F300C64BEF /* JSVTTRegionList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSVTTRegionList.cpp; sourceTree = "<group>"; };
</span><span class="cx">          7AF9B20B18CFB5F300C64BEF /* JSVTTRegionList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSVTTRegionList.h; sourceTree = "<group>"; };
</span><del>-               7B10339A2549720000C8C1AC /* GraphicsContextGLCVANGLE.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContextGLCVANGLE.cpp; sourceTree = "<group>"; };
-               7B10339C2549720100C8C1AC /* GraphicsContextGLCVANGLE.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GraphicsContextGLCVANGLE.h; sourceTree = "<group>"; };
</del><ins>+                7B10339A2549720000C8C1AC /* GraphicsContextGLCVCocoa.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContextGLCVCocoa.cpp; sourceTree = "<group>"; };
+               7B10339C2549720100C8C1AC /* GraphicsContextGLCVCocoa.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GraphicsContextGLCVCocoa.h; sourceTree = "<group>"; };
</ins><span class="cx">           7B10339D2549720100C8C1AC /* GraphicsContextGLCV.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GraphicsContextGLCV.h; sourceTree = "<group>"; };
</span><span class="cx">          7B1619102719880E00C40EAC /* WebProcessGraphicsContextGLCocoa.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = WebProcessGraphicsContextGLCocoa.mm; sourceTree = "<group>"; };
</span><span class="cx">          7B6DC81525712E9100380C70 /* GraphicsContextGLIOSurfaceSwapChain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContextGLIOSurfaceSwapChain.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -11360,6 +11362,8 @@
</span><span class="cx">          7B8ED5ED26F0C123008AC023 /* CVUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CVUtilities.h; sourceTree = "<group>"; };
</span><span class="cx">          7B8ED5EF26F0C123008AC023 /* CVUtilities.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CVUtilities.mm; sourceTree = "<group>"; };
</span><span class="cx">          7B90416E25501109006EEB8C /* RemoteGraphicsContextGLProxyBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteGraphicsContextGLProxyBase.h; sourceTree = "<group>"; };
</span><ins>+               7B95CFE92754FF6E000060CE /* GraphicsContextGLState.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = GraphicsContextGLState.h; sourceTree = "<group>"; };
+               7B95CFEC2754FF7C000060CE /* GraphicsContextGLANGLE.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = GraphicsContextGLANGLE.h; sourceTree = "<group>"; };
</ins><span class="cx">           7BB34A1625345CB200029D08 /* ANGLEUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANGLEUtilities.h; sourceTree = "<group>"; };
</span><span class="cx">          7BB34A45253776C600029D08 /* GraphicsContextGLImageExtractor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GraphicsContextGLImageExtractor.h; sourceTree = "<group>"; };
</span><span class="cx">          7BB34A47253776C700029D08 /* GraphicsContextGLImageExtractor.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContextGLImageExtractor.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -24071,6 +24075,7 @@
</span><span class="cx">                          6E27F243229C9F8400F1F632 /* ExtensionsGLANGLE.cpp */,
</span><span class="cx">                          6E27F244229C9F8D00F1F632 /* ExtensionsGLANGLE.h */,
</span><span class="cx">                          6E27F2422298CE4B00F1F632 /* GraphicsContextGLANGLE.cpp */,
</span><ins>+                               7B95CFEC2754FF7C000060CE /* GraphicsContextGLANGLE.h */,
</ins><span class="cx">                           6E290861229DB950000986E2 /* TemporaryANGLESetting.cpp */,
</span><span class="cx">                          6E290863229DB970000986E2 /* TemporaryANGLESetting.h */,
</span><span class="cx">                  );
</span><span class="lines">@@ -28592,6 +28597,7 @@
</span><span class="cx">                          7C330A011DF8FAC600D3395C /* GraphicsContextGLAttributes.h */,
</span><span class="cx">                          7BB34A47253776C700029D08 /* GraphicsContextGLImageExtractor.cpp */,
</span><span class="cx">                          7BB34A45253776C600029D08 /* GraphicsContextGLImageExtractor.h */,
</span><ins>+                               7B95CFE92754FF6E000060CE /* GraphicsContextGLState.h */,
</ins><span class="cx">                           0F580B090F12A2690051D689 /* GraphicsLayer.cpp */,
</span><span class="cx">                          0F580B0A0F12A2690051D689 /* GraphicsLayer.h */,
</span><span class="cx">                          0F580B0B0F12A2690051D689 /* GraphicsLayerClient.h */,
</span><span class="lines">@@ -30019,8 +30025,8 @@
</span><span class="cx">                          7B8ED5ED26F0C123008AC023 /* CVUtilities.h */,
</span><span class="cx">                          7B8ED5EF26F0C123008AC023 /* CVUtilities.mm */,
</span><span class="cx">                          7B10339D2549720100C8C1AC /* GraphicsContextGLCV.h */,
</span><del>-                               7B10339A2549720000C8C1AC /* GraphicsContextGLCVANGLE.cpp */,
-                               7B10339C2549720100C8C1AC /* GraphicsContextGLCVANGLE.h */,
</del><ins>+                                7B10339A2549720000C8C1AC /* GraphicsContextGLCVCocoa.cpp */,
+                               7B10339C2549720100C8C1AC /* GraphicsContextGLCVCocoa.h */,
</ins><span class="cx">                           CD27AE4E22A9868700947FF9 /* ImageRotationSessionVT.h */,
</span><span class="cx">                          CD27AE4F22A9868700947FF9 /* ImageRotationSessionVT.mm */,
</span><span class="cx">                          0746D30C2146EA38003DDF84 /* ImageTransferSessionVT.h */,
</span><span class="lines">@@ -34265,14 +34271,16 @@
</span><span class="cx">                          934907E4125BBBC8007F23A0 /* GraphicsContextCG.h in Headers */,
</span><span class="cx">                          F42994FA270CFE480032298B /* GraphicsContextFlushIdentifier.h in Headers */,
</span><span class="cx">                          313DE87023A96973008FC47B /* GraphicsContextGL.h in Headers */,
</span><ins>+                               7B95CFED2754FF7C000060CE /* GraphicsContextGLANGLE.h in Headers */,
</ins><span class="cx">                           7C330A021DF8FAC600D3395C /* GraphicsContextGLAttributes.h in Headers */,
</span><span class="cx">                          7BDDA31F274FA0210038659E /* GraphicsContextGLCocoa.h in Headers */,
</span><span class="cx">                          7B10339E2549721700C8C1AC /* GraphicsContextGLCV.h in Headers */,
</span><del>-                               7B10339F2549721E00C8C1AC /* GraphicsContextGLCVANGLE.h in Headers */,
</del><ins>+                                7B10339F2549721E00C8C1AC /* GraphicsContextGLCVCocoa.h in Headers */,
</ins><span class="cx">                           7BB34A48253776CA00029D08 /* GraphicsContextGLImageExtractor.h in Headers */,
</span><span class="cx">                          7B6DC81925712E9200380C70 /* GraphicsContextGLIOSurfaceSwapChain.h in Headers */,
</span><span class="cx">                          49C7B9FC1042D3650009D447 /* GraphicsContextGLOpenGL.h in Headers */,
</span><span class="cx">                          319A728823C267FE0085353C /* GraphicsContextGLOpenGLManager.h in Headers */,
</span><ins>+                               7B95CFEB2754FF6E000060CE /* GraphicsContextGLState.h in Headers */,
</ins><span class="cx">                           A80D67080E9E9DEB00E420F0 /* GraphicsContextPlatformPrivateCG.h in Headers */,
</span><span class="cx">                          0F580B0D0F12A2690051D689 /* GraphicsLayer.h in Headers */,
</span><span class="cx">                          499B3ED7128CD31400E726C2 /* GraphicsLayerCA.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsContextGLh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsContextGL.h (286292 => 286293)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsContextGL.h       2021-11-30 14:23:53 UTC (rev 286292)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContextGL.h  2021-11-30 14:54:52 UTC (rev 286293)
</span><span class="lines">@@ -1351,6 +1351,7 @@
</span><span class="cx">     // Returns true upon success.
</span><span class="cx">     static bool packImageData(Image*, const void* pixels, GCGLenum format, GCGLenum type, bool flipY, AlphaOp, DataFormat sourceFormat, unsigned sourceImageWidth, unsigned sourceImageHeight, const IntRect& sourceImageSubRectangle, int depth, unsigned sourceUnpackAlignment, int unpackImageHeight, Vector<uint8_t>& data);
</span><span class="cx"> 
</span><ins>+    WEBCORE_EXPORT static void paintToCanvas(const GraphicsContextGLAttributes&, PixelBuffer&&, const IntSize& canvasSize, GraphicsContext&);
</ins><span class="cx"> protected:
</span><span class="cx">     int m_currentWidth { 0 };
</span><span class="cx">     int m_currentHeight { 0 };
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsContextGLStateh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/graphics/GraphicsContextGLState.h (0 => 286293)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsContextGLState.h                          (rev 0)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContextGLState.h     2021-11-30 14:54:52 UTC (rev 286293)
</span><span class="lines">@@ -0,0 +1,79 @@
</span><ins>+/*
+ * Copyright (C) 2009, 2014-2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(WEBGL)
+
+#include "GraphicsContextGL.h"
+#include "GraphicsContextGLState.h"
+#include <wtf/HashCountedSet.h>
+#include <wtf/HashMap.h>
+#include <wtf/HashTraits.h>
+
+namespace WebCore {
+
+struct GraphicsContextGLState {
+    GCGLuint boundReadFBO { 0 };
+    GCGLuint boundDrawFBO { 0 };
+    GCGLenum activeTextureUnit { GraphicsContextGL::TEXTURE0 };
+
+    using BoundTextureMap = HashMap<GCGLenum,
+        std::pair<GCGLuint, GCGLenum>,
+        IntHash<GCGLenum>,
+        WTF::UnsignedWithZeroKeyHashTraits<GCGLuint>,
+        PairHashTraits<WTF::UnsignedWithZeroKeyHashTraits<GCGLuint>, WTF::UnsignedWithZeroKeyHashTraits<GCGLuint>>
+    >;
+    BoundTextureMap boundTextureMap;
+    GCGLuint currentBoundTexture() const { return boundTexture(activeTextureUnit); }
+    GCGLuint boundTexture(GCGLenum textureUnit) const
+    {
+        auto iterator = boundTextureMap.find(textureUnit);
+        if (iterator != boundTextureMap.end())
+            return iterator->value.first;
+        return 0;
+    }
+
+    GCGLuint currentBoundTarget() const { return boundTarget(activeTextureUnit); }
+    GCGLenum boundTarget(GCGLenum textureUnit) const
+    {
+        auto iterator = boundTextureMap.find(textureUnit);
+        if (iterator != boundTextureMap.end())
+            return iterator->value.second;
+        return 0;
+    }
+
+    void setBoundTexture(GCGLenum textureUnit, GCGLuint texture, GCGLenum target)
+    {
+        boundTextureMap.set(textureUnit, std::make_pair(texture, target));
+    }
+
+    using TextureSeedCount = HashCountedSet<GCGLuint, IntHash<GCGLuint>, WTF::UnsignedWithZeroKeyHashTraits<GCGLuint>>;
+    TextureSeedCount textureSeedCount;
+};
+
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsangleExtensionsGLANGLEcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.cpp (286292 => 286293)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.cpp       2021-11-30 14:23:53 UTC (rev 286292)
+++ trunk/Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.cpp  2021-11-30 14:54:52 UTC (rev 286293)
</span><span class="lines">@@ -29,11 +29,11 @@
</span><span class="cx"> #include "ExtensionsGLANGLE.h"
</span><span class="cx"> 
</span><span class="cx"> #include "ANGLEHeaders.h"
</span><del>-#include "GraphicsContextGLOpenGL.h"
</del><ins>+#include "GraphicsContextGLANGLE.h"
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-ExtensionsGLANGLE::ExtensionsGLANGLE(GraphicsContextGLOpenGL* context)
</del><ins>+ExtensionsGLANGLE::ExtensionsGLANGLE(GraphicsContextGLANGLE* context)
</ins><span class="cx">     : m_initializedAvailableExtensions(false)
</span><span class="cx">     , m_context(context)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsangleExtensionsGLANGLEh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.h (286292 => 286293)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.h 2021-11-30 14:23:53 UTC (rev 286292)
+++ trunk/Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.h    2021-11-30 14:54:52 UTC (rev 286293)
</span><span class="lines">@@ -32,13 +32,13 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class GraphicsContextGLOpenGL;
</del><ins>+class GraphicsContextGLANGLE;
</ins><span class="cx"> 
</span><span class="cx"> class ExtensionsGLANGLE : public ExtensionsGL {
</span><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><del>-    // This class only needs to be instantiated by GraphicsContextGLOpenGL implementations.
-    explicit ExtensionsGLANGLE(GraphicsContextGLOpenGL*);
</del><ins>+    // This class only needs to be instantiated by GraphicsContextGLANGLE implementations.
+    explicit ExtensionsGLANGLE(GraphicsContextGLANGLE*);
</ins><span class="cx">     virtual ~ExtensionsGLANGLE();
</span><span class="cx"> 
</span><span class="cx">     // ExtensionsGL methods.
</span><span class="lines">@@ -64,8 +64,8 @@
</span><span class="cx">     HashSet<String> m_requestableExtensions;
</span><span class="cx">     HashSet<String> m_enabledExtensions;
</span><span class="cx"> 
</span><del>-    // Weak pointer back to GraphicsContextGLOpenGL.
-    GraphicsContextGLOpenGL* m_context;
</del><ins>+    // Weak pointer back to GraphicsContextGLANGLE.
+    GraphicsContextGLANGLE* m_context;
</ins><span class="cx"> 
</span><span class="cx">     // Whether the WebGL 1.0-related floating-point renderability extensions have been enabled.
</span><span class="cx">     bool m_webglColorBufferFloatRGB { false };
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsangleGraphicsContextGLANGLEcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp (286292 => 286293)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp  2021-11-30 14:23:53 UTC (rev 286292)
+++ trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp     2021-11-30 14:54:52 UTC (rev 286293)
</span><span class="lines">@@ -27,12 +27,12 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEBGL) && USE(ANGLE)
</span><del>-#include "GraphicsContextGL.h"
</del><ins>+#include "GraphicsContextGLANGLE.h"
</ins><span class="cx"> 
</span><span class="cx"> #include "ANGLEHeaders.h"
</span><span class="cx"> #include "ANGLEUtilities.h"
</span><span class="cx"> #include "ExtensionsGLANGLE.h"
</span><del>-#include "GraphicsContextGLOpenGL.h"
</del><ins>+#include "GraphicsContextGLOpenGLManager.h"
</ins><span class="cx"> #include "ImageBuffer.h"
</span><span class="cx"> #include "IntRect.h"
</span><span class="cx"> #include "IntSize.h"
</span><span class="lines">@@ -40,19 +40,14 @@
</span><span class="cx"> #include "NotImplemented.h"
</span><span class="cx"> #include "PixelBuffer.h"
</span><span class="cx"> #include "TemporaryANGLESetting.h"
</span><del>-#include <JavaScriptCore/RegularExpression.h>
-#include <JavaScriptCore/Uint8ClampedArray.h>
</del><span class="cx"> #include <algorithm>
</span><span class="cx"> #include <cstring>
</span><del>-#include <wtf/HexNumber.h>
</del><span class="cx"> #include <wtf/Seconds.h>
</span><del>-#include <wtf/ThreadSpecific.h>
</del><span class="cx"> #include <wtf/text/CString.h>
</span><span class="cx"> #include <wtf/text/StringBuilder.h>
</span><span class="cx"> 
</span><del>-
</del><span class="cx"> #if ENABLE(VIDEO) && USE(AVFOUNDATION)
</span><del>-#include "GraphicsContextGLCVANGLE.h"
</del><ins>+#include "GraphicsContextGLCVCocoa.h"
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> // This one definition short-circuits the need for gl2ext.h, which
</span><span class="lines">@@ -76,8 +71,7 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-
-GCGLenum GraphicsContextGLOpenGL::drawingBufferTextureTarget()
</del><ins>+GCGLenum GraphicsContextGLANGLE::drawingBufferTextureTarget()
</ins><span class="cx"> {
</span><span class="cx"> #if PLATFORM(WIN)
</span><span class="cx">     m_drawingBufferTextureTarget = EGL_TEXTURE_2D;
</span><span class="lines">@@ -97,7 +91,7 @@
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLenum GraphicsContextGLOpenGL::drawingBufferTextureTargetQueryForDrawingTarget(GCGLenum drawingTarget)
</del><ins>+GCGLenum GraphicsContextGLANGLE::drawingBufferTextureTargetQueryForDrawingTarget(GCGLenum drawingTarget)
</ins><span class="cx"> {
</span><span class="cx">     switch (drawingTarget) {
</span><span class="cx">     case TEXTURE_2D:
</span><span class="lines">@@ -109,7 +103,7 @@
</span><span class="cx">     return -1;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLint GraphicsContextGLOpenGL::EGLDrawingBufferTextureTargetForDrawingTarget(GCGLenum drawingTarget)
</del><ins>+GCGLint GraphicsContextGLANGLE::EGLDrawingBufferTextureTargetForDrawingTarget(GCGLenum drawingTarget)
</ins><span class="cx"> {
</span><span class="cx">     switch (drawingTarget) {
</span><span class="cx">     case TEXTURE_2D:
</span><span class="lines">@@ -121,7 +115,7 @@
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool GraphicsContextGLOpenGL::releaseThreadResources(ReleaseThreadResourceBehavior releaseBehavior)
</del><ins>+bool GraphicsContextGLANGLE::releaseThreadResources(ReleaseThreadResourceBehavior releaseBehavior)
</ins><span class="cx"> {
</span><span class="cx">     platformReleaseThreadResources();
</span><span class="cx"> 
</span><span class="lines">@@ -165,7 +159,7 @@
</span><span class="cx">     return EGL_ReleaseThread();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-std::optional<PixelBuffer> GraphicsContextGLOpenGL::readPixelsForPaintResults()
</del><ins>+std::optional<PixelBuffer> GraphicsContextGLANGLE::readPixelsForPaintResults()
</ins><span class="cx"> {
</span><span class="cx">     PixelBufferFormat format { AlphaPremultiplication::Unpremultiplied, PixelFormat::RGBA8, DestinationColorSpace::SRGB() };
</span><span class="cx">     auto pixelBuffer = PixelBuffer::tryCreate(format, getInternalFramebufferSize());
</span><span class="lines">@@ -191,7 +185,7 @@
</span><span class="cx">     return pixelBuffer;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::validateAttributes()
</del><ins>+void GraphicsContextGLANGLE::validateAttributes()
</ins><span class="cx"> {
</span><span class="cx">     m_internalColorFormat = contextAttributes().alpha ? GL_RGBA8 : GL_RGB8;
</span><span class="cx"> 
</span><span class="lines">@@ -198,7 +192,7 @@
</span><span class="cx">     validateDepthStencil(packedDepthStencilExtensionName);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool GraphicsContextGLOpenGL::reshapeFBOs(const IntSize& size)
</del><ins>+bool GraphicsContextGLANGLE::reshapeFBOs(const IntSize& size)
</ins><span class="cx"> {
</span><span class="cx">     auto attrs = contextAttributes();
</span><span class="cx">     const int width = size.width();
</span><span class="lines">@@ -278,7 +272,7 @@
</span><span class="cx">     return mustRestoreFBO;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::attachDepthAndStencilBufferIfNeeded(GLuint internalDepthStencilFormat, int width, int height)
</del><ins>+void GraphicsContextGLANGLE::attachDepthAndStencilBufferIfNeeded(GLuint internalDepthStencilFormat, int width, int height)
</ins><span class="cx"> {
</span><span class="cx">     auto attrs = contextAttributes();
</span><span class="cx"> 
</span><span class="lines">@@ -304,7 +298,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::resolveMultisamplingIfNecessary(const IntRect& rect)
</del><ins>+void GraphicsContextGLANGLE::resolveMultisamplingIfNecessary(const IntRect& rect)
</ins><span class="cx"> {
</span><span class="cx">     TemporaryANGLESetting scopedScissor(GL_SCISSOR_TEST, GL_FALSE);
</span><span class="cx">     TemporaryANGLESetting scopedDither(GL_DITHER, GL_FALSE);
</span><span class="lines">@@ -335,7 +329,7 @@
</span><span class="cx">         gl::BindFramebuffer(GL_FRAMEBUFFER, boundFrameBuffer);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::renderbufferStorage(GCGLenum target, GCGLenum internalformat, GCGLsizei width, GCGLsizei height)
</del><ins>+void GraphicsContextGLANGLE::renderbufferStorage(GCGLenum target, GCGLenum internalformat, GCGLsizei width, GCGLsizei height)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -343,7 +337,7 @@
</span><span class="cx">     gl::RenderbufferStorage(target, internalformat, width, height);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::getIntegerv(GCGLenum pname, GCGLSpan<GCGLint> value)
</del><ins>+void GraphicsContextGLANGLE::getIntegerv(GCGLenum pname, GCGLSpan<GCGLint> value)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -350,7 +344,7 @@
</span><span class="cx">     gl::GetIntegervRobustANGLE(pname, value.bufSize, nullptr, value.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::getShaderPrecisionFormat(GCGLenum shaderType, GCGLenum precisionType, GCGLSpan<GCGLint, 2> range, GCGLint* precision)
</del><ins>+void GraphicsContextGLANGLE::getShaderPrecisionFormat(GCGLenum shaderType, GCGLenum precisionType, GCGLSpan<GCGLint, 2> range, GCGLint* precision)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -358,7 +352,7 @@
</span><span class="cx">     gl::GetShaderPrecisionFormat(shaderType, precisionType, range.data, precision);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::texImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, GCGLSpan<const GCGLvoid> pixels)
</del><ins>+void GraphicsContextGLANGLE::texImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, GCGLSpan<const GCGLvoid> pixels)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_isForWebGL2)
</span><span class="cx">         internalformat = static_cast<ExtensionsGLANGLE&>(getExtensions()).adjustWebGL1TextureInternalFormat(internalformat, format, type);
</span><span class="lines">@@ -368,12 +362,12 @@
</span><span class="cx">     m_state.textureSeedCount.add(m_state.currentBoundTexture());
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::texImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, GCGLintptr offset)
</del><ins>+void GraphicsContextGLANGLE::texImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, GCGLintptr offset)
</ins><span class="cx"> {
</span><span class="cx">     texImage2D(target, level, internalformat, width, height, border, format, type, makeGCGLSpan(reinterpret_cast<const GCGLvoid*>(offset), 0));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::texSubImage2D(GCGLenum target, GCGLint level, GCGLint xoff, GCGLint yoff, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLSpan<const GCGLvoid> pixels)
</del><ins>+void GraphicsContextGLANGLE::texSubImage2D(GCGLenum target, GCGLint level, GCGLint xoff, GCGLint yoff, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLSpan<const GCGLvoid> pixels)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -383,12 +377,12 @@
</span><span class="cx">     m_state.textureSeedCount.add(m_state.currentBoundTexture());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::texSubImage2D(GCGLenum target, GCGLint level, GCGLint xoff, GCGLint yoff, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLintptr offset)
</del><ins>+void GraphicsContextGLANGLE::texSubImage2D(GCGLenum target, GCGLint level, GCGLint xoff, GCGLint yoff, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLintptr offset)
</ins><span class="cx"> {
</span><span class="cx">     texSubImage2D(target, level, xoff, yoff, width, height, format, type, makeGCGLSpan(reinterpret_cast<const GCGLvoid*>(offset), 0));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::compressedTexImage2D(GCGLenum target, int level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, int border, GCGLsizei imageSize, GCGLSpan<const GCGLvoid> data)
</del><ins>+void GraphicsContextGLANGLE::compressedTexImage2D(GCGLenum target, int level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, int border, GCGLsizei imageSize, GCGLSpan<const GCGLvoid> data)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -397,12 +391,12 @@
</span><span class="cx">     m_state.textureSeedCount.add(m_state.currentBoundTexture());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::compressedTexImage2D(GCGLenum target, int level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, int border, GCGLsizei imageSize, GCGLintptr offset)
</del><ins>+void GraphicsContextGLANGLE::compressedTexImage2D(GCGLenum target, int level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, int border, GCGLsizei imageSize, GCGLintptr offset)
</ins><span class="cx"> {
</span><span class="cx">     compressedTexImage2D(target, level, internalformat, width, height, border, imageSize, makeGCGLSpan(reinterpret_cast<const GCGLvoid*>(offset), 0));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::compressedTexSubImage2D(GCGLenum target, int level, int xoffset, int yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLsizei imageSize, GCGLSpan<const GCGLvoid> data)
</del><ins>+void GraphicsContextGLANGLE::compressedTexSubImage2D(GCGLenum target, int level, int xoffset, int yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLsizei imageSize, GCGLSpan<const GCGLvoid> data)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -411,12 +405,12 @@
</span><span class="cx">     m_state.textureSeedCount.add(m_state.currentBoundTexture());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::compressedTexSubImage2D(GCGLenum target, int level, int xoffset, int yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLsizei imageSize, GCGLintptr offset)
</del><ins>+void GraphicsContextGLANGLE::compressedTexSubImage2D(GCGLenum target, int level, int xoffset, int yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLsizei imageSize, GCGLintptr offset)
</ins><span class="cx"> {
</span><span class="cx">     compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, makeGCGLSpan(reinterpret_cast<const GCGLvoid*>(offset), 0));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::depthRange(GCGLclampf zNear, GCGLclampf zFar)
</del><ins>+void GraphicsContextGLANGLE::depthRange(GCGLclampf zNear, GCGLclampf zFar)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -424,7 +418,7 @@
</span><span class="cx">     gl::DepthRangef(static_cast<float>(zNear), static_cast<float>(zFar));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::clearDepth(GCGLclampf depth)
</del><ins>+void GraphicsContextGLANGLE::clearDepth(GCGLclampf depth)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -432,7 +426,7 @@
</span><span class="cx">     gl::ClearDepthf(static_cast<float>(depth));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ExtensionsGL& GraphicsContextGLOpenGL::getExtensions()
</del><ins>+ExtensionsGL& GraphicsContextGLANGLE::getExtensions()
</ins><span class="cx"> {
</span><span class="cx">     if (!m_extensions)
</span><span class="cx">         m_extensions = makeUnique<ExtensionsGLANGLE>(this);
</span><span class="lines">@@ -439,17 +433,17 @@
</span><span class="cx">     return *m_extensions;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::readnPixels(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLSpan<GCGLvoid> data)
</del><ins>+void GraphicsContextGLANGLE::readnPixels(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLSpan<GCGLvoid> data)
</ins><span class="cx"> {
</span><span class="cx">     readnPixelsImpl(x, y, width, height, format, type, data.bufSize, nullptr, nullptr, nullptr, data.data, false);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::readnPixels(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLintptr offset)
</del><ins>+void GraphicsContextGLANGLE::readnPixels(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLintptr offset)
</ins><span class="cx"> {
</span><span class="cx">     readnPixelsImpl(x, y, width, height, format, type, 0, nullptr, nullptr, nullptr, reinterpret_cast<GCGLvoid*>(offset), true);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::readnPixelsImpl(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLsizei bufSize, GCGLsizei* length, GCGLsizei* columns, GCGLsizei* rows, GCGLvoid* data, bool readingToPixelBufferObject)
</del><ins>+void GraphicsContextGLANGLE::readnPixelsImpl(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLsizei bufSize, GCGLsizei* length, GCGLsizei* columns, GCGLsizei* rows, GCGLvoid* data, bool readingToPixelBufferObject)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -486,9 +480,9 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-// The contents of GraphicsContextGLOpenGLCommon follow, ported to use ANGLE.
</del><ins>+// The contents of GraphicsContextGLANGLECommon follow, ported to use ANGLE.
</ins><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::validateDepthStencil(const char* packedDepthStencilExtension)
</del><ins>+void GraphicsContextGLANGLE::validateDepthStencil(const char* packedDepthStencilExtension)
</ins><span class="cx"> {
</span><span class="cx">     ExtensionsGL& extensions = getExtensions();
</span><span class="cx">     // FIXME: Since the constructors of various platforms are not shared, we initialize this here.
</span><span class="lines">@@ -526,7 +520,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::prepareTexture()
</del><ins>+void GraphicsContextGLANGLE::prepareTexture()
</ins><span class="cx"> {
</span><span class="cx">     if (m_layerComposited)
</span><span class="cx">         return;
</span><span class="lines">@@ -537,7 +531,7 @@
</span><span class="cx">     prepareTextureImpl();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::prepareTextureImpl()
</del><ins>+void GraphicsContextGLANGLE::prepareTextureImpl()
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!m_layerComposited);
</span><span class="cx"> 
</span><span class="lines">@@ -580,7 +574,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-std::optional<PixelBuffer> GraphicsContextGLOpenGL::readRenderingResults()
</del><ins>+std::optional<PixelBuffer> GraphicsContextGLANGLE::readRenderingResults()
</ins><span class="cx"> {
</span><span class="cx">     ScopedRestoreReadFramebufferBinding fboBinding(m_isForWebGL2, m_state.boundReadFBO);
</span><span class="cx">     if (contextAttributes().antialias) {
</span><span class="lines">@@ -591,7 +585,7 @@
</span><span class="cx">     return readPixelsForPaintResults();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::reshape(int width, int height)
</del><ins>+void GraphicsContextGLANGLE::reshape(int width, int height)
</ins><span class="cx"> {
</span><span class="cx">     if (width == m_currentWidth && height == m_currentHeight)
</span><span class="cx">         return;
</span><span class="lines">@@ -677,7 +671,7 @@
</span><span class="cx">     gl::Flush();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::activeTexture(GCGLenum texture)
</del><ins>+void GraphicsContextGLANGLE::activeTexture(GCGLenum texture)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -686,7 +680,7 @@
</span><span class="cx">     gl::ActiveTexture(texture);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::attachShader(PlatformGLObject program, PlatformGLObject shader)
</del><ins>+void GraphicsContextGLANGLE::attachShader(PlatformGLObject program, PlatformGLObject shader)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(program);
</span><span class="cx">     ASSERT(shader);
</span><span class="lines">@@ -696,7 +690,7 @@
</span><span class="cx">     gl::AttachShader(program, shader);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::bindAttribLocation(PlatformGLObject program, GCGLuint index, const String& name)
</del><ins>+void GraphicsContextGLANGLE::bindAttribLocation(PlatformGLObject program, GCGLuint index, const String& name)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(program);
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -705,7 +699,7 @@
</span><span class="cx">     gl::BindAttribLocation(program, index, name.utf8().data());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::bindBuffer(GCGLenum target, PlatformGLObject buffer)
</del><ins>+void GraphicsContextGLANGLE::bindBuffer(GCGLenum target, PlatformGLObject buffer)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -713,7 +707,7 @@
</span><span class="cx">     gl::BindBuffer(target, buffer);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::bindFramebuffer(GCGLenum target, PlatformGLObject buffer)
</del><ins>+void GraphicsContextGLANGLE::bindFramebuffer(GCGLenum target, PlatformGLObject buffer)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -734,7 +728,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::bindRenderbuffer(GCGLenum target, PlatformGLObject renderbuffer)
</del><ins>+void GraphicsContextGLANGLE::bindRenderbuffer(GCGLenum target, PlatformGLObject renderbuffer)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -743,7 +737,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::bindTexture(GCGLenum target, PlatformGLObject texture)
</del><ins>+void GraphicsContextGLANGLE::bindTexture(GCGLenum target, PlatformGLObject texture)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -752,7 +746,7 @@
</span><span class="cx">     gl::BindTexture(target, texture);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::blendColor(GCGLclampf red, GCGLclampf green, GCGLclampf blue, GCGLclampf alpha)
</del><ins>+void GraphicsContextGLANGLE::blendColor(GCGLclampf red, GCGLclampf green, GCGLclampf blue, GCGLclampf alpha)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -760,7 +754,7 @@
</span><span class="cx">     gl::BlendColor(red, green, blue, alpha);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::blendEquation(GCGLenum mode)
</del><ins>+void GraphicsContextGLANGLE::blendEquation(GCGLenum mode)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -768,7 +762,7 @@
</span><span class="cx">     gl::BlendEquation(mode);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::blendEquationSeparate(GCGLenum modeRGB, GCGLenum modeAlpha)
</del><ins>+void GraphicsContextGLANGLE::blendEquationSeparate(GCGLenum modeRGB, GCGLenum modeAlpha)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -777,7 +771,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::blendFunc(GCGLenum sfactor, GCGLenum dfactor)
</del><ins>+void GraphicsContextGLANGLE::blendFunc(GCGLenum sfactor, GCGLenum dfactor)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -785,7 +779,7 @@
</span><span class="cx">     gl::BlendFunc(sfactor, dfactor);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::blendFuncSeparate(GCGLenum srcRGB, GCGLenum dstRGB, GCGLenum srcAlpha, GCGLenum dstAlpha)
</del><ins>+void GraphicsContextGLANGLE::blendFuncSeparate(GCGLenum srcRGB, GCGLenum dstRGB, GCGLenum srcAlpha, GCGLenum dstAlpha)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -793,7 +787,7 @@
</span><span class="cx">     gl::BlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::bufferData(GCGLenum target, GCGLsizeiptr size, GCGLenum usage)
</del><ins>+void GraphicsContextGLANGLE::bufferData(GCGLenum target, GCGLsizeiptr size, GCGLenum usage)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -801,7 +795,7 @@
</span><span class="cx">     gl::BufferData(target, size, 0, usage);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::bufferData(GCGLenum target, GCGLSpan<const GCGLvoid> data, GCGLenum usage)
</del><ins>+void GraphicsContextGLANGLE::bufferData(GCGLenum target, GCGLSpan<const GCGLvoid> data, GCGLenum usage)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -809,7 +803,7 @@
</span><span class="cx">     gl::BufferData(target, data.bufSize, data.data, usage);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::bufferSubData(GCGLenum target, GCGLintptr offset, GCGLSpan<const GCGLvoid> data)
</del><ins>+void GraphicsContextGLANGLE::bufferSubData(GCGLenum target, GCGLintptr offset, GCGLSpan<const GCGLvoid> data)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -817,7 +811,7 @@
</span><span class="cx">     gl::BufferSubData(target, offset, data.bufSize, data.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::getBufferSubData(GCGLenum target, GCGLintptr offset, GCGLSpan<GCGLvoid> data)
</del><ins>+void GraphicsContextGLANGLE::getBufferSubData(GCGLenum target, GCGLintptr offset, GCGLSpan<GCGLvoid> data)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -829,7 +823,7 @@
</span><span class="cx">         synthesizeGLError(GraphicsContextGL::INVALID_OPERATION);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::copyBufferSubData(GCGLenum readTarget, GCGLenum writeTarget, GCGLintptr readOffset, GCGLintptr writeOffset, GCGLsizeiptr size)
</del><ins>+void GraphicsContextGLANGLE::copyBufferSubData(GCGLenum readTarget, GCGLenum writeTarget, GCGLintptr readOffset, GCGLintptr writeOffset, GCGLsizeiptr size)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -837,7 +831,7 @@
</span><span class="cx">     gl::CopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::getInternalformativ(GCGLenum target, GCGLenum internalformat, GCGLenum pname, GCGLSpan<GCGLint> data)
</del><ins>+void GraphicsContextGLANGLE::getInternalformativ(GCGLenum target, GCGLenum internalformat, GCGLenum pname, GCGLSpan<GCGLint> data)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -844,7 +838,7 @@
</span><span class="cx">     gl::GetInternalformativRobustANGLE(target, internalformat, pname, data.bufSize, nullptr, data.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::renderbufferStorageMultisample(GCGLenum target, GCGLsizei samples, GCGLenum internalformat, GCGLsizei width, GCGLsizei height)
</del><ins>+void GraphicsContextGLANGLE::renderbufferStorageMultisample(GCGLenum target, GCGLsizei samples, GCGLenum internalformat, GCGLsizei width, GCGLsizei height)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -852,7 +846,7 @@
</span><span class="cx">     gl::RenderbufferStorageMultisample(target, samples, internalformat, width, height);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::texStorage2D(GCGLenum target, GCGLsizei levels, GCGLenum internalformat, GCGLsizei width, GCGLsizei height)
</del><ins>+void GraphicsContextGLANGLE::texStorage2D(GCGLenum target, GCGLsizei levels, GCGLenum internalformat, GCGLsizei width, GCGLsizei height)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -861,7 +855,7 @@
</span><span class="cx">     m_state.textureSeedCount.add(m_state.currentBoundTexture());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::texStorage3D(GCGLenum target, GCGLsizei levels, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth)
</del><ins>+void GraphicsContextGLANGLE::texStorage3D(GCGLenum target, GCGLsizei levels, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -870,7 +864,7 @@
</span><span class="cx">     m_state.textureSeedCount.add(m_state.currentBoundTexture());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::texImage3D(GCGLenum target, int level, int internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth, int border, GCGLenum format, GCGLenum type, GCGLSpan<const GCGLvoid> pixels)
</del><ins>+void GraphicsContextGLANGLE::texImage3D(GCGLenum target, int level, int internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth, int border, GCGLenum format, GCGLenum type, GCGLSpan<const GCGLvoid> pixels)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -878,12 +872,12 @@
</span><span class="cx">     gl::TexImage3DRobustANGLE(target, level, internalformat, width, height, depth, border, format, type, pixels.bufSize, pixels.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::texImage3D(GCGLenum target, int level, int internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth, int border, GCGLenum format, GCGLenum type, GCGLintptr offset)
</del><ins>+void GraphicsContextGLANGLE::texImage3D(GCGLenum target, int level, int internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth, int border, GCGLenum format, GCGLenum type, GCGLintptr offset)
</ins><span class="cx"> {
</span><span class="cx">     texImage3D(target, level, internalformat, width, height, depth, border, format, type, makeGCGLSpan(reinterpret_cast<const GCGLvoid*>(offset), 0));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::texSubImage3D(GCGLenum target, int level, int xoffset, int yoffset, int zoffset, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLenum format, GCGLenum type, GCGLSpan<const GCGLvoid> pixels)
</del><ins>+void GraphicsContextGLANGLE::texSubImage3D(GCGLenum target, int level, int xoffset, int yoffset, int zoffset, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLenum format, GCGLenum type, GCGLSpan<const GCGLvoid> pixels)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -891,12 +885,12 @@
</span><span class="cx">     gl::TexSubImage3DRobustANGLE(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels.bufSize, pixels.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::texSubImage3D(GCGLenum target, int level, int xoffset, int yoffset, int zoffset, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLenum format, GCGLenum type, GCGLintptr offset)
</del><ins>+void GraphicsContextGLANGLE::texSubImage3D(GCGLenum target, int level, int xoffset, int yoffset, int zoffset, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLenum format, GCGLenum type, GCGLintptr offset)
</ins><span class="cx"> {
</span><span class="cx">     texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, makeGCGLSpan(reinterpret_cast<const GCGLvoid*>(offset), 0));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::compressedTexImage3D(GCGLenum target, int level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth, int border, GCGLsizei imageSize, GCGLSpan<const GCGLvoid> data)
</del><ins>+void GraphicsContextGLANGLE::compressedTexImage3D(GCGLenum target, int level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth, int border, GCGLsizei imageSize, GCGLSpan<const GCGLvoid> data)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -904,12 +898,12 @@
</span><span class="cx">     gl::CompressedTexImage3DRobustANGLE(target, level, internalformat, width, height, depth, border, imageSize, data.bufSize, data.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::compressedTexImage3D(GCGLenum target, int level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth, int border, GCGLsizei imageSize, GCGLintptr offset)
</del><ins>+void GraphicsContextGLANGLE::compressedTexImage3D(GCGLenum target, int level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth, int border, GCGLsizei imageSize, GCGLintptr offset)
</ins><span class="cx"> {
</span><span class="cx">     compressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, makeGCGLSpan(reinterpret_cast<const GCGLvoid*>(offset), 0));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::compressedTexSubImage3D(GCGLenum target, int level, int xoffset, int yoffset, int zoffset, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLenum format, GCGLsizei imageSize, GCGLSpan<const GCGLvoid> data)
</del><ins>+void GraphicsContextGLANGLE::compressedTexSubImage3D(GCGLenum target, int level, int xoffset, int yoffset, int zoffset, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLenum format, GCGLsizei imageSize, GCGLSpan<const GCGLvoid> data)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -917,12 +911,12 @@
</span><span class="cx">     gl::CompressedTexSubImage3DRobustANGLE(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data.bufSize, data.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::compressedTexSubImage3D(GCGLenum target, int level, int xoffset, int yoffset, int zoffset, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLenum format, GCGLsizei imageSize, GCGLintptr offset)
</del><ins>+void GraphicsContextGLANGLE::compressedTexSubImage3D(GCGLenum target, int level, int xoffset, int yoffset, int zoffset, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLenum format, GCGLsizei imageSize, GCGLintptr offset)
</ins><span class="cx"> {
</span><span class="cx">     compressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, makeGCGLSpan(reinterpret_cast<const GCGLvoid*>(offset), 0));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Vector<GCGLint> GraphicsContextGLOpenGL::getActiveUniforms(PlatformGLObject program, const Vector<GCGLuint>& uniformIndices, GCGLenum pname)
</del><ins>+Vector<GCGLint> GraphicsContextGLANGLE::getActiveUniforms(PlatformGLObject program, const Vector<GCGLuint>& uniformIndices, GCGLenum pname)
</ins><span class="cx"> {
</span><span class="cx">     Vector<GCGLint> result(uniformIndices.size(), 0);
</span><span class="cx">     ASSERT(program);
</span><span class="lines">@@ -933,7 +927,7 @@
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLenum GraphicsContextGLOpenGL::checkFramebufferStatus(GCGLenum target)
</del><ins>+GCGLenum GraphicsContextGLANGLE::checkFramebufferStatus(GCGLenum target)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return GL_INVALID_OPERATION;
</span><span class="lines">@@ -941,7 +935,7 @@
</span><span class="cx">     return gl::CheckFramebufferStatus(target);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::clearColor(GCGLclampf r, GCGLclampf g, GCGLclampf b, GCGLclampf a)
</del><ins>+void GraphicsContextGLANGLE::clearColor(GCGLclampf r, GCGLclampf g, GCGLclampf b, GCGLclampf a)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -949,7 +943,7 @@
</span><span class="cx">     gl::ClearColor(r, g, b, a);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::clear(GCGLbitfield mask)
</del><ins>+void GraphicsContextGLANGLE::clear(GCGLbitfield mask)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -958,7 +952,7 @@
</span><span class="cx">     checkGPUStatus();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::clearStencil(GCGLint s)
</del><ins>+void GraphicsContextGLANGLE::clearStencil(GCGLint s)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -966,7 +960,7 @@
</span><span class="cx">     gl::ClearStencil(s);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::colorMask(GCGLboolean red, GCGLboolean green, GCGLboolean blue, GCGLboolean alpha)
</del><ins>+void GraphicsContextGLANGLE::colorMask(GCGLboolean red, GCGLboolean green, GCGLboolean blue, GCGLboolean alpha)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -974,7 +968,7 @@
</span><span class="cx">     gl::ColorMask(red, green, blue, alpha);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::compileShader(PlatformGLObject shader)
</del><ins>+void GraphicsContextGLANGLE::compileShader(PlatformGLObject shader)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(shader);
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -992,7 +986,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::compileShaderDirect(PlatformGLObject shader)
</del><ins>+void GraphicsContextGLANGLE::compileShaderDirect(PlatformGLObject shader)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(shader);
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -1001,7 +995,7 @@
</span><span class="cx">     gl::CompileShader(shader);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::texImage2DDirect(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, const void* pixels)
</del><ins>+void GraphicsContextGLANGLE::texImage2DDirect(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, const void* pixels)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1009,7 +1003,7 @@
</span><span class="cx">     m_state.textureSeedCount.add(m_state.currentBoundTexture());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::copyTexImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLint border)
</del><ins>+void GraphicsContextGLANGLE::copyTexImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLint border)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1026,7 +1020,7 @@
</span><span class="cx">         gl::BindFramebuffer(framebufferTarget, m_multisampleFBO);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::copyTexSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height)
</del><ins>+void GraphicsContextGLANGLE::copyTexSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1043,7 +1037,7 @@
</span><span class="cx">         gl::BindFramebuffer(framebufferTarget, m_multisampleFBO);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::cullFace(GCGLenum mode)
</del><ins>+void GraphicsContextGLANGLE::cullFace(GCGLenum mode)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1051,7 +1045,7 @@
</span><span class="cx">     gl::CullFace(mode);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::depthFunc(GCGLenum func)
</del><ins>+void GraphicsContextGLANGLE::depthFunc(GCGLenum func)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1059,7 +1053,7 @@
</span><span class="cx">     gl::DepthFunc(func);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::depthMask(GCGLboolean flag)
</del><ins>+void GraphicsContextGLANGLE::depthMask(GCGLboolean flag)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1067,7 +1061,7 @@
</span><span class="cx">     gl::DepthMask(flag);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::detachShader(PlatformGLObject program, PlatformGLObject shader)
</del><ins>+void GraphicsContextGLANGLE::detachShader(PlatformGLObject program, PlatformGLObject shader)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(program);
</span><span class="cx">     ASSERT(shader);
</span><span class="lines">@@ -1077,7 +1071,7 @@
</span><span class="cx">     gl::DetachShader(program, shader);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::disable(GCGLenum cap)
</del><ins>+void GraphicsContextGLANGLE::disable(GCGLenum cap)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1085,7 +1079,7 @@
</span><span class="cx">     gl::Disable(cap);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::disableVertexAttribArray(GCGLuint index)
</del><ins>+void GraphicsContextGLANGLE::disableVertexAttribArray(GCGLuint index)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1093,7 +1087,7 @@
</span><span class="cx">     gl::DisableVertexAttribArray(index);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::drawArrays(GCGLenum mode, GCGLint first, GCGLsizei count)
</del><ins>+void GraphicsContextGLANGLE::drawArrays(GCGLenum mode, GCGLint first, GCGLsizei count)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1102,7 +1096,7 @@
</span><span class="cx">     checkGPUStatus();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::drawElements(GCGLenum mode, GCGLsizei count, GCGLenum type, GCGLintptr offset)
</del><ins>+void GraphicsContextGLANGLE::drawElements(GCGLenum mode, GCGLsizei count, GCGLenum type, GCGLintptr offset)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1111,7 +1105,7 @@
</span><span class="cx">     checkGPUStatus();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::enable(GCGLenum cap)
</del><ins>+void GraphicsContextGLANGLE::enable(GCGLenum cap)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1119,7 +1113,7 @@
</span><span class="cx">     gl::Enable(cap);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::enableVertexAttribArray(GCGLuint index)
</del><ins>+void GraphicsContextGLANGLE::enableVertexAttribArray(GCGLuint index)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1127,7 +1121,7 @@
</span><span class="cx">     gl::EnableVertexAttribArray(index);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::finish()
</del><ins>+void GraphicsContextGLANGLE::finish()
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1135,7 +1129,7 @@
</span><span class="cx">     gl::Finish();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::flush()
</del><ins>+void GraphicsContextGLANGLE::flush()
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1143,7 +1137,7 @@
</span><span class="cx">     gl::Flush();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::framebufferRenderbuffer(GCGLenum target, GCGLenum attachment, GCGLenum renderbuffertarget, PlatformGLObject buffer)
</del><ins>+void GraphicsContextGLANGLE::framebufferRenderbuffer(GCGLenum target, GCGLenum attachment, GCGLenum renderbuffertarget, PlatformGLObject buffer)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1151,7 +1145,7 @@
</span><span class="cx">     gl::FramebufferRenderbuffer(target, attachment, renderbuffertarget, buffer);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::framebufferTexture2D(GCGLenum target, GCGLenum attachment, GCGLenum textarget, PlatformGLObject texture, GCGLint level)
</del><ins>+void GraphicsContextGLANGLE::framebufferTexture2D(GCGLenum target, GCGLenum attachment, GCGLenum textarget, PlatformGLObject texture, GCGLint level)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1160,7 +1154,7 @@
</span><span class="cx">     m_state.textureSeedCount.add(m_state.currentBoundTexture());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::frontFace(GCGLenum mode)
</del><ins>+void GraphicsContextGLANGLE::frontFace(GCGLenum mode)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1168,7 +1162,7 @@
</span><span class="cx">     gl::FrontFace(mode);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::generateMipmap(GCGLenum target)
</del><ins>+void GraphicsContextGLANGLE::generateMipmap(GCGLenum target)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1176,7 +1170,7 @@
</span><span class="cx">     gl::GenerateMipmap(target);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool GraphicsContextGLOpenGL::getActiveAttribImpl(PlatformGLObject program, GCGLuint index, ActiveInfo& info)
</del><ins>+bool GraphicsContextGLANGLE::getActiveAttribImpl(PlatformGLObject program, GCGLuint index, ActiveInfo& info)
</ins><span class="cx"> {
</span><span class="cx">     if (!program) {
</span><span class="cx">         synthesizeGLError(INVALID_VALUE);
</span><span class="lines">@@ -1201,12 +1195,12 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool GraphicsContextGLOpenGL::getActiveAttrib(PlatformGLObject program, GCGLuint index, ActiveInfo& info)
</del><ins>+bool GraphicsContextGLANGLE::getActiveAttrib(PlatformGLObject program, GCGLuint index, ActiveInfo& info)
</ins><span class="cx"> {
</span><span class="cx">     return getActiveAttribImpl(program, index, info);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool GraphicsContextGLOpenGL::getActiveUniformImpl(PlatformGLObject program, GCGLuint index, ActiveInfo& info)
</del><ins>+bool GraphicsContextGLANGLE::getActiveUniformImpl(PlatformGLObject program, GCGLuint index, ActiveInfo& info)
</ins><span class="cx"> {
</span><span class="cx">     if (!program) {
</span><span class="cx">         synthesizeGLError(INVALID_VALUE);
</span><span class="lines">@@ -1232,12 +1226,12 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool GraphicsContextGLOpenGL::getActiveUniform(PlatformGLObject program, GCGLuint index, ActiveInfo& info)
</del><ins>+bool GraphicsContextGLANGLE::getActiveUniform(PlatformGLObject program, GCGLuint index, ActiveInfo& info)
</ins><span class="cx"> {
</span><span class="cx">     return getActiveUniformImpl(program, index, info);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::getAttachedShaders(PlatformGLObject program, GCGLsizei maxCount, GCGLsizei* count, PlatformGLObject* shaders)
</del><ins>+void GraphicsContextGLANGLE::getAttachedShaders(PlatformGLObject program, GCGLsizei maxCount, GCGLsizei* count, PlatformGLObject* shaders)
</ins><span class="cx"> {
</span><span class="cx">     if (!program) {
</span><span class="cx">         synthesizeGLError(INVALID_VALUE);
</span><span class="lines">@@ -1249,7 +1243,7 @@
</span><span class="cx">     gl::GetAttachedShaders(program, maxCount, count, shaders);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-int GraphicsContextGLOpenGL::getAttribLocation(PlatformGLObject program, const String& name)
</del><ins>+int GraphicsContextGLANGLE::getAttribLocation(PlatformGLObject program, const String& name)
</ins><span class="cx"> {
</span><span class="cx">     if (!program)
</span><span class="cx">         return -1;
</span><span class="lines">@@ -1261,12 +1255,12 @@
</span><span class="cx">     return gl::GetAttribLocation(program, name.utf8().data());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-int GraphicsContextGLOpenGL::getAttribLocationDirect(PlatformGLObject program, const String& name)
</del><ins>+int GraphicsContextGLANGLE::getAttribLocationDirect(PlatformGLObject program, const String& name)
</ins><span class="cx"> {
</span><span class="cx">     return getAttribLocation(program, name);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool GraphicsContextGLOpenGL::moveErrorsToSyntheticErrorList()
</del><ins>+bool GraphicsContextGLANGLE::moveErrorsToSyntheticErrorList()
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return false;
</span><span class="lines">@@ -1287,7 +1281,7 @@
</span><span class="cx">     return movedAnError;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLenum GraphicsContextGLOpenGL::getError()
</del><ins>+GCGLenum GraphicsContextGLANGLE::getError()
</ins><span class="cx"> {
</span><span class="cx">     if (!m_syntheticErrors.isEmpty()) {
</span><span class="cx">         // Need to move the current errors to the synthetic error list in case
</span><span class="lines">@@ -1303,7 +1297,7 @@
</span><span class="cx">     return gl::GetError();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-String GraphicsContextGLOpenGL::getString(GCGLenum name)
</del><ins>+String GraphicsContextGLANGLE::getString(GCGLenum name)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return String();
</span><span class="lines">@@ -1311,7 +1305,7 @@
</span><span class="cx">     return String(reinterpret_cast<const char*>(gl::GetString(name)));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::hint(GCGLenum target, GCGLenum mode)
</del><ins>+void GraphicsContextGLANGLE::hint(GCGLenum target, GCGLenum mode)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1319,7 +1313,7 @@
</span><span class="cx">     gl::Hint(target, mode);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLboolean GraphicsContextGLOpenGL::isBuffer(PlatformGLObject buffer)
</del><ins>+GCGLboolean GraphicsContextGLANGLE::isBuffer(PlatformGLObject buffer)
</ins><span class="cx"> {
</span><span class="cx">     if (!buffer)
</span><span class="cx">         return GL_FALSE;
</span><span class="lines">@@ -1330,7 +1324,7 @@
</span><span class="cx">     return gl::IsBuffer(buffer);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLboolean GraphicsContextGLOpenGL::isEnabled(GCGLenum cap)
</del><ins>+GCGLboolean GraphicsContextGLANGLE::isEnabled(GCGLenum cap)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return GL_FALSE;
</span><span class="lines">@@ -1338,7 +1332,7 @@
</span><span class="cx">     return gl::IsEnabled(cap);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLboolean GraphicsContextGLOpenGL::isFramebuffer(PlatformGLObject framebuffer)
</del><ins>+GCGLboolean GraphicsContextGLANGLE::isFramebuffer(PlatformGLObject framebuffer)
</ins><span class="cx"> {
</span><span class="cx">     if (!framebuffer)
</span><span class="cx">         return GL_FALSE;
</span><span class="lines">@@ -1349,7 +1343,7 @@
</span><span class="cx">     return gl::IsFramebuffer(framebuffer);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLboolean GraphicsContextGLOpenGL::isProgram(PlatformGLObject program)
</del><ins>+GCGLboolean GraphicsContextGLANGLE::isProgram(PlatformGLObject program)
</ins><span class="cx"> {
</span><span class="cx">     if (!program)
</span><span class="cx">         return GL_FALSE;
</span><span class="lines">@@ -1360,7 +1354,7 @@
</span><span class="cx">     return gl::IsProgram(program);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLboolean GraphicsContextGLOpenGL::isRenderbuffer(PlatformGLObject renderbuffer)
</del><ins>+GCGLboolean GraphicsContextGLANGLE::isRenderbuffer(PlatformGLObject renderbuffer)
</ins><span class="cx"> {
</span><span class="cx">     if (!renderbuffer)
</span><span class="cx">         return GL_FALSE;
</span><span class="lines">@@ -1371,7 +1365,7 @@
</span><span class="cx">     return gl::IsRenderbuffer(renderbuffer);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLboolean GraphicsContextGLOpenGL::isShader(PlatformGLObject shader)
</del><ins>+GCGLboolean GraphicsContextGLANGLE::isShader(PlatformGLObject shader)
</ins><span class="cx"> {
</span><span class="cx">     if (!shader)
</span><span class="cx">         return GL_FALSE;
</span><span class="lines">@@ -1382,7 +1376,7 @@
</span><span class="cx">     return gl::IsShader(shader);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLboolean GraphicsContextGLOpenGL::isTexture(PlatformGLObject texture)
</del><ins>+GCGLboolean GraphicsContextGLANGLE::isTexture(PlatformGLObject texture)
</ins><span class="cx"> {
</span><span class="cx">     if (!texture)
</span><span class="cx">         return GL_FALSE;
</span><span class="lines">@@ -1393,7 +1387,7 @@
</span><span class="cx">     return gl::IsTexture(texture);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::lineWidth(GCGLfloat width)
</del><ins>+void GraphicsContextGLANGLE::lineWidth(GCGLfloat width)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1401,7 +1395,7 @@
</span><span class="cx">     gl::LineWidth(width);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::linkProgram(PlatformGLObject program)
</del><ins>+void GraphicsContextGLANGLE::linkProgram(PlatformGLObject program)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(program);
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -1410,7 +1404,7 @@
</span><span class="cx">     gl::LinkProgram(program);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::pixelStorei(GCGLenum pname, GCGLint param)
</del><ins>+void GraphicsContextGLANGLE::pixelStorei(GCGLenum pname, GCGLint param)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1418,7 +1412,7 @@
</span><span class="cx">     gl::PixelStorei(pname, param);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::polygonOffset(GCGLfloat factor, GCGLfloat units)
</del><ins>+void GraphicsContextGLANGLE::polygonOffset(GCGLfloat factor, GCGLfloat units)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1426,7 +1420,7 @@
</span><span class="cx">     gl::PolygonOffset(factor, units);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::sampleCoverage(GCGLclampf value, GCGLboolean invert)
</del><ins>+void GraphicsContextGLANGLE::sampleCoverage(GCGLclampf value, GCGLboolean invert)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1434,7 +1428,7 @@
</span><span class="cx">     gl::SampleCoverage(value, invert);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::scissor(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height)
</del><ins>+void GraphicsContextGLANGLE::scissor(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1442,7 +1436,7 @@
</span><span class="cx">     gl::Scissor(x, y, width, height);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::shaderSource(PlatformGLObject shader, const String& string)
</del><ins>+void GraphicsContextGLANGLE::shaderSource(PlatformGLObject shader, const String& string)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(shader);
</span><span class="cx"> 
</span><span class="lines">@@ -1455,7 +1449,7 @@
</span><span class="cx">     gl::ShaderSource(shader, 1, &shaderSourcePtr, &shaderSourceLength);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::stencilFunc(GCGLenum func, GCGLint ref, GCGLuint mask)
</del><ins>+void GraphicsContextGLANGLE::stencilFunc(GCGLenum func, GCGLint ref, GCGLuint mask)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1463,7 +1457,7 @@
</span><span class="cx">     gl::StencilFunc(func, ref, mask);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::stencilFuncSeparate(GCGLenum face, GCGLenum func, GCGLint ref, GCGLuint mask)
</del><ins>+void GraphicsContextGLANGLE::stencilFuncSeparate(GCGLenum face, GCGLenum func, GCGLint ref, GCGLuint mask)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1471,7 +1465,7 @@
</span><span class="cx">     gl::StencilFuncSeparate(face, func, ref, mask);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::stencilMask(GCGLuint mask)
</del><ins>+void GraphicsContextGLANGLE::stencilMask(GCGLuint mask)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1479,7 +1473,7 @@
</span><span class="cx">     gl::StencilMask(mask);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::stencilMaskSeparate(GCGLenum face, GCGLuint mask)
</del><ins>+void GraphicsContextGLANGLE::stencilMaskSeparate(GCGLenum face, GCGLuint mask)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1487,7 +1481,7 @@
</span><span class="cx">     gl::StencilMaskSeparate(face, mask);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::stencilOp(GCGLenum fail, GCGLenum zfail, GCGLenum zpass)
</del><ins>+void GraphicsContextGLANGLE::stencilOp(GCGLenum fail, GCGLenum zfail, GCGLenum zpass)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1495,7 +1489,7 @@
</span><span class="cx">     gl::StencilOp(fail, zfail, zpass);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::stencilOpSeparate(GCGLenum face, GCGLenum fail, GCGLenum zfail, GCGLenum zpass)
</del><ins>+void GraphicsContextGLANGLE::stencilOpSeparate(GCGLenum face, GCGLenum fail, GCGLenum zfail, GCGLenum zpass)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1503,7 +1497,7 @@
</span><span class="cx">     gl::StencilOpSeparate(face, fail, zfail, zpass);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::texParameterf(GCGLenum target, GCGLenum pname, GCGLfloat value)
</del><ins>+void GraphicsContextGLANGLE::texParameterf(GCGLenum target, GCGLenum pname, GCGLfloat value)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1511,7 +1505,7 @@
</span><span class="cx">     gl::TexParameterf(target, pname, value);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::texParameteri(GCGLenum target, GCGLenum pname, GCGLint value)
</del><ins>+void GraphicsContextGLANGLE::texParameteri(GCGLenum target, GCGLenum pname, GCGLint value)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1519,7 +1513,7 @@
</span><span class="cx">     gl::TexParameteri(target, pname, value);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniform1f(GCGLint location, GCGLfloat v0)
</del><ins>+void GraphicsContextGLANGLE::uniform1f(GCGLint location, GCGLfloat v0)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1527,7 +1521,7 @@
</span><span class="cx">     gl::Uniform1f(location, v0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniform1fv(GCGLint location, GCGLSpan<const GCGLfloat> array)
</del><ins>+void GraphicsContextGLANGLE::uniform1fv(GCGLint location, GCGLSpan<const GCGLfloat> array)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1535,7 +1529,7 @@
</span><span class="cx">     gl::Uniform1fv(location, array.bufSize, array.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniform2f(GCGLint location, GCGLfloat v0, GCGLfloat v1)
</del><ins>+void GraphicsContextGLANGLE::uniform2f(GCGLint location, GCGLfloat v0, GCGLfloat v1)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1543,7 +1537,7 @@
</span><span class="cx">     gl::Uniform2f(location, v0, v1);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniform2fv(GCGLint location, GCGLSpan<const GCGLfloat> array)
</del><ins>+void GraphicsContextGLANGLE::uniform2fv(GCGLint location, GCGLSpan<const GCGLfloat> array)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!(array.bufSize % 2));
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -1552,7 +1546,7 @@
</span><span class="cx">     gl::Uniform2fv(location, array.bufSize / 2, array.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniform3f(GCGLint location, GCGLfloat v0, GCGLfloat v1, GCGLfloat v2)
</del><ins>+void GraphicsContextGLANGLE::uniform3f(GCGLint location, GCGLfloat v0, GCGLfloat v1, GCGLfloat v2)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1560,7 +1554,7 @@
</span><span class="cx">     gl::Uniform3f(location, v0, v1, v2);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniform3fv(GCGLint location, GCGLSpan<const GCGLfloat> array)
</del><ins>+void GraphicsContextGLANGLE::uniform3fv(GCGLint location, GCGLSpan<const GCGLfloat> array)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!(array.bufSize % 3));
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -1569,7 +1563,7 @@
</span><span class="cx">     gl::Uniform3fv(location, array.bufSize / 3, array.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniform4f(GCGLint location, GCGLfloat v0, GCGLfloat v1, GCGLfloat v2, GCGLfloat v3)
</del><ins>+void GraphicsContextGLANGLE::uniform4f(GCGLint location, GCGLfloat v0, GCGLfloat v1, GCGLfloat v2, GCGLfloat v3)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1577,7 +1571,7 @@
</span><span class="cx">     gl::Uniform4f(location, v0, v1, v2, v3);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniform4fv(GCGLint location, GCGLSpan<const GCGLfloat> array)
</del><ins>+void GraphicsContextGLANGLE::uniform4fv(GCGLint location, GCGLSpan<const GCGLfloat> array)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!(array.bufSize % 4));
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -1586,7 +1580,7 @@
</span><span class="cx">     gl::Uniform4fv(location, array.bufSize / 4, array.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniform1i(GCGLint location, GCGLint v0)
</del><ins>+void GraphicsContextGLANGLE::uniform1i(GCGLint location, GCGLint v0)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1594,7 +1588,7 @@
</span><span class="cx">     gl::Uniform1i(location, v0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniform1iv(GCGLint location, GCGLSpan<const GCGLint> array)
</del><ins>+void GraphicsContextGLANGLE::uniform1iv(GCGLint location, GCGLSpan<const GCGLint> array)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1602,7 +1596,7 @@
</span><span class="cx">     gl::Uniform1iv(location, array.bufSize, array.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniform2i(GCGLint location, GCGLint v0, GCGLint v1)
</del><ins>+void GraphicsContextGLANGLE::uniform2i(GCGLint location, GCGLint v0, GCGLint v1)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1610,7 +1604,7 @@
</span><span class="cx">     gl::Uniform2i(location, v0, v1);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniform2iv(GCGLint location, GCGLSpan<const GCGLint> array)
</del><ins>+void GraphicsContextGLANGLE::uniform2iv(GCGLint location, GCGLSpan<const GCGLint> array)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!(array.bufSize % 2));
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -1619,7 +1613,7 @@
</span><span class="cx">     gl::Uniform2iv(location, array.bufSize / 2, array.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniform3i(GCGLint location, GCGLint v0, GCGLint v1, GCGLint v2)
</del><ins>+void GraphicsContextGLANGLE::uniform3i(GCGLint location, GCGLint v0, GCGLint v1, GCGLint v2)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1627,7 +1621,7 @@
</span><span class="cx">     gl::Uniform3i(location, v0, v1, v2);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniform3iv(GCGLint location, GCGLSpan<const GCGLint> array)
</del><ins>+void GraphicsContextGLANGLE::uniform3iv(GCGLint location, GCGLSpan<const GCGLint> array)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!(array.bufSize % 3));
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -1636,7 +1630,7 @@
</span><span class="cx">     gl::Uniform3iv(location, array.bufSize / 3, array.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniform4i(GCGLint location, GCGLint v0, GCGLint v1, GCGLint v2, GCGLint v3)
</del><ins>+void GraphicsContextGLANGLE::uniform4i(GCGLint location, GCGLint v0, GCGLint v1, GCGLint v2, GCGLint v3)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1644,7 +1638,7 @@
</span><span class="cx">     gl::Uniform4i(location, v0, v1, v2, v3);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniform4iv(GCGLint location, GCGLSpan<const GCGLint> array)
</del><ins>+void GraphicsContextGLANGLE::uniform4iv(GCGLint location, GCGLSpan<const GCGLint> array)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!(array.bufSize % 4));
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -1653,7 +1647,7 @@
</span><span class="cx">     gl::Uniform4iv(location, array.bufSize / 4, array.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniformMatrix2fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> array)
</del><ins>+void GraphicsContextGLANGLE::uniformMatrix2fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> array)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1661,7 +1655,7 @@
</span><span class="cx">     gl::UniformMatrix2fv(location, array.bufSize / 4, transpose, array.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniformMatrix3fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> array)
</del><ins>+void GraphicsContextGLANGLE::uniformMatrix3fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> array)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!(array.bufSize % 9));
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -1670,7 +1664,7 @@
</span><span class="cx">     gl::UniformMatrix3fv(location, array.bufSize / 9, transpose, array.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniformMatrix4fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> array)
</del><ins>+void GraphicsContextGLANGLE::uniformMatrix4fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> array)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!(array.bufSize % 16));
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -1679,7 +1673,7 @@
</span><span class="cx">     gl::UniformMatrix4fv(location, array.bufSize / 16, transpose, array.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::useProgram(PlatformGLObject program)
</del><ins>+void GraphicsContextGLANGLE::useProgram(PlatformGLObject program)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1687,7 +1681,7 @@
</span><span class="cx">     gl::UseProgram(program);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::validateProgram(PlatformGLObject program)
</del><ins>+void GraphicsContextGLANGLE::validateProgram(PlatformGLObject program)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(program);
</span><span class="cx"> 
</span><span class="lines">@@ -1697,7 +1691,7 @@
</span><span class="cx">     gl::ValidateProgram(program);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::vertexAttrib1f(GCGLuint index, GCGLfloat v0)
</del><ins>+void GraphicsContextGLANGLE::vertexAttrib1f(GCGLuint index, GCGLfloat v0)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1705,7 +1699,7 @@
</span><span class="cx">     gl::VertexAttrib1f(index, v0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::vertexAttrib1fv(GCGLuint index, GCGLSpan<const GCGLfloat, 1> array)
</del><ins>+void GraphicsContextGLANGLE::vertexAttrib1fv(GCGLuint index, GCGLSpan<const GCGLfloat, 1> array)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1713,7 +1707,7 @@
</span><span class="cx">     gl::VertexAttrib1fv(index, array.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::vertexAttrib2f(GCGLuint index, GCGLfloat v0, GCGLfloat v1)
</del><ins>+void GraphicsContextGLANGLE::vertexAttrib2f(GCGLuint index, GCGLfloat v0, GCGLfloat v1)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1721,7 +1715,7 @@
</span><span class="cx">     gl::VertexAttrib2f(index, v0, v1);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::vertexAttrib2fv(GCGLuint index, GCGLSpan<const GCGLfloat, 2> array)
</del><ins>+void GraphicsContextGLANGLE::vertexAttrib2fv(GCGLuint index, GCGLSpan<const GCGLfloat, 2> array)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1729,7 +1723,7 @@
</span><span class="cx">     gl::VertexAttrib2fv(index, array.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::vertexAttrib3f(GCGLuint index, GCGLfloat v0, GCGLfloat v1, GCGLfloat v2)
</del><ins>+void GraphicsContextGLANGLE::vertexAttrib3f(GCGLuint index, GCGLfloat v0, GCGLfloat v1, GCGLfloat v2)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1737,7 +1731,7 @@
</span><span class="cx">     gl::VertexAttrib3f(index, v0, v1, v2);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::vertexAttrib3fv(GCGLuint index, GCGLSpan<const GCGLfloat, 3> array)
</del><ins>+void GraphicsContextGLANGLE::vertexAttrib3fv(GCGLuint index, GCGLSpan<const GCGLfloat, 3> array)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1745,7 +1739,7 @@
</span><span class="cx">     gl::VertexAttrib3fv(index, array.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::vertexAttrib4f(GCGLuint index, GCGLfloat v0, GCGLfloat v1, GCGLfloat v2, GCGLfloat v3)
</del><ins>+void GraphicsContextGLANGLE::vertexAttrib4f(GCGLuint index, GCGLfloat v0, GCGLfloat v1, GCGLfloat v2, GCGLfloat v3)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1753,7 +1747,7 @@
</span><span class="cx">     gl::VertexAttrib4f(index, v0, v1, v2, v3);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::vertexAttrib4fv(GCGLuint index, GCGLSpan<const GCGLfloat, 4> array)
</del><ins>+void GraphicsContextGLANGLE::vertexAttrib4fv(GCGLuint index, GCGLSpan<const GCGLfloat, 4> array)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1761,7 +1755,7 @@
</span><span class="cx">     gl::VertexAttrib4fv(index, array.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::vertexAttribPointer(GCGLuint index, GCGLint size, GCGLenum type, GCGLboolean normalized, GCGLsizei stride, GCGLintptr offset)
</del><ins>+void GraphicsContextGLANGLE::vertexAttribPointer(GCGLuint index, GCGLint size, GCGLenum type, GCGLboolean normalized, GCGLsizei stride, GCGLintptr offset)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1769,7 +1763,7 @@
</span><span class="cx">     gl::VertexAttribPointer(index, size, type, normalized, stride, reinterpret_cast<GLvoid*>(static_cast<intptr_t>(offset)));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::vertexAttribIPointer(GCGLuint index, GCGLint size, GCGLenum type, GCGLsizei stride, GCGLintptr offset)
</del><ins>+void GraphicsContextGLANGLE::vertexAttribIPointer(GCGLuint index, GCGLint size, GCGLenum type, GCGLsizei stride, GCGLintptr offset)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1777,7 +1771,7 @@
</span><span class="cx">     gl::VertexAttribIPointer(index, size, type, stride, reinterpret_cast<GLvoid*>(static_cast<intptr_t>(offset)));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::viewport(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height)
</del><ins>+void GraphicsContextGLANGLE::viewport(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1785,7 +1779,7 @@
</span><span class="cx">     gl::Viewport(x, y, width, height);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PlatformGLObject GraphicsContextGLOpenGL::createVertexArray()
</del><ins>+PlatformGLObject GraphicsContextGLANGLE::createVertexArray()
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return 0;
</span><span class="lines">@@ -1798,7 +1792,7 @@
</span><span class="cx">     return array;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::deleteVertexArray(PlatformGLObject array)
</del><ins>+void GraphicsContextGLANGLE::deleteVertexArray(PlatformGLObject array)
</ins><span class="cx"> {
</span><span class="cx">     if (!array)
</span><span class="cx">         return;
</span><span class="lines">@@ -1810,7 +1804,7 @@
</span><span class="cx">         gl::DeleteVertexArraysOES(1, &array);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLboolean GraphicsContextGLOpenGL::isVertexArray(PlatformGLObject array)
</del><ins>+GCGLboolean GraphicsContextGLANGLE::isVertexArray(PlatformGLObject array)
</ins><span class="cx"> {
</span><span class="cx">     if (!array)
</span><span class="cx">         return GL_FALSE;
</span><span class="lines">@@ -1822,7 +1816,7 @@
</span><span class="cx">     return gl::IsVertexArrayOES(array);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::bindVertexArray(PlatformGLObject array)
</del><ins>+void GraphicsContextGLANGLE::bindVertexArray(PlatformGLObject array)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1832,7 +1826,7 @@
</span><span class="cx">         gl::BindVertexArrayOES(array);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::getBooleanv(GCGLenum pname, GCGLSpan<GCGLboolean> value)
</del><ins>+void GraphicsContextGLANGLE::getBooleanv(GCGLenum pname, GCGLSpan<GCGLboolean> value)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1840,7 +1834,7 @@
</span><span class="cx">     gl::GetBooleanvRobustANGLE(pname, value.bufSize, nullptr, value.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLint GraphicsContextGLOpenGL::getBufferParameteri(GCGLenum target, GCGLenum pname)
</del><ins>+GCGLint GraphicsContextGLANGLE::getBufferParameteri(GCGLenum target, GCGLenum pname)
</ins><span class="cx"> {
</span><span class="cx">     GCGLint value = 0;
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -1849,7 +1843,7 @@
</span><span class="cx">     return value;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::getFloatv(GCGLenum pname, GCGLSpan<GCGLfloat> value)
</del><ins>+void GraphicsContextGLANGLE::getFloatv(GCGLenum pname, GCGLSpan<GCGLfloat> value)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -1857,7 +1851,7 @@
</span><span class="cx">     gl::GetFloatvRobustANGLE(pname, value.bufSize, nullptr, value.data);
</span><span class="cx"> }
</span><span class="cx">     
</span><del>-GCGLint64 GraphicsContextGLOpenGL::getInteger64(GCGLenum pname)
</del><ins>+GCGLint64 GraphicsContextGLANGLE::getInteger64(GCGLenum pname)
</ins><span class="cx"> {
</span><span class="cx">     GCGLint64 value = 0;
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -1866,7 +1860,7 @@
</span><span class="cx">     return value;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLint64 GraphicsContextGLOpenGL::getInteger64i(GCGLenum pname, GCGLuint index)
</del><ins>+GCGLint64 GraphicsContextGLANGLE::getInteger64i(GCGLenum pname, GCGLuint index)
</ins><span class="cx"> {
</span><span class="cx">     GCGLint64 value = 0;
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -1875,7 +1869,7 @@
</span><span class="cx">     return value;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLint GraphicsContextGLOpenGL::getFramebufferAttachmentParameteri(GCGLenum target, GCGLenum attachment, GCGLenum pname)
</del><ins>+GCGLint GraphicsContextGLANGLE::getFramebufferAttachmentParameteri(GCGLenum target, GCGLenum attachment, GCGLenum pname)
</ins><span class="cx"> {
</span><span class="cx">     GCGLint value = 0;
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -1886,7 +1880,7 @@
</span><span class="cx">     return value;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLint GraphicsContextGLOpenGL::getProgrami(PlatformGLObject program, GCGLenum pname)
</del><ins>+GCGLint GraphicsContextGLANGLE::getProgrami(PlatformGLObject program, GCGLenum pname)
</ins><span class="cx"> {
</span><span class="cx">     GCGLint value = 0;
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -1895,7 +1889,7 @@
</span><span class="cx">     return value;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-String GraphicsContextGLOpenGL::getUnmangledInfoLog(PlatformGLObject shaders[2], GCGLsizei count, const String& log)
</del><ins>+String GraphicsContextGLANGLE::getUnmangledInfoLog(PlatformGLObject shaders[2], GCGLsizei count, const String& log)
</ins><span class="cx"> {
</span><span class="cx">     UNUSED_PARAM(shaders);
</span><span class="cx">     UNUSED_PARAM(count);
</span><span class="lines">@@ -1915,7 +1909,7 @@
</span><span class="cx">     return processedLog.toString();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-String GraphicsContextGLOpenGL::getProgramInfoLog(PlatformGLObject program)
</del><ins>+String GraphicsContextGLANGLE::getProgramInfoLog(PlatformGLObject program)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(program);
</span><span class="cx"> 
</span><span class="lines">@@ -1938,7 +1932,7 @@
</span><span class="cx">     return getUnmangledInfoLog(shaders, count, String(info.data(), size));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLint GraphicsContextGLOpenGL::getRenderbufferParameteri(GCGLenum target, GCGLenum pname)
</del><ins>+GCGLint GraphicsContextGLANGLE::getRenderbufferParameteri(GCGLenum target, GCGLenum pname)
</ins><span class="cx"> {
</span><span class="cx">     GCGLint value = 0;
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -1947,7 +1941,7 @@
</span><span class="cx">     return value;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLint GraphicsContextGLOpenGL::getShaderi(PlatformGLObject shader, GCGLenum pname)
</del><ins>+GCGLint GraphicsContextGLANGLE::getShaderi(PlatformGLObject shader, GCGLenum pname)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(shader);
</span><span class="cx">     GCGLint value = 0;
</span><span class="lines">@@ -1957,7 +1951,7 @@
</span><span class="cx">     return value;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-String GraphicsContextGLOpenGL::getShaderInfoLog(PlatformGLObject shader)
</del><ins>+String GraphicsContextGLANGLE::getShaderInfoLog(PlatformGLObject shader)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(shader);
</span><span class="cx"> 
</span><span class="lines">@@ -1977,12 +1971,12 @@
</span><span class="cx">     return getUnmangledInfoLog(shaders, 1, String(info.data(), size));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-String GraphicsContextGLOpenGL::getShaderSource(PlatformGLObject)
</del><ins>+String GraphicsContextGLANGLE::getShaderSource(PlatformGLObject)
</ins><span class="cx"> {
</span><span class="cx">     return emptyString();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLfloat GraphicsContextGLOpenGL::getTexParameterf(GCGLenum target, GCGLenum pname)
</del><ins>+GCGLfloat GraphicsContextGLANGLE::getTexParameterf(GCGLenum target, GCGLenum pname)
</ins><span class="cx"> {
</span><span class="cx">     GCGLfloat value = 0.f;
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -1991,7 +1985,7 @@
</span><span class="cx">     return value;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLint GraphicsContextGLOpenGL::getTexParameteri(GCGLenum target, GCGLenum pname)
</del><ins>+GCGLint GraphicsContextGLANGLE::getTexParameteri(GCGLenum target, GCGLenum pname)
</ins><span class="cx"> {
</span><span class="cx">     GCGLint value = 0;
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -2000,7 +1994,7 @@
</span><span class="cx">     return value;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::getUniformfv(PlatformGLObject program, GCGLint location, GCGLSpan<GCGLfloat> value)
</del><ins>+void GraphicsContextGLANGLE::getUniformfv(PlatformGLObject program, GCGLint location, GCGLSpan<GCGLfloat> value)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2009,7 +2003,7 @@
</span><span class="cx">     gl::GetUniformfvRobustANGLE(program, location, bufSize, nullptr, value.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::getUniformiv(PlatformGLObject program, GCGLint location, GCGLSpan<GCGLint> value)
</del><ins>+void GraphicsContextGLANGLE::getUniformiv(PlatformGLObject program, GCGLint location, GCGLSpan<GCGLint> value)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2018,7 +2012,7 @@
</span><span class="cx">     gl::GetUniformivRobustANGLE(program, location, bufSize, nullptr, value.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::getUniformuiv(PlatformGLObject program, GCGLint location, GCGLSpan<GCGLuint> value)
</del><ins>+void GraphicsContextGLANGLE::getUniformuiv(PlatformGLObject program, GCGLint location, GCGLSpan<GCGLuint> value)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2027,7 +2021,7 @@
</span><span class="cx">     gl::GetUniformuivRobustANGLE(program, location, bufSize, nullptr, value.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLint GraphicsContextGLOpenGL::getUniformLocation(PlatformGLObject program, const String& name)
</del><ins>+GCGLint GraphicsContextGLANGLE::getUniformLocation(PlatformGLObject program, const String& name)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(program);
</span><span class="cx"> 
</span><span class="lines">@@ -2037,7 +2031,7 @@
</span><span class="cx">     return gl::GetUniformLocation(program, name.utf8().data());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLsizeiptr GraphicsContextGLOpenGL::getVertexAttribOffset(GCGLuint index, GCGLenum pname)
</del><ins>+GCGLsizeiptr GraphicsContextGLANGLE::getVertexAttribOffset(GCGLuint index, GCGLenum pname)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return 0;
</span><span class="lines">@@ -2047,7 +2041,7 @@
</span><span class="cx">     return static_cast<GCGLsizeiptr>(reinterpret_cast<intptr_t>(pointer));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PlatformGLObject GraphicsContextGLOpenGL::createBuffer()
</del><ins>+PlatformGLObject GraphicsContextGLANGLE::createBuffer()
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return 0;
</span><span class="lines">@@ -2057,7 +2051,7 @@
</span><span class="cx">     return o;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PlatformGLObject GraphicsContextGLOpenGL::createFramebuffer()
</del><ins>+PlatformGLObject GraphicsContextGLANGLE::createFramebuffer()
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return 0;
</span><span class="lines">@@ -2067,7 +2061,7 @@
</span><span class="cx">     return o;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PlatformGLObject GraphicsContextGLOpenGL::createProgram()
</del><ins>+PlatformGLObject GraphicsContextGLANGLE::createProgram()
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return 0;
</span><span class="lines">@@ -2075,7 +2069,7 @@
</span><span class="cx">     return gl::CreateProgram();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PlatformGLObject GraphicsContextGLOpenGL::createRenderbuffer()
</del><ins>+PlatformGLObject GraphicsContextGLANGLE::createRenderbuffer()
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return 0;
</span><span class="lines">@@ -2085,7 +2079,7 @@
</span><span class="cx">     return o;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PlatformGLObject GraphicsContextGLOpenGL::createShader(GCGLenum type)
</del><ins>+PlatformGLObject GraphicsContextGLANGLE::createShader(GCGLenum type)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return 0;
</span><span class="lines">@@ -2093,7 +2087,7 @@
</span><span class="cx">     return gl::CreateShader((type == FRAGMENT_SHADER) ? GL_FRAGMENT_SHADER : GL_VERTEX_SHADER);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PlatformGLObject GraphicsContextGLOpenGL::createTexture()
</del><ins>+PlatformGLObject GraphicsContextGLANGLE::createTexture()
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return 0;
</span><span class="lines">@@ -2104,7 +2098,7 @@
</span><span class="cx">     return o;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::deleteBuffer(PlatformGLObject buffer)
</del><ins>+void GraphicsContextGLANGLE::deleteBuffer(PlatformGLObject buffer)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2112,7 +2106,7 @@
</span><span class="cx">     gl::DeleteBuffers(1, &buffer);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::deleteFramebuffer(PlatformGLObject framebuffer)
</del><ins>+void GraphicsContextGLANGLE::deleteFramebuffer(PlatformGLObject framebuffer)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2129,7 +2123,7 @@
</span><span class="cx">     gl::DeleteFramebuffers(1, &framebuffer);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::deleteProgram(PlatformGLObject program)
</del><ins>+void GraphicsContextGLANGLE::deleteProgram(PlatformGLObject program)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2137,7 +2131,7 @@
</span><span class="cx">     gl::DeleteProgram(program);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::deleteRenderbuffer(PlatformGLObject renderbuffer)
</del><ins>+void GraphicsContextGLANGLE::deleteRenderbuffer(PlatformGLObject renderbuffer)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2145,7 +2139,7 @@
</span><span class="cx">     gl::DeleteRenderbuffers(1, &renderbuffer);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::deleteShader(PlatformGLObject shader)
</del><ins>+void GraphicsContextGLANGLE::deleteShader(PlatformGLObject shader)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2153,7 +2147,7 @@
</span><span class="cx">     gl::DeleteShader(shader);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::deleteTexture(PlatformGLObject texture)
</del><ins>+void GraphicsContextGLANGLE::deleteTexture(PlatformGLObject texture)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2165,7 +2159,7 @@
</span><span class="cx">     m_state.textureSeedCount.removeAll(texture);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::synthesizeGLError(GCGLenum error)
</del><ins>+void GraphicsContextGLANGLE::synthesizeGLError(GCGLenum error)
</ins><span class="cx"> {
</span><span class="cx">     // Need to move the current errors to the synthetic error list to
</span><span class="cx">     // preserve the order of errors, so a caller to getError will get
</span><span class="lines">@@ -2174,25 +2168,25 @@
</span><span class="cx">     m_syntheticErrors.add(error);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::forceContextLost()
</del><ins>+void GraphicsContextGLANGLE::forceContextLost()
</ins><span class="cx"> {
</span><span class="cx">     for (auto* client : copyToVector(m_clients))
</span><span class="cx">         client->forceContextLost();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::recycleContext()
</del><ins>+void GraphicsContextGLANGLE::recycleContext()
</ins><span class="cx"> {
</span><span class="cx">     for (auto* client : copyToVector(m_clients))
</span><span class="cx">         client->recycleContext();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::dispatchContextChangedNotification()
</del><ins>+void GraphicsContextGLANGLE::dispatchContextChangedNotification()
</ins><span class="cx"> {
</span><span class="cx">     for (auto* client : copyToVector(m_clients))
</span><span class="cx">         client->dispatchContextChangedNotification();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::drawArraysInstanced(GCGLenum mode, GCGLint first, GCGLsizei count, GCGLsizei primcount)
</del><ins>+void GraphicsContextGLANGLE::drawArraysInstanced(GCGLenum mode, GCGLint first, GCGLsizei count, GCGLsizei primcount)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2204,7 +2198,7 @@
</span><span class="cx">     checkGPUStatus();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::drawElementsInstanced(GCGLenum mode, GCGLsizei count, GCGLenum type, GCGLintptr offset, GCGLsizei primcount)
</del><ins>+void GraphicsContextGLANGLE::drawElementsInstanced(GCGLenum mode, GCGLsizei count, GCGLenum type, GCGLintptr offset, GCGLsizei primcount)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2216,7 +2210,7 @@
</span><span class="cx">     checkGPUStatus();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::vertexAttribDivisor(GCGLuint index, GCGLuint divisor)
</del><ins>+void GraphicsContextGLANGLE::vertexAttribDivisor(GCGLuint index, GCGLuint divisor)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2227,7 +2221,7 @@
</span><span class="cx">         gl::VertexAttribDivisorANGLE(index, divisor);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLuint GraphicsContextGLOpenGL::getUniformBlockIndex(PlatformGLObject program, const String& uniformBlockName)
</del><ins>+GCGLuint GraphicsContextGLANGLE::getUniformBlockIndex(PlatformGLObject program, const String& uniformBlockName)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(program);
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -2236,7 +2230,7 @@
</span><span class="cx">     return gl::GetUniformBlockIndex(program, uniformBlockName.utf8().data());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-String GraphicsContextGLOpenGL::getActiveUniformBlockName(PlatformGLObject program, GCGLuint uniformBlockIndex)
</del><ins>+String GraphicsContextGLANGLE::getActiveUniformBlockName(PlatformGLObject program, GCGLuint uniformBlockIndex)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(program);
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -2256,7 +2250,7 @@
</span><span class="cx">     return String(buffer.data(), length);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniformBlockBinding(PlatformGLObject program, GCGLuint uniformBlockIndex, GCGLuint uniformBlockBinding)
</del><ins>+void GraphicsContextGLANGLE::uniformBlockBinding(PlatformGLObject program, GCGLuint uniformBlockIndex, GCGLuint uniformBlockBinding)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(program);
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -2267,7 +2261,7 @@
</span><span class="cx"> 
</span><span class="cx"> // Query Functions
</span><span class="cx"> 
</span><del>-PlatformGLObject GraphicsContextGLOpenGL::createQuery()
</del><ins>+PlatformGLObject GraphicsContextGLANGLE::createQuery()
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return 0;
</span><span class="lines">@@ -2277,7 +2271,7 @@
</span><span class="cx">     return name;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::beginQuery(GCGLenum target, PlatformGLObject query)
</del><ins>+void GraphicsContextGLANGLE::beginQuery(GCGLenum target, PlatformGLObject query)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2285,7 +2279,7 @@
</span><span class="cx">     gl::BeginQuery(target, query);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::endQuery(GCGLenum target)
</del><ins>+void GraphicsContextGLANGLE::endQuery(GCGLenum target)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2293,7 +2287,7 @@
</span><span class="cx">     gl::EndQuery(target);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLuint GraphicsContextGLOpenGL::getQueryObjectui(GCGLuint id, GCGLenum pname)
</del><ins>+GCGLuint GraphicsContextGLANGLE::getQueryObjectui(GCGLuint id, GCGLenum pname)
</ins><span class="cx"> {
</span><span class="cx">     GCGLuint value = 0;
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -2304,7 +2298,7 @@
</span><span class="cx"> 
</span><span class="cx"> // Transform Feedback Functions
</span><span class="cx"> 
</span><del>-PlatformGLObject GraphicsContextGLOpenGL::createTransformFeedback()
</del><ins>+PlatformGLObject GraphicsContextGLANGLE::createTransformFeedback()
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return 0;
</span><span class="lines">@@ -2314,7 +2308,7 @@
</span><span class="cx">     return name;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::deleteTransformFeedback(PlatformGLObject transformFeedback)
</del><ins>+void GraphicsContextGLANGLE::deleteTransformFeedback(PlatformGLObject transformFeedback)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2322,7 +2316,7 @@
</span><span class="cx">     gl::DeleteTransformFeedbacks(1, &transformFeedback);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLboolean GraphicsContextGLOpenGL::isTransformFeedback(PlatformGLObject transformFeedback)
</del><ins>+GCGLboolean GraphicsContextGLANGLE::isTransformFeedback(PlatformGLObject transformFeedback)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return GL_FALSE;
</span><span class="lines">@@ -2330,7 +2324,7 @@
</span><span class="cx">     return gl::IsTransformFeedback(transformFeedback);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::bindTransformFeedback(GCGLenum target, PlatformGLObject transformFeedback)
</del><ins>+void GraphicsContextGLANGLE::bindTransformFeedback(GCGLenum target, PlatformGLObject transformFeedback)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2338,7 +2332,7 @@
</span><span class="cx">     gl::BindTransformFeedback(target, transformFeedback);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::beginTransformFeedback(GCGLenum primitiveMode)
</del><ins>+void GraphicsContextGLANGLE::beginTransformFeedback(GCGLenum primitiveMode)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2346,7 +2340,7 @@
</span><span class="cx">     gl::BeginTransformFeedback(primitiveMode);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::endTransformFeedback()
</del><ins>+void GraphicsContextGLANGLE::endTransformFeedback()
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2354,7 +2348,7 @@
</span><span class="cx">     gl::EndTransformFeedback();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::transformFeedbackVaryings(PlatformGLObject program, const Vector<String>& varyings, GCGLenum bufferMode)
</del><ins>+void GraphicsContextGLANGLE::transformFeedbackVaryings(PlatformGLObject program, const Vector<String>& varyings, GCGLenum bufferMode)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2369,13 +2363,13 @@
</span><span class="cx">     gl::TransformFeedbackVaryings(program, pointersToVaryings.size(), pointersToVaryings.data(), bufferMode);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::getTransformFeedbackVarying(PlatformGLObject program, GCGLuint index, ActiveInfo& info)
</del><ins>+void GraphicsContextGLANGLE::getTransformFeedbackVarying(PlatformGLObject program, GCGLuint index, ActiveInfo& info)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     GCGLsizei bufSize = 0;
</span><del>-    gl::GetProgramiv(program, GraphicsContextGLOpenGL::TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH, &bufSize);
</del><ins>+    gl::GetProgramiv(program, GraphicsContextGLANGLE::TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH, &bufSize);
</ins><span class="cx">     if (!bufSize)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -2391,7 +2385,7 @@
</span><span class="cx">     info.type = type;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::bindBufferBase(GCGLenum target, GCGLuint index, PlatformGLObject buffer)
</del><ins>+void GraphicsContextGLANGLE::bindBufferBase(GCGLenum target, GCGLuint index, PlatformGLObject buffer)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2399,7 +2393,7 @@
</span><span class="cx">     gl::BindBufferBase(target, index, buffer);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::blitFramebuffer(GCGLint srcX0, GCGLint srcY0, GCGLint srcX1, GCGLint srcY1, GCGLint dstX0, GCGLint dstY0, GCGLint dstX1, GCGLint dstY1, GCGLbitfield mask, GCGLenum filter)
</del><ins>+void GraphicsContextGLANGLE::blitFramebuffer(GCGLint srcX0, GCGLint srcY0, GCGLint srcX1, GCGLint srcY1, GCGLint dstX0, GCGLint dstY0, GCGLint dstX1, GCGLint dstY1, GCGLbitfield mask, GCGLenum filter)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2407,7 +2401,7 @@
</span><span class="cx">     gl::BlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::framebufferTextureLayer(GCGLenum target, GCGLenum attachment, PlatformGLObject texture, GCGLint level, GCGLint layer)
</del><ins>+void GraphicsContextGLANGLE::framebufferTextureLayer(GCGLenum target, GCGLenum attachment, PlatformGLObject texture, GCGLint level, GCGLint layer)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2415,7 +2409,7 @@
</span><span class="cx">     gl::FramebufferTextureLayer(target, attachment, texture, level, layer);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::invalidateFramebuffer(GCGLenum target, GCGLSpan<const GCGLenum> attachments)
</del><ins>+void GraphicsContextGLANGLE::invalidateFramebuffer(GCGLenum target, GCGLSpan<const GCGLenum> attachments)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2423,7 +2417,7 @@
</span><span class="cx">     gl::InvalidateFramebuffer(target, attachments.bufSize, attachments.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::invalidateSubFramebuffer(GCGLenum target, GCGLSpan<const GCGLenum> attachments, GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height)
</del><ins>+void GraphicsContextGLANGLE::invalidateSubFramebuffer(GCGLenum target, GCGLSpan<const GCGLenum> attachments, GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2431,7 +2425,7 @@
</span><span class="cx">     gl::InvalidateSubFramebuffer(target, attachments.bufSize, attachments.data, x, y, width, height);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::readBuffer(GCGLenum src)
</del><ins>+void GraphicsContextGLANGLE::readBuffer(GCGLenum src)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2439,7 +2433,7 @@
</span><span class="cx">     gl::ReadBuffer(src);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::copyTexSubImage3D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLint zoffset, GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height)
</del><ins>+void GraphicsContextGLANGLE::copyTexSubImage3D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLint zoffset, GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2456,7 +2450,7 @@
</span><span class="cx">         gl::BindFramebuffer(framebufferTarget, m_multisampleFBO);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLint GraphicsContextGLOpenGL::getFragDataLocation(PlatformGLObject program, const String& name)
</del><ins>+GCGLint GraphicsContextGLANGLE::getFragDataLocation(PlatformGLObject program, const String& name)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return -1;
</span><span class="lines">@@ -2464,7 +2458,7 @@
</span><span class="cx">     return gl::GetFragDataLocation(program, name.utf8().data());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniform1ui(GCGLint location, GCGLuint v0)
</del><ins>+void GraphicsContextGLANGLE::uniform1ui(GCGLint location, GCGLuint v0)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2472,7 +2466,7 @@
</span><span class="cx">     gl::Uniform1ui(location, v0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniform2ui(GCGLint location, GCGLuint v0, GCGLuint v1)
</del><ins>+void GraphicsContextGLANGLE::uniform2ui(GCGLint location, GCGLuint v0, GCGLuint v1)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2480,7 +2474,7 @@
</span><span class="cx">     gl::Uniform2ui(location, v0, v1);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniform3ui(GCGLint location, GCGLuint v0, GCGLuint v1, GCGLuint v2)
</del><ins>+void GraphicsContextGLANGLE::uniform3ui(GCGLint location, GCGLuint v0, GCGLuint v1, GCGLuint v2)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2488,7 +2482,7 @@
</span><span class="cx">     gl::Uniform3ui(location, v0, v1, v2);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniform4ui(GCGLint location, GCGLuint v0, GCGLuint v1, GCGLuint v2, GCGLuint v3)
</del><ins>+void GraphicsContextGLANGLE::uniform4ui(GCGLint location, GCGLuint v0, GCGLuint v1, GCGLuint v2, GCGLuint v3)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2496,7 +2490,7 @@
</span><span class="cx">     gl::Uniform4ui(location, v0, v1, v2, v3);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniform1uiv(GCGLint location, GCGLSpan<const GCGLuint> data)
</del><ins>+void GraphicsContextGLANGLE::uniform1uiv(GCGLint location, GCGLSpan<const GCGLuint> data)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2504,7 +2498,7 @@
</span><span class="cx">     gl::Uniform1uiv(location, data.bufSize, data.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniform2uiv(GCGLint location, GCGLSpan<const GCGLuint> data)
</del><ins>+void GraphicsContextGLANGLE::uniform2uiv(GCGLint location, GCGLSpan<const GCGLuint> data)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!(data.bufSize % 2));
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -2513,7 +2507,7 @@
</span><span class="cx">     gl::Uniform2uiv(location, data.bufSize / 2, data.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniform3uiv(GCGLint location, GCGLSpan<const GCGLuint> data)
</del><ins>+void GraphicsContextGLANGLE::uniform3uiv(GCGLint location, GCGLSpan<const GCGLuint> data)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!(data.bufSize % 3));
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -2522,7 +2516,7 @@
</span><span class="cx">     gl::Uniform3uiv(location, data.bufSize / 3, data.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniform4uiv(GCGLint location, GCGLSpan<const GCGLuint> data)
</del><ins>+void GraphicsContextGLANGLE::uniform4uiv(GCGLint location, GCGLSpan<const GCGLuint> data)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!(data.bufSize % 4));
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -2531,7 +2525,7 @@
</span><span class="cx">     gl::Uniform4uiv(location, data.bufSize / 4, data.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniformMatrix2x3fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data)
</del><ins>+void GraphicsContextGLANGLE::uniformMatrix2x3fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!(data.bufSize % 6));
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -2540,7 +2534,7 @@
</span><span class="cx">     gl::UniformMatrix2x3fv(location, data.bufSize / 6, transpose, data.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniformMatrix3x2fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data)
</del><ins>+void GraphicsContextGLANGLE::uniformMatrix3x2fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!(data.bufSize % 6));
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -2549,7 +2543,7 @@
</span><span class="cx">     gl::UniformMatrix3x2fv(location, data.bufSize / 6, transpose, data.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniformMatrix2x4fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data)
</del><ins>+void GraphicsContextGLANGLE::uniformMatrix2x4fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!(data.bufSize % 8));
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -2558,7 +2552,7 @@
</span><span class="cx">     gl::UniformMatrix2x4fv(location, data.bufSize / 8, transpose, data.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniformMatrix4x2fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data)
</del><ins>+void GraphicsContextGLANGLE::uniformMatrix4x2fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!(data.bufSize % 8));
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -2567,7 +2561,7 @@
</span><span class="cx">     gl::UniformMatrix4x2fv(location, data.bufSize / 8, transpose, data.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniformMatrix3x4fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data)
</del><ins>+void GraphicsContextGLANGLE::uniformMatrix3x4fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!(data.bufSize % 12));
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -2576,7 +2570,7 @@
</span><span class="cx">     gl::UniformMatrix3x4fv(location, data.bufSize / 12, transpose, data.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::uniformMatrix4x3fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data)
</del><ins>+void GraphicsContextGLANGLE::uniformMatrix4x3fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!(data.bufSize % 12));
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -2585,7 +2579,7 @@
</span><span class="cx">     gl::UniformMatrix4x3fv(location, data.bufSize / 12, transpose, data.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::vertexAttribI4i(GCGLuint index, GCGLint x, GCGLint y, GCGLint z, GCGLint w)
</del><ins>+void GraphicsContextGLANGLE::vertexAttribI4i(GCGLuint index, GCGLint x, GCGLint y, GCGLint z, GCGLint w)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2593,7 +2587,7 @@
</span><span class="cx">     gl::VertexAttribI4i(index, x, y, z, w);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::vertexAttribI4iv(GCGLuint index, GCGLSpan<const GCGLint, 4> values)
</del><ins>+void GraphicsContextGLANGLE::vertexAttribI4iv(GCGLuint index, GCGLSpan<const GCGLint, 4> values)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2601,7 +2595,7 @@
</span><span class="cx">     gl::VertexAttribI4iv(index, values.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::vertexAttribI4ui(GCGLuint index, GCGLuint x, GCGLuint y, GCGLuint z, GCGLuint w)
</del><ins>+void GraphicsContextGLANGLE::vertexAttribI4ui(GCGLuint index, GCGLuint x, GCGLuint y, GCGLuint z, GCGLuint w)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2609,7 +2603,7 @@
</span><span class="cx">     gl::VertexAttribI4ui(index, x, y, z, w);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::vertexAttribI4uiv(GCGLuint index, GCGLSpan<const GCGLuint, 4> values)
</del><ins>+void GraphicsContextGLANGLE::vertexAttribI4uiv(GCGLuint index, GCGLSpan<const GCGLuint, 4> values)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2617,7 +2611,7 @@
</span><span class="cx">     gl::VertexAttribI4uiv(index, values.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::drawRangeElements(GCGLenum mode, GCGLuint start, GCGLuint end, GCGLsizei count, GCGLenum type, GCGLintptr offset)
</del><ins>+void GraphicsContextGLANGLE::drawRangeElements(GCGLenum mode, GCGLuint start, GCGLuint end, GCGLsizei count, GCGLenum type, GCGLintptr offset)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2625,7 +2619,7 @@
</span><span class="cx">     gl::DrawRangeElements(mode, start, end, count, type, reinterpret_cast<void*>(offset));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::drawBuffers(GCGLSpan<const GCGLenum> bufs)
</del><ins>+void GraphicsContextGLANGLE::drawBuffers(GCGLSpan<const GCGLenum> bufs)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2633,7 +2627,7 @@
</span><span class="cx">     gl::DrawBuffers(bufs.bufSize, bufs.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::clearBufferiv(GCGLenum buffer, GCGLint drawbuffer, GCGLSpan<const GCGLint> values)
</del><ins>+void GraphicsContextGLANGLE::clearBufferiv(GCGLenum buffer, GCGLint drawbuffer, GCGLSpan<const GCGLint> values)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2641,7 +2635,7 @@
</span><span class="cx">     gl::ClearBufferiv(buffer, drawbuffer, values.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::clearBufferuiv(GCGLenum buffer, GCGLint drawbuffer, GCGLSpan<const GCGLuint> values)
</del><ins>+void GraphicsContextGLANGLE::clearBufferuiv(GCGLenum buffer, GCGLint drawbuffer, GCGLSpan<const GCGLuint> values)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2649,7 +2643,7 @@
</span><span class="cx">     gl::ClearBufferuiv(buffer, drawbuffer, values.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::clearBufferfv(GCGLenum buffer, GCGLint drawbuffer, GCGLSpan<const GCGLfloat> values)
</del><ins>+void GraphicsContextGLANGLE::clearBufferfv(GCGLenum buffer, GCGLint drawbuffer, GCGLSpan<const GCGLfloat> values)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2657,7 +2651,7 @@
</span><span class="cx">     gl::ClearBufferfv(buffer, drawbuffer, values.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::clearBufferfi(GCGLenum buffer, GCGLint drawbuffer, GCGLfloat depth, GCGLint stencil)
</del><ins>+void GraphicsContextGLANGLE::clearBufferfi(GCGLenum buffer, GCGLint drawbuffer, GCGLfloat depth, GCGLint stencil)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2665,7 +2659,7 @@
</span><span class="cx">     gl::ClearBufferfi(buffer, drawbuffer, depth, stencil);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::deleteQuery(PlatformGLObject query)
</del><ins>+void GraphicsContextGLANGLE::deleteQuery(PlatformGLObject query)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2673,7 +2667,7 @@
</span><span class="cx">     gl::DeleteQueries(1, &query);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLboolean GraphicsContextGLOpenGL::isQuery(PlatformGLObject query)
</del><ins>+GCGLboolean GraphicsContextGLANGLE::isQuery(PlatformGLObject query)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return GL_FALSE;
</span><span class="lines">@@ -2681,7 +2675,7 @@
</span><span class="cx">     return gl::IsQuery(query);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PlatformGLObject GraphicsContextGLOpenGL::getQuery(GCGLenum target, GCGLenum pname)
</del><ins>+PlatformGLObject GraphicsContextGLANGLE::getQuery(GCGLenum target, GCGLenum pname)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return 0;
</span><span class="lines">@@ -2691,7 +2685,7 @@
</span><span class="cx">     return static_cast<PlatformGLObject>(value);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PlatformGLObject GraphicsContextGLOpenGL::createSampler()
</del><ins>+PlatformGLObject GraphicsContextGLANGLE::createSampler()
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return 0;
</span><span class="lines">@@ -2701,7 +2695,7 @@
</span><span class="cx">     return name;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::deleteSampler(PlatformGLObject sampler)
</del><ins>+void GraphicsContextGLANGLE::deleteSampler(PlatformGLObject sampler)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2709,7 +2703,7 @@
</span><span class="cx">     gl::DeleteSamplers(1, &sampler);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLboolean GraphicsContextGLOpenGL::isSampler(PlatformGLObject sampler)
</del><ins>+GCGLboolean GraphicsContextGLANGLE::isSampler(PlatformGLObject sampler)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return GL_FALSE;
</span><span class="lines">@@ -2717,7 +2711,7 @@
</span><span class="cx">     return gl::IsSampler(sampler);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::bindSampler(GCGLuint unit, PlatformGLObject sampler)
</del><ins>+void GraphicsContextGLANGLE::bindSampler(GCGLuint unit, PlatformGLObject sampler)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2725,7 +2719,7 @@
</span><span class="cx">     gl::BindSampler(unit, sampler);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::samplerParameteri(PlatformGLObject sampler, GCGLenum pname, GCGLint param)
</del><ins>+void GraphicsContextGLANGLE::samplerParameteri(PlatformGLObject sampler, GCGLenum pname, GCGLint param)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2733,7 +2727,7 @@
</span><span class="cx">     gl::SamplerParameteri(sampler, pname, param);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::samplerParameterf(PlatformGLObject sampler, GCGLenum pname, GCGLfloat param)
</del><ins>+void GraphicsContextGLANGLE::samplerParameterf(PlatformGLObject sampler, GCGLenum pname, GCGLfloat param)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2741,7 +2735,7 @@
</span><span class="cx">     gl::SamplerParameterf(sampler, pname, param);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLfloat GraphicsContextGLOpenGL::getSamplerParameterf(PlatformGLObject sampler, GCGLenum pname)
</del><ins>+GCGLfloat GraphicsContextGLANGLE::getSamplerParameterf(PlatformGLObject sampler, GCGLenum pname)
</ins><span class="cx"> {
</span><span class="cx">     GCGLfloat value = 0.f;
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -2751,7 +2745,7 @@
</span><span class="cx">     return value;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLint GraphicsContextGLOpenGL::getSamplerParameteri(PlatformGLObject sampler, GCGLenum pname)
</del><ins>+GCGLint GraphicsContextGLANGLE::getSamplerParameteri(PlatformGLObject sampler, GCGLenum pname)
</ins><span class="cx"> {
</span><span class="cx">     GCGLint value = 0;
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -2761,7 +2755,7 @@
</span><span class="cx">     return value;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLsync GraphicsContextGLOpenGL::fenceSync(GCGLenum condition, GCGLbitfield flags)
</del><ins>+GCGLsync GraphicsContextGLANGLE::fenceSync(GCGLenum condition, GCGLbitfield flags)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return 0;
</span><span class="lines">@@ -2769,7 +2763,7 @@
</span><span class="cx">     return gl::FenceSync(condition, flags);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLboolean GraphicsContextGLOpenGL::isSync(GCGLsync sync)
</del><ins>+GCGLboolean GraphicsContextGLANGLE::isSync(GCGLsync sync)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return GL_FALSE;
</span><span class="lines">@@ -2777,7 +2771,7 @@
</span><span class="cx">     return gl::IsSync(sync);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::deleteSync(GCGLsync sync)
</del><ins>+void GraphicsContextGLANGLE::deleteSync(GCGLsync sync)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2785,7 +2779,7 @@
</span><span class="cx">     gl::DeleteSync(sync);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLenum GraphicsContextGLOpenGL::clientWaitSync(GCGLsync sync, GCGLbitfield flags, GCGLuint64 timeout)
</del><ins>+GCGLenum GraphicsContextGLANGLE::clientWaitSync(GCGLsync sync, GCGLbitfield flags, GCGLuint64 timeout)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return GL_WAIT_FAILED;
</span><span class="lines">@@ -2793,7 +2787,7 @@
</span><span class="cx">     return gl::ClientWaitSync(sync, flags, timeout);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::waitSync(GCGLsync sync, GCGLbitfield flags, GCGLint64 timeout)
</del><ins>+void GraphicsContextGLANGLE::waitSync(GCGLsync sync, GCGLbitfield flags, GCGLint64 timeout)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2801,7 +2795,7 @@
</span><span class="cx">     gl::WaitSync(sync, flags, timeout);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLint GraphicsContextGLOpenGL::getSynci(GCGLsync sync, GCGLenum pname)
</del><ins>+GCGLint GraphicsContextGLANGLE::getSynci(GCGLsync sync, GCGLenum pname)
</ins><span class="cx"> {
</span><span class="cx">     GCGLint value = 0;
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -2811,7 +2805,7 @@
</span><span class="cx">     return value;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::pauseTransformFeedback()
</del><ins>+void GraphicsContextGLANGLE::pauseTransformFeedback()
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2819,7 +2813,7 @@
</span><span class="cx">     gl::PauseTransformFeedback();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::resumeTransformFeedback()
</del><ins>+void GraphicsContextGLANGLE::resumeTransformFeedback()
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2827,7 +2821,7 @@
</span><span class="cx">     gl::ResumeTransformFeedback();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::bindBufferRange(GCGLenum target, GCGLuint index, PlatformGLObject buffer, GCGLintptr offset, GCGLsizeiptr size)
</del><ins>+void GraphicsContextGLANGLE::bindBufferRange(GCGLenum target, GCGLuint index, PlatformGLObject buffer, GCGLintptr offset, GCGLsizeiptr size)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2835,7 +2829,7 @@
</span><span class="cx">     gl::BindBufferRange(target, index, buffer, offset, size);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Vector<GCGLuint> GraphicsContextGLOpenGL::getUniformIndices(PlatformGLObject program, const Vector<String>& uniformNames)
</del><ins>+Vector<GCGLuint> GraphicsContextGLANGLE::getUniformIndices(PlatformGLObject program, const Vector<String>& uniformNames)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(program);
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -2848,7 +2842,7 @@
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::getActiveUniformBlockiv(GCGLuint program, GCGLuint uniformBlockIndex, GCGLenum pname, GCGLSpan<GCGLint> params)
</del><ins>+void GraphicsContextGLANGLE::getActiveUniformBlockiv(GCGLuint program, GCGLuint uniformBlockIndex, GCGLenum pname, GCGLSpan<GCGLint> params)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2855,7 +2849,7 @@
</span><span class="cx">     gl::GetActiveUniformBlockivRobustANGLE(program, uniformBlockIndex, pname, params.bufSize, nullptr, params.data);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::multiDrawArraysANGLE(GCGLenum mode, GCGLSpan<const GCGLint> firsts, GCGLSpan<const GCGLsizei> counts, GCGLsizei drawcount)
</del><ins>+void GraphicsContextGLANGLE::multiDrawArraysANGLE(GCGLenum mode, GCGLSpan<const GCGLint> firsts, GCGLSpan<const GCGLsizei> counts, GCGLsizei drawcount)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2863,7 +2857,7 @@
</span><span class="cx">     gl::MultiDrawArraysANGLE(mode, firsts.data, counts.data, drawcount);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::multiDrawArraysInstancedANGLE(GCGLenum mode, GCGLSpan<const GCGLint> firsts, GCGLSpan<const GCGLsizei> counts, GCGLSpan<const GCGLsizei> instanceCounts, GCGLsizei drawcount)
</del><ins>+void GraphicsContextGLANGLE::multiDrawArraysInstancedANGLE(GCGLenum mode, GCGLSpan<const GCGLint> firsts, GCGLSpan<const GCGLsizei> counts, GCGLSpan<const GCGLsizei> instanceCounts, GCGLsizei drawcount)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2871,7 +2865,7 @@
</span><span class="cx">     gl::MultiDrawArraysInstancedANGLE(mode, firsts.data, counts.data, instanceCounts.data, drawcount);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::multiDrawElementsANGLE(GCGLenum mode, GCGLSpan<const GCGLsizei> counts, GCGLenum type, GCGLSpan<const GCGLint> offsets, GCGLsizei drawcount)
</del><ins>+void GraphicsContextGLANGLE::multiDrawElementsANGLE(GCGLenum mode, GCGLSpan<const GCGLsizei> counts, GCGLenum type, GCGLSpan<const GCGLint> offsets, GCGLsizei drawcount)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2884,7 +2878,7 @@
</span><span class="cx">     gl::MultiDrawElementsANGLE(mode, counts.data, type, pointers.data(), drawcount);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::multiDrawElementsInstancedANGLE(GCGLenum mode, GCGLSpan<const GCGLsizei> counts, GCGLenum type, GCGLSpan<const GCGLint> offsets, GCGLSpan<const GCGLsizei> instanceCounts, GCGLsizei drawcount)
</del><ins>+void GraphicsContextGLANGLE::multiDrawElementsInstancedANGLE(GCGLenum mode, GCGLSpan<const GCGLsizei> counts, GCGLenum type, GCGLSpan<const GCGLint> offsets, GCGLSpan<const GCGLsizei> instanceCounts, GCGLsizei drawcount)
</ins><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="cx">         return;
</span><span class="lines">@@ -2897,7 +2891,7 @@
</span><span class="cx">     gl::MultiDrawElementsInstancedANGLE(mode, counts.data, type, pointers.data(), instanceCounts.data, drawcount);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool GraphicsContextGLOpenGL::waitAndUpdateOldestFrame()
</del><ins>+bool GraphicsContextGLANGLE::waitAndUpdateOldestFrame()
</ins><span class="cx"> {
</span><span class="cx">     size_t oldestFrameCompletionFence = m_oldestFrameCompletionFence++ % maxPendingFrames;
</span><span class="cx">     bool success = true;
</span><span class="lines">@@ -2918,6 +2912,95 @@
</span><span class="cx">     return success;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void GraphicsContextGLANGLE::simulateEventForTesting(SimulatedEventForTesting event)
+{
+    if (event == SimulatedEventForTesting::ContextChange) {
+#if PLATFORM(COCOA)
+        GraphicsContextGLOpenGLManager::sharedManager().displayWasReconfigured();
+#endif
+        return;
+    }
+    if (event == SimulatedEventForTesting::GPUStatusFailure) {
+        m_failNextStatusCheck = true;
+        return;
+    }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool GraphicsContextGLANGLE::isGLES2Compliant() const
+{
+    return m_isForWebGL2;
+}
+
+void GraphicsContextGLANGLE::paintRenderingResultsToCanvas(ImageBuffer& imageBuffer)
+{
+    if (!makeContextCurrent())
+        return;
+    if (getInternalFramebufferSize().isEmpty())
+        return;
+    auto pixelBuffer = readRenderingResults();
+    if (!pixelBuffer)
+        return;
+    paintToCanvas(contextAttributes(), WTFMove(*pixelBuffer), imageBuffer.backendSize(), imageBuffer.context());
+}
+
+void GraphicsContextGLANGLE::paintCompositedResultsToCanvas(ImageBuffer& imageBuffer)
+{
+    if (!makeContextCurrent())
+        return;
+    if (getInternalFramebufferSize().isEmpty())
+        return;
+    auto pixelBuffer = readCompositedResults();
+    if (!pixelBuffer)
+        return;
+    paintToCanvas(contextAttributes(), WTFMove(*pixelBuffer), imageBuffer.backendSize(), imageBuffer.context());
+}
+
+std::optional<PixelBuffer> GraphicsContextGLANGLE::paintRenderingResultsToPixelBuffer()
+{
+    // Reading premultiplied alpha would involve unpremultiplying, which is lossy.
+    if (contextAttributes().premultipliedAlpha)
+        return std::nullopt;
+    auto results = readRenderingResultsForPainting();
+    if (results && !results->size().isEmpty()) {
+        ASSERT(results->format().pixelFormat == PixelFormat::RGBA8 || results->format().pixelFormat == PixelFormat::BGRA8);
+        // FIXME: Make PixelBufferConversions support negative rowBytes and in-place conversions.
+        const auto size = results->size();
+        const size_t rowStride = size.width() * 4;
+        uint8_t* top = results->data().data();
+        uint8_t* bottom = top + (size.height() - 1) * rowStride;
+        std::unique_ptr<uint8_t[]> temp(new uint8_t[rowStride]);
+        for (; top < bottom; top += rowStride, bottom -= rowStride) {
+            memcpy(temp.get(), bottom, rowStride);
+            memcpy(bottom, top, rowStride);
+            memcpy(top, temp.get(), rowStride);
+        }
+    }
+    return results;
+}
+
+std::optional<PixelBuffer> GraphicsContextGLANGLE::readRenderingResultsForPainting()
+{
+    if (!makeContextCurrent())
+        return std::nullopt;
+    if (getInternalFramebufferSize().isEmpty())
+        return std::nullopt;
+    return readRenderingResults();
+}
+
+std::optional<PixelBuffer> GraphicsContextGLANGLE::readCompositedResultsForPainting()
+{
+    if (!makeContextCurrent())
+        return std::nullopt;
+    if (getInternalFramebufferSize().isEmpty())
+        return std::nullopt;
+    return readCompositedResults();
+}
+
+unsigned GraphicsContextGLANGLE::textureSeed(GCGLuint texture)
+{
+    return m_state.textureSeedCount.count(texture);
+}
+
+}
+
</ins><span class="cx"> #endif // ENABLE(WEBGL) && USE(ANGLE)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsangleGraphicsContextGLANGLEhfromrev286292trunkSourceWebCoreplatformgraphicsopenglGraphicsContextGLOpenGLh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.h (from rev 286292, trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h) (0 => 286293)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.h                            (rev 0)
+++ trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.h       2021-11-30 14:54:52 UTC (rev 286293)
</span><span class="lines">@@ -0,0 +1,471 @@
</span><ins>+/*
+ * Copyright (C) 2009, 2014-2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(WEBGL) && USE(ANGLE)
+
+#include "ANGLEUtilities.h"
+#include "GraphicsContextGL.h"
+#include "GraphicsContextGLState.h"
+#include <memory>
+#include <wtf/ListHashSet.h>
+
+#if PLATFORM(COCOA)
+#include "GraphicsContextGLIOSurfaceSwapChain.h"
+#include "IOSurface.h"
+#endif
+
+#if PLATFORM(MAC)
+#include "ScopedHighPerformanceGPURequest.h"
+#endif
+
+#if USE(NICOSIA)
+namespace Nicosia {
+class GCGLLayer;
+}
+#endif
+
+namespace WebCore {
+
+class ExtensionsGL;
+class ExtensionsGLANGLE;
+class HostWindow;
+class ImageBuffer;
+class MediaPlayer;
+class PixelBuffer;
+
+#if USE(TEXTURE_MAPPER)
+class TextureMapperGCGLPlatformLayer;
+#endif
+
+// Base class for GraphicsContextGL contexts that use ANGLE.
+class WEBCORE_EXPORT GraphicsContextGLANGLE : public GraphicsContextGL {
+public:
+    virtual ~GraphicsContextGLANGLE();
+
+    PlatformGraphicsContextGLDisplay platformDisplay() const;
+    PlatformGraphicsContextGLConfig platformConfig() const;
+    GCGLenum drawingBufferTextureTarget();
+    static GCGLenum drawingBufferTextureTargetQueryForDrawingTarget(GCGLenum drawingTarget);
+    static GCGLint EGLDrawingBufferTextureTargetForDrawingTarget(GCGLenum drawingTarget);
+    enum class ReleaseThreadResourceBehavior {
+        // Releases current context after GraphicsContextGLANGLE calls done in the thread.
+        ReleaseCurrentContext,
+        // Releases all thread resources after GraphicsContextGLANGLE calls done in the thread.
+        ReleaseThreadResources,
+        // Releases all global state. Should be used only after all depending objects have
+        // been released.
+        TerminateAndReleaseThreadResources
+    };
+    static bool releaseThreadResources(ReleaseThreadResourceBehavior);
+
+    // With multisampling on, blit from multisampleFBO to regular FBO.
+    void prepareTexture();
+
+    // Get an attribute location without checking the name -> mangledname mapping.
+    int getAttribLocationDirect(PlatformGLObject program, const String& name);
+
+    // Compile a shader without going through ANGLE.
+    void compileShaderDirect(PlatformGLObject);
+
+    // Equivalent to ::glTexImage2D(). Allows pixels==0 with no allocation.
+    void texImage2DDirect(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, const void* pixels);
+
+    // GraphicsContextGL overrides.
+    bool isGLES2Compliant() const final;
+    void activeTexture(GCGLenum texture) final;
+    void attachShader(PlatformGLObject program, PlatformGLObject shader) final;
+    void bindAttribLocation(PlatformGLObject, GCGLuint index, const String& name) final;
+    void bindBuffer(GCGLenum target, PlatformGLObject) final;
+    void bindFramebuffer(GCGLenum target, PlatformGLObject) final;
+    void bindRenderbuffer(GCGLenum target, PlatformGLObject) final;
+    void bindTexture(GCGLenum target, PlatformGLObject) final;
+    void blendColor(GCGLclampf red, GCGLclampf green, GCGLclampf blue, GCGLclampf alpha) final;
+    void blendEquation(GCGLenum mode) final;
+    void blendEquationSeparate(GCGLenum modeRGB, GCGLenum modeAlpha) final;
+    void blendFunc(GCGLenum sfactor, GCGLenum dfactor) final;
+    void blendFuncSeparate(GCGLenum srcRGB, GCGLenum dstRGB, GCGLenum srcAlpha, GCGLenum dstAlpha) final;
+    void bufferData(GCGLenum target, GCGLsizeiptr, GCGLenum usage) final;
+    void bufferData(GCGLenum target, GCGLSpan<const GCGLvoid> data, GCGLenum usage) final;
+    void bufferSubData(GCGLenum target, GCGLintptr offset, GCGLSpan<const GCGLvoid> data) final;
+    GCGLenum checkFramebufferStatus(GCGLenum target) final;
+    void clear(GCGLbitfield mask) final;
+    void clearColor(GCGLclampf red, GCGLclampf green, GCGLclampf blue, GCGLclampf alpha) final;
+    void clearDepth(GCGLclampf depth) final;
+    void clearStencil(GCGLint s) final;
+    void colorMask(GCGLboolean red, GCGLboolean green, GCGLboolean blue, GCGLboolean alpha) final;
+    void compileShader(PlatformGLObject) final;
+    void copyTexImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLint border) final;
+    void copyTexSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height) final;
+    void cullFace(GCGLenum mode) final;
+    void depthFunc(GCGLenum func) final;
+    void depthMask(GCGLboolean flag) final;
+    void depthRange(GCGLclampf zNear, GCGLclampf zFar) final;
+    void detachShader(PlatformGLObject, PlatformGLObject) final;
+    void disable(GCGLenum cap) final;
+    void disableVertexAttribArray(GCGLuint index) final;
+    void drawArrays(GCGLenum mode, GCGLint first, GCGLsizei count) final;
+    void drawElements(GCGLenum mode, GCGLsizei count, GCGLenum type, GCGLintptr offset) final;
+    void enable(GCGLenum cap) final;
+    void enableVertexAttribArray(GCGLuint index) final;
+    void finish() final;
+    void flush() final;
+    void framebufferRenderbuffer(GCGLenum target, GCGLenum attachment, GCGLenum renderbuffertarget, PlatformGLObject) final;
+    void framebufferTexture2D(GCGLenum target, GCGLenum attachment, GCGLenum textarget, PlatformGLObject, GCGLint level) final;
+    void frontFace(GCGLenum mode) final;
+    void generateMipmap(GCGLenum target) final;
+    bool getActiveAttrib(PlatformGLObject program, GCGLuint index, ActiveInfo&) final;
+    bool getActiveAttribImpl(PlatformGLObject program, GCGLuint index, ActiveInfo&);
+    bool getActiveUniform(PlatformGLObject program, GCGLuint index, ActiveInfo&) final;
+    bool getActiveUniformImpl(PlatformGLObject program, GCGLuint index, ActiveInfo&);
+    void getAttachedShaders(PlatformGLObject program, GCGLsizei maxCount, GCGLsizei* count, PlatformGLObject* shaders);
+    GCGLint getAttribLocation(PlatformGLObject, const String& name) final;
+    void getBooleanv(GCGLenum pname, GCGLSpan<GCGLboolean> value) final;
+    GCGLint getBufferParameteri(GCGLenum target, GCGLenum pname) final;
+    GCGLenum getError() final;
+    void getFloatv(GCGLenum pname, GCGLSpan<GCGLfloat> value) final;
+    GCGLint getFramebufferAttachmentParameteri(GCGLenum target, GCGLenum attachment, GCGLenum pname) final;
+    void getIntegerv(GCGLenum pname, GCGLSpan<GCGLint> value) final;
+    GCGLint64 getInteger64(GCGLenum pname) final;
+    GCGLint64 getInteger64i(GCGLenum pname, GCGLuint index) final;
+    GCGLint getProgrami(PlatformGLObject program, GCGLenum pname) final;
+    String getProgramInfoLog(PlatformGLObject) final;
+    String getUnmangledInfoLog(PlatformGLObject[2], GCGLsizei, const String&);
+    GCGLint getRenderbufferParameteri(GCGLenum target, GCGLenum pname) final;
+    GCGLint getShaderi(PlatformGLObject, GCGLenum pname) final;
+    String getShaderInfoLog(PlatformGLObject) final;
+    void getShaderPrecisionFormat(GCGLenum shaderType, GCGLenum precisionType, GCGLSpan<GCGLint, 2> range, GCGLint* precision) final;
+    String getShaderSource(PlatformGLObject) final;
+    String getString(GCGLenum name) final;
+    GCGLfloat getTexParameterf(GCGLenum target, GCGLenum pname) final;
+    GCGLint getTexParameteri(GCGLenum target, GCGLenum pname) final;
+    void getUniformfv(PlatformGLObject program, GCGLint location, GCGLSpan<GCGLfloat> value) final;
+    void getUniformiv(PlatformGLObject program, GCGLint location, GCGLSpan<GCGLint> value) final;
+    void getUniformuiv(PlatformGLObject program, GCGLint location, GCGLSpan<GCGLuint> value) final;
+    GCGLint getUniformLocation(PlatformGLObject, const String& name) final;
+    GCGLsizeiptr getVertexAttribOffset(GCGLuint index, GCGLenum pname) final;
+    void hint(GCGLenum target, GCGLenum mode) final;
+    GCGLboolean isBuffer(PlatformGLObject) final;
+    GCGLboolean isEnabled(GCGLenum cap) final;
+    GCGLboolean isFramebuffer(PlatformGLObject) final;
+    GCGLboolean isProgram(PlatformGLObject) final;
+    GCGLboolean isRenderbuffer(PlatformGLObject) final;
+    GCGLboolean isShader(PlatformGLObject) final;
+    GCGLboolean isTexture(PlatformGLObject) final;
+    void lineWidth(GCGLfloat) final;
+    void linkProgram(PlatformGLObject) final;
+    void pixelStorei(GCGLenum pname, GCGLint param) final;
+    void polygonOffset(GCGLfloat factor, GCGLfloat units) final;
+    void readnPixels(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLSpan<GCGLvoid> data) final;
+    void readnPixels(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLintptr offset) final;
+    void renderbufferStorage(GCGLenum target, GCGLenum internalformat, GCGLsizei width, GCGLsizei height) final;
+    void sampleCoverage(GCGLclampf value, GCGLboolean invert) final;
+    void scissor(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height) final;
+    void shaderSource(PlatformGLObject, const String&) final;
+    void stencilFunc(GCGLenum func, GCGLint ref, GCGLuint mask) final;
+    void stencilFuncSeparate(GCGLenum face, GCGLenum func, GCGLint ref, GCGLuint mask) final;
+    void stencilMask(GCGLuint mask) final;
+    void stencilMaskSeparate(GCGLenum face, GCGLuint mask) final;
+    void stencilOp(GCGLenum fail, GCGLenum zfail, GCGLenum zpass) final;
+    void stencilOpSeparate(GCGLenum face, GCGLenum fail, GCGLenum zfail, GCGLenum zpass) final;
+    void texImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, GCGLSpan<const GCGLvoid> pixels) final;
+    void texImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, GCGLintptr offset) final;
+    void texSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLSpan<const GCGLvoid> pixels) final;
+    void texSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLintptr offset) final;
+    void compressedTexImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLsizei imageSize, GCGLSpan<const GCGLvoid> data) final;
+    void compressedTexImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLsizei imageSize, GCGLintptr offset) final;
+    void compressedTexSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLsizei imageSize, GCGLSpan<const GCGLvoid> data) final;
+    void compressedTexSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLsizei imageSize, GCGLintptr offset) final;
+    void texParameterf(GCGLenum target, GCGLenum pname, GCGLfloat param) final;
+    void texParameteri(GCGLenum target, GCGLenum pname, GCGLint param) final;
+    void uniform1f(GCGLint location, GCGLfloat x) final;
+    void uniform1fv(GCGLint location, GCGLSpan<const GCGLfloat> v) final;
+    void uniform1i(GCGLint location, GCGLint x) final;
+    void uniform1iv(GCGLint location, GCGLSpan<const GCGLint> v) final;
+    void uniform2f(GCGLint location, GCGLfloat x, GCGLfloat y) final;
+    void uniform2fv(GCGLint location, GCGLSpan<const GCGLfloat> v) final;
+    void uniform2i(GCGLint location, GCGLint x, GCGLint y) final;
+    void uniform2iv(GCGLint location, GCGLSpan<const GCGLint> v) final;
+    void uniform3f(GCGLint location, GCGLfloat x, GCGLfloat y, GCGLfloat z) final;
+    void uniform3fv(GCGLint location, GCGLSpan<const GCGLfloat> v) final;
+    void uniform3i(GCGLint location, GCGLint x, GCGLint y, GCGLint z) final;
+    void uniform3iv(GCGLint location, GCGLSpan<const GCGLint> v) final;
+    void uniform4f(GCGLint location, GCGLfloat x, GCGLfloat y, GCGLfloat z, GCGLfloat w) final;
+    void uniform4fv(GCGLint location, GCGLSpan<const GCGLfloat> v) final;
+    void uniform4i(GCGLint location, GCGLint x, GCGLint y, GCGLint z, GCGLint w) final;
+    void uniform4iv(GCGLint location, GCGLSpan<const GCGLint> v) final;
+    void uniformMatrix2fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> value) final;
+    void uniformMatrix3fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> value) final;
+    void uniformMatrix4fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> value) final;
+    void useProgram(PlatformGLObject) final;
+    void validateProgram(PlatformGLObject) final;
+    void vertexAttrib1f(GCGLuint index, GCGLfloat x) final;
+    void vertexAttrib1fv(GCGLuint index, GCGLSpan<const GCGLfloat, 1> values) final;
+    void vertexAttrib2f(GCGLuint index, GCGLfloat x, GCGLfloat y) final;
+    void vertexAttrib2fv(GCGLuint index, GCGLSpan<const GCGLfloat, 2> values) final;
+    void vertexAttrib3f(GCGLuint index, GCGLfloat x, GCGLfloat y, GCGLfloat z) final;
+    void vertexAttrib3fv(GCGLuint index, GCGLSpan<const GCGLfloat, 3> values) final;
+    void vertexAttrib4f(GCGLuint index, GCGLfloat x, GCGLfloat y, GCGLfloat z, GCGLfloat w) final;
+    void vertexAttrib4fv(GCGLuint index, GCGLSpan<const GCGLfloat, 4> values) final;
+    void vertexAttribPointer(GCGLuint index, GCGLint size, GCGLenum type, GCGLboolean normalized, GCGLsizei stride, GCGLintptr offset) final;
+    void viewport(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height) final;
+    void reshape(int width, int height) final;
+    void drawArraysInstanced(GCGLenum mode, GCGLint first, GCGLsizei count, GCGLsizei primcount) final;
+    void drawElementsInstanced(GCGLenum mode, GCGLsizei count, GCGLenum type, GCGLintptr offset, GCGLsizei primcount) final;
+    void vertexAttribDivisor(GCGLuint index, GCGLuint divisor) final;
+    PlatformGLObject createVertexArray() final;
+    void deleteVertexArray(PlatformGLObject) final;
+    GCGLboolean isVertexArray(PlatformGLObject) final;
+    void bindVertexArray(PlatformGLObject) final;
+    void copyBufferSubData(GCGLenum readTarget, GCGLenum writeTarget, GCGLintptr readOffset, GCGLintptr writeOffset, GCGLsizeiptr) final;
+    void getBufferSubData(GCGLenum target, GCGLintptr offset, GCGLSpan<GCGLvoid> data) final;
+    void blitFramebuffer(GCGLint srcX0, GCGLint srcY0, GCGLint srcX1, GCGLint srcY1, GCGLint dstX0, GCGLint dstY0, GCGLint dstX1, GCGLint dstY1, GCGLbitfield mask, GCGLenum filter) final;
+    void framebufferTextureLayer(GCGLenum target, GCGLenum attachment, PlatformGLObject texture, GCGLint level, GCGLint layer) final;
+    void invalidateFramebuffer(GCGLenum target, GCGLSpan<const GCGLenum> attachments) final;
+    void invalidateSubFramebuffer(GCGLenum target, GCGLSpan<const GCGLenum> attachments, GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height) final;
+    void readBuffer(GCGLenum src) final;
+    void getInternalformativ(GCGLenum target, GCGLenum internalformat, GCGLenum pname, GCGLSpan<GCGLint> data) final;
+    void renderbufferStorageMultisample(GCGLenum target, GCGLsizei samples, GCGLenum internalformat, GCGLsizei width, GCGLsizei height) final;
+    void texStorage2D(GCGLenum target, GCGLsizei levels, GCGLenum internalformat, GCGLsizei width, GCGLsizei height) final;
+    void texStorage3D(GCGLenum target, GCGLsizei levels, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth) final;
+    void texImage3D(GCGLenum target, GCGLint level, GCGLint internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLint border, GCGLenum format, GCGLenum type, GCGLSpan<const GCGLvoid> pixels) final;
+    void texImage3D(GCGLenum target, GCGLint level, GCGLint internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLint border, GCGLenum format, GCGLenum type, GCGLintptr offset) final;
+    void texSubImage3D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLint zoffset, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLenum format, GCGLenum type, GCGLSpan<const GCGLvoid> pixels) final;
+    void texSubImage3D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLint zoffset, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLenum format, GCGLenum type, GCGLintptr offset) final;
+    void copyTexSubImage3D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLint zoffset, GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height) final;
+    void compressedTexImage3D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLint border, GCGLsizei imageSize, GCGLSpan<const GCGLvoid> data) final;
+    void compressedTexImage3D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLint border, GCGLsizei imageSize, GCGLintptr offset) final;
+    void compressedTexSubImage3D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLint zoffset, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLenum format, GCGLsizei imageSize, GCGLSpan<const GCGLvoid> data) final;
+    void compressedTexSubImage3D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLint zoffset, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLenum format, GCGLsizei imageSize, GCGLintptr offset) final;
+    GCGLint getFragDataLocation(PlatformGLObject program, const String& name) final;
+    void uniform1ui(GCGLint location, GCGLuint v0) final;
+    void uniform2ui(GCGLint location, GCGLuint v0, GCGLuint v1) final;
+    void uniform3ui(GCGLint location, GCGLuint v0, GCGLuint v1, GCGLuint v2) final;
+    void uniform4ui(GCGLint location, GCGLuint v0, GCGLuint v1, GCGLuint v2, GCGLuint v3) final;
+    void uniform1uiv(GCGLint location, GCGLSpan<const GCGLuint>) final;
+    void uniform2uiv(GCGLint location, GCGLSpan<const GCGLuint>) final;
+    void uniform3uiv(GCGLint location, GCGLSpan<const GCGLuint>) final;
+    void uniform4uiv(GCGLint location, GCGLSpan<const GCGLuint>) final;
+    void uniformMatrix2x3fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data) final;
+    void uniformMatrix3x2fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data) final;
+    void uniformMatrix2x4fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data) final;
+    void uniformMatrix4x2fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data) final;
+    void uniformMatrix3x4fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data) final;
+    void uniformMatrix4x3fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data) final;
+    void vertexAttribI4i(GCGLuint index, GCGLint x, GCGLint y, GCGLint z, GCGLint w) final;
+    void vertexAttribI4iv(GCGLuint index, GCGLSpan<const GCGLint, 4> values) final;
+    void vertexAttribI4ui(GCGLuint index, GCGLuint x, GCGLuint y, GCGLuint z, GCGLuint w) final;
+    void vertexAttribI4uiv(GCGLuint index, GCGLSpan<const GCGLuint, 4> values) final;
+    void vertexAttribIPointer(GCGLuint index, GCGLint size, GCGLenum type, GCGLsizei stride, GCGLintptr offset) final;
+    void drawRangeElements(GCGLenum mode, GCGLuint start, GCGLuint end, GCGLsizei count, GCGLenum type, GCGLintptr offset) final;
+    void drawBuffers(GCGLSpan<const GCGLenum> bufs) final;
+    void clearBufferiv(GCGLenum buffer, GCGLint drawbuffer, GCGLSpan<const GCGLint> values) final;
+    void clearBufferuiv(GCGLenum buffer, GCGLint drawbuffer, GCGLSpan<const GCGLuint> values) final;
+    void clearBufferfv(GCGLenum buffer, GCGLint drawbuffer, GCGLSpan<const GCGLfloat> values) final;
+    void clearBufferfi(GCGLenum buffer, GCGLint drawbuffer, GCGLfloat depth, GCGLint stencil) final;
+    PlatformGLObject createQuery() final;
+    void deleteQuery(PlatformGLObject query) final;
+    GCGLboolean isQuery(PlatformGLObject query) final;
+    void beginQuery(GCGLenum target, PlatformGLObject query) final;
+    void endQuery(GCGLenum target) final;
+    PlatformGLObject getQuery(GCGLenum target, GCGLenum pname) final;
+    GCGLuint getQueryObjectui(PlatformGLObject query, GCGLenum pname) final;
+    PlatformGLObject createSampler() final;
+    void deleteSampler(PlatformGLObject sampler) final;
+    GCGLboolean isSampler(PlatformGLObject sampler) final;
+    void bindSampler(GCGLuint unit, PlatformGLObject sampler) final;
+    void samplerParameteri(PlatformGLObject sampler, GCGLenum pname, GCGLint param) final;
+    void samplerParameterf(PlatformGLObject sampler, GCGLenum pname, GCGLfloat param) final;
+    GCGLfloat getSamplerParameterf(PlatformGLObject sampler, GCGLenum pname) final;
+    GCGLint getSamplerParameteri(PlatformGLObject sampler, GCGLenum pname) final;
+    GCGLsync fenceSync(GCGLenum condition, GCGLbitfield flags) final;
+    GCGLboolean isSync(GCGLsync) final;
+    void deleteSync(GCGLsync) final;
+    GCGLenum clientWaitSync(GCGLsync, GCGLbitfield flags, GCGLuint64 timeout) final;
+    void waitSync(GCGLsync, GCGLbitfield flags, GCGLint64 timeout) final;
+    GCGLint getSynci(GCGLsync, GCGLenum pname) final;
+    PlatformGLObject createTransformFeedback() final;
+    void deleteTransformFeedback(PlatformGLObject id) final;
+    GCGLboolean isTransformFeedback(PlatformGLObject id) final;
+    void bindTransformFeedback(GCGLenum target, PlatformGLObject id) final;
+    void beginTransformFeedback(GCGLenum primitiveMode) final;
+    void endTransformFeedback() final;
+    void transformFeedbackVaryings(PlatformGLObject program, const Vector<String>& varyings, GCGLenum bufferMode) final;
+    void getTransformFeedbackVarying(PlatformGLObject program, GCGLuint index, ActiveInfo&) final;
+    void pauseTransformFeedback() final;
+    void resumeTransformFeedback() final;
+    void bindBufferBase(GCGLenum target, GCGLuint index, PlatformGLObject buffer) final;
+    void bindBufferRange(GCGLenum target, GCGLuint index, PlatformGLObject buffer, GCGLintptr offset, GCGLsizeiptr) final;
+    Vector<GCGLuint> getUniformIndices(PlatformGLObject program, const Vector<String>& uniformNames) final;
+    Vector<GCGLint> getActiveUniforms(PlatformGLObject program, const Vector<GCGLuint>& uniformIndices, GCGLenum pname) final;
+    GCGLuint getUniformBlockIndex(PlatformGLObject program, const String& uniformBlockName) final;
+    String getActiveUniformBlockName(PlatformGLObject program, GCGLuint uniformBlockIndex) final;
+    void uniformBlockBinding(PlatformGLObject program, GCGLuint uniformBlockIndex, GCGLuint uniformBlockBinding) final;
+    void getActiveUniformBlockiv(GCGLuint program, GCGLuint uniformBlockIndex, GCGLenum pname, GCGLSpan<GCGLint> params) final;
+    void multiDrawArraysANGLE(GCGLenum mode, GCGLSpan<const GCGLint> firsts, GCGLSpan<const GCGLsizei> counts, GCGLsizei drawcount) override;
+    void multiDrawArraysInstancedANGLE(GCGLenum mode, GCGLSpan<const GCGLint> firsts, GCGLSpan<const GCGLsizei> counts, GCGLSpan<const GCGLsizei> instanceCounts, GCGLsizei drawcount) override;
+    void multiDrawElementsANGLE(GCGLenum mode, GCGLSpan<const GCGLsizei> counts, GCGLenum type, GCGLSpan<const GCGLint> offsets, GCGLsizei drawcount) override;
+    void multiDrawElementsInstancedANGLE(GCGLenum mode, GCGLSpan<const GCGLsizei> counts, GCGLenum type, GCGLSpan<const GCGLint> offsets, GCGLSpan<const GCGLsizei> instanceCounts, GCGLsizei drawcount) override;
+    PlatformGLObject createBuffer() final;
+    PlatformGLObject createFramebuffer() final;
+    PlatformGLObject createProgram() final;
+    PlatformGLObject createRenderbuffer() final;
+    PlatformGLObject createShader(GCGLenum) final;
+    PlatformGLObject createTexture() final;
+    void deleteBuffer(PlatformGLObject) final;
+    void deleteFramebuffer(PlatformGLObject) final;
+    void deleteProgram(PlatformGLObject) final;
+    void deleteRenderbuffer(PlatformGLObject) final;
+    void deleteShader(PlatformGLObject) final;
+    void deleteTexture(PlatformGLObject) final;
+    void synthesizeGLError(GCGLenum error) final;
+    bool moveErrorsToSyntheticErrorList() final;
+    ExtensionsGL& getExtensions() final;
+    void simulateEventForTesting(SimulatedEventForTesting) override;
+    void paintRenderingResultsToCanvas(ImageBuffer&) final;
+    std::optional<PixelBuffer> paintRenderingResultsToPixelBuffer() final;
+    void paintCompositedResultsToCanvas(ImageBuffer&) final;
+    void setContextVisibility(bool) final;
+    void prepareForDisplay() override;
+
+    void forceContextLost();
+    void recycleContext();
+    void dispatchContextChangedNotification();
+    std::optional<PixelBuffer> readRenderingResultsForPainting();
+    std::optional<PixelBuffer> readCompositedResultsForPainting();
+
+#if PLATFORM(COCOA)
+    void displayWasReconfigured();
+#endif
+    unsigned textureSeed(GCGLuint texture);
+
+    constexpr static EGLNativeDisplayType defaultDisplay = EGL_DEFAULT_DISPLAY;
+#if PLATFORM(COCOA)
+    constexpr static EGLNativeDisplayType lowPowerDisplay = EGL_CAST(EGLNativeDisplayType, -1);
+    constexpr static EGLNativeDisplayType highPerformanceDisplay = EGL_CAST(EGLNativeDisplayType, -2);
+#endif
+
+protected:
+    GraphicsContextGLANGLE(GraphicsContextGLAttributes);
+    // Called once by all the public entry points that eventually call OpenGL.
+    // Called once by all the public entry points of ExtensionsGL that eventually call OpenGL.
+    bool makeContextCurrent() WARN_UNUSED_RETURN;
+
+    // Take into account the user's requested context creation attributes,
+    // in particular stencil and antialias, and determine which could or
+    // could not be honored based on the capabilities of the OpenGL
+    // implementation.
+    void validateDepthStencil(const char* packedDepthStencilExtension);
+    void validateAttributes();
+
+    void readnPixelsImpl(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLsizei bufSize, GCGLsizei* length, GCGLsizei* columns, GCGLsizei* rows, GCGLvoid* data, bool readingToPixelBufferObject);
+
+    // Did the most recent drawing operation leave the GPU in an acceptable state?
+    void checkGPUStatus();
+
+    std::optional<PixelBuffer> readRenderingResults();
+    std::optional<PixelBuffer> readCompositedResults();
+    std::optional<PixelBuffer> readPixelsForPaintResults();
+
+    bool reshapeFBOs(const IntSize&);
+    void prepareTextureImpl();
+    void resolveMultisamplingIfNecessary(const IntRect& = IntRect());
+    void attachDepthAndStencilBufferIfNeeded(GCGLuint internalDepthStencilFormat, int width, int height);
+
+    bool reshapeDisplayBufferBacking();
+#if PLATFORM(COCOA)
+    bool allocateAndBindDisplayBufferBacking();
+    bool bindDisplayBufferBacking(std::unique_ptr<IOSurface> backing, void* pbuffer);
+    static bool makeCurrent(PlatformGraphicsContextGLDisplay, PlatformGraphicsContextGL);
+#endif
+    // Returns false if context should be lost due to timeout.
+    bool waitAndUpdateOldestFrame() WARN_UNUSED_RETURN;
+
+    // Platform specific behavior for releaseResources();
+    static void platformReleaseThreadResources();
+
+    GCGLuint m_texture { 0 };
+    GCGLuint m_fbo { 0 };
+    GCGLuint m_depthStencilBuffer { 0 };
+    GCGLuint m_internalColorFormat { 0 };
+    GCGLuint m_internalDepthStencilFormat { 0 };
+    GCGLuint m_multisampleFBO { 0 };
+    GCGLuint m_multisampleDepthStencilBuffer { 0 };
+    GCGLuint m_multisampleColorBuffer { 0 };
+    // For preserveDrawingBuffer:true without multisampling.
+    GCGLuint m_preserveDrawingBufferTexture { 0 };
+    // Attaches m_texture when m_preserveDrawingBufferTexture is non-zero.
+    GCGLuint m_preserveDrawingBufferFBO { 0 };
+    // Queried at display startup.
+    EGLint m_drawingBufferTextureTarget { -1 };
+    // Errors raised by synthesizeGLError().
+    ListHashSet<GCGLenum> m_syntheticErrors;
+    bool m_isForWebGL2 { false };
+    unsigned m_statusCheckCount { 0 };
+    bool m_failNextStatusCheck { false };
+    bool m_useFenceSyncForDisplayRateLimit = false;
+    static constexpr size_t maxPendingFrames = 3;
+    size_t m_oldestFrameCompletionFence { 0 };
+    ScopedGLFence m_frameCompletionFences[maxPendingFrames];
+    GraphicsContextGLState m_state;
+    std::unique_ptr<ExtensionsGLANGLE> m_extensions;
+
+#if PLATFORM(COCOA)
+    GraphicsContextGLIOSurfaceSwapChain m_swapChain;
+    EGLDisplay m_displayObj { nullptr };
+    PlatformGraphicsContextGL m_contextObj { nullptr };
+    PlatformGraphicsContextGLConfig m_configObj { nullptr };
+    // Backing store for the the buffer which is eventually used for display.
+    // When preserveDrawingBuffer == false, this is the drawing buffer backing store.
+    // When preserveDrawingBuffer == true, this is blitted to during display prepare.
+    std::unique_ptr<IOSurface> m_displayBufferBacking;
+    void* m_displayBufferPbuffer { nullptr };
+#endif
+#if PLATFORM(MAC)
+    bool m_switchesGPUOnDisplayReconfiguration { false };
+    ScopedHighPerformanceGPURequest m_highPerformanceGPURequest;
+#endif
+#if USE(COORDINATED_GRAPHICS)
+    GCGLuint m_compositorTexture { 0 };
+    GCGLuint m_intermediateTexture { 0 };
+#endif
+#if USE(NICOSIA)
+    std::unique_ptr<Nicosia::GCGLLayer> m_nicosiaLayer;
+#elif USE(TEXTURE_MAPPER)
+    std::unique_ptr<TextureMapperGCGLPlatformLayer> m_texmapLayer;
+#endif
+
+    friend class ExtensionsGLANGLE;
+#if USE(NICOSIA)
+    friend class Nicosia::GCGLLayer;
+#elif USE(TEXTURE_MAPPER)
+    friend class TextureMapperGCGLPlatformLayer;
+#endif
+};
+
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscairoGraphicsContextGLCairocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextGLCairo.cpp (286292 => 286293)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextGLCairo.cpp  2021-11-30 14:23:53 UTC (rev 286292)
+++ trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextGLCairo.cpp     2021-11-30 14:54:52 UTC (rev 286293)
</span><span class="lines">@@ -106,7 +106,7 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::paintToCanvas(const GraphicsContextGLAttributes& sourceContextAttributes, PixelBuffer&& pixelBuffer, const IntSize& canvasSize, GraphicsContext& context)
</del><ins>+void GraphicsContextGL::paintToCanvas(const GraphicsContextGLAttributes& sourceContextAttributes, PixelBuffer&& pixelBuffer, const IntSize& canvasSize, GraphicsContext& context)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!pixelBuffer.size().isEmpty());
</span><span class="cx">     if (canvasSize.isEmpty())
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscgGraphicsContextGLCGcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cg/GraphicsContextGLCG.cpp (286292 => 286293)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cg/GraphicsContextGLCG.cpp        2021-11-30 14:23:53 UTC (rev 286292)
+++ trunk/Source/WebCore/platform/graphics/cg/GraphicsContextGLCG.cpp   2021-11-30 14:54:52 UTC (rev 286293)
</span><span class="lines">@@ -506,7 +506,7 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::paintToCanvas(const GraphicsContextGLAttributes& sourceContextAttributes, PixelBuffer&& pixelBuffer, const IntSize& canvasSize, GraphicsContext& context)
</del><ins>+void GraphicsContextGL::paintToCanvas(const GraphicsContextGLAttributes& sourceContextAttributes, PixelBuffer&& pixelBuffer, const IntSize& canvasSize, GraphicsContext& context)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!pixelBuffer.size().isEmpty());
</span><span class="cx">     if (canvasSize.isEmpty())
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscocoaGraphicsContextGLCocoah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.h (286292 => 286293)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.h    2021-11-30 14:23:53 UTC (rev 286292)
+++ trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.h       2021-11-30 14:54:52 UTC (rev 286293)
</span><span class="lines">@@ -27,12 +27,18 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEBGL)
</span><span class="cx"> 
</span><del>-#include "GraphicsContextGLOpenGL.h"
</del><ins>+#include "GraphicsContextGLANGLE.h"
</ins><span class="cx"> #include "IOSurface.h"
</span><span class="cx"> 
</span><ins>+#if ENABLE(VIDEO)
</ins><span class="cx"> namespace WebCore {
</span><ins>+class GraphicsContextGLCVCocoa;
+}
+#endif
</ins><span class="cx"> 
</span><del>-class WEBCORE_EXPORT GraphicsContextGLCocoa : public GraphicsContextGLOpenGL {
</del><ins>+namespace WebCore {
+
+class WEBCORE_EXPORT GraphicsContextGLCocoa : public GraphicsContextGLANGLE {
</ins><span class="cx"> public:
</span><span class="cx">     static RefPtr<GraphicsContextGLCocoa> create(WebCore::GraphicsContextGLAttributes&&);
</span><span class="cx">     ~GraphicsContextGLCocoa();
</span><span class="lines">@@ -49,14 +55,26 @@
</span><span class="cx">     void detachIOSurfaceFromSharedTexture(void* handle);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    // GraphicsContextGLOpenGL overrides.
</del><ins>+    // GraphicsContextGLANGLE overrides.
+    PlatformLayer* platformLayer() const override;
</ins><span class="cx"> #if ENABLE(VIDEO)
</span><span class="cx">     bool copyTextureFromMedia(MediaPlayer&, PlatformGLObject texture, GCGLenum target, GCGLint level, GCGLenum internalFormat, GCGLenum format, GCGLenum type, bool premultiplyAlpha, bool flipY) final;
</span><span class="cx"> #endif
</span><ins>+#if ENABLE(VIDEO)
+    GraphicsContextGLCV* asCV() final;
+#endif
+#if ENABLE(MEDIA_STREAM)
+    RefPtr<MediaSample> paintCompositedResultsToMediaSample() final;
+#endif
</ins><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     GraphicsContextGLCocoa(WebCore::GraphicsContextGLAttributes&&);
</span><span class="cx">     bool isValid() const;
</span><ins>+
+#if ENABLE(VIDEO)
+    std::unique_ptr<GraphicsContextGLCVCocoa> m_cv;
+#endif
+    friend class GraphicsContextGLCVCocoa;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscocoaGraphicsContextGLCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.mm (286292 => 286293)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.mm   2021-11-30 14:23:53 UTC (rev 286292)
+++ trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.mm      2021-11-30 14:54:52 UTC (rev 286293)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(VIDEO)
</span><del>-#include "GraphicsContextGLCVANGLE.h"
</del><ins>+#include "GraphicsContextGLCVCocoa.h"
</ins><span class="cx"> #include "MediaPlayerPrivate.h"
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx"> // In isCurrentContextPredictable() == true case this variable is accessed in single-threaded manner.
</span><span class="cx"> // In isCurrentContextPredictable() == false case this variable is accessed from multiple threads but always sequentially
</span><span class="cx"> // and it always contains nullptr and nullptr is always written to it.
</span><del>-static GraphicsContextGLOpenGL* currentContext;
</del><ins>+static GraphicsContextGLANGLE* currentContext;
</ins><span class="cx"> 
</span><span class="cx"> static bool isCurrentContextPredictable()
</span><span class="cx"> {
</span><span class="lines">@@ -147,7 +147,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     LOG(WebGL, "Attempting to use ANGLE's %s backend.", attrs.useMetal ? "Metal" : "OpenGL");
</span><del>-    EGLNativeDisplayType nativeDisplay = GraphicsContextGLOpenGL::defaultDisplay;
</del><ins>+    EGLNativeDisplayType nativeDisplay = GraphicsContextGLANGLE::defaultDisplay;
</ins><span class="cx">     if (attrs.useMetal) {
</span><span class="cx">         displayAttributes.append(EGL_PLATFORM_ANGLE_TYPE_ANGLE);
</span><span class="cx">         displayAttributes.append(EGL_PLATFORM_ANGLE_TYPE_METAL_ANGLE);
</span><span class="lines">@@ -157,11 +157,11 @@
</span><span class="cx">         if (powerPreference == GraphicsContextGLAttributes::PowerPreference::LowPower) {
</span><span class="cx">             displayAttributes.append(EGL_POWER_PREFERENCE_ANGLE);
</span><span class="cx">             displayAttributes.append(EGL_LOW_POWER_ANGLE);
</span><del>-            nativeDisplay = GraphicsContextGLOpenGL::lowPowerDisplay;
</del><ins>+            nativeDisplay = GraphicsContextGLANGLE::lowPowerDisplay;
</ins><span class="cx">         } else if (powerPreference == GraphicsContextGLAttributes::PowerPreference::HighPerformance) {
</span><span class="cx">             displayAttributes.append(EGL_POWER_PREFERENCE_ANGLE);
</span><span class="cx">             displayAttributes.append(EGL_HIGH_POWER_ANGLE);
</span><del>-            nativeDisplay = GraphicsContextGLOpenGL::highPerformanceDisplay;
</del><ins>+            nativeDisplay = GraphicsContextGLANGLE::highPerformanceDisplay;
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx">     displayAttributes.append(EGL_NONE);
</span><span class="lines">@@ -215,13 +215,13 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> GraphicsContextGLCocoa::GraphicsContextGLCocoa(WebCore::GraphicsContextGLAttributes&& attributes)
</span><del>-    : GraphicsContextGLOpenGL(WTFMove(attributes))
</del><ins>+    : GraphicsContextGLANGLE(WTFMove(attributes))
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // FIXME: Below is functionality that should be moved to GraphicsContextGLCocoa to simplify the base class.
</span><span class="cx"> 
</span><del>-GraphicsContextGLOpenGL::GraphicsContextGLOpenGL(GraphicsContextGLAttributes attrs)
</del><ins>+GraphicsContextGLANGLE::GraphicsContextGLANGLE(GraphicsContextGLAttributes attrs)
</ins><span class="cx">     : GraphicsContextGL(attrs)
</span><span class="cx"> {
</span><span class="cx">     m_isForWebGL2 = attrs.webGLVersion == GraphicsContextGLWebGLVersion::WebGL2;
</span><span class="lines">@@ -356,7 +356,7 @@
</span><span class="cx">         extensions.ensureEnabled(extension);
</span><span class="cx">     }
</span><span class="cx">     if (contextAttributes().useMetal) {
</span><del>-        // GraphicsContextGLOpenGL uses sync objects to throttle display on Metal implementations.
</del><ins>+        // GraphicsContextGLANGLE uses sync objects to throttle display on Metal implementations.
</ins><span class="cx">         // OpenGL sync objects are not signaling upon completion on Catalina-era drivers, so
</span><span class="cx">         // OpenGL cannot use this method of throttling. OpenGL drivers typically implement
</span><span class="cx">         // some sort of internal throttling.
</span><span class="lines">@@ -410,10 +410,10 @@
</span><span class="cx"> 
</span><span class="cx">     gl::ClearColor(0, 0, 0, 0);
</span><span class="cx"> 
</span><del>-    LOG(WebGL, "Created a GraphicsContextGLOpenGL (%p).", this);
</del><ins>+    LOG(WebGL, "Created a GraphicsContextGLANGLE (%p).", this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL()
</del><ins>+GraphicsContextGLANGLE::~GraphicsContextGLANGLE()
</ins><span class="cx"> {
</span><span class="cx">     GraphicsContextGLOpenGLManager::sharedManager().removeContext(this);
</span><span class="cx">     if (makeContextCurrent()) {
</span><span class="lines">@@ -454,7 +454,7 @@
</span><span class="cx">     }
</span><span class="cx">     ASSERT(currentContext != this);
</span><span class="cx">     m_drawingBufferTextureTarget = -1;
</span><del>-    LOG(WebGL, "Destroyed a GraphicsContextGLOpenGL (%p).", this);
</del><ins>+    LOG(WebGL, "Destroyed a GraphicsContextGLANGLE (%p).", this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool GraphicsContextGLCocoa::isValid() const
</span><span class="lines">@@ -462,12 +462,12 @@
</span><span class="cx">     return m_texture;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PlatformLayer* GraphicsContextGLOpenGL::platformLayer() const
</del><ins>+PlatformLayer* GraphicsContextGLCocoa::platformLayer() const
</ins><span class="cx"> {
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool GraphicsContextGLOpenGL::makeContextCurrent()
</del><ins>+bool GraphicsContextGLANGLE::makeContextCurrent()
</ins><span class="cx"> {
</span><span class="cx">     if (!m_contextObj)
</span><span class="cx">         return false;
</span><span class="lines">@@ -485,7 +485,7 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::checkGPUStatus()
</del><ins>+void GraphicsContextGLANGLE::checkGPUStatus()
</ins><span class="cx"> {
</span><span class="cx">     if (m_failNextStatusCheck) {
</span><span class="cx">         LOG(WebGL, "Pretending the GPU has reset (%p). Lose the context.", this);
</span><span class="lines">@@ -506,7 +506,7 @@
</span><span class="cx">     restartStatus = 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::setContextVisibility(bool isVisible)
</del><ins>+void GraphicsContextGLANGLE::setContextVisibility(bool isVisible)
</ins><span class="cx"> {
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     if (!m_switchesGPUOnDisplayReconfiguration)
</span><span class="lines">@@ -520,7 +520,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::displayWasReconfigured()
</del><ins>+void GraphicsContextGLANGLE::displayWasReconfigured()
</ins><span class="cx"> {
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     if (m_switchesGPUOnDisplayReconfiguration)
</span><span class="lines">@@ -529,7 +529,7 @@
</span><span class="cx">     dispatchContextChangedNotification();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool GraphicsContextGLOpenGL::reshapeDisplayBufferBacking()
</del><ins>+bool GraphicsContextGLANGLE::reshapeDisplayBufferBacking()
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!getInternalFramebufferSize().isEmpty());
</span><span class="cx">     // Reset the current backbuffer now before allocating a new one in order to slightly reduce memory pressure.
</span><span class="lines">@@ -547,7 +547,7 @@
</span><span class="cx">     return allocateAndBindDisplayBufferBacking();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool GraphicsContextGLOpenGL::allocateAndBindDisplayBufferBacking()
</del><ins>+bool GraphicsContextGLANGLE::allocateAndBindDisplayBufferBacking()
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!getInternalFramebufferSize().isEmpty());
</span><span class="cx">     auto backing = IOSurface::create(getInternalFramebufferSize(), DestinationColorSpace::SRGB());
</span><span class="lines">@@ -576,7 +576,7 @@
</span><span class="cx">     return bindDisplayBufferBacking(WTFMove(backing), pbuffer);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool GraphicsContextGLOpenGL::bindDisplayBufferBacking(std::unique_ptr<IOSurface> backing, void* pbuffer)
</del><ins>+bool GraphicsContextGLANGLE::bindDisplayBufferBacking(std::unique_ptr<IOSurface> backing, void* pbuffer)
</ins><span class="cx"> {
</span><span class="cx">     GCGLenum textureTarget = drawingBufferTextureTarget();
</span><span class="cx">     ScopedRestoreTextureBinding restoreBinding(drawingBufferTextureTargetQueryForDrawingTarget(textureTarget), textureTarget, textureTarget != TEXTURE_RECTANGLE_ARB);
</span><span class="lines">@@ -590,7 +590,7 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool GraphicsContextGLOpenGL::makeCurrent(PlatformGraphicsContextGLDisplay display, PlatformGraphicsContextGL context)
</del><ins>+bool GraphicsContextGLANGLE::makeCurrent(PlatformGraphicsContextGLDisplay display, PlatformGraphicsContextGL context)
</ins><span class="cx"> {
</span><span class="cx">     currentContext = nullptr;
</span><span class="cx">     return EGL_MakeCurrent(display, EGL_NO_SURFACE, EGL_NO_SURFACE, context);
</span><span class="lines">@@ -598,7 +598,7 @@
</span><span class="cx"> 
</span><span class="cx"> void* GraphicsContextGLCocoa::createPbufferAndAttachIOSurface(GCGLenum target, PbufferAttachmentUsage usage, GCGLenum internalFormat, GCGLsizei width, GCGLsizei height, GCGLenum type, IOSurfaceRef surface, GCGLuint plane)
</span><span class="cx"> {
</span><del>-    if (target != GraphicsContextGLOpenGL::drawingBufferTextureTarget()) {
</del><ins>+    if (target != GraphicsContextGLANGLE::drawingBufferTextureTarget()) {
</ins><span class="cx">         LOG(WebGL, "Unknown texture target %d.", static_cast<int>(target));
</span><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="lines">@@ -667,25 +667,8 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-bool GraphicsContextGLOpenGL::isGLES2Compliant() const
</del><ins>+void GraphicsContextGLANGLE::prepareForDisplay()
</ins><span class="cx"> {
</span><del>-    return m_isForWebGL2;
-}
-
-void GraphicsContextGLOpenGL::simulateEventForTesting(SimulatedEventForTesting event)
-{
-    if (event == SimulatedEventForTesting::ContextChange) {
-        GraphicsContextGLOpenGLManager::sharedManager().displayWasReconfigured();
-        return;
-    }
-    if (event == SimulatedEventForTesting::GPUStatusFailure) {
-        m_failNextStatusCheck = true;
-        return;
-    }
-}
-
-void GraphicsContextGLOpenGL::prepareForDisplay()
-{
</del><span class="cx">     if (m_layerComposited)
</span><span class="cx">         return;
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -724,15 +707,15 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(VIDEO)
</span><del>-GraphicsContextGLCV* GraphicsContextGLOpenGL::asCV()
</del><ins>+GraphicsContextGLCV* GraphicsContextGLCocoa::asCV()
</ins><span class="cx"> {
</span><span class="cx">     if (!m_cv)
</span><del>-        m_cv = GraphicsContextGLCVANGLE::create(*this);
</del><ins>+        m_cv = GraphicsContextGLCVCocoa::create(*this);
</ins><span class="cx">     return m_cv.get();
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-std::optional<PixelBuffer> GraphicsContextGLOpenGL::readCompositedResults()
</del><ins>+std::optional<PixelBuffer> GraphicsContextGLANGLE::readCompositedResults()
</ins><span class="cx"> {
</span><span class="cx">     auto& displayBuffer = m_swapChain.displayBuffer();
</span><span class="cx">     if (!displayBuffer.surface || !displayBuffer.handle)
</span><span class="lines">@@ -764,7 +747,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(MEDIA_STREAM)
</span><del>-RefPtr<MediaSample> GraphicsContextGLOpenGL::paintCompositedResultsToMediaSample()
</del><ins>+RefPtr<MediaSample> GraphicsContextGLCocoa::paintCompositedResultsToMediaSample()
</ins><span class="cx"> {
</span><span class="cx">     auto &displayBuffer = m_swapChain.displayBuffer();
</span><span class="cx">     if (!displayBuffer.surface || !displayBuffer.handle)
</span><span class="lines">@@ -779,7 +762,7 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-void GraphicsContextGLOpenGL::platformReleaseThreadResources()
</del><ins>+void GraphicsContextGLANGLE::platformReleaseThreadResources()
</ins><span class="cx"> {
</span><span class="cx">     currentContext = nullptr;
</span><span class="cx"> }
</span><span class="lines">@@ -801,12 +784,12 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-PlatformGraphicsContextGLDisplay GraphicsContextGLOpenGL::platformDisplay() const
</del><ins>+PlatformGraphicsContextGLDisplay GraphicsContextGLANGLE::platformDisplay() const
</ins><span class="cx"> {
</span><span class="cx">     return m_displayObj;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PlatformGraphicsContextGLConfig GraphicsContextGLOpenGL::platformConfig() const
</del><ins>+PlatformGraphicsContextGLConfig GraphicsContextGLANGLE::platformConfig() const
</ins><span class="cx"> {
</span><span class="cx">     return m_configObj;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscvGraphicsContextGLCVANGLEcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/cv/GraphicsContextGLCVANGLE.cpp (286292 => 286293)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cv/GraphicsContextGLCVANGLE.cpp   2021-11-30 14:23:53 UTC (rev 286292)
+++ trunk/Source/WebCore/platform/graphics/cv/GraphicsContextGLCVANGLE.cpp      2021-11-30 14:54:52 UTC (rev 286293)
</span><span class="lines">@@ -1,689 +0,0 @@
</span><del>-/*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "GraphicsContextGLCVANGLE.h"
-
-#if ENABLE(WEBGL) && ENABLE(VIDEO) && USE(AVFOUNDATION)
-
-#include "ANGLEUtilitiesCocoa.h"
-#include "FourCC.h"
-#include "GraphicsContextGLOpenGL.h"
-#include "Logging.h"
-#include <pal/spi/cf/CoreVideoSPI.h>
-#include <pal/spi/cocoa/IOSurfaceSPI.h>
-#include <wtf/NeverDestroyed.h>
-#include <wtf/Scope.h>
-#include <wtf/StdMap.h>
-#include <wtf/cf/TypeCastsCF.h>
-#include <wtf/text/StringBuilder.h>
-
-#include "CoreVideoSoftLink.h"
-
-namespace WebCore {
-
-static constexpr auto s_yuvVertexShaderTexture2D {
-    "attribute vec2 a_position;"
-    "uniform vec2 u_yTextureSize;"
-    "uniform vec2 u_uvTextureSize;"
-    "uniform int u_flipY;"
-    "varying vec2 v_yTextureCoordinate;"
-    "varying vec2 v_uvTextureCoordinate;"
-    "void main()"
-    "{"
-    "    gl_Position = vec4(a_position, 0, 1.0);"
-    "    vec2 normalizedPosition = a_position * .5 + .5;"
-    "    if (u_flipY == 1)"
-    "        normalizedPosition.y = 1.0 - normalizedPosition.y;"
-    "    v_yTextureCoordinate = normalizedPosition;"
-    "    v_uvTextureCoordinate = normalizedPosition;"
-    "}"_s
-};
-
-static constexpr auto s_yuvVertexShaderTextureRectangle {
-    "attribute vec2 a_position;"
-    "uniform vec2 u_yTextureSize;"
-    "uniform vec2 u_uvTextureSize;"
-    "uniform int u_flipY;"
-    "varying vec2 v_yTextureCoordinate;"
-    "varying vec2 v_uvTextureCoordinate;"
-    "void main()"
-    "{"
-    "    gl_Position = vec4(a_position, 0, 1.0);"
-    "    vec2 normalizedPosition = a_position * .5 + .5;"
-    "    if (u_flipY == 1)"
-    "        normalizedPosition.y = 1.0 - normalizedPosition.y;"
-    "    v_yTextureCoordinate = normalizedPosition * u_yTextureSize;"
-    "    v_uvTextureCoordinate = normalizedPosition * u_uvTextureSize;"
-    "}"_s
-};
-
-constexpr auto s_yuvFragmentShaderTexture2D {
-    "precision mediump float;"
-    "uniform sampler2D u_yTexture;"
-    "uniform sampler2D u_uvTexture;"
-    "uniform mat4 u_colorMatrix;"
-    "varying vec2 v_yTextureCoordinate;"
-    "varying vec2 v_uvTextureCoordinate;"
-    "void main()"
-    "{"
-    "    vec4 yuv;"
-    "    yuv.r = texture2D(u_yTexture, v_yTextureCoordinate).r;"
-    "    yuv.gb = texture2D(u_uvTexture, v_uvTextureCoordinate).rg;"
-    "    yuv.a = 1.0;"
-    "    gl_FragColor = yuv * u_colorMatrix;"
-    "}"_s
-};
-
-static constexpr auto s_yuvFragmentShaderTextureRectangle {
-    "precision mediump float;"
-    "uniform sampler2DRect u_yTexture;"
-    "uniform sampler2DRect u_uvTexture;"
-    "uniform mat4 u_colorMatrix;"
-    "varying vec2 v_yTextureCoordinate;"
-    "varying vec2 v_uvTextureCoordinate;"
-    "void main()"
-    "{"
-    "    vec4 yuv;"
-    "    yuv.r = texture2DRect(u_yTexture, v_yTextureCoordinate).r;"
-    "    yuv.gb = texture2DRect(u_uvTexture, v_uvTextureCoordinate).rg;"
-    "    yuv.a = 1.0;"
-    "    gl_FragColor = yuv * u_colorMatrix;"
-    "}"_s
-};
-
-enum class PixelRange {
-    Unknown,
-    Video,
-    Full,
-};
-
-enum class TransferFunctionCV {
-    Unknown,
-    kITU_R_709_2,
-    kITU_R_601_4,
-    kSMPTE_240M_1995,
-    kDCI_P3,
-    kP3_D65,
-    kITU_R_2020,
-};
-
-static PixelRange pixelRangeFromPixelFormat(OSType pixelFormat)
-{
-    switch (pixelFormat) {
-    case kCVPixelFormatType_4444AYpCbCr8:
-    case kCVPixelFormatType_4444AYpCbCr16:
-    case kCVPixelFormatType_422YpCbCr_4A_8BiPlanar:
-    case kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange:
-    case kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange:
-    case kCVPixelFormatType_422YpCbCr10BiPlanarVideoRange:
-    case kCVPixelFormatType_444YpCbCr10BiPlanarVideoRange:
-#if HAVE(COREVIDEO_COMPRESSED_PIXEL_FORMAT_TYPES)
-    case kCVPixelFormatType_AGX_420YpCbCr8BiPlanarVideoRange:
-#endif
-        return PixelRange::Video;
-    case kCVPixelFormatType_420YpCbCr8PlanarFullRange:
-    case kCVPixelFormatType_420YpCbCr8BiPlanarFullRange:
-    case kCVPixelFormatType_422YpCbCr8FullRange:
-    case kCVPixelFormatType_ARGB2101010LEPacked:
-    case kCVPixelFormatType_420YpCbCr10BiPlanarFullRange:
-    case kCVPixelFormatType_422YpCbCr10BiPlanarFullRange:
-    case kCVPixelFormatType_444YpCbCr10BiPlanarFullRange:
-#if HAVE(COREVIDEO_COMPRESSED_PIXEL_FORMAT_TYPES)
-    case kCVPixelFormatType_AGX_420YpCbCr8BiPlanarFullRange:
-#endif
-        return PixelRange::Full;
-    default:
-        return PixelRange::Unknown;
-    }
-}
-
-static TransferFunctionCV transferFunctionFromString(CFStringRef string)
-{
-    if (!string)
-        return TransferFunctionCV::Unknown;
-    if (CFEqual(string, kCVImageBufferYCbCrMatrix_ITU_R_709_2))
-        return TransferFunctionCV::kITU_R_709_2;
-    if (CFEqual(string, kCVImageBufferYCbCrMatrix_ITU_R_601_4))
-        return TransferFunctionCV::kITU_R_601_4;
-    if (CFEqual(string, kCVImageBufferYCbCrMatrix_SMPTE_240M_1995))
-        return TransferFunctionCV::kSMPTE_240M_1995;
-    if (canLoad_CoreVideo_kCVImageBufferYCbCrMatrix_DCI_P3() && CFEqual(string, kCVImageBufferYCbCrMatrix_DCI_P3))
-        return TransferFunctionCV::kDCI_P3;
-    if (canLoad_CoreVideo_kCVImageBufferYCbCrMatrix_P3_D65() && CFEqual(string, kCVImageBufferYCbCrMatrix_P3_D65))
-        return TransferFunctionCV::kP3_D65;
-    if (canLoad_CoreVideo_kCVImageBufferYCbCrMatrix_ITU_R_2020() && CFEqual(string, kCVImageBufferYCbCrMatrix_ITU_R_2020))
-        return TransferFunctionCV::kITU_R_2020;
-    return TransferFunctionCV::Unknown;
-}
-
-struct GLfloatColor {
-    union {
-        struct {
-            GLfloat r;
-            GLfloat g;
-            GLfloat b;
-        } rgb;
-        struct {
-            GLfloat y;
-            GLfloat cb;
-            GLfloat cr;
-        } ycbcr;
-    };
-
-    constexpr GLfloatColor(GLfloat r, GLfloat g, GLfloat b)
-        : rgb { r, g, b }
-    {
-    }
-
-    constexpr GLfloatColor(int r, int g, int b, GLfloat scale)
-        : rgb { r / scale, g / scale, b / scale}
-    {
-    }
-
-    static constexpr GLfloat abs(GLfloat value)
-    {
-        return value >= 0 ? value : -value;
-    }
-
-    constexpr bool isApproximatelyEqualTo(const GLfloatColor& color, GLfloat maxDelta) const
-    {
-        return abs(rgb.r - color.rgb.r) < abs(maxDelta)
-            && abs(rgb.g - color.rgb.g) < abs(maxDelta)
-            && abs(rgb.b - color.rgb.b) < abs(maxDelta);
-    }
-};
-
-struct GLfloatColors {
-    static constexpr GLfloatColor black   {0, 0, 0};
-    static constexpr GLfloatColor white   {1, 1, 1};
-    static constexpr GLfloatColor red     {1, 0, 0};
-    static constexpr GLfloatColor green   {0, 1, 0};
-    static constexpr GLfloatColor blue    {0, 0, 1};
-    static constexpr GLfloatColor cyan    {0, 1, 1};
-    static constexpr GLfloatColor magenta {1, 0, 1};
-    static constexpr GLfloatColor yellow  {1, 1, 0};
-};
-
-struct YCbCrMatrix {
-        GLfloat rows[4][4];
-
-    constexpr YCbCrMatrix(PixelRange, GLfloat cbCoefficient, GLfloat crCoefficient);
-
-    operator const GLfloat*() const
-    {
-        return &rows[0][0];
-    }
-
-    constexpr GLfloatColor operator*(const GLfloatColor&) const;
-};
-
-constexpr YCbCrMatrix::YCbCrMatrix(PixelRange range, GLfloat cbCoefficient, GLfloat crCoefficient)
-    : rows { }
-{
-    // The conversion from YCbCr -> RGB generally takes the form:
-    // Y = Kr * R + Kg * G + Kb * B
-    // Cb = (B - Y) / (2 * (1 - Kb))
-    // Cr = (R - Y) / (2 * (1 - Kr))
-    // Where the values of Kb and Kr are defined in a specification and Kg is derived from: Kr + Kg + Kb = 1
-    //
-    // Solving the above equations for R, B, and G derives the following:
-    // R = Y + (2 * (1 - Kr)) * Cr
-    // B = Y + (2 * (1 - Kb)) * Cb
-    // G = Y - (2 * (1 - Kb)) * (Kb / Kg) * Cb - ((1 - Kr) * 2) * (Kr / Kg) * Cr
-    //
-    // When the color values are Video range, Y has a range of [16, 235] with a width of 219, and Cb & Cr have
-    // a range of [16, 240] with a width of 224. When the color values are Full range, Y, Cb, and Cr all have
-    // a range of [0, 255] with a width of 256.
-
-    GLfloat cgCoefficient = 1 - cbCoefficient - crCoefficient;
-    GLfloat yScalingFactor = range == PixelRange::Full ? 1.f : 255.f / 219.f;
-    GLfloat cbcrScalingFactor = range == PixelRange::Full ? 1.f : 255.f / 224.f;
-
-    rows[0][0] = yScalingFactor;
-    rows[0][1] = 0;
-    rows[0][2] = cbcrScalingFactor * 2 * (1 - crCoefficient);
-    rows[0][3] = 0;
-
-    rows[1][0] = yScalingFactor;
-    rows[1][1] = -cbcrScalingFactor * 2 * (1 - cbCoefficient) * (cbCoefficient / cgCoefficient);
-    rows[1][2] = -cbcrScalingFactor * 2 * (1 - crCoefficient) * (crCoefficient / cgCoefficient);
-    rows[1][3] = 0;
-
-    rows[2][0] = yScalingFactor;
-    rows[2][1] = cbcrScalingFactor * 2 * (1 - cbCoefficient);
-    rows[2][2] = 0;
-    rows[2][3] = 0;
-
-    rows[3][0] = 0;
-    rows[3][1] = 0;
-    rows[3][2] = 0;
-    rows[3][3] = 1;
-
-    // Configure the final column of the matrix to convert Cb and Cr to [-128, 128]
-    // and, in the case of video-range, to convert Y to [16, 240]:
-    for (auto rowNumber = 0; rowNumber < 3; ++rowNumber) {
-        auto& row = rows[rowNumber];
-        auto& x = row[0];
-        auto& y = row[1];
-        auto& z = row[2];
-        auto& w = row[3];
-
-        w -= (y + z) * 128 / 255;
-        if (range == PixelRange::Video)
-            w -= x * 16 / 255;
-    }
-}
-
-constexpr GLfloatColor YCbCrMatrix::operator*(const GLfloatColor& color) const
-{
-    return GLfloatColor(
-        rows[0][0] * color.rgb.r + rows[0][1] * color.rgb.g + rows[0][2] * color.rgb.b + rows[0][3],
-        rows[1][0] * color.rgb.r + rows[1][1] * color.rgb.g + rows[1][2] * color.rgb.b + rows[1][3],
-        rows[2][0] * color.rgb.r + rows[2][1] * color.rgb.g + rows[2][2] * color.rgb.b + rows[2][3]
-    );
-}
-
-static const GLfloat* YCbCrToRGBMatrixForRangeAndTransferFunction(PixelRange range, TransferFunctionCV transferFunction)
-{
-    using MapKey = std::pair<PixelRange, TransferFunctionCV>;
-    using MatrixMap = StdMap<MapKey, const YCbCrMatrix&>;
-
-    static NeverDestroyed<MatrixMap> matrices;
-    static dispatch_once_t onceToken;
-
-    // Matrices are derived from the components in the ITU R.601 rev 4 specification
-    // https://www.itu.int/rec/R-REC-BT.601
-    constexpr static YCbCrMatrix r601VideoMatrix { PixelRange::Video, 0.114f, 0.299f };
-    constexpr static YCbCrMatrix r601FullMatrix { PixelRange::Full, 0.114f, 0.299f };
-
-    static_assert((r601VideoMatrix * GLfloatColor(16,  128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::black,   1.5f / 255.f), "r.610 video matrix does not produce black color");
-    static_assert((r601VideoMatrix * GLfloatColor(235, 128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::white,   1.5f / 255.f), "r.610 video matrix does not produce white color");
-    static_assert((r601VideoMatrix * GLfloatColor(81,  90,  240, 255)).isApproximatelyEqualTo(GLfloatColors::red,     1.5f / 255.f), "r.610 video matrix does not produce red color");
-    static_assert((r601VideoMatrix * GLfloatColor(145, 54,  34,  255)).isApproximatelyEqualTo(GLfloatColors::green,   1.5f / 255.f), "r.610 video matrix does not produce green color");
-    static_assert((r601VideoMatrix * GLfloatColor(41,  240, 110, 255)).isApproximatelyEqualTo(GLfloatColors::blue,    1.5f / 255.f), "r.610 video matrix does not produce blue color");
-    static_assert((r601VideoMatrix * GLfloatColor(210, 16,  146, 255)).isApproximatelyEqualTo(GLfloatColors::yellow,  1.5f / 255.f), "r.610 video matrix does not produce yellow color");
-    static_assert((r601VideoMatrix * GLfloatColor(106, 202, 222, 255)).isApproximatelyEqualTo(GLfloatColors::magenta, 1.5f / 255.f), "r.610 video matrix does not produce magenta color");
-    static_assert((r601VideoMatrix * GLfloatColor(170, 166, 16,  255)).isApproximatelyEqualTo(GLfloatColors::cyan,    1.5f / 255.f), "r.610 video matrix does not produce cyan color");
-
-    static_assert((r601FullMatrix * GLfloatColor(0,   128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::black,   1.5f / 255.f), "r.610 full matrix does not produce black color");
-    static_assert((r601FullMatrix * GLfloatColor(255, 128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::white,   1.5f / 255.f), "r.610 full matrix does not produce white color");
-    static_assert((r601FullMatrix * GLfloatColor(76,  85,  255, 255)).isApproximatelyEqualTo(GLfloatColors::red,     1.5f / 255.f), "r.610 full matrix does not produce red color");
-    static_assert((r601FullMatrix * GLfloatColor(150, 44,  21,  255)).isApproximatelyEqualTo(GLfloatColors::green,   1.5f / 255.f), "r.610 full matrix does not produce green color");
-    static_assert((r601FullMatrix * GLfloatColor(29,  255, 107, 255)).isApproximatelyEqualTo(GLfloatColors::blue,    1.5f / 255.f), "r.610 full matrix does not produce blue color");
-    static_assert((r601FullMatrix * GLfloatColor(226, 0,   149, 255)).isApproximatelyEqualTo(GLfloatColors::yellow,  1.5f / 255.f), "r.610 full matrix does not produce yellow color");
-    static_assert((r601FullMatrix * GLfloatColor(105, 212, 235, 255)).isApproximatelyEqualTo(GLfloatColors::magenta, 1.5f / 255.f), "r.610 full matrix does not produce magenta color");
-    static_assert((r601FullMatrix * GLfloatColor(179, 171, 1,   255)).isApproximatelyEqualTo(GLfloatColors::cyan,    1.5f / 255.f), "r.610 full matrix does not produce cyan color");
-
-    // Matrices are derived from the components in the ITU R.709 rev 2 specification
-    // https://www.itu.int/rec/R-REC-BT.709-2-199510-S
-    constexpr static YCbCrMatrix r709VideoMatrix { PixelRange::Video, 0.0722, 0.2126 };
-    constexpr static YCbCrMatrix r709FullMatrix { PixelRange::Full, 0.0722, 0.2126 };
-
-    static_assert((r709VideoMatrix * GLfloatColor(16,  128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::black,   1.5f / 255.f), "r.709 video matrix does not produce black color");
-    static_assert((r709VideoMatrix * GLfloatColor(235, 128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::white,   1.5f / 255.f), "r.709 video matrix does not produce white color");
-    static_assert((r709VideoMatrix * GLfloatColor(63,  102, 240, 255)).isApproximatelyEqualTo(GLfloatColors::red,     1.5f / 255.f), "r.709 video matrix does not produce red color");
-    static_assert((r709VideoMatrix * GLfloatColor(173, 42,  26,  255)).isApproximatelyEqualTo(GLfloatColors::green,   1.5f / 255.f), "r.709 video matrix does not produce green color");
-    static_assert((r709VideoMatrix * GLfloatColor(32,  240, 118, 255)).isApproximatelyEqualTo(GLfloatColors::blue,    1.5f / 255.f), "r.709 video matrix does not produce blue color");
-    static_assert((r709VideoMatrix * GLfloatColor(219, 16,  138, 255)).isApproximatelyEqualTo(GLfloatColors::yellow,  1.5f / 255.f), "r.709 video matrix does not produce yellow color");
-    static_assert((r709VideoMatrix * GLfloatColor(78,  214, 230, 255)).isApproximatelyEqualTo(GLfloatColors::magenta, 1.5f / 255.f), "r.709 video matrix does not produce magenta color");
-    static_assert((r709VideoMatrix * GLfloatColor(188, 154, 16,  255)).isApproximatelyEqualTo(GLfloatColors::cyan,    1.5f / 255.f), "r.709 video matrix does not produce cyan color");
-
-    static_assert((r709FullMatrix * GLfloatColor(0,   128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::black,   1.5f / 255.f), "r.709 full matrix does not produce black color");
-    static_assert((r709FullMatrix * GLfloatColor(255, 128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::white,   1.5f / 255.f), "r.709 full matrix does not produce white color");
-    static_assert((r709FullMatrix * GLfloatColor(54,  99,  256, 255)).isApproximatelyEqualTo(GLfloatColors::red,     1.5f / 255.f), "r.709 full matrix does not produce red color");
-    static_assert((r709FullMatrix * GLfloatColor(182, 30,  12,  255)).isApproximatelyEqualTo(GLfloatColors::green,   1.5f / 255.f), "r.709 full matrix does not produce green color");
-    static_assert((r709FullMatrix * GLfloatColor(18,  256, 116, 255)).isApproximatelyEqualTo(GLfloatColors::blue,    1.5f / 255.f), "r.709 full matrix does not produce blue color");
-    static_assert((r709FullMatrix * GLfloatColor(237, 1,   140, 255)).isApproximatelyEqualTo(GLfloatColors::yellow,  1.5f / 255.f), "r.709 full matrix does not produce yellow color");
-    static_assert((r709FullMatrix * GLfloatColor(73,  226, 244, 255)).isApproximatelyEqualTo(GLfloatColors::magenta, 1.5f / 255.f), "r.709 full matrix does not produce magenta color");
-    static_assert((r709FullMatrix * GLfloatColor(201, 157, 1,   255)).isApproximatelyEqualTo(GLfloatColors::cyan,    1.5f / 255.f), "r.709 full matrix does not produce cyan color");
-
-    // Matrices are derived from the components in the ITU-R BT.2020-2 specification
-    // https://www.itu.int/rec/R-REC-BT.2020
-    constexpr static YCbCrMatrix bt2020VideoMatrix { PixelRange::Video, 0.0593, 0.2627 };
-    constexpr static YCbCrMatrix bt2020FullMatrix { PixelRange::Full, 0.0593, 0.2627 };
-
-    static_assert((bt2020VideoMatrix * GLfloatColor(16,  128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::black,   1.5f / 255.f), "bt.2020 video matrix does not produce black color");
-    static_assert((bt2020VideoMatrix * GLfloatColor(235, 128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::white,   1.5f / 255.f), "bt.2020 video matrix does not produce white color");
-    static_assert((bt2020VideoMatrix * GLfloatColor(74,  97,  240, 255)).isApproximatelyEqualTo(GLfloatColors::red,     1.5f / 255.f), "bt.2020 video matrix does not produce red color");
-    static_assert((bt2020VideoMatrix * GLfloatColor(164, 47,  25,  255)).isApproximatelyEqualTo(GLfloatColors::green,   1.5f / 255.f), "bt.2020 video matrix does not produce green color");
-    static_assert((bt2020VideoMatrix * GLfloatColor(29,  240, 119, 255)).isApproximatelyEqualTo(GLfloatColors::blue,    1.5f / 255.f), "bt.2020 video matrix does not produce blue color");
-    static_assert((bt2020VideoMatrix * GLfloatColor(222, 16,  137, 255)).isApproximatelyEqualTo(GLfloatColors::yellow,  1.5f / 255.f), "bt.2020 video matrix does not produce yellow color");
-    static_assert((bt2020VideoMatrix * GLfloatColor(87,  209, 231, 255)).isApproximatelyEqualTo(GLfloatColors::magenta, 1.5f / 255.f), "bt.2020 video matrix does not produce magenta color");
-    static_assert((bt2020VideoMatrix * GLfloatColor(177, 159, 16,  255)).isApproximatelyEqualTo(GLfloatColors::cyan,    1.5f / 255.f), "bt.2020 video matrix does not produce cyan color");
-
-    static_assert((bt2020FullMatrix * GLfloatColor(0,   128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::black,   1.5f / 255.f), "bt.2020 full matrix does not produce black color");
-    static_assert((bt2020FullMatrix * GLfloatColor(255, 128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::white,   1.5f / 255.f), "bt.2020 full matrix does not produce white color");
-    static_assert((bt2020FullMatrix * GLfloatColor(67,  92,  256, 255)).isApproximatelyEqualTo(GLfloatColors::red,     1.5f / 255.f), "bt.2020 full matrix does not produce red color");
-    static_assert((bt2020FullMatrix * GLfloatColor(173, 36,  11,  255)).isApproximatelyEqualTo(GLfloatColors::green,   1.5f / 255.f), "bt.2020 full matrix does not produce green color");
-    static_assert((bt2020FullMatrix * GLfloatColor(15,  256, 118, 255)).isApproximatelyEqualTo(GLfloatColors::blue,    1.5f / 255.f), "bt.2020 full matrix does not produce blue color");
-    static_assert((bt2020FullMatrix * GLfloatColor(240, 0,   138, 255)).isApproximatelyEqualTo(GLfloatColors::yellow,  1.5f / 255.f), "bt.2020 full matrix does not produce yellow color");
-    static_assert((bt2020FullMatrix * GLfloatColor(82,  220, 245, 255)).isApproximatelyEqualTo(GLfloatColors::magenta, 1.5f / 255.f), "bt.2020 full matrix does not produce magenta color");
-    static_assert((bt2020FullMatrix * GLfloatColor(188, 164, 1,   255)).isApproximatelyEqualTo(GLfloatColors::cyan,    1.5f / 255.f), "bt.2020 full matrix does not produce cyan color");
-
-    // Matrices are derived from the components in the SMPTE 240M-1999 specification
-    // http://ieeexplore.ieee.org/document/7291461/
-    constexpr static YCbCrMatrix smpte240MVideoMatrix { PixelRange::Video, 0.087, 0.212 };
-    constexpr static YCbCrMatrix smpte240MFullMatrix { PixelRange::Full, 0.087, 0.212 };
-
-    static_assert((smpte240MVideoMatrix * GLfloatColor(16,  128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::black,   1.5f / 255.f), "SMPTE 240M video matrix does not produce black color");
-    static_assert((smpte240MVideoMatrix * GLfloatColor(235, 128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::white,   1.5f / 255.f), "SMPTE 240M video matrix does not produce white color");
-    static_assert((smpte240MVideoMatrix * GLfloatColor(62,  102, 240, 255)).isApproximatelyEqualTo(GLfloatColors::red,     1.5f / 255.f), "SMPTE 240M video matrix does not produce red color");
-    static_assert((smpte240MVideoMatrix * GLfloatColor(170, 42,  28,  255)).isApproximatelyEqualTo(GLfloatColors::green,   1.5f / 255.f), "SMPTE 240M video matrix does not produce green color");
-    static_assert((smpte240MVideoMatrix * GLfloatColor(35,  240, 116, 255)).isApproximatelyEqualTo(GLfloatColors::blue,    1.5f / 255.f), "SMPTE 240M video matrix does not produce blue color");
-    static_assert((smpte240MVideoMatrix * GLfloatColor(216, 16,  140, 255)).isApproximatelyEqualTo(GLfloatColors::yellow,  1.5f / 255.f), "SMPTE 240M video matrix does not produce yellow color");
-    static_assert((smpte240MVideoMatrix * GLfloatColor(81,  214, 228, 255)).isApproximatelyEqualTo(GLfloatColors::magenta, 1.5f / 255.f), "SMPTE 240M video matrix does not produce magenta color");
-    static_assert((smpte240MVideoMatrix * GLfloatColor(189, 154, 16,  255)).isApproximatelyEqualTo(GLfloatColors::cyan,    1.5f / 255.f), "SMPTE 240M video matrix does not produce cyan color");
-
-    static_assert((smpte240MFullMatrix * GLfloatColor(0,   128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::black,   1.5f / 255.f), "SMPTE 240M full matrix does not produce black color");
-    static_assert((smpte240MFullMatrix * GLfloatColor(255, 128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::white,   1.5f / 255.f), "SMPTE 240M full matrix does not produce white color");
-    static_assert((smpte240MFullMatrix * GLfloatColor(54,  98,  256, 255)).isApproximatelyEqualTo(GLfloatColors::red,     1.5f / 255.f), "SMPTE 240M full matrix does not produce red color");
-    static_assert((smpte240MFullMatrix * GLfloatColor(179, 30,  15,  255)).isApproximatelyEqualTo(GLfloatColors::green,   1.5f / 255.f), "SMPTE 240M full matrix does not produce green color");
-    static_assert((smpte240MFullMatrix * GLfloatColor(22,  256, 114, 255)).isApproximatelyEqualTo(GLfloatColors::blue,    1.5f / 255.f), "SMPTE 240M full matrix does not produce blue color");
-    static_assert((smpte240MFullMatrix * GLfloatColor(233, 1,   142, 255)).isApproximatelyEqualTo(GLfloatColors::yellow,  1.5f / 255.f), "SMPTE 240M full matrix does not produce yellow color");
-    static_assert((smpte240MFullMatrix * GLfloatColor(76,  226, 241, 255)).isApproximatelyEqualTo(GLfloatColors::magenta, 1.5f / 255.f), "SMPTE 240M full matrix does not produce magenta color");
-    static_assert((smpte240MFullMatrix * GLfloatColor(201, 158, 1,   255)).isApproximatelyEqualTo(GLfloatColors::cyan,    1.5f / 255.f), "SMPTE 240M full matrix does not produce cyan color");
-
-    dispatch_once(&onceToken, ^{
-        matrices.get().emplace(MapKey(PixelRange::Video, TransferFunctionCV::kITU_R_601_4), r601VideoMatrix);
-        matrices.get().emplace(MapKey(PixelRange::Full, TransferFunctionCV::kITU_R_601_4), r601FullMatrix);
-        matrices.get().emplace(MapKey(PixelRange::Video, TransferFunctionCV::kITU_R_709_2), r709VideoMatrix);
-        matrices.get().emplace(MapKey(PixelRange::Full, TransferFunctionCV::kITU_R_709_2), r709FullMatrix);
-        matrices.get().emplace(MapKey(PixelRange::Video, TransferFunctionCV::kITU_R_2020), bt2020VideoMatrix);
-        matrices.get().emplace(MapKey(PixelRange::Full, TransferFunctionCV::kITU_R_2020), bt2020FullMatrix);
-        matrices.get().emplace(MapKey(PixelRange::Video, TransferFunctionCV::kSMPTE_240M_1995), smpte240MVideoMatrix);
-        matrices.get().emplace(MapKey(PixelRange::Full, TransferFunctionCV::kSMPTE_240M_1995), smpte240MFullMatrix);
-    });
-
-    // We should never be asked to handle a Pixel Format whose range value is unknown.
-    ASSERT(range != PixelRange::Unknown);
-    if (range == PixelRange::Unknown)
-        range = PixelRange::Full;
-
-    auto iterator = matrices.get().find({range, transferFunction});
-
-    // Assume unknown transfer functions are r.601:
-    if (iterator == matrices.get().end())
-        iterator = matrices.get().find({range, TransferFunctionCV::kITU_R_601_4});
-
-    ASSERT(iterator != matrices.get().end());
-    return iterator->second;
-}
-
-std::unique_ptr<GraphicsContextGLCVANGLE> GraphicsContextGLCVANGLE::create(GraphicsContextGLOpenGL& context)
-{
-    std::unique_ptr<GraphicsContextGLCVANGLE> cv { new GraphicsContextGLCVANGLE(context) };
-    if (!cv->m_context)
-        return nullptr;
-    return cv;
-}
-
-GraphicsContextGLCVANGLE::~GraphicsContextGLCVANGLE()
-{
-    if (!m_context || !GraphicsContextGLOpenGL::makeCurrent(m_display, m_context))
-        return;
-    gl::DeleteBuffers(1, &m_yuvVertexBuffer);
-    gl::DeleteFramebuffers(1, &m_framebuffer);
-    EGL_DestroyContext(m_display, m_context);
-}
-
-GraphicsContextGLCVANGLE::GraphicsContextGLCVANGLE(GraphicsContextGLOpenGL& owner)
-    : m_owner(owner)
-{
-    // Create compatible context that shares state with owner, but one that does not
-    // have robustness or WebGL compatibility.
-    const EGLint contextAttributes[] = {
-        EGL_CONTEXT_CLIENT_VERSION,
-        owner.m_isForWebGL2 ? 3 : 2,
-        EGL_CONTEXT_OPENGL_BACKWARDS_COMPATIBLE_ANGLE,
-        EGL_FALSE,
-        EGL_CONTEXT_CLIENT_ARRAYS_ENABLED_ANGLE,
-        EGL_FALSE,
-        EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM,
-        EGL_FALSE,
-        EGL_NONE
-    };
-    EGLDisplay display = owner.platformDisplay();
-    EGLConfig config = owner.platformConfig();
-    EGLContext context = EGL_CreateContext(display, config, owner.m_contextObj, contextAttributes);
-    if (context == EGL_NO_CONTEXT)
-        return;
-    GraphicsContextGLOpenGL::makeCurrent(display, context);
-
-    auto contextCleanup = makeScopeExit([display, context] {
-        GraphicsContextGLOpenGL::makeCurrent(display, EGL_NO_CONTEXT);
-        EGL_DestroyContext(display, context);
-    });
-
-    const bool useTexture2D = m_owner.drawingBufferTextureTarget() == GL_TEXTURE_2D;
-
-#if PLATFORM(MAC) || PLATFORM(MACCATALYST)
-    if (!useTexture2D) {
-        gl::RequestExtensionANGLE("GL_ANGLE_texture_rectangle");
-        gl::RequestExtensionANGLE("GL_EXT_texture_format_BGRA8888");
-        if (gl::GetError() != GL_NO_ERROR)
-            return;
-    }
-#endif
-
-    GLint vertexShader = gl::CreateShader(GL_VERTEX_SHADER);
-    GLint fragmentShader = gl::CreateShader(GL_FRAGMENT_SHADER);
-    GLuint yuvProgram = gl::CreateProgram();
-    auto programCleanup = makeScopeExit([vertexShader, fragmentShader, yuvProgram] {
-        gl::DeleteShader(vertexShader);
-        gl::DeleteShader(fragmentShader);
-        gl::DeleteProgram(yuvProgram);
-    });
-    // These are written so strlen might be compile-time.
-    GLint vsLength = useTexture2D ? s_yuvVertexShaderTexture2D.length() : s_yuvVertexShaderTextureRectangle.length();
-    GLint fsLength = useTexture2D ? s_yuvFragmentShaderTexture2D.length() : s_yuvFragmentShaderTextureRectangle.length();
-    const char* vertexShaderSource = useTexture2D ? s_yuvVertexShaderTexture2D : s_yuvVertexShaderTextureRectangle;
-    const char* fragmentShaderSource = useTexture2D ? s_yuvFragmentShaderTexture2D : s_yuvFragmentShaderTextureRectangle;
-
-    gl::ShaderSource(vertexShader, 1, &vertexShaderSource, &vsLength);
-    gl::ShaderSource(fragmentShader, 1, &fragmentShaderSource, &fsLength);
-    gl::CompileShader(vertexShader);
-    gl::CompileShader(fragmentShader);
-    gl::AttachShader(yuvProgram, vertexShader);
-    gl::AttachShader(yuvProgram, fragmentShader);
-    gl::LinkProgram(yuvProgram);
-    // Link status is checked afterwards for theoretical parallel compilation benefit.
-
-    GLuint yuvVertexBuffer = 0;
-    gl::GenBuffers(1, &yuvVertexBuffer);
-    auto yuvVertexBufferCleanup = makeScopeExit([yuvVertexBuffer] {
-        gl::DeleteBuffers(1, &yuvVertexBuffer);
-    });
-    float vertices[12] = { -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1 };
-    gl::BindBuffer(GL_ARRAY_BUFFER, yuvVertexBuffer);
-    gl::BufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);
-
-    GLuint framebuffer = 0;
-    gl::GenFramebuffers(1, &framebuffer);
-    auto framebufferCleanup = makeScopeExit([framebuffer] {
-        gl::DeleteFramebuffers(1, &framebuffer);
-    });
-
-    GLint status = 0;
-    gl::GetProgramivRobustANGLE(yuvProgram, GL_LINK_STATUS, 1, nullptr, &status);
-    if (!status) {
-        GLint vsStatus = 0;
-        gl::GetShaderivRobustANGLE(vertexShader, GL_COMPILE_STATUS, 1, nullptr, &vsStatus);
-        GLint fsStatus = 0;
-        gl::GetShaderivRobustANGLE(fragmentShader, GL_COMPILE_STATUS, 1, nullptr, &fsStatus);
-        LOG(WebGL, "GraphicsContextGLCVANGLE(%p) - YUV program failed to link: %d, %d, %d.", this, status, vsStatus, fsStatus);
-        return;
-    }
-    contextCleanup.release();
-    yuvVertexBufferCleanup.release();
-    framebufferCleanup.release();
-    m_display = display;
-    m_context = context;
-    m_config = config;
-    m_yuvVertexBuffer = yuvVertexBuffer;
-    m_framebuffer = framebuffer;
-    m_yTextureUniformLocation = gl::GetUniformLocation(yuvProgram, "u_yTexture");
-    m_uvTextureUniformLocation = gl::GetUniformLocation(yuvProgram, "u_uvTexture");
-    m_colorMatrixUniformLocation = gl::GetUniformLocation(yuvProgram, "u_colorMatrix");
-    m_yuvFlipYUniformLocation = gl::GetUniformLocation(yuvProgram, "u_flipY");
-    m_yTextureSizeUniformLocation = gl::GetUniformLocation(yuvProgram, "u_yTextureSize");
-    m_uvTextureSizeUniformLocation = gl::GetUniformLocation(yuvProgram, "u_uvTextureSize");
-    m_yuvPositionAttributeLocation = gl::GetAttribLocation(yuvProgram, "a_position");
-    // Program is deleted by the cleanup while the program binary stays in use.
-    gl::UseProgram(yuvProgram);
-    gl::EnableVertexAttribArray(m_yuvPositionAttributeLocation);
-    gl::VertexAttribPointer(m_yuvPositionAttributeLocation, 2, GL_FLOAT, false, 0, 0);
-    gl::ClearColor(0, 0, 0, 0);
-    gl::BindFramebuffer(GL_FRAMEBUFFER, m_framebuffer);
-}
-
-bool GraphicsContextGLCVANGLE::copyPixelBufferToTexture(CVPixelBufferRef image, PlatformGLObject outputTexture, GLint level, GLenum internalFormat, GLenum format, GLenum type, FlipY flipY)
-{
-    // FIXME: This currently only supports '420v' and '420f' pixel formats. Investigate supporting more pixel formats.
-    OSType pixelFormat = CVPixelBufferGetPixelFormatType(image);
-    if (pixelFormat != kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange
-        && pixelFormat != kCVPixelFormatType_420YpCbCr8BiPlanarFullRange
-#if HAVE(COREVIDEO_COMPRESSED_PIXEL_FORMAT_TYPES)
-        && pixelFormat != kCVPixelFormatType_AGX_420YpCbCr8BiPlanarVideoRange
-        && pixelFormat != kCVPixelFormatType_AGX_420YpCbCr8BiPlanarFullRange
-#endif
-        ) {
-        LOG(WebGL, "GraphicsContextGLCVANGLE::copyVideoTextureToPlatformTexture(%p) - Asked to copy an unsupported pixel format ('%s').", this, FourCC(pixelFormat).toString().utf8().data());
-        return false;
-    }
-    IOSurfaceRef surface = CVPixelBufferGetIOSurface(image);
-    if (!surface)
-        return false;
-
-    auto newSurfaceSeed = IOSurfaceGetSeed(surface);
-    if (flipY == m_lastFlipY
-        && surface == m_lastSurface
-        && newSurfaceSeed == m_lastSurfaceSeed
-        && lastTextureSeed(outputTexture) == m_owner.textureSeed(outputTexture)) {
-        // If the texture hasn't been modified since the last time we copied to it, and the
-        // image hasn't been modified since the last time it was copied, this is a no-op.
-        return true;
-    }
-    if (!m_context || !GraphicsContextGLOpenGL::makeCurrent(m_display, m_context))
-        return false;
-
-    size_t width = CVPixelBufferGetWidth(image);
-    size_t height = CVPixelBufferGetHeight(image);
-
-    gl::Viewport(0, 0, width, height);
-
-    // The outputTexture might contain uninitialized content on early-outs. Clear it in cases
-    // autoClearTextureOnError is not reset.
-    auto autoClearTextureOnError = makeScopeExit([outputTexture, level, internalFormat, format, type] {
-        gl::BindTexture(GL_TEXTURE_2D, outputTexture);
-        gl::TexImage2D(GL_TEXTURE_2D, level, internalFormat, 0, 0, 0, format, type, nullptr);
-        gl::BindTexture(GL_TEXTURE_2D, 0);
-    });
-    // Allocate memory for the output texture.
-    gl::BindTexture(GL_TEXTURE_2D, outputTexture);
-    gl::TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-    gl::TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
-    gl::TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
-    gl::TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-    gl::TexImage2D(GL_TEXTURE_2D, level, internalFormat, width, height, 0, format, type, nullptr);
-
-    gl::FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, outputTexture, level);
-    GLenum status = gl::CheckFramebufferStatus(GL_FRAMEBUFFER);
-    if (status != GL_FRAMEBUFFER_COMPLETE) {
-        LOG(WebGL, "GraphicsContextGLCVANGLE::copyVideoTextureToPlatformTexture(%p) - Unable to create framebuffer for outputTexture.", this);
-        return false;
-    }
-    gl::BindTexture(GL_TEXTURE_2D, 0);
-
-    // Bind and set up the textures for the video source.
-    auto yPlaneWidth = IOSurfaceGetWidthOfPlane(surface, 0);
-    auto yPlaneHeight = IOSurfaceGetHeightOfPlane(surface, 0);
-    auto uvPlaneWidth = IOSurfaceGetWidthOfPlane(surface, 1);
-    auto uvPlaneHeight = IOSurfaceGetHeightOfPlane(surface, 1);
-
-    GLenum videoTextureTarget = m_owner.drawingBufferTextureTarget();
-
-    GLuint uvTexture = 0;
-    gl::GenTextures(1, &uvTexture);
-    auto uvTextureCleanup = makeScopeExit([uvTexture] {
-        gl::DeleteTextures(1, &uvTexture);
-    });
-    gl::ActiveTexture(GL_TEXTURE1);
-    gl::BindTexture(videoTextureTarget, uvTexture);
-    gl::TexParameteri(videoTextureTarget, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-    gl::TexParameteri(videoTextureTarget, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
-    gl::TexParameteri(videoTextureTarget, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
-    gl::TexParameteri(videoTextureTarget, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-    auto uvHandle = WebCore::createPbufferAndAttachIOSurface(m_display, m_config, videoTextureTarget, EGL_IOSURFACE_READ_HINT_ANGLE, GL_RG, uvPlaneWidth, uvPlaneHeight, GL_UNSIGNED_BYTE, surface, 1);
-    if (!uvHandle)
-        return false;
-    auto uvHandleCleanup = makeScopeExit([display = m_display, uvHandle] {
-        WebCore::destroyPbufferAndDetachIOSurface(display, uvHandle);
-    });
-
-    GLuint yTexture = 0;
-    gl::GenTextures(1, &yTexture);
-    auto yTextureCleanup = makeScopeExit([yTexture] {
-        gl::DeleteTextures(1, &yTexture);
-    });
-    gl::ActiveTexture(GL_TEXTURE0);
-    gl::BindTexture(videoTextureTarget, yTexture);
-    gl::TexParameteri(videoTextureTarget, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-    gl::TexParameteri(videoTextureTarget, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
-    gl::TexParameteri(videoTextureTarget, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
-    gl::TexParameteri(videoTextureTarget, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-    auto yHandle = WebCore::createPbufferAndAttachIOSurface(m_display, m_config, videoTextureTarget, EGL_IOSURFACE_READ_HINT_ANGLE, GL_RED, yPlaneWidth, yPlaneHeight, GL_UNSIGNED_BYTE, surface, 0);
-    if (!yHandle)
-        return false;
-    auto yHandleCleanup = makeScopeExit([display = m_display, yHandle] {
-        destroyPbufferAndDetachIOSurface(display, yHandle);
-    });
-
-    // Configure the drawing parameters.
-    gl::Uniform1i(m_yTextureUniformLocation, 0);
-    gl::Uniform1i(m_uvTextureUniformLocation, 1);
-    gl::Uniform1i(m_yuvFlipYUniformLocation, flipY == FlipY::Yes ? 1 : 0);
-    gl::Uniform2f(m_yTextureSizeUniformLocation, yPlaneWidth, yPlaneHeight);
-    gl::Uniform2f(m_uvTextureSizeUniformLocation, uvPlaneWidth, uvPlaneHeight);
-
-    auto range = pixelRangeFromPixelFormat(pixelFormat);
-    auto transferFunction = transferFunctionFromString(dynamic_cf_cast<CFStringRef>(CVBufferGetAttachment(image, kCVImageBufferYCbCrMatrixKey, nil)));
-    auto colorMatrix = YCbCrToRGBMatrixForRangeAndTransferFunction(range, transferFunction);
-    gl::UniformMatrix4fv(m_colorMatrixUniformLocation, 1, GL_FALSE, colorMatrix);
-
-    // Do the actual drawing.
-    gl::DrawArrays(GL_TRIANGLES, 0, 6);
-
-    m_lastSurface = surface;
-    m_lastSurfaceSeed = newSurfaceSeed;
-    m_lastTextureSeed.set(outputTexture, m_owner.textureSeed(outputTexture));
-    m_lastFlipY = flipY;
-    autoClearTextureOnError.release();
-    return true;
-}
-
-}
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscvGraphicsContextGLCVANGLEh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/cv/GraphicsContextGLCVANGLE.h (286292 => 286293)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cv/GraphicsContextGLCVANGLE.h     2021-11-30 14:23:53 UTC (rev 286292)
+++ trunk/Source/WebCore/platform/graphics/cv/GraphicsContextGLCVANGLE.h        2021-11-30 14:54:52 UTC (rev 286293)
</span><span class="lines">@@ -1,82 +0,0 @@
</span><del>-/*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#if ENABLE(WEBGL) && ENABLE(VIDEO) && USE(AVFOUNDATION)
-
-#include "GraphicsContextGLCV.h"
-
-#include <memory>
-#include <wtf/UnsafePointer.h>
-
-namespace WebCore {
-class GraphicsContextGLOpenGL;
-
-// GraphicsContextGLCV implementation for ANGLE flavour of GraphicsContextGLOpenGL.
-// This class is part of the internal implementation of GraphicsContextGLOpenGL for ANGLE Cocoa.
-class GraphicsContextGLCVANGLE final : public GraphicsContextGLCV {
-    WTF_MAKE_FAST_ALLOCATED;
-public:
-    static std::unique_ptr<GraphicsContextGLCVANGLE> create(GraphicsContextGLOpenGL&);
-
-    ~GraphicsContextGLCVANGLE() final;
-
-    bool copyPixelBufferToTexture(CVPixelBufferRef, PlatformGLObject outputTexture, GCGLint level, GCGLenum internalFormat, GCGLenum format, GCGLenum type, FlipY) final;
-
-private:
-    GraphicsContextGLCVANGLE(GraphicsContextGLOpenGL&);
-
-    unsigned lastTextureSeed(GCGLuint texture)
-    {
-        return m_lastTextureSeed.get(texture);
-    }
-
-    GraphicsContextGLOpenGL& m_owner;
-    PlatformGraphicsContextGLDisplay m_display { nullptr };
-    PlatformGraphicsContextGL m_context { nullptr };
-    PlatformGraphicsContextGLConfig m_config { nullptr };
-
-    PlatformGLObject m_framebuffer { 0 };
-    PlatformGLObject m_yuvVertexBuffer { 0 };
-    GCGLint m_yTextureUniformLocation { -1 };
-    GCGLint m_uvTextureUniformLocation { -1 };
-    GCGLint m_yuvFlipYUniformLocation { -1 };
-    GCGLint m_colorMatrixUniformLocation { -1 };
-    GCGLint m_yuvPositionAttributeLocation { -1 };
-    GCGLint m_yTextureSizeUniformLocation { -1 };
-    GCGLint m_uvTextureSizeUniformLocation { -1 };
-
-    FlipY m_lastFlipY { FlipY::No };
-    UnsafePointer<IOSurfaceRef> m_lastSurface;
-    uint32_t m_lastSurfaceSeed { 0 };
-
-    using TextureSeedMap = HashMap<GCGLuint, unsigned, IntHash<GCGLuint>, WTF::UnsignedWithZeroKeyHashTraits<GCGLuint>>;
-    TextureSeedMap m_lastTextureSeed;
-};
-
-}
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscvGraphicsContextGLCVCocoacppfromrev286292trunkSourceWebCoreplatformgraphicscvGraphicsContextGLCVANGLEcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/graphics/cv/GraphicsContextGLCVCocoa.cpp (from rev 286292, trunk/Source/WebCore/platform/graphics/cv/GraphicsContextGLCVANGLE.cpp) (0 => 286293)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cv/GraphicsContextGLCVCocoa.cpp                           (rev 0)
+++ trunk/Source/WebCore/platform/graphics/cv/GraphicsContextGLCVCocoa.cpp      2021-11-30 14:54:52 UTC (rev 286293)
</span><span class="lines">@@ -0,0 +1,689 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "GraphicsContextGLCVCocoa.h"
+
+#if ENABLE(WEBGL) && ENABLE(VIDEO) && USE(AVFOUNDATION)
+
+#include "ANGLEUtilitiesCocoa.h"
+#include "FourCC.h"
+#include "GraphicsContextGLCocoa.h"
+#include "Logging.h"
+#include <pal/spi/cf/CoreVideoSPI.h>
+#include <pal/spi/cocoa/IOSurfaceSPI.h>
+#include <wtf/NeverDestroyed.h>
+#include <wtf/Scope.h>
+#include <wtf/StdMap.h>
+#include <wtf/cf/TypeCastsCF.h>
+#include <wtf/text/StringBuilder.h>
+
+#include "CoreVideoSoftLink.h"
+
+namespace WebCore {
+
+static constexpr auto s_yuvVertexShaderTexture2D {
+    "attribute vec2 a_position;"
+    "uniform vec2 u_yTextureSize;"
+    "uniform vec2 u_uvTextureSize;"
+    "uniform int u_flipY;"
+    "varying vec2 v_yTextureCoordinate;"
+    "varying vec2 v_uvTextureCoordinate;"
+    "void main()"
+    "{"
+    "    gl_Position = vec4(a_position, 0, 1.0);"
+    "    vec2 normalizedPosition = a_position * .5 + .5;"
+    "    if (u_flipY == 1)"
+    "        normalizedPosition.y = 1.0 - normalizedPosition.y;"
+    "    v_yTextureCoordinate = normalizedPosition;"
+    "    v_uvTextureCoordinate = normalizedPosition;"
+    "}"_s
+};
+
+static constexpr auto s_yuvVertexShaderTextureRectangle {
+    "attribute vec2 a_position;"
+    "uniform vec2 u_yTextureSize;"
+    "uniform vec2 u_uvTextureSize;"
+    "uniform int u_flipY;"
+    "varying vec2 v_yTextureCoordinate;"
+    "varying vec2 v_uvTextureCoordinate;"
+    "void main()"
+    "{"
+    "    gl_Position = vec4(a_position, 0, 1.0);"
+    "    vec2 normalizedPosition = a_position * .5 + .5;"
+    "    if (u_flipY == 1)"
+    "        normalizedPosition.y = 1.0 - normalizedPosition.y;"
+    "    v_yTextureCoordinate = normalizedPosition * u_yTextureSize;"
+    "    v_uvTextureCoordinate = normalizedPosition * u_uvTextureSize;"
+    "}"_s
+};
+
+constexpr auto s_yuvFragmentShaderTexture2D {
+    "precision mediump float;"
+    "uniform sampler2D u_yTexture;"
+    "uniform sampler2D u_uvTexture;"
+    "uniform mat4 u_colorMatrix;"
+    "varying vec2 v_yTextureCoordinate;"
+    "varying vec2 v_uvTextureCoordinate;"
+    "void main()"
+    "{"
+    "    vec4 yuv;"
+    "    yuv.r = texture2D(u_yTexture, v_yTextureCoordinate).r;"
+    "    yuv.gb = texture2D(u_uvTexture, v_uvTextureCoordinate).rg;"
+    "    yuv.a = 1.0;"
+    "    gl_FragColor = yuv * u_colorMatrix;"
+    "}"_s
+};
+
+static constexpr auto s_yuvFragmentShaderTextureRectangle {
+    "precision mediump float;"
+    "uniform sampler2DRect u_yTexture;"
+    "uniform sampler2DRect u_uvTexture;"
+    "uniform mat4 u_colorMatrix;"
+    "varying vec2 v_yTextureCoordinate;"
+    "varying vec2 v_uvTextureCoordinate;"
+    "void main()"
+    "{"
+    "    vec4 yuv;"
+    "    yuv.r = texture2DRect(u_yTexture, v_yTextureCoordinate).r;"
+    "    yuv.gb = texture2DRect(u_uvTexture, v_uvTextureCoordinate).rg;"
+    "    yuv.a = 1.0;"
+    "    gl_FragColor = yuv * u_colorMatrix;"
+    "}"_s
+};
+
+enum class PixelRange {
+    Unknown,
+    Video,
+    Full,
+};
+
+enum class TransferFunctionCV {
+    Unknown,
+    kITU_R_709_2,
+    kITU_R_601_4,
+    kSMPTE_240M_1995,
+    kDCI_P3,
+    kP3_D65,
+    kITU_R_2020,
+};
+
+static PixelRange pixelRangeFromPixelFormat(OSType pixelFormat)
+{
+    switch (pixelFormat) {
+    case kCVPixelFormatType_4444AYpCbCr8:
+    case kCVPixelFormatType_4444AYpCbCr16:
+    case kCVPixelFormatType_422YpCbCr_4A_8BiPlanar:
+    case kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange:
+    case kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange:
+    case kCVPixelFormatType_422YpCbCr10BiPlanarVideoRange:
+    case kCVPixelFormatType_444YpCbCr10BiPlanarVideoRange:
+#if HAVE(COREVIDEO_COMPRESSED_PIXEL_FORMAT_TYPES)
+    case kCVPixelFormatType_AGX_420YpCbCr8BiPlanarVideoRange:
+#endif
+        return PixelRange::Video;
+    case kCVPixelFormatType_420YpCbCr8PlanarFullRange:
+    case kCVPixelFormatType_420YpCbCr8BiPlanarFullRange:
+    case kCVPixelFormatType_422YpCbCr8FullRange:
+    case kCVPixelFormatType_ARGB2101010LEPacked:
+    case kCVPixelFormatType_420YpCbCr10BiPlanarFullRange:
+    case kCVPixelFormatType_422YpCbCr10BiPlanarFullRange:
+    case kCVPixelFormatType_444YpCbCr10BiPlanarFullRange:
+#if HAVE(COREVIDEO_COMPRESSED_PIXEL_FORMAT_TYPES)
+    case kCVPixelFormatType_AGX_420YpCbCr8BiPlanarFullRange:
+#endif
+        return PixelRange::Full;
+    default:
+        return PixelRange::Unknown;
+    }
+}
+
+static TransferFunctionCV transferFunctionFromString(CFStringRef string)
+{
+    if (!string)
+        return TransferFunctionCV::Unknown;
+    if (CFEqual(string, kCVImageBufferYCbCrMatrix_ITU_R_709_2))
+        return TransferFunctionCV::kITU_R_709_2;
+    if (CFEqual(string, kCVImageBufferYCbCrMatrix_ITU_R_601_4))
+        return TransferFunctionCV::kITU_R_601_4;
+    if (CFEqual(string, kCVImageBufferYCbCrMatrix_SMPTE_240M_1995))
+        return TransferFunctionCV::kSMPTE_240M_1995;
+    if (canLoad_CoreVideo_kCVImageBufferYCbCrMatrix_DCI_P3() && CFEqual(string, kCVImageBufferYCbCrMatrix_DCI_P3))
+        return TransferFunctionCV::kDCI_P3;
+    if (canLoad_CoreVideo_kCVImageBufferYCbCrMatrix_P3_D65() && CFEqual(string, kCVImageBufferYCbCrMatrix_P3_D65))
+        return TransferFunctionCV::kP3_D65;
+    if (canLoad_CoreVideo_kCVImageBufferYCbCrMatrix_ITU_R_2020() && CFEqual(string, kCVImageBufferYCbCrMatrix_ITU_R_2020))
+        return TransferFunctionCV::kITU_R_2020;
+    return TransferFunctionCV::Unknown;
+}
+
+struct GLfloatColor {
+    union {
+        struct {
+            GLfloat r;
+            GLfloat g;
+            GLfloat b;
+        } rgb;
+        struct {
+            GLfloat y;
+            GLfloat cb;
+            GLfloat cr;
+        } ycbcr;
+    };
+
+    constexpr GLfloatColor(GLfloat r, GLfloat g, GLfloat b)
+        : rgb { r, g, b }
+    {
+    }
+
+    constexpr GLfloatColor(int r, int g, int b, GLfloat scale)
+        : rgb { r / scale, g / scale, b / scale }
+    {
+    }
+
+    static constexpr GLfloat abs(GLfloat value)
+    {
+        return value >= 0 ? value : -value;
+    }
+
+    constexpr bool isApproximatelyEqualTo(const GLfloatColor& color, GLfloat maxDelta) const
+    {
+        return abs(rgb.r - color.rgb.r) < abs(maxDelta)
+            && abs(rgb.g - color.rgb.g) < abs(maxDelta)
+            && abs(rgb.b - color.rgb.b) < abs(maxDelta);
+    }
+};
+
+struct GLfloatColors {
+    static constexpr GLfloatColor black   { 0, 0, 0 };
+    static constexpr GLfloatColor white   { 1, 1, 1 };
+    static constexpr GLfloatColor red     { 1, 0, 0 };
+    static constexpr GLfloatColor green   { 0, 1, 0 };
+    static constexpr GLfloatColor blue    { 0, 0, 1 };
+    static constexpr GLfloatColor cyan    { 0, 1, 1 };
+    static constexpr GLfloatColor magenta { 1, 0, 1 };
+    static constexpr GLfloatColor yellow  { 1, 1, 0 };
+};
+
+struct YCbCrMatrix {
+    GLfloat rows[4][4];
+
+    constexpr YCbCrMatrix(PixelRange, GLfloat cbCoefficient, GLfloat crCoefficient);
+
+    operator const GLfloat*() const
+    {
+        return &rows[0][0];
+    }
+
+    constexpr GLfloatColor operator*(const GLfloatColor&) const;
+};
+
+constexpr YCbCrMatrix::YCbCrMatrix(PixelRange range, GLfloat cbCoefficient, GLfloat crCoefficient)
+    : rows { }
+{
+    // The conversion from YCbCr -> RGB generally takes the form:
+    // Y = Kr * R + Kg * G + Kb * B
+    // Cb = (B - Y) / (2 * (1 - Kb))
+    // Cr = (R - Y) / (2 * (1 - Kr))
+    // Where the values of Kb and Kr are defined in a specification and Kg is derived from: Kr + Kg + Kb = 1
+    //
+    // Solving the above equations for R, B, and G derives the following:
+    // R = Y + (2 * (1 - Kr)) * Cr
+    // B = Y + (2 * (1 - Kb)) * Cb
+    // G = Y - (2 * (1 - Kb)) * (Kb / Kg) * Cb - ((1 - Kr) * 2) * (Kr / Kg) * Cr
+    //
+    // When the color values are Video range, Y has a range of [16, 235] with a width of 219, and Cb & Cr have
+    // a range of [16, 240] with a width of 224. When the color values are Full range, Y, Cb, and Cr all have
+    // a range of [0, 255] with a width of 256.
+
+    GLfloat cgCoefficient = 1 - cbCoefficient - crCoefficient;
+    GLfloat yScalingFactor = range == PixelRange::Full ? 1.f : 255.f / 219.f;
+    GLfloat cbcrScalingFactor = range == PixelRange::Full ? 1.f : 255.f / 224.f;
+
+    rows[0][0] = yScalingFactor;
+    rows[0][1] = 0;
+    rows[0][2] = cbcrScalingFactor * 2 * (1 - crCoefficient);
+    rows[0][3] = 0;
+
+    rows[1][0] = yScalingFactor;
+    rows[1][1] = -cbcrScalingFactor * 2 * (1 - cbCoefficient) * (cbCoefficient / cgCoefficient);
+    rows[1][2] = -cbcrScalingFactor * 2 * (1 - crCoefficient) * (crCoefficient / cgCoefficient);
+    rows[1][3] = 0;
+
+    rows[2][0] = yScalingFactor;
+    rows[2][1] = cbcrScalingFactor * 2 * (1 - cbCoefficient);
+    rows[2][2] = 0;
+    rows[2][3] = 0;
+
+    rows[3][0] = 0;
+    rows[3][1] = 0;
+    rows[3][2] = 0;
+    rows[3][3] = 1;
+
+    // Configure the final column of the matrix to convert Cb and Cr to [-128, 128]
+    // and, in the case of video-range, to convert Y to [16, 240]:
+    for (auto rowNumber = 0; rowNumber < 3; ++rowNumber) {
+        auto& row = rows[rowNumber];
+        auto& x = row[0];
+        auto& y = row[1];
+        auto& z = row[2];
+        auto& w = row[3];
+
+        w -= (y + z) * 128 / 255;
+        if (range == PixelRange::Video)
+            w -= x * 16 / 255;
+    }
+}
+
+constexpr GLfloatColor YCbCrMatrix::operator*(const GLfloatColor& color) const
+{
+    return GLfloatColor(
+        rows[0][0] * color.rgb.r + rows[0][1] * color.rgb.g + rows[0][2] * color.rgb.b + rows[0][3],
+        rows[1][0] * color.rgb.r + rows[1][1] * color.rgb.g + rows[1][2] * color.rgb.b + rows[1][3],
+        rows[2][0] * color.rgb.r + rows[2][1] * color.rgb.g + rows[2][2] * color.rgb.b + rows[2][3]
+    );
+}
+
+static const GLfloat* YCbCrToRGBMatrixForRangeAndTransferFunction(PixelRange range, TransferFunctionCV transferFunction)
+{
+    using MapKey = std::pair<PixelRange, TransferFunctionCV>;
+    using MatrixMap = StdMap<MapKey, const YCbCrMatrix&>;
+
+    static NeverDestroyed<MatrixMap> matrices;
+    static dispatch_once_t onceToken;
+
+    // Matrices are derived from the components in the ITU R.601 rev 4 specification
+    // https://www.itu.int/rec/R-REC-BT.601
+    constexpr static YCbCrMatrix r601VideoMatrix { PixelRange::Video, 0.114f, 0.299f };
+    constexpr static YCbCrMatrix r601FullMatrix { PixelRange::Full, 0.114f, 0.299f };
+
+    static_assert((r601VideoMatrix * GLfloatColor(16,  128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::black,   1.5f / 255.f), "r.610 video matrix does not produce black color");
+    static_assert((r601VideoMatrix * GLfloatColor(235, 128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::white,   1.5f / 255.f), "r.610 video matrix does not produce white color");
+    static_assert((r601VideoMatrix * GLfloatColor(81,  90,  240, 255)).isApproximatelyEqualTo(GLfloatColors::red,     1.5f / 255.f), "r.610 video matrix does not produce red color");
+    static_assert((r601VideoMatrix * GLfloatColor(145, 54,  34,  255)).isApproximatelyEqualTo(GLfloatColors::green,   1.5f / 255.f), "r.610 video matrix does not produce green color");
+    static_assert((r601VideoMatrix * GLfloatColor(41,  240, 110, 255)).isApproximatelyEqualTo(GLfloatColors::blue,    1.5f / 255.f), "r.610 video matrix does not produce blue color");
+    static_assert((r601VideoMatrix * GLfloatColor(210, 16,  146, 255)).isApproximatelyEqualTo(GLfloatColors::yellow,  1.5f / 255.f), "r.610 video matrix does not produce yellow color");
+    static_assert((r601VideoMatrix * GLfloatColor(106, 202, 222, 255)).isApproximatelyEqualTo(GLfloatColors::magenta, 1.5f / 255.f), "r.610 video matrix does not produce magenta color");
+    static_assert((r601VideoMatrix * GLfloatColor(170, 166, 16,  255)).isApproximatelyEqualTo(GLfloatColors::cyan,    1.5f / 255.f), "r.610 video matrix does not produce cyan color");
+
+    static_assert((r601FullMatrix * GLfloatColor(0,   128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::black,   1.5f / 255.f), "r.610 full matrix does not produce black color");
+    static_assert((r601FullMatrix * GLfloatColor(255, 128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::white,   1.5f / 255.f), "r.610 full matrix does not produce white color");
+    static_assert((r601FullMatrix * GLfloatColor(76,  85,  255, 255)).isApproximatelyEqualTo(GLfloatColors::red,     1.5f / 255.f), "r.610 full matrix does not produce red color");
+    static_assert((r601FullMatrix * GLfloatColor(150, 44,  21,  255)).isApproximatelyEqualTo(GLfloatColors::green,   1.5f / 255.f), "r.610 full matrix does not produce green color");
+    static_assert((r601FullMatrix * GLfloatColor(29,  255, 107, 255)).isApproximatelyEqualTo(GLfloatColors::blue,    1.5f / 255.f), "r.610 full matrix does not produce blue color");
+    static_assert((r601FullMatrix * GLfloatColor(226, 0,   149, 255)).isApproximatelyEqualTo(GLfloatColors::yellow,  1.5f / 255.f), "r.610 full matrix does not produce yellow color");
+    static_assert((r601FullMatrix * GLfloatColor(105, 212, 235, 255)).isApproximatelyEqualTo(GLfloatColors::magenta, 1.5f / 255.f), "r.610 full matrix does not produce magenta color");
+    static_assert((r601FullMatrix * GLfloatColor(179, 171, 1,   255)).isApproximatelyEqualTo(GLfloatColors::cyan,    1.5f / 255.f), "r.610 full matrix does not produce cyan color");
+
+    // Matrices are derived from the components in the ITU R.709 rev 2 specification
+    // https://www.itu.int/rec/R-REC-BT.709-2-199510-S
+    constexpr static YCbCrMatrix r709VideoMatrix { PixelRange::Video, 0.0722, 0.2126 };
+    constexpr static YCbCrMatrix r709FullMatrix { PixelRange::Full, 0.0722, 0.2126 };
+
+    static_assert((r709VideoMatrix * GLfloatColor(16,  128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::black,   1.5f / 255.f), "r.709 video matrix does not produce black color");
+    static_assert((r709VideoMatrix * GLfloatColor(235, 128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::white,   1.5f / 255.f), "r.709 video matrix does not produce white color");
+    static_assert((r709VideoMatrix * GLfloatColor(63,  102, 240, 255)).isApproximatelyEqualTo(GLfloatColors::red,     1.5f / 255.f), "r.709 video matrix does not produce red color");
+    static_assert((r709VideoMatrix * GLfloatColor(173, 42,  26,  255)).isApproximatelyEqualTo(GLfloatColors::green,   1.5f / 255.f), "r.709 video matrix does not produce green color");
+    static_assert((r709VideoMatrix * GLfloatColor(32,  240, 118, 255)).isApproximatelyEqualTo(GLfloatColors::blue,    1.5f / 255.f), "r.709 video matrix does not produce blue color");
+    static_assert((r709VideoMatrix * GLfloatColor(219, 16,  138, 255)).isApproximatelyEqualTo(GLfloatColors::yellow,  1.5f / 255.f), "r.709 video matrix does not produce yellow color");
+    static_assert((r709VideoMatrix * GLfloatColor(78,  214, 230, 255)).isApproximatelyEqualTo(GLfloatColors::magenta, 1.5f / 255.f), "r.709 video matrix does not produce magenta color");
+    static_assert((r709VideoMatrix * GLfloatColor(188, 154, 16,  255)).isApproximatelyEqualTo(GLfloatColors::cyan,    1.5f / 255.f), "r.709 video matrix does not produce cyan color");
+
+    static_assert((r709FullMatrix * GLfloatColor(0,   128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::black,   1.5f / 255.f), "r.709 full matrix does not produce black color");
+    static_assert((r709FullMatrix * GLfloatColor(255, 128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::white,   1.5f / 255.f), "r.709 full matrix does not produce white color");
+    static_assert((r709FullMatrix * GLfloatColor(54,  99,  256, 255)).isApproximatelyEqualTo(GLfloatColors::red,     1.5f / 255.f), "r.709 full matrix does not produce red color");
+    static_assert((r709FullMatrix * GLfloatColor(182, 30,  12,  255)).isApproximatelyEqualTo(GLfloatColors::green,   1.5f / 255.f), "r.709 full matrix does not produce green color");
+    static_assert((r709FullMatrix * GLfloatColor(18,  256, 116, 255)).isApproximatelyEqualTo(GLfloatColors::blue,    1.5f / 255.f), "r.709 full matrix does not produce blue color");
+    static_assert((r709FullMatrix * GLfloatColor(237, 1,   140, 255)).isApproximatelyEqualTo(GLfloatColors::yellow,  1.5f / 255.f), "r.709 full matrix does not produce yellow color");
+    static_assert((r709FullMatrix * GLfloatColor(73,  226, 244, 255)).isApproximatelyEqualTo(GLfloatColors::magenta, 1.5f / 255.f), "r.709 full matrix does not produce magenta color");
+    static_assert((r709FullMatrix * GLfloatColor(201, 157, 1,   255)).isApproximatelyEqualTo(GLfloatColors::cyan,    1.5f / 255.f), "r.709 full matrix does not produce cyan color");
+
+    // Matrices are derived from the components in the ITU-R BT.2020-2 specification
+    // https://www.itu.int/rec/R-REC-BT.2020
+    constexpr static YCbCrMatrix bt2020VideoMatrix { PixelRange::Video, 0.0593, 0.2627 };
+    constexpr static YCbCrMatrix bt2020FullMatrix { PixelRange::Full, 0.0593, 0.2627 };
+
+    static_assert((bt2020VideoMatrix * GLfloatColor(16,  128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::black,   1.5f / 255.f), "bt.2020 video matrix does not produce black color");
+    static_assert((bt2020VideoMatrix * GLfloatColor(235, 128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::white,   1.5f / 255.f), "bt.2020 video matrix does not produce white color");
+    static_assert((bt2020VideoMatrix * GLfloatColor(74,  97,  240, 255)).isApproximatelyEqualTo(GLfloatColors::red,     1.5f / 255.f), "bt.2020 video matrix does not produce red color");
+    static_assert((bt2020VideoMatrix * GLfloatColor(164, 47,  25,  255)).isApproximatelyEqualTo(GLfloatColors::green,   1.5f / 255.f), "bt.2020 video matrix does not produce green color");
+    static_assert((bt2020VideoMatrix * GLfloatColor(29,  240, 119, 255)).isApproximatelyEqualTo(GLfloatColors::blue,    1.5f / 255.f), "bt.2020 video matrix does not produce blue color");
+    static_assert((bt2020VideoMatrix * GLfloatColor(222, 16,  137, 255)).isApproximatelyEqualTo(GLfloatColors::yellow,  1.5f / 255.f), "bt.2020 video matrix does not produce yellow color");
+    static_assert((bt2020VideoMatrix * GLfloatColor(87,  209, 231, 255)).isApproximatelyEqualTo(GLfloatColors::magenta, 1.5f / 255.f), "bt.2020 video matrix does not produce magenta color");
+    static_assert((bt2020VideoMatrix * GLfloatColor(177, 159, 16,  255)).isApproximatelyEqualTo(GLfloatColors::cyan,    1.5f / 255.f), "bt.2020 video matrix does not produce cyan color");
+
+    static_assert((bt2020FullMatrix * GLfloatColor(0,   128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::black,   1.5f / 255.f), "bt.2020 full matrix does not produce black color");
+    static_assert((bt2020FullMatrix * GLfloatColor(255, 128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::white,   1.5f / 255.f), "bt.2020 full matrix does not produce white color");
+    static_assert((bt2020FullMatrix * GLfloatColor(67,  92,  256, 255)).isApproximatelyEqualTo(GLfloatColors::red,     1.5f / 255.f), "bt.2020 full matrix does not produce red color");
+    static_assert((bt2020FullMatrix * GLfloatColor(173, 36,  11,  255)).isApproximatelyEqualTo(GLfloatColors::green,   1.5f / 255.f), "bt.2020 full matrix does not produce green color");
+    static_assert((bt2020FullMatrix * GLfloatColor(15,  256, 118, 255)).isApproximatelyEqualTo(GLfloatColors::blue,    1.5f / 255.f), "bt.2020 full matrix does not produce blue color");
+    static_assert((bt2020FullMatrix * GLfloatColor(240, 0,   138, 255)).isApproximatelyEqualTo(GLfloatColors::yellow,  1.5f / 255.f), "bt.2020 full matrix does not produce yellow color");
+    static_assert((bt2020FullMatrix * GLfloatColor(82,  220, 245, 255)).isApproximatelyEqualTo(GLfloatColors::magenta, 1.5f / 255.f), "bt.2020 full matrix does not produce magenta color");
+    static_assert((bt2020FullMatrix * GLfloatColor(188, 164, 1,   255)).isApproximatelyEqualTo(GLfloatColors::cyan,    1.5f / 255.f), "bt.2020 full matrix does not produce cyan color");
+
+    // Matrices are derived from the components in the SMPTE 240M-1999 specification
+    // http://ieeexplore.ieee.org/document/7291461/
+    constexpr static YCbCrMatrix smpte240MVideoMatrix { PixelRange::Video, 0.087, 0.212 };
+    constexpr static YCbCrMatrix smpte240MFullMatrix { PixelRange::Full, 0.087, 0.212 };
+
+    static_assert((smpte240MVideoMatrix * GLfloatColor(16,  128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::black,   1.5f / 255.f), "SMPTE 240M video matrix does not produce black color");
+    static_assert((smpte240MVideoMatrix * GLfloatColor(235, 128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::white,   1.5f / 255.f), "SMPTE 240M video matrix does not produce white color");
+    static_assert((smpte240MVideoMatrix * GLfloatColor(62,  102, 240, 255)).isApproximatelyEqualTo(GLfloatColors::red,     1.5f / 255.f), "SMPTE 240M video matrix does not produce red color");
+    static_assert((smpte240MVideoMatrix * GLfloatColor(170, 42,  28,  255)).isApproximatelyEqualTo(GLfloatColors::green,   1.5f / 255.f), "SMPTE 240M video matrix does not produce green color");
+    static_assert((smpte240MVideoMatrix * GLfloatColor(35,  240, 116, 255)).isApproximatelyEqualTo(GLfloatColors::blue,    1.5f / 255.f), "SMPTE 240M video matrix does not produce blue color");
+    static_assert((smpte240MVideoMatrix * GLfloatColor(216, 16,  140, 255)).isApproximatelyEqualTo(GLfloatColors::yellow,  1.5f / 255.f), "SMPTE 240M video matrix does not produce yellow color");
+    static_assert((smpte240MVideoMatrix * GLfloatColor(81,  214, 228, 255)).isApproximatelyEqualTo(GLfloatColors::magenta, 1.5f / 255.f), "SMPTE 240M video matrix does not produce magenta color");
+    static_assert((smpte240MVideoMatrix * GLfloatColor(189, 154, 16,  255)).isApproximatelyEqualTo(GLfloatColors::cyan,    1.5f / 255.f), "SMPTE 240M video matrix does not produce cyan color");
+
+    static_assert((smpte240MFullMatrix * GLfloatColor(0,   128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::black,   1.5f / 255.f), "SMPTE 240M full matrix does not produce black color");
+    static_assert((smpte240MFullMatrix * GLfloatColor(255, 128, 128, 255)).isApproximatelyEqualTo(GLfloatColors::white,   1.5f / 255.f), "SMPTE 240M full matrix does not produce white color");
+    static_assert((smpte240MFullMatrix * GLfloatColor(54,  98,  256, 255)).isApproximatelyEqualTo(GLfloatColors::red,     1.5f / 255.f), "SMPTE 240M full matrix does not produce red color");
+    static_assert((smpte240MFullMatrix * GLfloatColor(179, 30,  15,  255)).isApproximatelyEqualTo(GLfloatColors::green,   1.5f / 255.f), "SMPTE 240M full matrix does not produce green color");
+    static_assert((smpte240MFullMatrix * GLfloatColor(22,  256, 114, 255)).isApproximatelyEqualTo(GLfloatColors::blue,    1.5f / 255.f), "SMPTE 240M full matrix does not produce blue color");
+    static_assert((smpte240MFullMatrix * GLfloatColor(233, 1,   142, 255)).isApproximatelyEqualTo(GLfloatColors::yellow,  1.5f / 255.f), "SMPTE 240M full matrix does not produce yellow color");
+    static_assert((smpte240MFullMatrix * GLfloatColor(76,  226, 241, 255)).isApproximatelyEqualTo(GLfloatColors::magenta, 1.5f / 255.f), "SMPTE 240M full matrix does not produce magenta color");
+    static_assert((smpte240MFullMatrix * GLfloatColor(201, 158, 1,   255)).isApproximatelyEqualTo(GLfloatColors::cyan,    1.5f / 255.f), "SMPTE 240M full matrix does not produce cyan color");
+
+    dispatch_once(&onceToken, ^{
+        matrices.get().emplace(MapKey(PixelRange::Video, TransferFunctionCV::kITU_R_601_4), r601VideoMatrix);
+        matrices.get().emplace(MapKey(PixelRange::Full, TransferFunctionCV::kITU_R_601_4), r601FullMatrix);
+        matrices.get().emplace(MapKey(PixelRange::Video, TransferFunctionCV::kITU_R_709_2), r709VideoMatrix);
+        matrices.get().emplace(MapKey(PixelRange::Full, TransferFunctionCV::kITU_R_709_2), r709FullMatrix);
+        matrices.get().emplace(MapKey(PixelRange::Video, TransferFunctionCV::kITU_R_2020), bt2020VideoMatrix);
+        matrices.get().emplace(MapKey(PixelRange::Full, TransferFunctionCV::kITU_R_2020), bt2020FullMatrix);
+        matrices.get().emplace(MapKey(PixelRange::Video, TransferFunctionCV::kSMPTE_240M_1995), smpte240MVideoMatrix);
+        matrices.get().emplace(MapKey(PixelRange::Full, TransferFunctionCV::kSMPTE_240M_1995), smpte240MFullMatrix);
+    });
+
+    // We should never be asked to handle a Pixel Format whose range value is unknown.
+    ASSERT(range != PixelRange::Unknown);
+    if (range == PixelRange::Unknown)
+        range = PixelRange::Full;
+
+    auto iterator = matrices.get().find({ range, transferFunction });
+
+    // Assume unknown transfer functions are r.601:
+    if (iterator == matrices.get().end())
+        iterator = matrices.get().find({ range, TransferFunctionCV::kITU_R_601_4 });
+
+    ASSERT(iterator != matrices.get().end());
+    return iterator->second;
+}
+
+std::unique_ptr<GraphicsContextGLCVCocoa> GraphicsContextGLCVCocoa::create(GraphicsContextGLCocoa& context)
+{
+    std::unique_ptr<GraphicsContextGLCVCocoa> cv { new GraphicsContextGLCVCocoa(context) };
+    if (!cv->m_context)
+        return nullptr;
+    return cv;
+}
+
+GraphicsContextGLCVCocoa::~GraphicsContextGLCVCocoa()
+{
+    if (!m_context || !GraphicsContextGLCocoa::makeCurrent(m_display, m_context))
+        return;
+    gl::DeleteBuffers(1, &m_yuvVertexBuffer);
+    gl::DeleteFramebuffers(1, &m_framebuffer);
+    EGL_DestroyContext(m_display, m_context);
+}
+
+GraphicsContextGLCVCocoa::GraphicsContextGLCVCocoa(GraphicsContextGLCocoa& owner)
+    : m_owner(owner)
+{
+    // Create compatible context that shares state with owner, but one that does not
+    // have robustness or WebGL compatibility.
+    const EGLint contextAttributes[] = {
+        EGL_CONTEXT_CLIENT_VERSION,
+        owner.m_isForWebGL2 ? 3 : 2,
+        EGL_CONTEXT_OPENGL_BACKWARDS_COMPATIBLE_ANGLE,
+        EGL_FALSE,
+        EGL_CONTEXT_CLIENT_ARRAYS_ENABLED_ANGLE,
+        EGL_FALSE,
+        EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM,
+        EGL_FALSE,
+        EGL_NONE
+    };
+    EGLDisplay display = owner.platformDisplay();
+    EGLConfig config = owner.platformConfig();
+    EGLContext context = EGL_CreateContext(display, config, owner.m_contextObj, contextAttributes);
+    if (context == EGL_NO_CONTEXT)
+        return;
+    GraphicsContextGLCocoa::makeCurrent(display, context);
+
+    auto contextCleanup = makeScopeExit([display, context] {
+        GraphicsContextGLCocoa::makeCurrent(display, EGL_NO_CONTEXT);
+        EGL_DestroyContext(display, context);
+    });
+
+    const bool useTexture2D = m_owner.drawingBufferTextureTarget() == GL_TEXTURE_2D;
+
+#if PLATFORM(MAC) || PLATFORM(MACCATALYST)
+    if (!useTexture2D) {
+        gl::RequestExtensionANGLE("GL_ANGLE_texture_rectangle");
+        gl::RequestExtensionANGLE("GL_EXT_texture_format_BGRA8888");
+        if (gl::GetError() != GL_NO_ERROR)
+            return;
+    }
+#endif
+
+    GLint vertexShader = gl::CreateShader(GL_VERTEX_SHADER);
+    GLint fragmentShader = gl::CreateShader(GL_FRAGMENT_SHADER);
+    GLuint yuvProgram = gl::CreateProgram();
+    auto programCleanup = makeScopeExit([vertexShader, fragmentShader, yuvProgram] {
+        gl::DeleteShader(vertexShader);
+        gl::DeleteShader(fragmentShader);
+        gl::DeleteProgram(yuvProgram);
+    });
+    // These are written so strlen might be compile-time.
+    GLint vsLength = useTexture2D ? s_yuvVertexShaderTexture2D.length() : s_yuvVertexShaderTextureRectangle.length();
+    GLint fsLength = useTexture2D ? s_yuvFragmentShaderTexture2D.length() : s_yuvFragmentShaderTextureRectangle.length();
+    const char* vertexShaderSource = useTexture2D ? s_yuvVertexShaderTexture2D : s_yuvVertexShaderTextureRectangle;
+    const char* fragmentShaderSource = useTexture2D ? s_yuvFragmentShaderTexture2D : s_yuvFragmentShaderTextureRectangle;
+
+    gl::ShaderSource(vertexShader, 1, &vertexShaderSource, &vsLength);
+    gl::ShaderSource(fragmentShader, 1, &fragmentShaderSource, &fsLength);
+    gl::CompileShader(vertexShader);
+    gl::CompileShader(fragmentShader);
+    gl::AttachShader(yuvProgram, vertexShader);
+    gl::AttachShader(yuvProgram, fragmentShader);
+    gl::LinkProgram(yuvProgram);
+    // Link status is checked afterwards for theoretical parallel compilation benefit.
+
+    GLuint yuvVertexBuffer = 0;
+    gl::GenBuffers(1, &yuvVertexBuffer);
+    auto yuvVertexBufferCleanup = makeScopeExit([yuvVertexBuffer] {
+        gl::DeleteBuffers(1, &yuvVertexBuffer);
+    });
+    float vertices[12] = { -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1 };
+    gl::BindBuffer(GL_ARRAY_BUFFER, yuvVertexBuffer);
+    gl::BufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);
+
+    GLuint framebuffer = 0;
+    gl::GenFramebuffers(1, &framebuffer);
+    auto framebufferCleanup = makeScopeExit([framebuffer] {
+        gl::DeleteFramebuffers(1, &framebuffer);
+    });
+
+    GLint status = 0;
+    gl::GetProgramivRobustANGLE(yuvProgram, GL_LINK_STATUS, 1, nullptr, &status);
+    if (!status) {
+        GLint vsStatus = 0;
+        gl::GetShaderivRobustANGLE(vertexShader, GL_COMPILE_STATUS, 1, nullptr, &vsStatus);
+        GLint fsStatus = 0;
+        gl::GetShaderivRobustANGLE(fragmentShader, GL_COMPILE_STATUS, 1, nullptr, &fsStatus);
+        LOG(WebGL, "GraphicsContextGLCVCocoa(%p) - YUV program failed to link: %d, %d, %d.", this, status, vsStatus, fsStatus);
+        return;
+    }
+    contextCleanup.release();
+    yuvVertexBufferCleanup.release();
+    framebufferCleanup.release();
+    m_display = display;
+    m_context = context;
+    m_config = config;
+    m_yuvVertexBuffer = yuvVertexBuffer;
+    m_framebuffer = framebuffer;
+    m_yTextureUniformLocation = gl::GetUniformLocation(yuvProgram, "u_yTexture");
+    m_uvTextureUniformLocation = gl::GetUniformLocation(yuvProgram, "u_uvTexture");
+    m_colorMatrixUniformLocation = gl::GetUniformLocation(yuvProgram, "u_colorMatrix");
+    m_yuvFlipYUniformLocation = gl::GetUniformLocation(yuvProgram, "u_flipY");
+    m_yTextureSizeUniformLocation = gl::GetUniformLocation(yuvProgram, "u_yTextureSize");
+    m_uvTextureSizeUniformLocation = gl::GetUniformLocation(yuvProgram, "u_uvTextureSize");
+    m_yuvPositionAttributeLocation = gl::GetAttribLocation(yuvProgram, "a_position");
+    // Program is deleted by the cleanup while the program binary stays in use.
+    gl::UseProgram(yuvProgram);
+    gl::EnableVertexAttribArray(m_yuvPositionAttributeLocation);
+    gl::VertexAttribPointer(m_yuvPositionAttributeLocation, 2, GL_FLOAT, false, 0, 0);
+    gl::ClearColor(0, 0, 0, 0);
+    gl::BindFramebuffer(GL_FRAMEBUFFER, m_framebuffer);
+}
+
+bool GraphicsContextGLCVCocoa::copyPixelBufferToTexture(CVPixelBufferRef image, PlatformGLObject outputTexture, GLint level, GLenum internalFormat, GLenum format, GLenum type, FlipY flipY)
+{
+    // FIXME: This currently only supports '420v' and '420f' pixel formats. Investigate supporting more pixel formats.
+    OSType pixelFormat = CVPixelBufferGetPixelFormatType(image);
+    if (pixelFormat != kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange // NOLINT
+        && pixelFormat != kCVPixelFormatType_420YpCbCr8BiPlanarFullRange
+#if HAVE(COREVIDEO_COMPRESSED_PIXEL_FORMAT_TYPES)
+        && pixelFormat != kCVPixelFormatType_AGX_420YpCbCr8BiPlanarVideoRange
+        && pixelFormat != kCVPixelFormatType_AGX_420YpCbCr8BiPlanarFullRange
+#endif
+        ) {
+        LOG(WebGL, "GraphicsContextGLCVCocoa::copyVideoTextureToPlatformTexture(%p) - Asked to copy an unsupported pixel format ('%s').", this, FourCC(pixelFormat).toString().utf8().data());
+        return false;
+    }
+    IOSurfaceRef surface = CVPixelBufferGetIOSurface(image);
+    if (!surface)
+        return false;
+
+    auto newSurfaceSeed = IOSurfaceGetSeed(surface);
+    if (flipY == m_lastFlipY
+        && surface == m_lastSurface
+        && newSurfaceSeed == m_lastSurfaceSeed
+        && lastTextureSeed(outputTexture) == m_owner.textureSeed(outputTexture)) {
+        // If the texture hasn't been modified since the last time we copied to it, and the
+        // image hasn't been modified since the last time it was copied, this is a no-op.
+        return true;
+    }
+    if (!m_context || !GraphicsContextGLCocoa::makeCurrent(m_display, m_context))
+        return false;
+
+    size_t width = CVPixelBufferGetWidth(image);
+    size_t height = CVPixelBufferGetHeight(image);
+
+    gl::Viewport(0, 0, width, height);
+
+    // The outputTexture might contain uninitialized content on early-outs. Clear it in cases
+    // autoClearTextureOnError is not reset.
+    auto autoClearTextureOnError = makeScopeExit([outputTexture, level, internalFormat, format, type] {
+        gl::BindTexture(GL_TEXTURE_2D, outputTexture);
+        gl::TexImage2D(GL_TEXTURE_2D, level, internalFormat, 0, 0, 0, format, type, nullptr);
+        gl::BindTexture(GL_TEXTURE_2D, 0);
+    });
+    // Allocate memory for the output texture.
+    gl::BindTexture(GL_TEXTURE_2D, outputTexture);
+    gl::TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+    gl::TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+    gl::TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+    gl::TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+    gl::TexImage2D(GL_TEXTURE_2D, level, internalFormat, width, height, 0, format, type, nullptr);
+
+    gl::FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, outputTexture, level);
+    GLenum status = gl::CheckFramebufferStatus(GL_FRAMEBUFFER);
+    if (status != GL_FRAMEBUFFER_COMPLETE) {
+        LOG(WebGL, "GraphicsContextGLCVCocoa::copyVideoTextureToPlatformTexture(%p) - Unable to create framebuffer for outputTexture.", this);
+        return false;
+    }
+    gl::BindTexture(GL_TEXTURE_2D, 0);
+
+    // Bind and set up the textures for the video source.
+    auto yPlaneWidth = IOSurfaceGetWidthOfPlane(surface, 0);
+    auto yPlaneHeight = IOSurfaceGetHeightOfPlane(surface, 0);
+    auto uvPlaneWidth = IOSurfaceGetWidthOfPlane(surface, 1);
+    auto uvPlaneHeight = IOSurfaceGetHeightOfPlane(surface, 1);
+
+    GLenum videoTextureTarget = m_owner.drawingBufferTextureTarget();
+
+    GLuint uvTexture = 0;
+    gl::GenTextures(1, &uvTexture);
+    auto uvTextureCleanup = makeScopeExit([uvTexture] {
+        gl::DeleteTextures(1, &uvTexture);
+    });
+    gl::ActiveTexture(GL_TEXTURE1);
+    gl::BindTexture(videoTextureTarget, uvTexture);
+    gl::TexParameteri(videoTextureTarget, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+    gl::TexParameteri(videoTextureTarget, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+    gl::TexParameteri(videoTextureTarget, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+    gl::TexParameteri(videoTextureTarget, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+    auto uvHandle = WebCore::createPbufferAndAttachIOSurface(m_display, m_config, videoTextureTarget, EGL_IOSURFACE_READ_HINT_ANGLE, GL_RG, uvPlaneWidth, uvPlaneHeight, GL_UNSIGNED_BYTE, surface, 1);
+    if (!uvHandle)
+        return false;
+    auto uvHandleCleanup = makeScopeExit([display = m_display, uvHandle] {
+        WebCore::destroyPbufferAndDetachIOSurface(display, uvHandle);
+    });
+
+    GLuint yTexture = 0;
+    gl::GenTextures(1, &yTexture);
+    auto yTextureCleanup = makeScopeExit([yTexture] {
+        gl::DeleteTextures(1, &yTexture);
+    });
+    gl::ActiveTexture(GL_TEXTURE0);
+    gl::BindTexture(videoTextureTarget, yTexture);
+    gl::TexParameteri(videoTextureTarget, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+    gl::TexParameteri(videoTextureTarget, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+    gl::TexParameteri(videoTextureTarget, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+    gl::TexParameteri(videoTextureTarget, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+    auto yHandle = WebCore::createPbufferAndAttachIOSurface(m_display, m_config, videoTextureTarget, EGL_IOSURFACE_READ_HINT_ANGLE, GL_RED, yPlaneWidth, yPlaneHeight, GL_UNSIGNED_BYTE, surface, 0);
+    if (!yHandle)
+        return false;
+    auto yHandleCleanup = makeScopeExit([display = m_display, yHandle] {
+        destroyPbufferAndDetachIOSurface(display, yHandle);
+    });
+
+    // Configure the drawing parameters.
+    gl::Uniform1i(m_yTextureUniformLocation, 0);
+    gl::Uniform1i(m_uvTextureUniformLocation, 1);
+    gl::Uniform1i(m_yuvFlipYUniformLocation, flipY == FlipY::Yes ? 1 : 0);
+    gl::Uniform2f(m_yTextureSizeUniformLocation, yPlaneWidth, yPlaneHeight);
+    gl::Uniform2f(m_uvTextureSizeUniformLocation, uvPlaneWidth, uvPlaneHeight);
+
+    auto range = pixelRangeFromPixelFormat(pixelFormat);
+    auto transferFunction = transferFunctionFromString(dynamic_cf_cast<CFStringRef>(CVBufferGetAttachment(image, kCVImageBufferYCbCrMatrixKey, nil)));
+    auto colorMatrix = YCbCrToRGBMatrixForRangeAndTransferFunction(range, transferFunction);
+    gl::UniformMatrix4fv(m_colorMatrixUniformLocation, 1, GL_FALSE, colorMatrix);
+
+    // Do the actual drawing.
+    gl::DrawArrays(GL_TRIANGLES, 0, 6);
+
+    m_lastSurface = surface;
+    m_lastSurfaceSeed = newSurfaceSeed;
+    m_lastTextureSeed.set(outputTexture, m_owner.textureSeed(outputTexture));
+    m_lastFlipY = flipY;
+    autoClearTextureOnError.release();
+    return true;
+}
+
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscvGraphicsContextGLCVCocoahfromrev286292trunkSourceWebCoreplatformgraphicscvGraphicsContextGLCVANGLEh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/graphics/cv/GraphicsContextGLCVCocoa.h (from rev 286292, trunk/Source/WebCore/platform/graphics/cv/GraphicsContextGLCVANGLE.h) (0 => 286293)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cv/GraphicsContextGLCVCocoa.h                             (rev 0)
+++ trunk/Source/WebCore/platform/graphics/cv/GraphicsContextGLCVCocoa.h        2021-11-30 14:54:52 UTC (rev 286293)
</span><span class="lines">@@ -0,0 +1,82 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(WEBGL) && ENABLE(VIDEO) && USE(AVFOUNDATION)
+
+#include "GraphicsContextGLCV.h"
+
+#include <memory>
+#include <wtf/UnsafePointer.h>
+
+namespace WebCore {
+class GraphicsContextGLCocoa;
+
+// GraphicsContextGLCV implementation for GraphicsContextGLCocoa.
+// This class is part of the internal implementation of GraphicsContextGLCocoa.
+class GraphicsContextGLCVCocoa final : public GraphicsContextGLCV {
+    WTF_MAKE_FAST_ALLOCATED;
+public:
+    static std::unique_ptr<GraphicsContextGLCVCocoa> create(GraphicsContextGLCocoa&);
+
+    ~GraphicsContextGLCVCocoa() final;
+
+    bool copyPixelBufferToTexture(CVPixelBufferRef, PlatformGLObject outputTexture, GCGLint level, GCGLenum internalFormat, GCGLenum format, GCGLenum type, FlipY) final;
+
+private:
+    GraphicsContextGLCVCocoa(GraphicsContextGLCocoa&);
+
+    unsigned lastTextureSeed(GCGLuint texture)
+    {
+        return m_lastTextureSeed.get(texture);
+    }
+
+    GraphicsContextGLCocoa& m_owner;
+    PlatformGraphicsContextGLDisplay m_display { nullptr };
+    PlatformGraphicsContextGL m_context { nullptr };
+    PlatformGraphicsContextGLConfig m_config { nullptr };
+
+    PlatformGLObject m_framebuffer { 0 };
+    PlatformGLObject m_yuvVertexBuffer { 0 };
+    GCGLint m_yTextureUniformLocation { -1 };
+    GCGLint m_uvTextureUniformLocation { -1 };
+    GCGLint m_yuvFlipYUniformLocation { -1 };
+    GCGLint m_colorMatrixUniformLocation { -1 };
+    GCGLint m_yuvPositionAttributeLocation { -1 };
+    GCGLint m_yTextureSizeUniformLocation { -1 };
+    GCGLint m_uvTextureSizeUniformLocation { -1 };
+
+    FlipY m_lastFlipY { FlipY::No };
+    UnsafePointer<IOSurfaceRef> m_lastSurface;
+    uint32_t m_lastSurfaceSeed { 0 };
+
+    using TextureSeedMap = HashMap<GCGLuint, unsigned, IntHash<GCGLuint>, WTF::UnsignedWithZeroKeyHashTraits<GCGLuint>>;
+    TextureSeedMap m_lastTextureSeed;
+};
+
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsnicosiatexmapNicosiaGCGLANGLELayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.cpp (286292 => 286293)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.cpp  2021-11-30 14:23:53 UTC (rev 286292)
+++ trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.cpp     2021-11-30 14:54:52 UTC (rev 286293)
</span><span class="lines">@@ -177,7 +177,7 @@
</span><span class="cx">     return m_config;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GCGLANGLELayer::GCGLANGLELayer(GraphicsContextGLOpenGL& context)
</del><ins>+GCGLANGLELayer::GCGLANGLELayer(GraphicsContextGLANGLE& context)
</ins><span class="cx">     : GCGLLayer(context)
</span><span class="cx">     , m_angleContext(ANGLEContext::createContext())
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsnicosiatexmapNicosiaGCGLANGLELayerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.h (286292 => 286293)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.h    2021-11-30 14:23:53 UTC (rev 286292)
+++ trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.h       2021-11-30 14:54:52 UTC (rev 286293)
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx">         EGLSurface m_surface { nullptr };
</span><span class="cx">     };
</span><span class="cx"> 
</span><del>-    GCGLANGLELayer(WebCore::GraphicsContextGLOpenGL&);
</del><ins>+    GCGLANGLELayer(WebCore::GraphicsContextGLANGLE&);
</ins><span class="cx">     virtual ~GCGLANGLELayer();
</span><span class="cx"> 
</span><span class="cx">     bool makeContextCurrent() override;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsnicosiatexmapNicosiaGCGLLayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLLayer.cpp (286292 => 286293)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLLayer.cpp       2021-11-30 14:23:53 UTC (rev 286292)
+++ trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLLayer.cpp  2021-11-30 14:54:52 UTC (rev 286293)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx"> 
</span><span class="cx"> using namespace WebCore;
</span><span class="cx"> 
</span><del>-GCGLLayer::GCGLLayer(GraphicsContextGLOpenGL& context)
</del><ins>+GCGLLayer::GCGLLayer(GraphicsContextGLType& context)
</ins><span class="cx">     : m_context(context)
</span><span class="cx">     , m_contentLayer(Nicosia::ContentLayer::create(Nicosia::ContentLayerTextureMapperImpl::createFactory(*this)))
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsnicosiatexmapNicosiaGCGLLayerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLLayer.h (286292 => 286293)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLLayer.h 2021-11-30 14:23:53 UTC (rev 286292)
+++ trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLLayer.h    2021-11-30 14:54:52 UTC (rev 286293)
</span><span class="lines">@@ -30,10 +30,15 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEBGL) && USE(NICOSIA) && USE(TEXTURE_MAPPER)
</span><span class="cx"> 
</span><del>-#include "GraphicsContextGLOpenGL.h"
</del><span class="cx"> #include "NicosiaContentLayerTextureMapperImpl.h"
</span><span class="cx"> #include <memory>
</span><span class="cx"> 
</span><ins>+#if USE(ANGLE)
+#include "GraphicsContextGLANGLE.h"
+#else
+#include "GraphicsContextGLOpenGL.h"
+#endif
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> class GLContext;
</span><span class="cx"> }
</span><span class="lines">@@ -43,7 +48,12 @@
</span><span class="cx"> class GCGLLayer : public ContentLayerTextureMapperImpl::Client {
</span><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><del>-    explicit GCGLLayer(WebCore::GraphicsContextGLOpenGL&);
</del><ins>+#if USE(ANGLE)
+    using GraphicsContextGLType = WebCore::GraphicsContextGLANGLE;
+#else
+    using GraphicsContextGLType = WebCore::GraphicsContextGLOpenGL;
+#endif
+    explicit GCGLLayer(GraphicsContextGLType&);
</ins><span class="cx"> 
</span><span class="cx">     virtual ~GCGLLayer();
</span><span class="cx"> 
</span><span class="lines">@@ -54,7 +64,7 @@
</span><span class="cx">     void swapBuffersIfNeeded() override;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    WebCore::GraphicsContextGLOpenGL& m_context;
</del><ins>+    GraphicsContextGLType& m_context;
</ins><span class="cx">     std::unique_ptr<WebCore::GLContext> m_glContext;
</span><span class="cx"> 
</span><span class="cx">     Ref<ContentLayer> m_contentLayer;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsopenglGraphicsContextGLOpenGLcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.cpp (286292 => 286293)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.cpp        2021-11-30 14:23:53 UTC (rev 286292)
+++ trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.cpp   2021-11-30 14:54:52 UTC (rev 286293)
</span><span class="lines">@@ -1,7 +1,8 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010, 2016 Apple Inc. All rights reserved.
- * Copyright (C) 2010 Google Inc. All rights reserved.
- * Copyright (C) 2010 Mozilla Corporation. All rights reserved.
</del><ins>+ * Copyright (C) 2010, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ * Copyright (C) 2012 ChangSeok Oh <shivamidow@gmail.com>
+ * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -22,22 +23,3095 @@
</span><span class="cx">  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
</span><span class="cx">  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
</span><span class="cx">  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
</span><del>- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
</del><ins>+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</ins><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "GraphicsContextGLOpenGL.h"
</span><span class="cx"> 
</span><del>-#if ENABLE(WEBGL)
</del><ins>+#if ENABLE(WEBGL) && !USE(ANGLE)
</ins><span class="cx"> 
</span><del>-#include "ExtensionsGL.h"
</del><ins>+#include "ANGLEWebKitBridge.h"
+#include "GLContext.h"
+#include "GraphicsContext.h"
+#include "GraphicsContextGLOpenGLManager.h"
</ins><span class="cx"> #include "ImageBuffer.h"
</span><ins>+#include "IntRect.h"
+#include "IntSize.h"
+#include "Logging.h"
</ins><span class="cx"> #include "PixelBuffer.h"
</span><del>-#include <memory>
</del><ins>+#include "TemporaryOpenGLSetting.h"
+#include "WebGLRenderingContextBase.h"
+#include <JavaScriptCore/RegularExpression.h>
+#include <cstring>
+#include <wtf/HexNumber.h>
+#include <wtf/MainThread.h>
+#include <wtf/ThreadSpecific.h>
</ins><span class="cx"> #include <wtf/UniqueArray.h>
</span><ins>+#include <wtf/Vector.h>
+#include <wtf/text/CString.h>
+#include <wtf/text/StringBuilder.h>
</ins><span class="cx"> 
</span><ins>+#if USE(OPENGL_ES)
+#include "ExtensionsGLOpenGLES.h"
+#else
+#include "ExtensionsGLOpenGL.h"
+#endif
+
+#if USE(LIBEPOXY)
+#include "EpoxyShims.h"
+#elif USE(OPENGL_ES)
+#include "OpenGLESShims.h"
+#elif PLATFORM(GTK) || PLATFORM(WIN)
+#include "OpenGLShims.h"
+#endif
+
+#if USE(NICOSIA)
+#include "NicosiaGCGLLayer.h"
+#endif
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+static ThreadSpecific<ShaderNameHash*>& getCurrentNameHashMapForShader()
+{
+    static std::once_flag onceFlag;
+    static ThreadSpecific<ShaderNameHash*>* sharedNameHash;
+    std::call_once(onceFlag, [] {
+        sharedNameHash = new ThreadSpecific<ShaderNameHash*>;
+    });
+
+    return *sharedNameHash;
+}
+
+static void setCurrentNameHashMapForShader(ShaderNameHash* shaderNameHash)
+{
+    *getCurrentNameHashMapForShader() = shaderNameHash;
+}
+
+// Hash function used by the ANGLE translator/compiler to do
+// symbol name mangling. Since this is a static method, before
+// calling compileShader we set currentNameHashMapForShader
+// to point to the map kept by the current instance of GraphicsContextGLOpenGL.
+
+static uint64_t nameHashForShader(const char* name, size_t length)
+{
+    if (!length)
+        return 0;
+
+    CString nameAsCString = CString(name);
+
+    // Look up name in our local map.
+    ShaderNameHash*& currentNameHashMapForShader = *getCurrentNameHashMapForShader();
+    ShaderNameHash::iterator findResult = currentNameHashMapForShader->find(nameAsCString);
+    if (findResult != currentNameHashMapForShader->end())
+        return findResult->value;
+
+    unsigned hashValue = nameAsCString.hash();
+
+    // Convert the 32-bit hash from CString::hash into a 64-bit result
+    // by shifting then adding the size of our table. Overflow would
+    // only be a problem if we're already hashing to the same value (and
+    // we're hoping that over the lifetime of the context we
+    // don't have that many symbols).
+
+    uint64_t result = hashValue;
+    result = (result << 32) + (currentNameHashMapForShader->size() + 1);
+
+    currentNameHashMapForShader->set(nameAsCString, result);
+    return result;
+}
+
+GraphicsContextGLOpenGL::GraphicsContextGLOpenGL(GraphicsContextGLAttributes attributes)
+    : GraphicsContextGL(attributes)
+{
+#if USE(NICOSIA)
+    m_nicosiaLayer = makeUnique<Nicosia::GCGLLayer>(*this);
+#else
+    m_texmapLayer = makeUnique<TextureMapperGCGLPlatformLayer>(*this);
+#endif
+
+    bool success = makeContextCurrent();
+    ASSERT_UNUSED(success, success);
+
+    validateAttributes();
+    attributes = contextAttributes(); // They may have changed during validation.
+
+    // Create a texture to render into.
+    ::glGenTextures(1, &m_texture);
+    ::glBindTexture(GL_TEXTURE_2D, m_texture);
+    ::glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+    ::glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+    ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+    ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+    ::glBindTexture(GL_TEXTURE_2D, 0);
+
+    // Create an FBO.
+    ::glGenFramebuffers(1, &m_fbo);
+    ::glBindFramebuffer(GL_FRAMEBUFFER, m_fbo);
+
+#if USE(COORDINATED_GRAPHICS)
+    ::glGenTextures(1, &m_compositorTexture);
+    ::glBindTexture(GL_TEXTURE_2D, m_compositorTexture);
+    ::glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+    ::glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+    ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+    ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+
+    ::glGenTextures(1, &m_intermediateTexture);
+    ::glBindTexture(GL_TEXTURE_2D, m_intermediateTexture);
+    ::glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+    ::glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+    ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+    ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+
+    ::glBindTexture(GL_TEXTURE_2D, 0);
+#endif
+
+    // Create a multisample FBO.
+    ASSERT(m_state.boundReadFBO == m_state.boundDrawFBO);
+    if (attributes.antialias) {
+        ::glGenFramebuffers(1, &m_multisampleFBO);
+        ::glBindFramebuffer(GL_FRAMEBUFFER, m_multisampleFBO);
+        m_state.boundDrawFBO = m_state.boundReadFBO = m_multisampleFBO;
+        ::glGenRenderbuffers(1, &m_multisampleColorBuffer);
+        if (attributes.stencil || attributes.depth)
+            ::glGenRenderbuffers(1, &m_multisampleDepthStencilBuffer);
+    } else {
+        // Bind canvas FBO.
+        glBindFramebuffer(GraphicsContextGLOpenGL::FRAMEBUFFER, m_fbo);
+        m_state.boundDrawFBO = m_state.boundReadFBO = m_fbo;
+#if USE(OPENGL_ES)
+        if (attributes.depth)
+            glGenRenderbuffers(1, &m_depthBuffer);
+        if (attributes.stencil)
+            glGenRenderbuffers(1, &m_stencilBuffer);
+#endif
+        if (attributes.stencil || attributes.depth)
+            glGenRenderbuffers(1, &m_depthStencilBuffer);
+    }
+
+#if !USE(OPENGL_ES)
+    ::glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
+
+    if (GLContext::current()->version() >= 320) {
+        m_usingCoreProfile = true;
+
+        // From version 3.2 on we use the OpenGL Core profile, so request that ouput to the shader compiler.
+        // OpenGL version 3.2 uses GLSL version 1.50.
+        m_compiler = ANGLEWebKitBridge(SH_GLSL_150_CORE_OUTPUT);
+
+        // From version 3.2 on we use the OpenGL Core profile, and we need a VAO for rendering.
+        // A VAO could be created and bound by each component using GL rendering (TextureMapper, WebGL, etc). This is
+        // a simpler solution: the first GraphicsContextGLOpenGL created on a GLContext will create and bind a VAO for that context.
+        GCGLint currentVAO = getInteger(GraphicsContextGLOpenGL::VERTEX_ARRAY_BINDING);
+        if (!currentVAO) {
+            m_vao = createVertexArray();
+            bindVertexArray(m_vao);
+        }
+    } else {
+        // For lower versions request the compatibility output to the shader compiler.
+        m_compiler = ANGLEWebKitBridge(SH_GLSL_COMPATIBILITY_OUTPUT);
+
+        // GL_POINT_SPRITE is needed in lower versions.
+        ::glEnable(GL_POINT_SPRITE);
+    }
+#else
+    // Adjust the shader specification depending on whether GLES3 (i.e. WebGL2 support) was requested.
+#if ENABLE(WEBGL2)
+    m_compiler = ANGLEWebKitBridge(SH_ESSL_OUTPUT, (attributes.webGLVersion == GraphicsContextGLWebGLVersion::WebGL2) ? SH_WEBGL2_SPEC : SH_WEBGL_SPEC);
+#else
+    m_compiler = ANGLEWebKitBridge(SH_ESSL_OUTPUT, SH_WEBGL_SPEC);
+#endif
+#endif
+
+    // ANGLE initialization.
+    ShBuiltInResources ANGLEResources;
+    sh::InitBuiltInResources(&ANGLEResources);
+
+    ANGLEResources.MaxVertexAttribs = getInteger(GraphicsContextGLOpenGL::MAX_VERTEX_ATTRIBS);
+    ANGLEResources.MaxVertexUniformVectors = getInteger(GraphicsContextGLOpenGL::MAX_VERTEX_UNIFORM_VECTORS);
+    ANGLEResources.MaxVaryingVectors = getInteger(GraphicsContextGLOpenGL::MAX_VARYING_VECTORS);
+    ANGLEResources.MaxVertexTextureImageUnits = getInteger(GraphicsContextGLOpenGL::MAX_VERTEX_TEXTURE_IMAGE_UNITS);
+    ANGLEResources.MaxCombinedTextureImageUnits = getInteger(GraphicsContextGLOpenGL::MAX_COMBINED_TEXTURE_IMAGE_UNITS);
+    ANGLEResources.MaxTextureImageUnits = getInteger(GraphicsContextGLOpenGL::MAX_TEXTURE_IMAGE_UNITS);
+    ANGLEResources.MaxFragmentUniformVectors = getInteger(GraphicsContextGLOpenGL::MAX_FRAGMENT_UNIFORM_VECTORS);
+
+    // Always set to 1 for OpenGL ES.
+    ANGLEResources.MaxDrawBuffers = 1;
+
+    GCGLint range[2] { };
+    GCGLint precision = 0;
+    getShaderPrecisionFormat(GraphicsContextGLOpenGL::FRAGMENT_SHADER, GraphicsContextGLOpenGL::HIGH_FLOAT, range, &precision);
+    ANGLEResources.FragmentPrecisionHigh = (range[0] || range[1] || precision);
+
+    m_compiler.setResources(ANGLEResources);
+
+    ::glClearColor(0, 0, 0, 0);
+}
+
+GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL()
+{
+    GraphicsContextGLOpenGLManager::sharedManager().removeContext(this);
+    bool success = makeContextCurrent();
+    ASSERT_UNUSED(success, success);
+    if (m_texture)
+        ::glDeleteTextures(1, &m_texture);
+#if USE(COORDINATED_GRAPHICS)
+    if (m_compositorTexture)
+        ::glDeleteTextures(1, &m_compositorTexture);
+#endif
+
+    auto attributes = contextAttributes();
+
+    if (attributes.antialias) {
+        ::glDeleteRenderbuffers(1, &m_multisampleColorBuffer);
+        if (attributes.stencil || attributes.depth)
+            ::glDeleteRenderbuffers(1, &m_multisampleDepthStencilBuffer);
+        ::glDeleteFramebuffers(1, &m_multisampleFBO);
+    } else if (attributes.stencil || attributes.depth) {
+#if USE(OPENGL_ES)
+        if (m_depthBuffer)
+            glDeleteRenderbuffers(1, &m_depthBuffer);
+
+        if (m_stencilBuffer)
+            glDeleteRenderbuffers(1, &m_stencilBuffer);
+#endif
+        if (m_depthStencilBuffer)
+            ::glDeleteRenderbuffers(1, &m_depthStencilBuffer);
+    }
+    ::glDeleteFramebuffers(1, &m_fbo);
+#if USE(COORDINATED_GRAPHICS)
+    ::glDeleteTextures(1, &m_intermediateTexture);
+#endif
+
+#if USE(CAIRO)
+    if (m_vao)
+        deleteVertexArray(m_vao);
+#endif
+}
+
+bool GraphicsContextGLOpenGL::makeContextCurrent()
+{
+#if USE(NICOSIA)
+    return m_nicosiaLayer->makeContextCurrent();
+#else
+    return m_texmapLayer->makeContextCurrent();
+#endif
+}
+
+void GraphicsContextGLOpenGL::checkGPUStatus()
+{
+}
+
+bool GraphicsContextGLOpenGL::isGLES2Compliant() const
+{
+#if USE(OPENGL_ES)
+    return true;
+#else
+    return false;
+#endif
+}
+
+#if PLATFORM(GTK)
+ExtensionsGLOpenGLCommon& GraphicsContextGLOpenGL::getExtensions()
+{
+    if (!m_extensions) {
+#if USE(OPENGL_ES)
+        // glGetStringi is not available on GLES2.
+        m_extensions = makeUnique<ExtensionsGLOpenGLES>(this,  false);
+#else
+        // From OpenGL 3.2 on we use the Core profile, and there we must use glGetStringi.
+        m_extensions = makeUnique<ExtensionsGLOpenGL>(this, GLContext::current()->version() >= 320);
+#endif
+    }
+    return *m_extensions;
+}
+#endif
+
+void GraphicsContextGLOpenGL::setContextVisibility(bool)
+{
+}
+
+void GraphicsContextGLOpenGL::simulateEventForTesting(SimulatedEventForTesting event)
+{
+    if (event == SimulatedEventForTesting::GPUStatusFailure)
+        m_failNextStatusCheck = true;
+}
+
+void GraphicsContextGLOpenGL::prepareForDisplay()
+{
+}
+
+std::optional<PixelBuffer> GraphicsContextGLOpenGL::readCompositedResults()
+{
+    return readRenderingResults();
+}
+
+void GraphicsContextGLOpenGL::validateDepthStencil(const char* packedDepthStencilExtension)
+{
+    auto attrs = contextAttributes();
+
+    ExtensionsGLOpenGLCommon& extensions = getExtensions();
+    if (attrs.stencil) {
+        if (extensions.supports(packedDepthStencilExtension)) {
+            extensions.ensureEnabled(packedDepthStencilExtension);
+            // Force depth if stencil is true.
+            attrs.depth = true;
+        } else
+            attrs.stencil = false;
+        setContextAttributes(attrs);
+    }
+    if (attrs.antialias && !m_isForWebGL2) {
+        if (!extensions.supports("GL_ANGLE_framebuffer_multisample")) {
+            attrs.antialias = false;
+            setContextAttributes(attrs);
+        } else
+            extensions.ensureEnabled("GL_ANGLE_framebuffer_multisample");
+    }
+}
+
+void GraphicsContextGLOpenGL::prepareTexture()
+{
+    if (m_layerComposited)
+        return;
+
+    if (!makeContextCurrent())
+        return;
+
+
+#if !USE(COORDINATED_GRAPHICS)
+    TemporaryOpenGLSetting scopedScissor(GL_SCISSOR_TEST, GL_FALSE);
+    TemporaryOpenGLSetting scopedDither(GL_DITHER, GL_FALSE);
+#endif
+
+    if (contextAttributes().antialias)
+        resolveMultisamplingIfNecessary();
+
+#if USE(COORDINATED_GRAPHICS)
+    std::swap(m_texture, m_compositorTexture);
+    std::swap(m_texture, m_intermediateTexture);
+    ::glBindFramebuffer(GL_FRAMEBUFFER, m_fbo);
+    ::glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, m_texture, 0);
+    glFlush();
+
+    ASSERT(m_state.boundReadFBO == m_state.boundDrawFBO);
+    if (m_state.boundDrawFBO != m_fbo)
+        ::glBindFramebufferEXT(GraphicsContextGL::FRAMEBUFFER, m_state.boundDrawFBO);
+    else
+        ::glBindFramebufferEXT(GraphicsContextGL::FRAMEBUFFER, m_fbo);
+    return;
+#endif
+
+    ::glActiveTexture(GL_TEXTURE0);
+    ::glBindTexture(GL_TEXTURE_2D, m_state.boundTarget(GL_TEXTURE0) == GL_TEXTURE_2D ? m_state.boundTexture(GL_TEXTURE0) : 0);
+    ::glActiveTexture(m_state.activeTextureUnit);
+    ASSERT(m_state.boundReadFBO == m_state.boundDrawFBO);
+    if (m_state.boundDrawFBO != m_fbo)
+        ::glBindFramebufferEXT(GraphicsContextGL::FRAMEBUFFER, m_state.boundDrawFBO);
+    ::glFlush();
+}
+
+std::optional<PixelBuffer> GraphicsContextGLOpenGL::readRenderingResults()
+{
+    bool mustRestoreFBO = false;
+    if (contextAttributes().antialias) {
+        resolveMultisamplingIfNecessary();
+        ::glBindFramebufferEXT(GraphicsContextGL::FRAMEBUFFER, m_fbo);
+        mustRestoreFBO = true;
+    } else {
+        ASSERT(m_state.boundReadFBO == m_state.boundDrawFBO);
+        if (m_state.boundDrawFBO != m_fbo) {
+            mustRestoreFBO = true;
+            ::glBindFramebufferEXT(GraphicsContextGL::FRAMEBUFFER, m_fbo);
+        }
+    }
+    auto result = readPixelsForPaintResults();
+    if (mustRestoreFBO)
+        ::glBindFramebufferEXT(GraphicsContextGL::FRAMEBUFFER, m_state.boundDrawFBO);
+    return result;
+}
+
+void GraphicsContextGLOpenGL::reshape(int width, int height)
+{
+    if (width == m_currentWidth && height == m_currentHeight)
+        return;
+
+    ASSERT(width >= 0 && height >= 0);
+    if (width < 0 || height < 0)
+        return;
+
+    if (!makeContextCurrent())
+        return;
+
+    markContextChanged();
+
+    m_currentWidth = width;
+    m_currentHeight = height;
+
+    validateAttributes();
+
+    TemporaryOpenGLSetting scopedScissor(GL_SCISSOR_TEST, GL_FALSE);
+    TemporaryOpenGLSetting scopedDither(GL_DITHER, GL_FALSE);
+    
+    bool mustRestoreFBO = reshapeFBOs(IntSize(width, height));
+
+    // Initialize renderbuffers to 0.
+    GLfloat clearColor[] = { 0, 0, 0, 0 }, clearDepth = 0;
+    GLint clearStencil = 0;
+    GLboolean colorMask[] = { GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE }, depthMask = GL_TRUE;
+    GLuint stencilMask = 0xffffffff, stencilMaskBack = 0xffffffff;
+    GLbitfield clearMask = GL_COLOR_BUFFER_BIT;
+    ::glGetFloatv(GL_COLOR_CLEAR_VALUE, clearColor);
+    ::glClearColor(0, 0, 0, 0);
+    ::glGetBooleanv(GL_COLOR_WRITEMASK, colorMask);
+    ::glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
+
+    auto attrs = contextAttributes();
+
+    if (attrs.depth) {
+        ::glGetFloatv(GL_DEPTH_CLEAR_VALUE, &clearDepth);
+        GraphicsContextGLOpenGL::clearDepth(1);
+        ::glGetBooleanv(GL_DEPTH_WRITEMASK, &depthMask);
+        ::glDepthMask(GL_TRUE);
+        clearMask |= GL_DEPTH_BUFFER_BIT;
+    }
+    if (attrs.stencil) {
+        ::glGetIntegerv(GL_STENCIL_CLEAR_VALUE, &clearStencil);
+        ::glClearStencil(0);
+        ::glGetIntegerv(GL_STENCIL_WRITEMASK, reinterpret_cast<GLint*>(&stencilMask));
+        ::glGetIntegerv(GL_STENCIL_BACK_WRITEMASK, reinterpret_cast<GLint*>(&stencilMaskBack));
+        ::glStencilMaskSeparate(GL_FRONT, 0xffffffff);
+        ::glStencilMaskSeparate(GL_BACK, 0xffffffff);
+        clearMask |= GL_STENCIL_BUFFER_BIT;
+    }
+
+    ::glClear(clearMask);
+
+    ::glClearColor(clearColor[0], clearColor[1], clearColor[2], clearColor[3]);
+    ::glColorMask(colorMask[0], colorMask[1], colorMask[2], colorMask[3]);
+    if (attrs.depth) {
+        GraphicsContextGLOpenGL::clearDepth(clearDepth);
+        ::glDepthMask(depthMask);
+    }
+    if (attrs.stencil) {
+        ::glClearStencil(clearStencil);
+        ::glStencilMaskSeparate(GL_FRONT, stencilMask);
+        ::glStencilMaskSeparate(GL_BACK, stencilMaskBack);
+    }
+
+    if (mustRestoreFBO)
+        ::glBindFramebufferEXT(GraphicsContextGL::FRAMEBUFFER, m_state.boundDrawFBO);
+
+    auto error = ::glGetError();
+    if (error != GL_NO_ERROR) {
+        RELEASE_LOG(WebGL, "Fatal: OpenGL error during GraphicsContextGL buffer initialization (%d).", error);
+        forceContextLost();
+        return;
+    }
+
+    ::glFlush();
+}
+
+bool GraphicsContextGLOpenGL::checkVaryingsPacking(PlatformGLObject vertexShader, PlatformGLObject fragmentShader) const
+{
+    ASSERT(m_shaderSourceMap.contains(vertexShader));
+    ASSERT(m_shaderSourceMap.contains(fragmentShader));
+    const auto& vertexEntry = m_shaderSourceMap.find(vertexShader)->value;
+    const auto& fragmentEntry = m_shaderSourceMap.find(fragmentShader)->value;
+
+    HashMap<String, sh::ShaderVariable> combinedVaryings;
+    for (const auto& vertexSymbol : vertexEntry.varyingMap) {
+        const String& symbolName = vertexSymbol.key;
+        // The varying map includes variables for each index of an array variable.
+        // We only want a single variable to represent the array.
+        if (symbolName.endsWith("]"))
+            continue;
+
+        // Don't count built in varyings.
+        if (symbolName == "gl_FragCoord" || symbolName == "gl_FrontFacing" || symbolName == "gl_PointCoord")
+            continue;
+
+        const auto& fragmentSymbol = fragmentEntry.varyingMap.find(symbolName);
+        if (fragmentSymbol != fragmentEntry.varyingMap.end())
+            combinedVaryings.add(symbolName, fragmentSymbol->value);
+    }
+
+    size_t numVaryings = combinedVaryings.size();
+    if (!numVaryings)
+        return true;
+
+    std::vector<sh::ShaderVariable> variables;
+    variables.reserve(combinedVaryings.size());
+    for (const auto& varyingSymbol : combinedVaryings.values())
+        variables.push_back(varyingSymbol);
+
+    GCGLint maxVaryingVectors = 0;
+#if USE(OPENGL_ES)
+    ::glGetIntegerv(MAX_VARYING_VECTORS, &maxVaryingVectors);
+#else
+    if (m_isForWebGL2)
+        ::glGetIntegerv(GL_MAX_VARYING_VECTORS, &maxVaryingVectors);
+    else {
+        GCGLint maxVaryingFloats = 0;
+        ::glGetIntegerv(GL_MAX_VARYING_FLOATS, &maxVaryingFloats);
+        maxVaryingVectors = maxVaryingFloats / 4;
+    }
+#endif
+    return sh::CheckVariablesWithinPackingLimits(maxVaryingVectors, variables);
+}
+
+bool GraphicsContextGLOpenGL::precisionsMatch(PlatformGLObject vertexShader, PlatformGLObject fragmentShader) const
+{
+    ASSERT(m_shaderSourceMap.contains(vertexShader));
+    ASSERT(m_shaderSourceMap.contains(fragmentShader));
+    const auto& vertexEntry = m_shaderSourceMap.find(vertexShader)->value;
+    const auto& fragmentEntry = m_shaderSourceMap.find(fragmentShader)->value;
+
+    HashMap<String, sh::GLenum> vertexSymbolPrecisionMap;
+
+    for (const auto& entry : vertexEntry.uniformMap) {
+        const std::string& mappedName = entry.value.get().mappedName;
+        vertexSymbolPrecisionMap.add(String(mappedName.c_str(), mappedName.length()), entry.value.get().precision);
+    }
+
+    for (const auto& entry : fragmentEntry.uniformMap) {
+        const std::string& mappedName = entry.value.get().mappedName;
+        const auto& vertexSymbol = vertexSymbolPrecisionMap.find(String(mappedName.c_str(), mappedName.length()));
+        if (vertexSymbol != vertexSymbolPrecisionMap.end() && vertexSymbol->value != entry.value.get().precision)
+            return false;
+    }
+
+    return true;
+}
+
+void GraphicsContextGLOpenGL::activeTexture(GCGLenum texture)
+{
+    if (!makeContextCurrent())
+        return;
+
+    m_state.activeTextureUnit = texture;
+    ::glActiveTexture(texture);
+}
+
+void GraphicsContextGLOpenGL::attachShader(PlatformGLObject program, PlatformGLObject shader)
+{
+    ASSERT(program);
+    ASSERT(shader);
+    if (!makeContextCurrent())
+        return;
+
+    m_shaderProgramSymbolCountMap.remove(program);
+    ::glAttachShader(program, shader);
+}
+
+void GraphicsContextGLOpenGL::bindAttribLocation(PlatformGLObject program, GCGLuint index, const String& name)
+{
+    ASSERT(program);
+    if (!makeContextCurrent())
+        return;
+
+    String mappedName = mappedSymbolName(program, SHADER_SYMBOL_TYPE_ATTRIBUTE, name);
+    LOG(WebGL, "::bindAttribLocation is mapping %s to %s", name.utf8().data(), mappedName.utf8().data());
+    ::glBindAttribLocation(program, index, mappedName.utf8().data());
+}
+
+void GraphicsContextGLOpenGL::bindBuffer(GCGLenum target, PlatformGLObject buffer)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glBindBuffer(target, buffer);
+}
+
+void GraphicsContextGLOpenGL::bindFramebuffer(GCGLenum target, PlatformGLObject buffer)
+{
+    if (!makeContextCurrent())
+        return;
+
+    GLuint fbo;
+    if (buffer)
+        fbo = buffer;
+    else
+        fbo = (contextAttributes().antialias ? m_multisampleFBO : m_fbo);
+    ASSERT(target == GL_FRAMEBUFFER);
+    ASSERT(m_state.boundReadFBO == m_state.boundDrawFBO);
+    if (fbo != m_state.boundDrawFBO) {
+        ::glBindFramebufferEXT(target, fbo);
+        m_state.boundDrawFBO = m_state.boundReadFBO = fbo;
+    }
+}
+
+void GraphicsContextGLOpenGL::bindRenderbuffer(GCGLenum target, PlatformGLObject renderbuffer)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glBindRenderbufferEXT(target, renderbuffer);
+}
+
+
+void GraphicsContextGLOpenGL::bindTexture(GCGLenum target, PlatformGLObject texture)
+{
+    if (!makeContextCurrent())
+        return;
+
+    m_state.setBoundTexture(m_state.activeTextureUnit, texture, target);
+    ::glBindTexture(target, texture);
+}
+
+void GraphicsContextGLOpenGL::blendColor(GCGLclampf red, GCGLclampf green, GCGLclampf blue, GCGLclampf alpha)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glBlendColor(red, green, blue, alpha);
+}
+
+void GraphicsContextGLOpenGL::blendEquation(GCGLenum mode)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glBlendEquation(mode);
+}
+
+void GraphicsContextGLOpenGL::blendEquationSeparate(GCGLenum modeRGB, GCGLenum modeAlpha)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glBlendEquationSeparate(modeRGB, modeAlpha);
+}
+
+
+void GraphicsContextGLOpenGL::blendFunc(GCGLenum sfactor, GCGLenum dfactor)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glBlendFunc(sfactor, dfactor);
+}       
+
+void GraphicsContextGLOpenGL::blendFuncSeparate(GCGLenum srcRGB, GCGLenum dstRGB, GCGLenum srcAlpha, GCGLenum dstAlpha)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
+}
+
+void GraphicsContextGLOpenGL::bufferData(GCGLenum target, GCGLsizeiptr size, GCGLenum usage)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glBufferData(target, size, 0, usage);
+}
+
+void GraphicsContextGLOpenGL::bufferData(GCGLenum target, GCGLSpan<const void> data, GCGLenum usage)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glBufferData(target, data.bufSize, data.data, usage);
+}
+
+void GraphicsContextGLOpenGL::bufferSubData(GCGLenum target, GCGLintptr offset, GCGLSpan<const GCGLvoid> data)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glBufferSubData(target, offset, data.bufSize, data.data);
+}
+
+GCGLenum GraphicsContextGLOpenGL::checkFramebufferStatus(GCGLenum target)
+{
+    if (!makeContextCurrent())
+        return GL_INVALID_OPERATION;
+
+    return ::glCheckFramebufferStatusEXT(target);
+}
+
+void GraphicsContextGLOpenGL::clearColor(GCGLclampf r, GCGLclampf g, GCGLclampf b, GCGLclampf a)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glClearColor(r, g, b, a);
+}
+
+void GraphicsContextGLOpenGL::clear(GCGLbitfield mask)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glClear(mask);
+    checkGPUStatus();
+}
+
+void GraphicsContextGLOpenGL::clearStencil(GCGLint s)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glClearStencil(s);
+}
+
+void GraphicsContextGLOpenGL::colorMask(GCGLboolean red, GCGLboolean green, GCGLboolean blue, GCGLboolean alpha)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glColorMask(red, green, blue, alpha);
+}
+
+void GraphicsContextGLOpenGL::compileShader(PlatformGLObject shader)
+{
+    ASSERT(shader);
+    if (!makeContextCurrent())
+        return;
+
+    // Turn on name mapping. Due to the way ANGLE name hashing works, we
+    // point a global hashmap to the map owned by this context.
+    ShBuiltInResources ANGLEResources = m_compiler.getResources();
+    ShHashFunction64 previousHashFunction = ANGLEResources.HashFunction;
+    ANGLEResources.HashFunction = nameHashForShader;
+
+    if (!nameHashMapForShaders)
+        nameHashMapForShaders = makeUnique<ShaderNameHash>();
+    setCurrentNameHashMapForShader(nameHashMapForShaders.get());
+    m_compiler.setResources(ANGLEResources);
+
+    String translatedShaderSource = m_extensions->getTranslatedShaderSourceANGLE(shader);
+
+    ANGLEResources.HashFunction = previousHashFunction;
+    m_compiler.setResources(ANGLEResources);
+    setCurrentNameHashMapForShader(nullptr);
+
+    if (!translatedShaderSource.length())
+        return;
+
+    const CString& translatedShaderCString = translatedShaderSource.utf8();
+    const char* translatedShaderPtr = translatedShaderCString.data();
+    int translatedShaderLength = translatedShaderCString.length();
+
+    LOG(WebGL, "--- begin original shader source ---\n%s\n--- end original shader source ---\n", getShaderSource(shader).utf8().data());
+    LOG(WebGL, "--- begin translated shader source ---\n%s\n--- end translated shader source ---", translatedShaderPtr);
+
+    ::glShaderSource(shader, 1, &translatedShaderPtr, &translatedShaderLength);
+    
+    ::glCompileShader(shader);
+    
+    int compileStatus;
+    
+    ::glGetShaderiv(shader, COMPILE_STATUS, &compileStatus);
+
+    ShaderSourceMap::iterator result = m_shaderSourceMap.find(shader);
+    ShaderSourceEntry& entry = result->value;
+
+    // Populate the shader log
+    GLint length = 0;
+    ::glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &length);
+
+    if (length) {
+        GLsizei size = 0;
+        Vector<GLchar> info(length);
+        ::glGetShaderInfoLog(shader, length, &size, info.data());
+
+        PlatformGLObject shaders[2] = { shader, 0 };
+        entry.log = getUnmangledInfoLog(shaders, 1, String(info.data(), size));
+    }
+
+    if (compileStatus != GL_TRUE) {
+        entry.isValid = false;
+        LOG(WebGL, "Error: shader translator produced a shader that OpenGL would not compile.");
+    }
+}
+
+void GraphicsContextGLOpenGL::compileShaderDirect(PlatformGLObject shader)
+{
+    ASSERT(shader);
+    if (!makeContextCurrent())
+        return;
+
+    HashMap<PlatformGLObject, ShaderSourceEntry>::iterator result = m_shaderSourceMap.find(shader);
+
+    if (result == m_shaderSourceMap.end())
+        return;
+
+    ShaderSourceEntry& entry = result->value;
+
+    const CString& shaderSourceCString = entry.source.utf8();
+    const char* shaderSourcePtr = shaderSourceCString.data();
+    int shaderSourceLength = shaderSourceCString.length();
+
+    LOG(WebGL, "--- begin direct shader source ---\n%s\n--- end direct shader source ---\n", shaderSourcePtr);
+
+    ::glShaderSource(shader, 1, &shaderSourcePtr, &shaderSourceLength);
+
+    ::glCompileShader(shader);
+
+    int compileStatus;
+
+    ::glGetShaderiv(shader, COMPILE_STATUS, &compileStatus);
+
+    if (compileStatus == GL_TRUE) {
+        entry.isValid = true;
+        LOG(WebGL, "Direct compilation of shader succeeded.");
+    } else {
+        entry.isValid = false;
+        LOG(WebGL, "Error: direct compilation of shader failed.");
+    }
+}
+
+void GraphicsContextGLOpenGL::copyTexImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLint border)
+{
+    if (!makeContextCurrent())
+        return;
+
+    auto attrs = contextAttributes();
+
+    ASSERT(m_state.boundReadFBO == m_state.boundDrawFBO);
+    if (attrs.antialias && m_state.boundDrawFBO == m_multisampleFBO) {
+        resolveMultisamplingIfNecessary(IntRect(x, y, width, height));
+        ::glBindFramebufferEXT(GraphicsContextGL::FRAMEBUFFER, m_fbo);
+    }
+    ::glCopyTexImage2D(target, level, internalformat, x, y, width, height, border);
+    if (attrs.antialias && m_state.boundDrawFBO == m_multisampleFBO)
+        ::glBindFramebufferEXT(GraphicsContextGL::FRAMEBUFFER, m_multisampleFBO);
+}
+
+void GraphicsContextGLOpenGL::copyTexSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height)
+{
+    if (!makeContextCurrent())
+        return;
+
+    auto attrs = contextAttributes();
+
+    ASSERT(m_state.boundReadFBO == m_state.boundDrawFBO);
+    if (attrs.antialias && m_state.boundDrawFBO == m_multisampleFBO) {
+        resolveMultisamplingIfNecessary(IntRect(x, y, width, height));
+        ::glBindFramebufferEXT(GraphicsContextGL::FRAMEBUFFER, m_fbo);
+    }
+    ::glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
+    if (attrs.antialias && m_state.boundDrawFBO == m_multisampleFBO)
+        ::glBindFramebufferEXT(GraphicsContextGL::FRAMEBUFFER, m_multisampleFBO);
+}
+
+void GraphicsContextGLOpenGL::cullFace(GCGLenum mode)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glCullFace(mode);
+}
+
+void GraphicsContextGLOpenGL::depthFunc(GCGLenum func)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glDepthFunc(func);
+}
+
+void GraphicsContextGLOpenGL::depthMask(GCGLboolean flag)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glDepthMask(flag);
+}
+
+void GraphicsContextGLOpenGL::detachShader(PlatformGLObject program, PlatformGLObject shader)
+{
+    ASSERT(program);
+    ASSERT(shader);
+    if (!makeContextCurrent())
+        return;
+
+    m_shaderProgramSymbolCountMap.remove(program);
+    ::glDetachShader(program, shader);
+}
+
+void GraphicsContextGLOpenGL::disable(GCGLenum cap)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glDisable(cap);
+}
+
+void GraphicsContextGLOpenGL::disableVertexAttribArray(GCGLuint index)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glDisableVertexAttribArray(index);
+}
+
+void GraphicsContextGLOpenGL::drawArrays(GCGLenum mode, GCGLint first, GCGLsizei count)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glDrawArrays(mode, first, count);
+    checkGPUStatus();
+}
+
+void GraphicsContextGLOpenGL::drawElements(GCGLenum mode, GCGLsizei count, GCGLenum type, GCGLintptr offset)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glDrawElements(mode, count, type, reinterpret_cast<GLvoid*>(static_cast<intptr_t>(offset)));
+    checkGPUStatus();
+}
+
+void GraphicsContextGLOpenGL::enable(GCGLenum cap)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glEnable(cap);
+}
+
+void GraphicsContextGLOpenGL::enableVertexAttribArray(GCGLuint index)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glEnableVertexAttribArray(index);
+}
+
+void GraphicsContextGLOpenGL::finish()
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glFinish();
+}
+
+void GraphicsContextGLOpenGL::flush()
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glFlush();
+}
+
+void GraphicsContextGLOpenGL::framebufferRenderbuffer(GCGLenum target, GCGLenum attachment, GCGLenum renderbuffertarget, PlatformGLObject buffer)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glFramebufferRenderbufferEXT(target, attachment, renderbuffertarget, buffer);
+}
+
+void GraphicsContextGLOpenGL::framebufferTexture2D(GCGLenum target, GCGLenum attachment, GCGLenum textarget, PlatformGLObject texture, GCGLint level)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glFramebufferTexture2DEXT(target, attachment, textarget, texture, level);
+    m_state.textureSeedCount.add(m_state.currentBoundTexture());
+}
+
+void GraphicsContextGLOpenGL::frontFace(GCGLenum mode)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glFrontFace(mode);
+}
+
+void GraphicsContextGLOpenGL::generateMipmap(GCGLenum target)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glGenerateMipmap(target);
+}
+
+bool GraphicsContextGLOpenGL::getActiveAttribImpl(PlatformGLObject program, GCGLuint index, ActiveInfo& info)
+{
+    if (!program) {
+        synthesizeGLError(INVALID_VALUE);
+        return false;
+    }
+    if (!makeContextCurrent())
+        return false;
+
+    GLint maxAttributeSize = 0;
+    ::glGetProgramiv(program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &maxAttributeSize);
+    Vector<GLchar> name(maxAttributeSize); // GL_ACTIVE_ATTRIBUTE_MAX_LENGTH includes null termination.
+    GLsizei nameLength = 0;
+    GLint size = 0;
+    GLenum type = 0;
+    ::glGetActiveAttrib(program, index, maxAttributeSize, &nameLength, &size, &type, name.data());
+    if (!nameLength)
+        return false;
+    
+    String originalName = originalSymbolName(program, SHADER_SYMBOL_TYPE_ATTRIBUTE, String(name.data(), nameLength));
+    
+#ifndef NDEBUG
+    String uniformName(name.data(), nameLength);
+    LOG(WebGL, "Program %d is mapping active attribute %d from '%s' to '%s'", program, index, uniformName.utf8().data(), originalName.utf8().data());
+#endif
+
+    info.name = originalName;
+    info.type = type;
+    info.size = size;
+    return true;
+}
+
+bool GraphicsContextGLOpenGL::getActiveAttrib(PlatformGLObject program, GCGLuint index, ActiveInfo& info)
+{
+    GCGLint symbolCount;
+    auto result = m_shaderProgramSymbolCountMap.find(program);
+    if (result == m_shaderProgramSymbolCountMap.end()) {
+        getNonBuiltInActiveSymbolCount(program, GraphicsContextGL::ACTIVE_ATTRIBUTES, &symbolCount);
+        result = m_shaderProgramSymbolCountMap.find(program);
+    }
+    
+    ActiveShaderSymbolCounts& symbolCounts = result->value;
+    GCGLuint rawIndex = (index < symbolCounts.filteredToActualAttributeIndexMap.size()) ? symbolCounts.filteredToActualAttributeIndexMap[index] : -1;
+
+    return getActiveAttribImpl(program, rawIndex, info);
+}
+
+bool GraphicsContextGLOpenGL::getActiveUniformImpl(PlatformGLObject program, GCGLuint index, ActiveInfo& info)
+{
+    if (!program) {
+        synthesizeGLError(INVALID_VALUE);
+        return false;
+    }
+
+    if (!makeContextCurrent())
+        return false;
+
+    GLint maxUniformSize = 0;
+    ::glGetProgramiv(program, GL_ACTIVE_UNIFORM_MAX_LENGTH, &maxUniformSize);
+
+    Vector<GLchar> name(maxUniformSize); // GL_ACTIVE_UNIFORM_MAX_LENGTH includes null termination.
+    GLsizei nameLength = 0;
+    GLint size = 0;
+    GLenum type = 0;
+    ::glGetActiveUniform(program, index, maxUniformSize, &nameLength, &size, &type, name.data());
+    if (!nameLength)
+        return false;
+    
+    String originalName = originalSymbolName(program, SHADER_SYMBOL_TYPE_UNIFORM, String(name.data(), nameLength));
+    
+#ifndef NDEBUG
+    String uniformName(name.data(), nameLength);
+    LOG(WebGL, "Program %d is mapping active uniform %d from '%s' to '%s'", program, index, uniformName.utf8().data(), originalName.utf8().data());
+#endif
+    
+    info.name = originalName;
+    info.type = type;
+    info.size = size;
+    return true;
+}
+
+bool GraphicsContextGLOpenGL::getActiveUniform(PlatformGLObject program, GCGLuint index, ActiveInfo& info)
+{
+    GCGLint symbolCount;
+    auto result = m_shaderProgramSymbolCountMap.find(program);
+    if (result == m_shaderProgramSymbolCountMap.end()) {
+        getNonBuiltInActiveSymbolCount(program, GraphicsContextGL::ACTIVE_UNIFORMS, &symbolCount);
+        result = m_shaderProgramSymbolCountMap.find(program);
+    }
+    
+    ActiveShaderSymbolCounts& symbolCounts = result->value;
+    GCGLuint rawIndex = (index < symbolCounts.filteredToActualUniformIndexMap.size()) ? symbolCounts.filteredToActualUniformIndexMap[index] : -1;
+    
+    return getActiveUniformImpl(program, rawIndex, info);
+}
+
+void GraphicsContextGLOpenGL::getAttachedShaders(PlatformGLObject program, GCGLsizei maxCount, GCGLsizei* count, PlatformGLObject* shaders)
+{
+    if (!program) {
+        synthesizeGLError(INVALID_VALUE);
+        return;
+    }
+    if (!makeContextCurrent())
+        return;
+
+    ::glGetAttachedShaders(program, maxCount, count, shaders);
+}
+
+static String generateHashedName(const String& name)
+{
+    if (name.isEmpty())
+        return name;
+    uint64_t number = nameHashForShader(name.utf8().data(), name.length());
+    return makeString("webgl_", hex(number, Lowercase));
+}
+
+std::optional<String> GraphicsContextGLOpenGL::mappedSymbolInShaderSourceMap(PlatformGLObject shader, ANGLEShaderSymbolType symbolType, const String& name)
+{
+    auto result = m_shaderSourceMap.find(shader);
+    if (result == m_shaderSourceMap.end())
+        return std::nullopt;
+
+    const auto& symbolMap = result->value.symbolMap(symbolType);
+    auto symbolEntry = symbolMap.find(name);
+    if (symbolEntry == symbolMap.end())
+        return std::nullopt;
+
+    auto& mappedName = symbolEntry->value.get().mappedName;
+    return String(mappedName.c_str(), mappedName.length());
+}
+
+String GraphicsContextGLOpenGL::mappedSymbolName(PlatformGLObject program, ANGLEShaderSymbolType symbolType, const String& name)
+{
+    GCGLsizei count = 0;
+    PlatformGLObject shaders[2] = { };
+    getAttachedShaders(program, 2, &count, shaders);
+
+    for (GCGLsizei i = 0; i < count; ++i) {
+        auto mappedName = mappedSymbolInShaderSourceMap(shaders[i], symbolType, name);
+        if (mappedName)
+            return mappedName.value();
+    }
+
+    // We might have detached or deleted the shaders after linking.
+    auto result = m_linkedShaderMap.find(program);
+    if (result != m_linkedShaderMap.end()) {
+        auto linkedShaders = result->value;
+        auto mappedName = mappedSymbolInShaderSourceMap(linkedShaders.first, symbolType, name);
+        if (mappedName)
+            return mappedName.value();
+        mappedName = mappedSymbolInShaderSourceMap(linkedShaders.second, symbolType, name);
+        if (mappedName)
+            return mappedName.value();
+    }
+
+    if (symbolType == SHADER_SYMBOL_TYPE_ATTRIBUTE && !name.isEmpty()) {
+        // Attributes are a special case: they may be requested before any shaders have been compiled,
+        // and aren't even required to be used in any shader program.
+        if (!nameHashMapForShaders)
+            nameHashMapForShaders = makeUnique<ShaderNameHash>();
+        setCurrentNameHashMapForShader(nameHashMapForShaders.get());
+
+        auto generatedName = generateHashedName(name);
+
+        setCurrentNameHashMapForShader(nullptr);
+
+        m_possiblyUnusedAttributeMap.set(generatedName, name);
+
+        return generatedName;
+    }
+
+    return name;
+}
+
+std::optional<String> GraphicsContextGLOpenGL::originalSymbolInShaderSourceMap(PlatformGLObject shader, ANGLEShaderSymbolType symbolType, const String& name)
+{
+    auto result = m_shaderSourceMap.find(shader);
+    if (result == m_shaderSourceMap.end())
+        return std::nullopt;
+
+    const auto& symbolMap = result->value.symbolMap(symbolType);
+    for (const auto& symbolEntry : symbolMap) {
+        if (name == symbolEntry.value.get().mappedName.c_str())
+            return symbolEntry.key;
+    }
+    return std::nullopt;
+}
+
+String GraphicsContextGLOpenGL::originalSymbolName(PlatformGLObject program, ANGLEShaderSymbolType symbolType, const String& name)
+{
+    GCGLsizei count;
+    PlatformGLObject shaders[2];
+    getAttachedShaders(program, 2, &count, shaders);
+    
+    for (GCGLsizei i = 0; i < count; ++i) {
+        auto originalName = originalSymbolInShaderSourceMap(shaders[i], symbolType, name);
+        if (originalName)
+            return originalName.value();
+    }
+
+    // We might have detached or deleted the shaders after linking.
+    auto result = m_linkedShaderMap.find(program);
+    if (result != m_linkedShaderMap.end()) {
+        auto linkedShaders = result->value;
+        auto originalName = originalSymbolInShaderSourceMap(linkedShaders.first, symbolType, name);
+        if (originalName)
+            return originalName.value();
+        originalName = originalSymbolInShaderSourceMap(linkedShaders.second, symbolType, name);
+        if (originalName)
+            return originalName.value();
+    }
+
+    if (symbolType == SHADER_SYMBOL_TYPE_ATTRIBUTE && !name.isEmpty()) {
+        // Attributes are a special case: they may be requested before any shaders have been compiled,
+        // and aren't even required to be used in any shader program.
+
+        const auto& cached = m_possiblyUnusedAttributeMap.find(name);
+        if (cached != m_possiblyUnusedAttributeMap.end())
+            return cached->value;
+    }
+
+    return name;
+}
+
+String GraphicsContextGLOpenGL::mappedSymbolName(PlatformGLObject shaders[2], size_t count, const String& name)
+{
+    for (size_t symbolType = 0; symbolType <= static_cast<size_t>(SHADER_SYMBOL_TYPE_VARYING); ++symbolType) {
+        for (size_t i = 0; i < count; ++i) {
+            ShaderSourceMap::iterator result = m_shaderSourceMap.find(shaders[i]);
+            if (result == m_shaderSourceMap.end())
+                continue;
+            
+            const ShaderSymbolMap& symbolMap = result->value.symbolMap(static_cast<enum ANGLEShaderSymbolType>(symbolType));
+            for (const auto& symbolEntry : symbolMap) {
+                if (name == symbolEntry.value.get().mappedName.c_str())
+                    return symbolEntry.key;
+            }
+        }
+    }
+    return name;
+}
+
+int GraphicsContextGLOpenGL::getAttribLocation(PlatformGLObject program, const String& name)
+{
+    if (!program)
+        return -1;
+
+    if (!makeContextCurrent())
+        return -1;
+
+
+    String mappedName = mappedSymbolName(program, SHADER_SYMBOL_TYPE_ATTRIBUTE, name);
+    LOG(WebGL, "::glGetAttribLocation is mapping %s to %s", name.utf8().data(), mappedName.utf8().data());
+    return ::glGetAttribLocation(program, mappedName.utf8().data());
+}
+
+int GraphicsContextGLOpenGL::getAttribLocationDirect(PlatformGLObject program, const String& name)
+{
+    if (!program)
+        return -1;
+
+    if (!makeContextCurrent())
+        return -1;
+
+
+    return ::glGetAttribLocation(program, name.utf8().data());
+}
+
+bool GraphicsContextGLOpenGL::moveErrorsToSyntheticErrorList()
+{
+    if (!makeContextCurrent())
+        return false;
+
+    bool movedAnError = false;
+
+    // Set an arbitrary limit of 100 here to avoid creating a hang if
+    // a problem driver has a bug that causes it to never clear the error.
+    // Otherwise, we would just loop until we got NO_ERROR.
+    for (unsigned i = 0; i < 100; ++i) {
+        GCGLenum error = glGetError();
+        if (error == NO_ERROR)
+            break;
+        m_syntheticErrors.add(error);
+        movedAnError = true;
+    }
+
+    return movedAnError;
+}
+
+GCGLenum GraphicsContextGLOpenGL::getError()
+{
+    if (!m_syntheticErrors.isEmpty()) {
+        // Need to move the current errors to the synthetic error list in case
+        // that error is already there, since the expected behavior of both
+        // glGetError and getError is to only report each error code once.
+        moveErrorsToSyntheticErrorList();
+        return m_syntheticErrors.takeFirst();
+    }
+
+    if (!makeContextCurrent())
+        return GL_INVALID_OPERATION;
+
+    return ::glGetError();
+}
+
+String GraphicsContextGLOpenGL::getString(GCGLenum name)
+{
+    if (!makeContextCurrent())
+        return String();
+
+    return String(reinterpret_cast<const char*>(::glGetString(name)));
+}
+
+void GraphicsContextGLOpenGL::hint(GCGLenum target, GCGLenum mode)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glHint(target, mode);
+}
+
+GCGLboolean GraphicsContextGLOpenGL::isBuffer(PlatformGLObject buffer)
+{
+    if (!buffer)
+        return GL_FALSE;
+
+    if (!makeContextCurrent())
+        return GL_FALSE;
+
+    return ::glIsBuffer(buffer);
+}
+
+GCGLboolean GraphicsContextGLOpenGL::isEnabled(GCGLenum cap)
+{
+    if (!makeContextCurrent())
+        return GL_FALSE;
+
+    return ::glIsEnabled(cap);
+}
+
+GCGLboolean GraphicsContextGLOpenGL::isFramebuffer(PlatformGLObject framebuffer)
+{
+    if (!framebuffer)
+        return GL_FALSE;
+
+    if (!makeContextCurrent())
+        return GL_FALSE;
+
+    return ::glIsFramebufferEXT(framebuffer);
+}
+
+GCGLboolean GraphicsContextGLOpenGL::isProgram(PlatformGLObject program)
+{
+    if (!program)
+        return GL_FALSE;
+
+    if (!makeContextCurrent())
+        return GL_FALSE;
+
+    return ::glIsProgram(program);
+}
+
+GCGLboolean GraphicsContextGLOpenGL::isRenderbuffer(PlatformGLObject renderbuffer)
+{
+    if (!renderbuffer)
+        return GL_FALSE;
+
+    if (!makeContextCurrent())
+        return GL_FALSE;
+
+    return ::glIsRenderbufferEXT(renderbuffer);
+}
+
+GCGLboolean GraphicsContextGLOpenGL::isShader(PlatformGLObject shader)
+{
+    if (!shader)
+        return GL_FALSE;
+
+    if (!makeContextCurrent())
+        return GL_FALSE;
+
+    return ::glIsShader(shader);
+}
+
+GCGLboolean GraphicsContextGLOpenGL::isTexture(PlatformGLObject texture)
+{
+    if (!texture)
+        return GL_FALSE;
+
+    if (!makeContextCurrent())
+        return GL_FALSE;
+
+    return ::glIsTexture(texture);
+}
+
+void GraphicsContextGLOpenGL::lineWidth(GCGLfloat width)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glLineWidth(width);
+}
+
+void GraphicsContextGLOpenGL::linkProgram(PlatformGLObject program)
+{
+    ASSERT(program);
+    if (!makeContextCurrent())
+        return;
+
+
+    GCGLsizei count = 0;
+    PlatformGLObject shaders[2] = { };
+    getAttachedShaders(program, 2, &count, shaders);
+
+    if (count == 2)
+        m_linkedShaderMap.set(program, std::make_pair(shaders[0], shaders[1]));
+
+    ::glLinkProgram(program);
+}
+
+void GraphicsContextGLOpenGL::pixelStorei(GCGLenum pname, GCGLint param)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glPixelStorei(pname, param);
+}
+
+void GraphicsContextGLOpenGL::polygonOffset(GCGLfloat factor, GCGLfloat units)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glPolygonOffset(factor, units);
+}
+
+void GraphicsContextGLOpenGL::sampleCoverage(GCGLclampf value, GCGLboolean invert)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glSampleCoverage(value, invert);
+}
+
+void GraphicsContextGLOpenGL::scissor(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glScissor(x, y, width, height);
+}
+
+void GraphicsContextGLOpenGL::shaderSource(PlatformGLObject shader, const String& string)
+{
+    ASSERT(shader);
+
+    if (!makeContextCurrent())
+        return;
+
+
+    ShaderSourceEntry entry;
+
+    entry.source = string;
+
+    m_shaderSourceMap.set(shader, WTFMove(entry));
+}
+
+void GraphicsContextGLOpenGL::stencilFunc(GCGLenum func, GCGLint ref, GCGLuint mask)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glStencilFunc(func, ref, mask);
+}
+
+void GraphicsContextGLOpenGL::stencilFuncSeparate(GCGLenum face, GCGLenum func, GCGLint ref, GCGLuint mask)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glStencilFuncSeparate(face, func, ref, mask);
+}
+
+void GraphicsContextGLOpenGL::stencilMask(GCGLuint mask)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glStencilMask(mask);
+}
+
+void GraphicsContextGLOpenGL::stencilMaskSeparate(GCGLenum face, GCGLuint mask)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glStencilMaskSeparate(face, mask);
+}
+
+void GraphicsContextGLOpenGL::stencilOp(GCGLenum fail, GCGLenum zfail, GCGLenum zpass)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glStencilOp(fail, zfail, zpass);
+}
+
+void GraphicsContextGLOpenGL::stencilOpSeparate(GCGLenum face, GCGLenum fail, GCGLenum zfail, GCGLenum zpass)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glStencilOpSeparate(face, fail, zfail, zpass);
+}
+
+void GraphicsContextGLOpenGL::texParameterf(GCGLenum target, GCGLenum pname, GCGLfloat value)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glTexParameterf(target, pname, value);
+}
+
+void GraphicsContextGLOpenGL::texParameteri(GCGLenum target, GCGLenum pname, GCGLint value)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glTexParameteri(target, pname, value);
+}
+
+void GraphicsContextGLOpenGL::uniform1f(GCGLint location, GCGLfloat v0)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glUniform1f(location, v0);
+}
+
+void GraphicsContextGLOpenGL::uniform1fv(GCGLint location, GCGLSpan<const GCGLfloat> array)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glUniform1fv(location, array.bufSize, array.data);
+}
+
+void GraphicsContextGLOpenGL::uniform2f(GCGLint location, GCGLfloat v0, GCGLfloat v1)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glUniform2f(location, v0, v1);
+}
+
+void GraphicsContextGLOpenGL::uniform2fv(GCGLint location, GCGLSpan<const GCGLfloat> array)
+{
+    ASSERT(!(array.bufSize % 2));
+    if (!makeContextCurrent())
+        return;
+
+    ::glUniform2fv(location, array.bufSize / 2, array.data);
+}
+
+void GraphicsContextGLOpenGL::uniform3f(GCGLint location, GCGLfloat v0, GCGLfloat v1, GCGLfloat v2)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glUniform3f(location, v0, v1, v2);
+}
+
+void GraphicsContextGLOpenGL::uniform3fv(GCGLint location, GCGLSpan<const GCGLfloat> array)
+{
+    ASSERT(!(array.bufSize % 3));
+    if (!makeContextCurrent())
+        return;
+
+    ::glUniform3fv(location, array.bufSize / 3, array.data);
+}
+
+void GraphicsContextGLOpenGL::uniform4f(GCGLint location, GCGLfloat v0, GCGLfloat v1, GCGLfloat v2, GCGLfloat v3)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glUniform4f(location, v0, v1, v2, v3);
+}
+
+void GraphicsContextGLOpenGL::uniform4fv(GCGLint location, GCGLSpan<const GCGLfloat> array)
+{
+    ASSERT(!(array.bufSize % 4));
+    if (!makeContextCurrent())
+        return;
+
+    ::glUniform4fv(location, array.bufSize / 4, array.data);
+}
+
+void GraphicsContextGLOpenGL::uniform1i(GCGLint location, GCGLint v0)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glUniform1i(location, v0);
+}
+
+void GraphicsContextGLOpenGL::uniform1iv(GCGLint location, GCGLSpan<const GCGLint> array)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glUniform1iv(location, array.bufSize, array.data);
+}
+
+void GraphicsContextGLOpenGL::uniform2i(GCGLint location, GCGLint v0, GCGLint v1)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glUniform2i(location, v0, v1);
+}
+
+void GraphicsContextGLOpenGL::uniform2iv(GCGLint location, GCGLSpan<const GCGLint> array)
+{
+    ASSERT(!(array.bufSize % 2));
+    if (!makeContextCurrent())
+        return;
+
+    ::glUniform2iv(location, array.bufSize / 2, array.data);
+}
+
+void GraphicsContextGLOpenGL::uniform3i(GCGLint location, GCGLint v0, GCGLint v1, GCGLint v2)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glUniform3i(location, v0, v1, v2);
+}
+
+void GraphicsContextGLOpenGL::uniform3iv(GCGLint location, GCGLSpan<const GCGLint> array)
+{
+    ASSERT(!(array.bufSize % 3));
+    if (!makeContextCurrent())
+        return;
+
+    ::glUniform3iv(location, array.bufSize / 3, array.data);
+}
+
+void GraphicsContextGLOpenGL::uniform4i(GCGLint location, GCGLint v0, GCGLint v1, GCGLint v2, GCGLint v3)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glUniform4i(location, v0, v1, v2, v3);
+}
+
+void GraphicsContextGLOpenGL::uniform4iv(GCGLint location, GCGLSpan<const GCGLint> array)
+{
+    ASSERT(!(array.bufSize % 4));
+    if (!makeContextCurrent())
+        return;
+
+    ::glUniform4iv(location, array.bufSize / 4, array.data);
+}
+
+void GraphicsContextGLOpenGL::uniformMatrix2fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> array)
+{
+    ASSERT(!(array.bufSize % 4));
+    if (!makeContextCurrent())
+        return;
+
+    ::glUniformMatrix2fv(location, array.bufSize / 4, transpose, array.data);
+}
+
+void GraphicsContextGLOpenGL::uniformMatrix3fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> array)
+{
+    ASSERT(!(array.bufSize % 9));
+    if (!makeContextCurrent())
+        return;
+
+    ::glUniformMatrix3fv(location, array.bufSize / 9, transpose, array.data);
+}
+
+void GraphicsContextGLOpenGL::uniformMatrix4fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> array)
+{
+    ASSERT(!(array.bufSize % 16));
+    if (!makeContextCurrent())
+        return;
+
+    ::glUniformMatrix4fv(location, array.bufSize / 16, transpose, array.data);
+}
+
+void GraphicsContextGLOpenGL::useProgram(PlatformGLObject program)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glUseProgram(program);
+}
+
+void GraphicsContextGLOpenGL::validateProgram(PlatformGLObject program)
+{
+    ASSERT(program);
+
+    if (!makeContextCurrent())
+        return;
+
+    ::glValidateProgram(program);
+}
+
+void GraphicsContextGLOpenGL::vertexAttrib1f(GCGLuint index, GCGLfloat v0)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glVertexAttrib1f(index, v0);
+}
+
+void GraphicsContextGLOpenGL::vertexAttrib1fv(GCGLuint index, GCGLSpan<const GCGLfloat, 1> array)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glVertexAttrib1fv(index, array.data);
+}
+
+void GraphicsContextGLOpenGL::vertexAttrib2f(GCGLuint index, GCGLfloat v0, GCGLfloat v1)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glVertexAttrib2f(index, v0, v1);
+}
+
+void GraphicsContextGLOpenGL::vertexAttrib2fv(GCGLuint index, GCGLSpan<const GCGLfloat, 2> array)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glVertexAttrib2fv(index, array.data);
+}
+
+void GraphicsContextGLOpenGL::vertexAttrib3f(GCGLuint index, GCGLfloat v0, GCGLfloat v1, GCGLfloat v2)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glVertexAttrib3f(index, v0, v1, v2);
+}
+
+void GraphicsContextGLOpenGL::vertexAttrib3fv(GCGLuint index, GCGLSpan<const GCGLfloat, 3> array)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glVertexAttrib3fv(index, array.data);
+}
+
+void GraphicsContextGLOpenGL::vertexAttrib4f(GCGLuint index, GCGLfloat v0, GCGLfloat v1, GCGLfloat v2, GCGLfloat v3)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glVertexAttrib4f(index, v0, v1, v2, v3);
+}
+
+void GraphicsContextGLOpenGL::vertexAttrib4fv(GCGLuint index, GCGLSpan<const GCGLfloat, 4> array)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glVertexAttrib4fv(index, array.data);
+}
+
+void GraphicsContextGLOpenGL::vertexAttribPointer(GCGLuint index, GCGLint size, GCGLenum type, GCGLboolean normalized, GCGLsizei stride, GCGLintptr offset)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glVertexAttribPointer(index, size, type, normalized, stride, reinterpret_cast<GLvoid*>(static_cast<intptr_t>(offset)));
+}
+
+void GraphicsContextGLOpenGL::viewport(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glViewport(x, y, width, height);
+}
+
+PlatformGLObject GraphicsContextGLOpenGL::createVertexArray()
+{
+    return getExtensions().createVertexArrayOES();
+}
+
+void GraphicsContextGLOpenGL::deleteVertexArray(PlatformGLObject array)
+{
+    getExtensions().deleteVertexArrayOES(array);
+}
+
+GCGLboolean GraphicsContextGLOpenGL::isVertexArray(PlatformGLObject array)
+{
+    return getExtensions().isVertexArrayOES(array);
+}
+
+void GraphicsContextGLOpenGL::bindVertexArray(PlatformGLObject array)
+{
+    getExtensions().bindVertexArrayOES(array);
+}
+
+void GraphicsContextGLOpenGL::getBooleanv(GCGLenum pname, GCGLSpan<GCGLboolean> value)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glGetBooleanv(pname, value.data);
+}
+
+GCGLint GraphicsContextGLOpenGL::getBufferParameteri(GCGLenum target, GCGLenum pname)
+{
+    GCGLint value = 0;
+    if (!makeContextCurrent())
+        return value;
+
+    ::glGetBufferParameteriv(target, pname, &value);
+    return value;
+}
+
+void GraphicsContextGLOpenGL::getFloatv(GCGLenum pname, GCGLSpan<GCGLfloat> value)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glGetFloatv(pname, value.data);
+}
+
+GCGLint64 GraphicsContextGLOpenGL::getInteger64(GCGLenum pname)
+{
+    UNUSED_PARAM(pname);
+    if (!makeContextCurrent())
+        return 0;
+
+    GCGLint64 value = 0;
+    // FIXME 141178: Before enabling this we must first switch over to using gl3.h and creating and initialing the WebGL2 context using OpenGL ES 3.0.
+    // ::glGetInteger64v(pname, value);
+    return value;
+}
+
+GCGLint64 GraphicsContextGLOpenGL::getInteger64i(GCGLenum pname, GCGLuint index)
+{
+    UNUSED_PARAM(pname);
+    UNUSED_PARAM(index);
+    if (!makeContextCurrent())
+        return 0;
+
+    GCGLint64 value = 0;
+    // FIXME 141178: Before enabling this we must first switch over to using gl3.h and creating and initialing the WebGL2 context using OpenGL ES 3.0.
+    // ::glGetInteger64i_v(pname, index, value);
+    return value;
+}
+
+GCGLint GraphicsContextGLOpenGL::getFramebufferAttachmentParameteri(GCGLenum target, GCGLenum attachment, GCGLenum pname)
+{
+    GCGLint value = 0;
+    if (!makeContextCurrent())
+        return 0;
+    if (attachment == DEPTH_STENCIL_ATTACHMENT)
+        attachment = DEPTH_ATTACHMENT; // Or STENCIL_ATTACHMENT, either works.
+    ::glGetFramebufferAttachmentParameterivEXT(target, attachment, pname, &value);
+    return value;
+}
+
+GCGLint GraphicsContextGLOpenGL::getProgrami(PlatformGLObject program, GCGLenum pname)
+{
+    if (!makeContextCurrent())
+        return 0;
+    GCGLint value = 0;
+    ::glGetProgramiv(program, pname, &value);
+    return value;
+}
+
+void GraphicsContextGLOpenGL::getNonBuiltInActiveSymbolCount(PlatformGLObject program, GCGLenum pname, GCGLint* value)
+{
+    ASSERT(ACTIVE_ATTRIBUTES == pname || ACTIVE_UNIFORMS == pname);
+    if (!value)
+        return;
+
+    if (!makeContextCurrent())
+        return;
+
+    const auto& result = m_shaderProgramSymbolCountMap.find(program);
+    if (result != m_shaderProgramSymbolCountMap.end()) {
+        *value = result->value.countForType(pname);
+        return;
+    }
+
+    m_shaderProgramSymbolCountMap.set(program, ActiveShaderSymbolCounts());
+    ActiveShaderSymbolCounts& symbolCounts = m_shaderProgramSymbolCountMap.find(program)->value;
+
+    // Retrieve the active attributes, build a filtered count, and a mapping of
+    // our internal attributes indexes to the real unfiltered indexes inside OpenGL.
+    GCGLint attributeCount = 0;
+    ::glGetProgramiv(program, ACTIVE_ATTRIBUTES, &attributeCount);
+    for (GCGLint i = 0; i < attributeCount; ++i) {
+        ActiveInfo info;
+        getActiveAttribImpl(program, i, info);
+        if (info.name.startsWith("gl_"))
+            continue;
+
+        symbolCounts.filteredToActualAttributeIndexMap.append(i);
+    }
+    
+    // Do the same for uniforms.
+    GCGLint uniformCount = 0;
+    ::glGetProgramiv(program, ACTIVE_UNIFORMS, &uniformCount);
+    for (GCGLint i = 0; i < uniformCount; ++i) {
+        ActiveInfo info;
+        getActiveUniformImpl(program, i, info);
+        if (info.name.startsWith("gl_"))
+            continue;
+        
+        symbolCounts.filteredToActualUniformIndexMap.append(i);
+    }
+    
+    *value = symbolCounts.countForType(pname);
+}
+
+String GraphicsContextGLOpenGL::getUnmangledInfoLog(PlatformGLObject shaders[2], GCGLsizei count, const String& log)
+{
+    LOG(WebGL, "Original ShaderInfoLog:\n%s", log.utf8().data());
+
+    JSC::Yarr::RegularExpression regExp("webgl_[0123456789abcdefABCDEF]+");
+
+    StringBuilder processedLog;
+    
+    // ANGLE inserts a "#extension" line into the shader source that
+    // causes a warning in some compilers. There is no point showing
+    // this warning to the user since they didn't write the code that
+    // is causing it.
+    static const NeverDestroyed<String> angleWarning { "WARNING: 0:1: extension 'GL_ARB_gpu_shader5' is not supported\n"_s };
+    int startFrom = log.startsWith(angleWarning) ? angleWarning.get().length() : 0;
+    int matchedLength = 0;
+
+    do {
+        int start = regExp.match(log, startFrom, &matchedLength);
+        if (start == -1)
+            break;
+
+        processedLog.append(log.substring(startFrom, start - startFrom));
+        startFrom = start + matchedLength;
+
+        const String& mangledSymbol = log.substring(start, matchedLength);
+        const String& mappedSymbol = mappedSymbolName(shaders, count, mangledSymbol);
+        LOG(WebGL, "Demangling: %s to %s", mangledSymbol.utf8().data(), mappedSymbol.utf8().data());
+        processedLog.append(mappedSymbol);
+    } while (startFrom < static_cast<int>(log.length()));
+
+    processedLog.append(log.substring(startFrom, log.length() - startFrom));
+
+    LOG(WebGL, "Unmangled ShaderInfoLog:\n%s", processedLog.toString().utf8().data());
+    return processedLog.toString();
+}
+
+String GraphicsContextGLOpenGL::getProgramInfoLog(PlatformGLObject program)
+{
+    ASSERT(program);
+
+    if (!makeContextCurrent())
+        return String();
+
+    GLint length = 0;
+    ::glGetProgramiv(program, GL_INFO_LOG_LENGTH, &length);
+    if (!length)
+        return String(); 
+
+    GLsizei size = 0;
+    Vector<GLchar> info(length);
+    ::glGetProgramInfoLog(program, length, &size, info.data());
+
+    GCGLsizei count;
+    PlatformGLObject shaders[2];
+    getAttachedShaders(program, 2, &count, shaders);
+
+    return getUnmangledInfoLog(shaders, count, String(info.data(), size));
+}
+
+GCGLint GraphicsContextGLOpenGL::getRenderbufferParameteri(GCGLenum target, GCGLenum pname)
+{
+    GCGLint value = 0;
+    if (!makeContextCurrent())
+        return value;
+    ::glGetRenderbufferParameterivEXT(target, pname, &value);
+    return value;
+}
+
+GCGLint GraphicsContextGLOpenGL::getShaderi(PlatformGLObject shader, GCGLenum pname)
+{
+    ASSERT(shader);
+    GCGLint value = 0;
+    if (!makeContextCurrent())
+        return value;
+
+
+    const auto& result = m_shaderSourceMap.find(shader);
+    
+    switch (pname) {
+    case DELETE_STATUS:
+    case SHADER_TYPE:
+        ::glGetShaderiv(shader, pname, &value);
+        break;
+    case COMPILE_STATUS:
+        if (result != m_shaderSourceMap.end())
+            value = static_cast<int>(result->value.isValid);
+        break;
+    case INFO_LOG_LENGTH:
+        if (result != m_shaderSourceMap.end())
+            value = getShaderInfoLog(shader).length();
+        break;
+    case SHADER_SOURCE_LENGTH:
+        value = getShaderSource(shader).length();
+        break;
+    default:
+        synthesizeGLError(INVALID_ENUM);
+    }
+    return value;
+}
+
+String GraphicsContextGLOpenGL::getShaderInfoLog(PlatformGLObject shader)
+{
+    ASSERT(shader);
+
+    if (!makeContextCurrent())
+        return String();
+
+    const auto& result = m_shaderSourceMap.find(shader);
+    if (result == m_shaderSourceMap.end())
+        return String(); 
+
+    const ShaderSourceEntry& entry = result->value;
+    if (!entry.isValid)
+        return entry.log;
+
+    GLint length = 0;
+    ::glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &length);
+    if (!length)
+        return String(); 
+
+    GLsizei size = 0;
+    Vector<GLchar> info(length);
+    ::glGetShaderInfoLog(shader, length, &size, info.data());
+
+    PlatformGLObject shaders[2] = { shader, 0 };
+    return getUnmangledInfoLog(shaders, 1, String(info.data(), size));
+}
+
+String GraphicsContextGLOpenGL::getShaderSource(PlatformGLObject shader)
+{
+    ASSERT(shader);
+
+    if (!makeContextCurrent())
+        return String();
+
+    const auto& result = m_shaderSourceMap.find(shader);
+    if (result == m_shaderSourceMap.end())
+        return String(); 
+
+    return result->value.source;
+}
+
+GCGLfloat GraphicsContextGLOpenGL::getTexParameterf(GCGLenum target, GCGLenum pname)
+{
+    GCGLfloat value = 0.f;
+    if (!makeContextCurrent())
+        return value;
+    ::glGetTexParameterfv(target, pname, &value);
+    return value;
+}
+
+GCGLint GraphicsContextGLOpenGL::getTexParameteri(GCGLenum target, GCGLenum pname)
+{
+    GCGLint value = 0;
+    if (!makeContextCurrent())
+        return value;
+    ::glGetTexParameteriv(target, pname, &value);
+    return value;
+}
+
+void GraphicsContextGLOpenGL::getUniformfv(PlatformGLObject program, GCGLint location, GCGLSpan<GCGLfloat> value)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glGetUniformfv(program, location, value.data);
+}
+
+void GraphicsContextGLOpenGL::getUniformiv(PlatformGLObject program, GCGLint location, GCGLSpan<GCGLint> value)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glGetUniformiv(program, location, value.data);
+}
+
+void GraphicsContextGLOpenGL::getUniformuiv(PlatformGLObject program, GCGLint location, GCGLSpan<GCGLuint> value)
+{
+    UNUSED_PARAM(program);
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(value);
+}
+
+GCGLint GraphicsContextGLOpenGL::getUniformLocation(PlatformGLObject program, const String& name)
+{
+    ASSERT(program);
+
+    if (!makeContextCurrent())
+        return -1;
+
+    String mappedName = mappedSymbolName(program, SHADER_SYMBOL_TYPE_UNIFORM, name);
+    LOG(WebGL, "::getUniformLocation is mapping %s to %s", name.utf8().data(), mappedName.utf8().data());
+    return ::glGetUniformLocation(program, mappedName.utf8().data());
+}
+
+GCGLsizeiptr GraphicsContextGLOpenGL::getVertexAttribOffset(GCGLuint index, GCGLenum pname)
+{
+    if (!makeContextCurrent())
+        return 0;
+
+    GLvoid* pointer = 0;
+    ::glGetVertexAttribPointerv(index, pname, &pointer);
+    return static_cast<GCGLsizeiptr>(reinterpret_cast<intptr_t>(pointer));
+}
+
+void GraphicsContextGLOpenGL::texSubImage2D(GCGLenum target, GCGLint level, GCGLint xoff, GCGLint yoff, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLSpan<const GCGLvoid> pixels)
+{
+    if (!makeContextCurrent())
+        return;
+
+#if !USE(OPENGL_ES)
+    if (type == HALF_FLOAT_OES)
+        type = GL_HALF_FLOAT_ARB;
+#endif
+
+    if (m_usingCoreProfile)  {
+        // There are some format values used in WebGL that are deprecated when using a core profile, so we need
+        // to adapt them, as we do in GraphicsContextGLOpenGL::texImage2D().
+        switch (format) {
+        case ALPHA:
+            // We are using GL_RED to back GL_ALPHA, so do it here as well.
+            format = RED;
+            break;
+        case LUMINANCE_ALPHA:
+            // We are using GL_RG to back GL_LUMINANCE_ALPHA, so do it here as well.
+            format = RG;
+            break;
+        default:
+            break;
+        }
+    }
+
+    // FIXME: we will need to deal with PixelStore params when dealing with image buffers that differ from the subimage size.
+    ::glTexSubImage2D(target, level, xoff, yoff, width, height, format, type, pixels.data);
+    m_state.textureSeedCount.add(m_state.currentBoundTexture());
+}
+
+void GraphicsContextGLOpenGL::compressedTexImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLsizei imageSize, GCGLSpan<const GCGLvoid> data)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data.data);
+    m_state.textureSeedCount.add(m_state.currentBoundTexture());
+}
+
+void GraphicsContextGLOpenGL::compressedTexSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLsizei imageSize, GCGLSpan<const GCGLvoid> data)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data.data);
+    m_state.textureSeedCount.add(m_state.currentBoundTexture());
+}
+
+PlatformGLObject GraphicsContextGLOpenGL::createBuffer()
+{
+    if (!makeContextCurrent())
+        return 0;
+
+    GLuint o = 0;
+    glGenBuffers(1, &o);
+    return o;
+}
+
+PlatformGLObject GraphicsContextGLOpenGL::createFramebuffer()
+{
+    if (!makeContextCurrent())
+        return 0;
+
+    GLuint o = 0;
+    glGenFramebuffersEXT(1, &o);
+    return o;
+}
+
+PlatformGLObject GraphicsContextGLOpenGL::createProgram()
+{
+    if (!makeContextCurrent())
+        return 0;
+
+    return glCreateProgram();
+}
+
+PlatformGLObject GraphicsContextGLOpenGL::createRenderbuffer()
+{
+    if (!makeContextCurrent())
+        return 0;
+
+    GLuint o = 0;
+    glGenRenderbuffersEXT(1, &o);
+    return o;
+}
+
+PlatformGLObject GraphicsContextGLOpenGL::createShader(GCGLenum type)
+{
+    if (!makeContextCurrent())
+        return 0;
+
+    return glCreateShader((type == FRAGMENT_SHADER) ? GL_FRAGMENT_SHADER : GL_VERTEX_SHADER);
+}
+
+PlatformGLObject GraphicsContextGLOpenGL::createTexture()
+{
+    if (!makeContextCurrent())
+        return 0;
+
+    GLuint o = 0;
+    glGenTextures(1, &o);
+    m_state.textureSeedCount.add(o);
+    return o;
+}
+
+void GraphicsContextGLOpenGL::deleteBuffer(PlatformGLObject buffer)
+{
+    if (!makeContextCurrent())
+        return;
+
+    glDeleteBuffers(1, &buffer);
+}
+
+void GraphicsContextGLOpenGL::deleteFramebuffer(PlatformGLObject framebuffer)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ASSERT(m_state.boundReadFBO == m_state.boundDrawFBO);
+    if (framebuffer == m_state.boundDrawFBO) {
+        // Make sure the framebuffer is not going to be used for drawing
+        // operations after it gets deleted.
+        bindFramebuffer(FRAMEBUFFER, 0);
+    }
+    glDeleteFramebuffersEXT(1, &framebuffer);
+}
+
+void GraphicsContextGLOpenGL::deleteProgram(PlatformGLObject program)
+{
+    if (!makeContextCurrent())
+        return;
+
+    m_shaderProgramSymbolCountMap.remove(program);
+    glDeleteProgram(program);
+}
+
+void GraphicsContextGLOpenGL::deleteRenderbuffer(PlatformGLObject renderbuffer)
+{
+    if (!makeContextCurrent())
+        return;
+
+    glDeleteRenderbuffersEXT(1, &renderbuffer);
+}
+
+void GraphicsContextGLOpenGL::deleteShader(PlatformGLObject shader)
+{
+    if (!makeContextCurrent())
+        return;
+
+    glDeleteShader(shader);
+}
+
+void GraphicsContextGLOpenGL::deleteTexture(PlatformGLObject texture)
+{
+    if (!makeContextCurrent())
+        return;
+
+    m_state.boundTextureMap.removeIf([texture] (auto& keyValue) {
+        return keyValue.value.first == texture;
+    });
+    glDeleteTextures(1, &texture);
+    m_state.textureSeedCount.removeAll(texture);
+}
+
+void GraphicsContextGLOpenGL::synthesizeGLError(GCGLenum error)
+{
+    // Need to move the current errors to the synthetic error list to
+    // preserve the order of errors, so a caller to getError will get
+    // any errors from glError before the error we are synthesizing.
+    moveErrorsToSyntheticErrorList();
+    m_syntheticErrors.add(error);
+}
+
+void GraphicsContextGLOpenGL::forceContextLost()
+{
+    for (auto* client : copyToVector(m_clients))
+        client->forceContextLost();
+}
+
+void GraphicsContextGLOpenGL::recycleContext()
+{
+    for (auto* client : copyToVector(m_clients))
+        client->recycleContext();
+}
+
+void GraphicsContextGLOpenGL::dispatchContextChangedNotification()
+{
+    for (auto* client : copyToVector(m_clients))
+        client->dispatchContextChangedNotification();
+}
+
+void GraphicsContextGLOpenGL::texImage2DDirect(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, const void* pixels)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
+    m_state.textureSeedCount.add(m_state.currentBoundTexture());
+}
+
+void GraphicsContextGLOpenGL::drawArraysInstanced(GCGLenum mode, GCGLint first, GCGLsizei count, GCGLsizei primcount)
+{
+    getExtensions().drawArraysInstancedANGLE(mode, first, count, primcount);
+    checkGPUStatus();
+}
+
+void GraphicsContextGLOpenGL::drawElementsInstanced(GCGLenum mode, GCGLsizei count, GCGLenum type, GCGLintptr offset, GCGLsizei primcount)
+{
+    getExtensions().drawElementsInstancedANGLE(mode, count, type, offset, primcount);
+    checkGPUStatus();
+}
+
+void GraphicsContextGLOpenGL::vertexAttribDivisor(GCGLuint index, GCGLuint divisor)
+{
+    getExtensions().vertexAttribDivisorANGLE(index, divisor);
+}
+
+#if HAVE(OPENGL_4) && ENABLE(WEBGL2)
+void GraphicsContextGLOpenGL::primitiveRestartIndex(GCGLuint index)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glPrimitiveRestartIndex(index);
+}
+#endif
+
+void GraphicsContextGLOpenGL::bufferData(GCGLenum target, const void* data, GCGLenum usage, GCGLuint srcOffset, GCGLuint length)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(data);
+    UNUSED_PARAM(usage);
+    UNUSED_PARAM(srcOffset);
+    UNUSED_PARAM(length);
+}
+
+void GraphicsContextGLOpenGL::bufferSubData(GCGLenum target, GCGLintptr dstByteOffset, const void* srcData, GCGLuint srcOffset, GCGLuint length)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(dstByteOffset);
+    UNUSED_PARAM(srcData);
+    UNUSED_PARAM(srcOffset);
+    UNUSED_PARAM(length);
+}
+
+#if HAVE(OPENGL_4) || HAVE(OPENGL_ES_3)
+void GraphicsContextGLOpenGL::copyBufferSubData(GCGLenum readTarget, GCGLenum writeTarget, GCGLintptr readOffset, GCGLintptr writeOffset, GCGLsizeiptr size)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glCopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size);
+}
+#else
+void GraphicsContextGLOpenGL::copyBufferSubData(GCGLenum, GCGLenum, GCGLintptr, GCGLintptr, GCGLsizeiptr)
+{
+}
+#endif
+
+void GraphicsContextGLOpenGL::getBufferSubData(GCGLenum target, GCGLintptr offset, GCGLSpan<GCGLvoid> data)
+{
+#if HAVE(OPENGL_4) || HAVE(OPENGL_ES_3)
+    if (!makeContextCurrent())
+        return;
+    GCGLvoid* ptr = ::glMapBufferRange(target, offset, data.bufSize, GraphicsContextGL::MAP_READ_BIT);
+    if (!ptr)
+        return;
+    memcpy(data.data, ptr, data.bufSize);
+    if (!::glUnmapBuffer(target))
+        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION);
+#else
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(offset);
+    UNUSED_PARAM(data);
+    synthesizeGLError(GraphicsContextGL::INVALID_OPERATION);
+#endif
+}
+
+
+void GraphicsContextGLOpenGL::blitFramebuffer(GCGLint srcX0, GCGLint srcY0, GCGLint srcX1, GCGLint srcY1, GCGLint dstX0, GCGLint dstY0, GCGLint dstX1, GCGLint dstY1, GCGLbitfield mask, GCGLenum filter)
+{
+    UNUSED_PARAM(srcX0);
+    UNUSED_PARAM(srcY0);
+    UNUSED_PARAM(srcX1);
+    UNUSED_PARAM(srcY1);
+    UNUSED_PARAM(dstX0);
+    UNUSED_PARAM(dstY0);
+    UNUSED_PARAM(dstX1);
+    UNUSED_PARAM(dstY1);
+    UNUSED_PARAM(mask);
+    UNUSED_PARAM(filter);
+}
+
+void GraphicsContextGLOpenGL::framebufferTextureLayer(GCGLenum target, GCGLenum attachment, PlatformGLObject texture, GCGLint level, GCGLint layer)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(attachment);
+    UNUSED_PARAM(texture);
+    UNUSED_PARAM(level);
+    UNUSED_PARAM(layer);
+}
+
+void GraphicsContextGLOpenGL::invalidateFramebuffer(GCGLenum target, GCGLSpan<const GCGLenum> attachments)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(attachments);
+}
+
+void GraphicsContextGLOpenGL::invalidateSubFramebuffer(GCGLenum target, GCGLSpan<const GCGLenum> attachments, GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(attachments);
+    UNUSED_PARAM(x);
+    UNUSED_PARAM(y);
+    UNUSED_PARAM(width);
+    UNUSED_PARAM(height);
+}
+
+void GraphicsContextGLOpenGL::readBuffer(GCGLenum src)
+{
+    UNUSED_PARAM(src);
+}
+
+#if HAVE(OPENGL_4) || HAVE(OPENGL_ES_3)
+void GraphicsContextGLOpenGL::getInternalformativ(GCGLenum target, GCGLenum internalformat, GCGLenum pname, GCGLSpan<GCGLint> data)
+{
+#if USE(OPENGL_ES)
+    if (!makeContextCurrent())
+        return;
+
+    ::glGetInternalformativ(target, internalformat, pname, data.bufSize, data.data);
+#else
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(internalformat);
+    UNUSED_PARAM(pname);
+    UNUSED_PARAM(bufSize);
+    UNUSED_PARAM(params);
+#endif
+}
+
+void GraphicsContextGLOpenGL::renderbufferStorageMultisample(GCGLenum target, GCGLsizei samples, GCGLenum internalformat, GCGLsizei width, GCGLsizei height)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glRenderbufferStorageMultisample(target, samples, internalformat, width, height);
+}
+
+void GraphicsContextGLOpenGL::texStorage2D(GCGLenum target, GCGLsizei levels, GCGLenum internalformat, GCGLsizei width, GCGLsizei height)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glTexStorage2D(target, levels, internalformat, width, height);
+    m_state.textureSeedCount.add(m_state.currentBoundTexture());
+}
+
+void GraphicsContextGLOpenGL::texStorage3D(GCGLenum target, GCGLsizei levels, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth)
+{
+    if (!makeContextCurrent())
+        return;
+
+    ::glTexStorage3D(target, levels, internalformat, width, height, depth);
+    m_state.textureSeedCount.add(m_state.currentBoundTexture());
+}
+#else
+void GraphicsContextGLOpenGL::getInternalformativ(GCGLenum, GCGLenum, GCGLenum, GCGLSpan<GCGLint>)
+{
+}
+
+void GraphicsContextGLOpenGL::renderbufferStorageMultisample(GCGLenum, GCGLsizei, GCGLenum, GCGLsizei, GCGLsizei)
+{
+}
+
+void GraphicsContextGLOpenGL::texStorage2D(GCGLenum, GCGLsizei, GCGLenum, GCGLsizei, GCGLsizei)
+{
+}
+
+void GraphicsContextGLOpenGL::texStorage3D(GCGLenum, GCGLsizei, GCGLenum, GCGLsizei, GCGLsizei, GCGLsizei)
+{
+}
+#endif
+
+void GraphicsContextGLOpenGL::copyTexSubImage3D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLint zoffset, GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(level);
+    UNUSED_PARAM(xoffset);
+    UNUSED_PARAM(yoffset);
+    UNUSED_PARAM(zoffset);
+    UNUSED_PARAM(x);
+    UNUSED_PARAM(y);
+    UNUSED_PARAM(width);
+    UNUSED_PARAM(height);
+}
+
+GCGLint GraphicsContextGLOpenGL::getFragDataLocation(PlatformGLObject program, const String& name)
+{
+    UNUSED_PARAM(program);
+    UNUSED_PARAM(name);
+
+    return 0;
+}
+
+void GraphicsContextGLOpenGL::uniform1ui(GCGLint location, GCGLuint v0)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(v0);
+}
+
+void GraphicsContextGLOpenGL::uniform2ui(GCGLint location, GCGLuint v0, GCGLuint v1)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(v0);
+    UNUSED_PARAM(v1);
+}
+
+void GraphicsContextGLOpenGL::uniform3ui(GCGLint location, GCGLuint v0, GCGLuint v1, GCGLuint v2)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(v0);
+    UNUSED_PARAM(v1);
+    UNUSED_PARAM(v2);
+}
+
+void GraphicsContextGLOpenGL::uniform4ui(GCGLint location, GCGLuint v0, GCGLuint v1, GCGLuint v2, GCGLuint v3)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(v0);
+    UNUSED_PARAM(v1);
+    UNUSED_PARAM(v2);
+    UNUSED_PARAM(v3);
+}
+
+void GraphicsContextGLOpenGL::uniform1uiv(GCGLint location, GCGLSpan<const GCGLuint> data)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(data);
+}
+
+void GraphicsContextGLOpenGL::uniform2uiv(GCGLint location, GCGLSpan<const GCGLuint> data)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(data);
+}
+
+void GraphicsContextGLOpenGL::uniform3uiv(GCGLint location, GCGLSpan<const GCGLuint> data)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(data);
+}
+
+void GraphicsContextGLOpenGL::uniform4uiv(GCGLint location, GCGLSpan<const GCGLuint> data)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(data);
+}
+
+void GraphicsContextGLOpenGL::uniformMatrix2x3fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(transpose);
+    UNUSED_PARAM(data);
+}
+
+void GraphicsContextGLOpenGL::uniformMatrix3x2fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(transpose);
+    UNUSED_PARAM(data);
+}
+
+void GraphicsContextGLOpenGL::uniformMatrix2x4fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(transpose);
+    UNUSED_PARAM(data);
+}
+
+void GraphicsContextGLOpenGL::uniformMatrix4x2fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(transpose);
+    UNUSED_PARAM(data);
+}
+
+void GraphicsContextGLOpenGL::uniformMatrix3x4fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(transpose);
+    UNUSED_PARAM(data);
+}
+
+void GraphicsContextGLOpenGL::uniformMatrix4x3fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(transpose);
+    UNUSED_PARAM(data);
+}
+
+void GraphicsContextGLOpenGL::vertexAttribI4i(GCGLuint index, GCGLint x, GCGLint y, GCGLint z, GCGLint w)
+{
+    UNUSED_PARAM(index);
+    UNUSED_PARAM(x);
+    UNUSED_PARAM(y);
+    UNUSED_PARAM(z);
+    UNUSED_PARAM(w);
+}
+
+void GraphicsContextGLOpenGL::vertexAttribI4iv(GCGLuint index, GCGLSpan<const GCGLint, 4> values)
+{
+    UNUSED_PARAM(index);
+    UNUSED_PARAM(values);
+}
+
+void GraphicsContextGLOpenGL::vertexAttribI4ui(GCGLuint index, GCGLuint x, GCGLuint y, GCGLuint z, GCGLuint w)
+{
+    UNUSED_PARAM(index);
+    UNUSED_PARAM(x);
+    UNUSED_PARAM(y);
+    UNUSED_PARAM(z);
+    UNUSED_PARAM(w);
+}
+
+void GraphicsContextGLOpenGL::vertexAttribI4uiv(GCGLuint index, GCGLSpan<const GCGLuint, 4> values)
+{
+    UNUSED_PARAM(index);
+    UNUSED_PARAM(values);
+}
+
+void GraphicsContextGLOpenGL::vertexAttribIPointer(GCGLuint index, GCGLint size, GCGLenum type, GCGLsizei stride, GCGLintptr offset)
+{
+    UNUSED_PARAM(index);
+    UNUSED_PARAM(size);
+    UNUSED_PARAM(type);
+    UNUSED_PARAM(stride);
+    UNUSED_PARAM(offset);
+}
+
+void GraphicsContextGLOpenGL::drawRangeElements(GCGLenum mode, GCGLuint start, GCGLuint end, GCGLsizei count, GCGLenum type, GCGLintptr offset)
+{
+    UNUSED_PARAM(mode);
+    UNUSED_PARAM(start);
+    UNUSED_PARAM(end);
+    UNUSED_PARAM(count);
+    UNUSED_PARAM(type);
+    UNUSED_PARAM(offset);
+}
+
+void GraphicsContextGLOpenGL::drawBuffers(GCGLSpan<const GCGLenum> bufs)
+{
+    UNUSED_PARAM(bufs);
+}
+
+void GraphicsContextGLOpenGL::clearBufferiv(GCGLenum buffer, GCGLint drawbuffer, GCGLSpan<const GCGLint> values)
+{
+    UNUSED_PARAM(buffer);
+    UNUSED_PARAM(drawbuffer);
+    UNUSED_PARAM(values);
+}
+
+void GraphicsContextGLOpenGL::clearBufferuiv(GCGLenum buffer, GCGLint drawbuffer, GCGLSpan<const GCGLuint> values)
+{
+    UNUSED_PARAM(buffer);
+    UNUSED_PARAM(drawbuffer);
+    UNUSED_PARAM(values);
+}
+
+void GraphicsContextGLOpenGL::clearBufferfv(GCGLenum buffer, GCGLint drawbuffer, GCGLSpan<const GCGLfloat> values)
+{
+    UNUSED_PARAM(buffer);
+    UNUSED_PARAM(drawbuffer);
+    UNUSED_PARAM(values);
+}
+
+void GraphicsContextGLOpenGL::clearBufferfi(GCGLenum buffer, GCGLint drawbuffer, GCGLfloat depth, GCGLint stencil)
+{
+    UNUSED_PARAM(buffer);
+    UNUSED_PARAM(drawbuffer);
+    UNUSED_PARAM(depth);
+    UNUSED_PARAM(stencil);
+}
+
+PlatformGLObject GraphicsContextGLOpenGL::createQuery()
+{
+    return 0;
+}
+
+void GraphicsContextGLOpenGL::deleteQuery(PlatformGLObject query)
+{
+    UNUSED_PARAM(query);
+}
+
+GCGLboolean GraphicsContextGLOpenGL::isQuery(PlatformGLObject query)
+{
+    UNUSED_PARAM(query);
+
+    return false;
+}
+
+void GraphicsContextGLOpenGL::beginQuery(GCGLenum target, PlatformGLObject query)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(query);
+}
+
+void GraphicsContextGLOpenGL::endQuery(GCGLenum target)
+{
+    UNUSED_PARAM(target);
+}
+
+PlatformGLObject GraphicsContextGLOpenGL::getQuery(GCGLenum target, GCGLenum pname)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(pname);
+
+    return 0;
+}
+
+GCGLuint GraphicsContextGLOpenGL::getQueryObjectui(PlatformGLObject query, GCGLenum pname)
+{
+    UNUSED_PARAM(query);
+    UNUSED_PARAM(pname);
+    return 0;
+}
+
+PlatformGLObject GraphicsContextGLOpenGL::createSampler()
+{
+    return 0;
+}
+
+void GraphicsContextGLOpenGL::deleteSampler(PlatformGLObject sampler)
+{
+    UNUSED_PARAM(sampler);
+}
+
+GCGLboolean GraphicsContextGLOpenGL::isSampler(PlatformGLObject sampler)
+{
+    UNUSED_PARAM(sampler);
+
+    return false;
+}
+
+void GraphicsContextGLOpenGL::bindSampler(GCGLuint unit, PlatformGLObject sampler)
+{
+    UNUSED_PARAM(unit);
+    UNUSED_PARAM(sampler);
+}
+
+void GraphicsContextGLOpenGL::samplerParameteri(PlatformGLObject sampler, GCGLenum pname, GCGLint param)
+{
+    UNUSED_PARAM(sampler);
+    UNUSED_PARAM(pname);
+    UNUSED_PARAM(param);
+}
+
+void GraphicsContextGLOpenGL::samplerParameterf(PlatformGLObject sampler, GCGLenum pname, GCGLfloat param)
+{
+    UNUSED_PARAM(sampler);
+    UNUSED_PARAM(pname);
+    UNUSED_PARAM(param);
+}
+
+GCGLfloat GraphicsContextGLOpenGL::getSamplerParameterf(PlatformGLObject sampler, GCGLenum pname)
+{
+    UNUSED_PARAM(sampler);
+    UNUSED_PARAM(pname);
+    return 0.f;
+}
+
+GCGLint GraphicsContextGLOpenGL::getSamplerParameteri(PlatformGLObject sampler, GCGLenum pname)
+
+{
+    UNUSED_PARAM(sampler);
+    UNUSED_PARAM(pname);
+    return 0;
+}
+
+GCGLsync GraphicsContextGLOpenGL::fenceSync(GCGLenum condition, GCGLbitfield flags)
+{
+    UNUSED_PARAM(condition);
+    UNUSED_PARAM(flags);
+
+    return 0;
+}
+
+GCGLboolean GraphicsContextGLOpenGL::isSync(GCGLsync sync)
+{
+    UNUSED_PARAM(sync);
+
+    return false;
+}
+
+void GraphicsContextGLOpenGL::deleteSync(GCGLsync sync)
+{
+    UNUSED_PARAM(sync);
+}
+
+GCGLenum GraphicsContextGLOpenGL::clientWaitSync(GCGLsync sync, GCGLbitfield flags, GCGLuint64 timeout)
+{
+    UNUSED_PARAM(sync);
+    UNUSED_PARAM(flags);
+    UNUSED_PARAM(timeout);
+
+    return 0;
+}
+
+void GraphicsContextGLOpenGL::waitSync(GCGLsync sync, GCGLbitfield flags, GCGLint64 timeout)
+{
+    UNUSED_PARAM(sync);
+    UNUSED_PARAM(flags);
+    UNUSED_PARAM(timeout);
+}
+
+GCGLint GraphicsContextGLOpenGL::getSynci(GCGLsync sync, GCGLenum pname)
+{
+    UNUSED_PARAM(sync);
+    UNUSED_PARAM(pname);
+    return 0;
+}
+
+PlatformGLObject GraphicsContextGLOpenGL::createTransformFeedback()
+{
+    return 0;
+}
+
+void GraphicsContextGLOpenGL::deleteTransformFeedback(PlatformGLObject id)
+{
+    UNUSED_PARAM(id);
+}
+
+GCGLboolean GraphicsContextGLOpenGL::isTransformFeedback(PlatformGLObject id)
+{
+    UNUSED_PARAM(id);
+
+    return false;
+}
+
+void GraphicsContextGLOpenGL::bindTransformFeedback(GCGLenum target, PlatformGLObject id)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(id);
+}
+
+void GraphicsContextGLOpenGL::beginTransformFeedback(GCGLenum primitiveMode)
+{
+    UNUSED_PARAM(primitiveMode);
+}
+
+void GraphicsContextGLOpenGL::endTransformFeedback()
+{
+}
+
+void GraphicsContextGLOpenGL::transformFeedbackVaryings(PlatformGLObject program, const Vector<String>& varyings, GCGLenum bufferMode)
+{
+    UNUSED_PARAM(program);
+    UNUSED_PARAM(varyings);
+    UNUSED_PARAM(bufferMode);
+}
+
+void GraphicsContextGLOpenGL::getTransformFeedbackVarying(PlatformGLObject program, GCGLuint index, ActiveInfo&)
+{
+    UNUSED_PARAM(program);
+    UNUSED_PARAM(index);
+}
+
+void GraphicsContextGLOpenGL::pauseTransformFeedback()
+{
+}
+
+void GraphicsContextGLOpenGL::resumeTransformFeedback()
+{
+}
+
+void GraphicsContextGLOpenGL::bindBufferBase(GCGLenum target, GCGLuint index, PlatformGLObject buffer)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(index);
+    UNUSED_PARAM(buffer);
+}
+
+void GraphicsContextGLOpenGL::bindBufferRange(GCGLenum target, GCGLuint index, PlatformGLObject buffer, GCGLintptr offset, GCGLsizeiptr size)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(index);
+    UNUSED_PARAM(buffer);
+    UNUSED_PARAM(offset);
+    UNUSED_PARAM(size);
+}
+
+Vector<GCGLuint> GraphicsContextGLOpenGL::getUniformIndices(PlatformGLObject program, const Vector<String>& uniformNames)
+{
+    UNUSED_PARAM(program);
+    UNUSED_PARAM(uniformNames);
+
+    return { };
+}
+
+Vector<GCGLint> GraphicsContextGLOpenGL::getActiveUniforms(PlatformGLObject program, const Vector<GCGLuint>& uniformIndices, GCGLenum pname)
+{
+    Vector<GCGLint> result(uniformIndices.size(), 0);
+#if HAVE(OPENGL_4) || HAVE(OPENGL_ES_3)
+    ASSERT(program);
+    if (!makeContextCurrent())
+        return result;
+
+    ::glGetActiveUniformsiv(program, uniformIndices.size(), uniformIndices.data(), pname, result.data());
+#else
+    UNUSED_PARAM(program);
+    UNUSED_PARAM(pname);
+#endif
+    return result;
+}
+
+GCGLuint GraphicsContextGLOpenGL::getUniformBlockIndex(PlatformGLObject program, const String& uniformBlockName)
+{
+    UNUSED_PARAM(program);
+    UNUSED_PARAM(uniformBlockName);
+    return 0;
+}
+
+String GraphicsContextGLOpenGL::getActiveUniformBlockName(PlatformGLObject program, GCGLuint uniformBlockIndex)
+{
+    UNUSED_PARAM(program);
+    UNUSED_PARAM(uniformBlockIndex);
+    return emptyString();
+}
+
+void GraphicsContextGLOpenGL::uniformBlockBinding(PlatformGLObject program, GCGLuint uniformBlockIndex, GCGLuint uniformBlockBinding)
+{
+    UNUSED_PARAM(program);
+    UNUSED_PARAM(uniformBlockIndex);
+    UNUSED_PARAM(uniformBlockBinding);
+}
+
+void GraphicsContextGLOpenGL::readnPixels(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLintptr offset)
+{
+    UNUSED_PARAM(x);
+    UNUSED_PARAM(y);
+    UNUSED_PARAM(width);
+    UNUSED_PARAM(height);
+    UNUSED_PARAM(format);
+    UNUSED_PARAM(type);
+    UNUSED_PARAM(offset);
+}
+
+void GraphicsContextGLOpenGL::getActiveUniformBlockiv(GCGLuint program, GCGLuint uniformBlockIndex, GCGLenum pname, GCGLSpan<GCGLint> params)
+{
+    UNUSED_PARAM(program);
+    UNUSED_PARAM(uniformBlockIndex);
+    UNUSED_PARAM(pname);
+    UNUSED_PARAM(params);
+}
+
+void GraphicsContextGLOpenGL::texImage2D(GCGLenum, GCGLint, GCGLenum, GCGLsizei, GCGLsizei, GCGLint, GCGLenum, GCGLenum , GCGLintptr)
+{
+}
+
+void GraphicsContextGLOpenGL::texSubImage2D(GCGLenum, GCGLint, GCGLint, GCGLint, GCGLsizei, GCGLsizei, GCGLenum, GCGLenum, GCGLintptr)
+{
+}
+
+void GraphicsContextGLOpenGL::compressedTexImage2D(GCGLenum, GCGLint, GCGLenum, GCGLsizei, GCGLsizei, GCGLint, GCGLsizei, GCGLintptr)
+{
+}
+
+void GraphicsContextGLOpenGL::compressedTexSubImage2D(GCGLenum, GCGLint, GCGLint, GCGLint, GCGLsizei, GCGLsizei, GCGLenum, GCGLsizei, GCGLintptr)
+{
+}
+
+void GraphicsContextGLOpenGL::texImage3D(GCGLenum, GCGLint, GCGLint, GCGLsizei, GCGLsizei, GCGLsizei, GCGLint, GCGLenum, GCGLenum, GCGLSpan<const GCGLvoid>)
+{
+}
+
+void GraphicsContextGLOpenGL::texImage3D(GCGLenum, GCGLint, GCGLint, GCGLsizei, GCGLsizei, GCGLsizei, GCGLint, GCGLenum, GCGLenum, GCGLintptr)
+{
+}
+
+void GraphicsContextGLOpenGL::texSubImage3D(GCGLenum, GCGLint, GCGLint, GCGLint, GCGLint, GCGLsizei, GCGLsizei, GCGLsizei, GCGLenum, GCGLenum, GCGLSpan<const GCGLvoid>)
+{
+}
+
+void GraphicsContextGLOpenGL::texSubImage3D(GCGLenum, GCGLint, GCGLint, GCGLint, GCGLint, GCGLsizei, GCGLsizei, GCGLsizei, GCGLenum, GCGLenum, GCGLintptr)
+{
+}
+
+void GraphicsContextGLOpenGL::compressedTexImage3D(GCGLenum, GCGLint, GCGLenum, GCGLsizei, GCGLsizei, GCGLsizei, GCGLint, GCGLsizei, GCGLSpan<const GCGLvoid>)
+{
+}
+
+void GraphicsContextGLOpenGL::compressedTexImage3D(GCGLenum, GCGLint, GCGLenum, GCGLsizei, GCGLsizei, GCGLsizei, GCGLint, GCGLsizei, GCGLintptr)
+{
+}
+
+void GraphicsContextGLOpenGL::compressedTexSubImage3D(GCGLenum, GCGLint, GCGLint, GCGLint, GCGLint, GCGLsizei, GCGLsizei, GCGLsizei, GCGLenum, GCGLsizei, GCGLSpan<const GCGLvoid>)
+{
+}
+
+void GraphicsContextGLOpenGL::compressedTexSubImage3D(GCGLenum, GCGLint, GCGLint, GCGLint, GCGLint, GCGLsizei, GCGLsizei, GCGLsizei, GCGLenum, GCGLsizei, GCGLintptr)
+{
+}
+
+void GraphicsContextGLOpenGL::multiDrawArraysANGLE(GCGLenum, GCGLSpan<const GCGLint>, GCGLSpan<const GCGLsizei>, GCGLsizei)
+{
+    synthesizeGLError(GraphicsContextGL::INVALID_OPERATION);
+}
+
+void GraphicsContextGLOpenGL::multiDrawArraysInstancedANGLE(GCGLenum, GCGLSpan<const GCGLint>, GCGLSpan<const GCGLsizei>, GCGLSpan<const GCGLsizei>, GCGLsizei)
+{
+    synthesizeGLError(GraphicsContextGL::INVALID_OPERATION);
+}
+
+void GraphicsContextGLOpenGL::multiDrawElementsANGLE(GCGLenum, GCGLSpan<const GCGLsizei>, GCGLenum, GCGLSpan<const GCGLint>, GCGLsizei)
+{
+    synthesizeGLError(GraphicsContextGL::INVALID_OPERATION);
+}
+
+void GraphicsContextGLOpenGL::multiDrawElementsInstancedANGLE(GCGLenum, GCGLSpan<const GCGLsizei>, GCGLenum, GCGLSpan<const GCGLint>, GCGLSpan<const GCGLsizei>, GCGLsizei)
+{
+    synthesizeGLError(GraphicsContextGL::INVALID_OPERATION);
+}
+
+bool GraphicsContextGLOpenGL::texImage2DResourceSafe(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, GCGLint unpackAlignment)
+{
+    ASSERT(unpackAlignment == 1 || unpackAlignment == 2 || unpackAlignment == 4 || unpackAlignment == 8);
+    UniqueArray<unsigned char> zero;
+    unsigned size = 0;
+    if (width > 0 && height > 0) {
+        PixelStoreParams params;
+        params.alignment = unpackAlignment;
+        GCGLenum error = computeImageSizeInBytes(format, type, width, height, 1, params, &size, nullptr, nullptr);
+        if (error != GraphicsContextGL::NO_ERROR) {
+            synthesizeGLError(error);
+            return false;
+        }
+        zero = makeUniqueArray<unsigned char>(size);
+        if (!zero) {
+            synthesizeGLError(GraphicsContextGL::INVALID_VALUE);
+            return false;
+        }
+        memset(zero.get(), 0, size);
+    }
+    texImage2D(target, level, internalformat, width, height, border, format, type, makeGCGLSpan(zero.get(), size));
+    return true;
+}
+
</ins><span class="cx"> void GraphicsContextGLOpenGL::paintRenderingResultsToCanvas(ImageBuffer& imageBuffer)
</span><span class="cx"> {
</span><span class="cx">     if (!makeContextCurrent())
</span><span class="lines">@@ -103,6 +3177,6 @@
</span><span class="cx">     return readCompositedResults();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-} // namespace WebCore
</del><ins>+}
</ins><span class="cx"> 
</span><del>-#endif // ENABLE(WEBGL)
</del><ins>+#endif // ENABLE(WEBGL) && !USE(ANGLE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsopenglGraphicsContextGLOpenGLh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h (286292 => 286293)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h  2021-11-30 14:23:53 UTC (rev 286292)
+++ trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h     2021-11-30 14:54:52 UTC (rev 286293)
</span><span class="lines">@@ -25,53 +25,17 @@
</span><span class="cx"> 
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><del>-#if ENABLE(WEBGL)
</del><ins>+#if ENABLE(WEBGL) && !USE(ANGLE)
</ins><span class="cx"> 
</span><ins>+#include "ANGLEWebKitBridge.h"
+#include "ExtensionsGLOpenGLCommon.h"
</ins><span class="cx"> #include "GraphicsContextGL.h"
</span><ins>+#include "GraphicsContextGLState.h"
</ins><span class="cx"> #include <memory>
</span><del>-#include <wtf/HashCountedSet.h>
</del><span class="cx"> #include <wtf/HashMap.h>
</span><span class="cx"> #include <wtf/ListHashSet.h>
</span><del>-#include <wtf/RetainPtr.h>
-#include <wtf/UniqueArray.h>
</del><span class="cx"> #include <wtf/UniqueRef.h>
</span><span class="cx"> 
</span><del>-#if PLATFORM(COCOA)
-#include "GraphicsContextGLIOSurfaceSwapChain.h"
-#include "IOSurface.h"
-#endif
-
-#if USE(CA)
-#include "PlatformCALayer.h"
-#endif
-
-#if USE(ANGLE)
-#include "ANGLEUtilities.h"
-#else
-#include "ANGLEWebKitBridge.h"
-#include "ExtensionsGLOpenGLCommon.h"
-#endif
-
-#if PLATFORM(MAC)
-#include "ScopedHighPerformanceGPURequest.h"
-#endif
-
-// FIXME: Find a better way to avoid the name confliction for NO_ERROR.
-#if PLATFORM(WIN)
-#undef NO_ERROR
-#elif PLATFORM(GTK)
-// This define is from the X11 headers, but it's used below, so we must undefine it.
-#undef VERSION
-#endif
-
-#if PLATFORM(COCOA)
-OBJC_CLASS CALayer;
-OBJC_CLASS WebGLLayer;
-namespace WebCore {
-class GraphicsContextGLCVANGLE;
-}
-#endif // PLATFORM(COCOA)
-
</del><span class="cx"> #if USE(NICOSIA)
</span><span class="cx"> namespace Nicosia {
</span><span class="cx"> class GCGLLayer;
</span><span class="lines">@@ -80,9 +44,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> class ExtensionsGL;
</span><del>-#if USE(ANGLE)
-class ExtensionsGLANGLE;
-#elif USE(OPENGL_ES)
</del><ins>+#if USE(OPENGL_ES)
</ins><span class="cx"> class ExtensionsGLOpenGLES;
</span><span class="cx"> #elif USE(OPENGL)
</span><span class="cx"> class ExtensionsGLOpenGL;
</span><span class="lines">@@ -97,28 +59,11 @@
</span><span class="cx"> 
</span><span class="cx"> typedef HashMap<CString, uint64_t> ShaderNameHash;
</span><span class="cx"> 
</span><ins>+// Base class for GraphicsContextGL contexts that use OpenGL or OpenGL ES.
</ins><span class="cx"> class WEBCORE_EXPORT GraphicsContextGLOpenGL : public GraphicsContextGL
</span><span class="cx"> {
</span><span class="cx"> public:
</span><span class="cx">     virtual ~GraphicsContextGLOpenGL();
</span><del>-    PlatformLayer* platformLayer() const override;
-#if USE(ANGLE)
-    PlatformGraphicsContextGLDisplay platformDisplay() const;
-    PlatformGraphicsContextGLConfig platformConfig() const;
-    GCGLenum drawingBufferTextureTarget();
-    static GCGLenum drawingBufferTextureTargetQueryForDrawingTarget(GCGLenum drawingTarget);
-    static GCGLint EGLDrawingBufferTextureTargetForDrawingTarget(GCGLenum drawingTarget);
-    enum class ReleaseThreadResourceBehavior {
-        // Releases current context after GraphicsContextGLOpenGL calls done in the thread.
-        ReleaseCurrentContext,
-        // Releases all thread resources after GraphicsContextGLOpenGL calls done in the thread.
-        ReleaseThreadResources,
-        // Releases all global state. Should be used only after all depending objects have
-        // been released.
-        TerminateAndReleaseThreadResources
-    };
-    static bool releaseThreadResources(ReleaseThreadResourceBehavior);
-#endif
</del><span class="cx"> 
</span><span class="cx">     // With multisampling on, blit from multisampleFBO to regular FBO.
</span><span class="cx">     void prepareTexture();
</span><span class="lines">@@ -132,15 +77,9 @@
</span><span class="cx">     // Equivalent to ::glTexImage2D(). Allows pixels==0 with no allocation.
</span><span class="cx">     void texImage2DDirect(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, const void* pixels);
</span><span class="cx"> 
</span><del>-#if !USE(ANGLE)
-    // Helper to texImage2D with pixel==0 case: pixels are initialized to 0.
-    // Return true if no GL error is synthesized.
-    // By default, alignment is 4, the OpenGL default setting.
</del><span class="cx">     bool texImage2DResourceSafe(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, GCGLint alignment = 4);
</span><del>-#endif
</del><span class="cx"> 
</span><span class="cx">     bool isGLES2Compliant() const final;
</span><del>-
</del><span class="cx">     //----------------------------------------------------------------------
</span><span class="cx">     // Entry points for WebGL.
</span><span class="cx">     //
</span><span class="lines">@@ -206,9 +145,7 @@
</span><span class="cx">     GCGLint64 getInteger64(GCGLenum pname) final;
</span><span class="cx">     GCGLint64 getInteger64i(GCGLenum pname, GCGLuint index) final;
</span><span class="cx">     GCGLint getProgrami(PlatformGLObject program, GCGLenum pname) final;
</span><del>-#if !USE(ANGLE)
</del><span class="cx">     void getNonBuiltInActiveSymbolCount(PlatformGLObject program, GCGLenum pname, GCGLint* value);
</span><del>-#endif // !USE(ANGLE)
</del><span class="cx">     String getProgramInfoLog(PlatformGLObject) final;
</span><span class="cx">     String getUnmangledInfoLog(PlatformGLObject[2], GCGLsizei, const String&);
</span><span class="cx">     GCGLint getRenderbufferParameteri(GCGLenum target, GCGLenum pname) final;
</span><span class="lines">@@ -286,10 +223,8 @@
</span><span class="cx"> 
</span><span class="cx">     void useProgram(PlatformGLObject) final;
</span><span class="cx">     void validateProgram(PlatformGLObject) final;
</span><del>-#if !USE(ANGLE)
</del><span class="cx">     bool checkVaryingsPacking(PlatformGLObject vertexShader, PlatformGLObject fragmentShader) const;
</span><span class="cx">     bool precisionsMatch(PlatformGLObject vertexShader, PlatformGLObject fragmentShader) const;
</span><del>-#endif
</del><span class="cx"> 
</span><span class="cx">     void vertexAttrib1f(GCGLuint index, GCGLfloat x) final;
</span><span class="cx">     void vertexAttrib1fv(GCGLuint index, GCGLSpan<const GCGLfloat, 1> values) final;
</span><span class="lines">@@ -317,10 +252,8 @@
</span><span class="cx"> 
</span><span class="cx">     // ========== WebGL2 entry points.
</span><span class="cx"> 
</span><del>-#if !USE(ANGLE)
</del><span class="cx">     void bufferData(GCGLenum target, const void* data, GCGLenum usage, GCGLuint srcOffset, GCGLuint length);
</span><span class="cx">     void bufferSubData(GCGLenum target, GCGLintptr dstByteOffset, const void* srcData, GCGLuint srcOffset, GCGLuint length);
</span><del>-#endif
</del><span class="cx">     void copyBufferSubData(GCGLenum readTarget, GCGLenum writeTarget, GCGLintptr readOffset, GCGLintptr writeOffset, GCGLsizeiptr size) final;
</span><span class="cx"> 
</span><span class="cx">     void getBufferSubData(GCGLenum target, GCGLintptr offset, GCGLSpan<GCGLvoid> data) final;
</span><span class="lines">@@ -445,9 +378,6 @@
</span><span class="cx">     void paintRenderingResultsToCanvas(ImageBuffer&) final;
</span><span class="cx">     std::optional<PixelBuffer> paintRenderingResultsToPixelBuffer() final;
</span><span class="cx">     void paintCompositedResultsToCanvas(ImageBuffer&) final;
</span><del>-#if ENABLE(MEDIA_STREAM)
-    RefPtr<MediaSample> paintCompositedResultsToMediaSample() final;
-#endif
</del><span class="cx"> 
</span><span class="cx">     std::optional<PixelBuffer> readRenderingResultsForPainting();
</span><span class="cx">     std::optional<PixelBuffer> readCompositedResultsForPainting();
</span><span class="lines">@@ -456,9 +386,6 @@
</span><span class="cx">     void primitiveRestartIndex(GCGLuint);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if PLATFORM(COCOA)
-    void displayWasReconfigured();
-#endif
</del><span class="cx"> 
</span><span class="cx">     void setContextVisibility(bool) final;
</span><span class="cx"> 
</span><span class="lines">@@ -484,12 +411,8 @@
</span><span class="cx">     // all methods it contains may necessarily be supported on the
</span><span class="cx">     // current hardware. Must call ExtensionsGL::supports() to
</span><span class="cx">     // determine this.
</span><del>-#if !USE(ANGLE)
</del><span class="cx">     // Use covariant return type for OPENGL/OPENGL_ES
</span><span class="cx">     ExtensionsGLOpenGLCommon& getExtensions() final;
</span><del>-#else
-    ExtensionsGL& getExtensions() final;
-#endif
</del><span class="cx"> 
</span><span class="cx">     void simulateEventForTesting(SimulatedEventForTesting) override;
</span><span class="cx"> 
</span><span class="lines">@@ -497,31 +420,11 @@
</span><span class="cx"> 
</span><span class="cx">     void prepareForDisplay() override;
</span><span class="cx"> 
</span><del>-#if ENABLE(VIDEO) && USE(AVFOUNDATION)
-    GraphicsContextGLCV* asCV() final;
-#endif
-
-    static void paintToCanvas(const GraphicsContextGLAttributes&, PixelBuffer&&, const IntSize& canvasSize, GraphicsContext&);
-
-#if USE(ANGLE)
-    constexpr static EGLNativeDisplayType defaultDisplay = EGL_DEFAULT_DISPLAY;
-#if PLATFORM(COCOA)
-    constexpr static EGLNativeDisplayType lowPowerDisplay = EGL_CAST(EGLNativeDisplayType, -1);
-    constexpr static EGLNativeDisplayType highPerformanceDisplay = EGL_CAST(EGLNativeDisplayType, -2);
-#endif
-#endif
-
</del><span class="cx"> protected:
</span><span class="cx">     GraphicsContextGLOpenGL(GraphicsContextGLAttributes);
</span><del>-#if PLATFORM(COCOA)
-    GraphicsContextGLIOSurfaceSwapChain m_swapChain;
-    EGLDisplay m_displayObj { nullptr };
-    PlatformGraphicsContextGL m_contextObj { nullptr };
-    PlatformGraphicsContextGLConfig m_configObj { nullptr };
-#endif
</del><ins>+
</ins><span class="cx">     GCGLuint m_texture { 0 };
</span><span class="cx"> 
</span><del>-private:
</del><span class="cx">     // Called once by all the public entry points that eventually call OpenGL.
</span><span class="cx">     // Called once by all the public entry points of ExtensionsGL that eventually call OpenGL.
</span><span class="cx">     bool makeContextCurrent() WARN_UNUSED_RETURN;
</span><span class="lines">@@ -547,24 +450,7 @@
</span><span class="cx">     void resolveMultisamplingIfNecessary(const IntRect& = IntRect());
</span><span class="cx">     void attachDepthAndStencilBufferIfNeeded(GCGLuint internalDepthStencilFormat, int width, int height);
</span><span class="cx"> 
</span><del>-#if USE(ANGLE)
-    bool reshapeDisplayBufferBacking();
-#endif
-#if PLATFORM(COCOA)
-    bool allocateAndBindDisplayBufferBacking();
-    bool bindDisplayBufferBacking(std::unique_ptr<IOSurface> backing, void* pbuffer);
-    static bool makeCurrent(PlatformGraphicsContextGLDisplay, PlatformGraphicsContextGL);
-    friend class GraphicsContextGLCVANGLE;
-#endif
-#if USE(ANGLE)
-    // Returns false if context should be lost due to timeout.
-    bool waitAndUpdateOldestFrame() WARN_UNUSED_RETURN;
</del><span class="cx"> 
</span><del>-    // Platform specific behavior for releaseResources();
-    static void platformReleaseThreadResources();
-#endif
-
-#if !USE(ANGLE)
</del><span class="cx">     typedef HashMap<String, UniqueRef<sh::ShaderVariable>> ShaderSymbolMap;
</span><span class="cx"> 
</span><span class="cx">     struct ShaderSourceEntry {
</span><span class="lines">@@ -631,12 +517,8 @@
</span><span class="cx">     std::optional<String> originalSymbolInShaderSourceMap(PlatformGLObject shader, ANGLEShaderSymbolType, const String& name);
</span><span class="cx"> 
</span><span class="cx">     std::unique_ptr<ShaderNameHash> nameHashMapForShaders;
</span><del>-#endif // !USE(ANGLE)
</del><span class="cx"> 
</span><del>-#if USE(ANGLE)
-    friend class ExtensionsGLANGLE;
-    std::unique_ptr<ExtensionsGLANGLE> m_extensions;
-#elif USE(OPENGL_ES)
</del><ins>+#if USE(OPENGL_ES)
</ins><span class="cx">     friend class ExtensionsGLOpenGLES;
</span><span class="cx">     friend class ExtensionsGLOpenGLCommon;
</span><span class="cx">     std::unique_ptr<ExtensionsGLOpenGLES> m_extensions;
</span><span class="lines">@@ -648,9 +530,7 @@
</span><span class="cx"> 
</span><span class="cx">     Vector<Vector<float>> m_vertexArray;
</span><span class="cx"> 
</span><del>-#if !USE(ANGLE)
</del><span class="cx">     ANGLEWebKitBridge m_compiler;
</span><del>-#endif
</del><span class="cx"> 
</span><span class="cx">     GCGLuint m_fbo { 0 };
</span><span class="cx"> #if USE(COORDINATED_GRAPHICS)
</span><span class="lines">@@ -658,7 +538,7 @@
</span><span class="cx">     GCGLuint m_intermediateTexture { 0 };
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if !USE(ANGLE) && USE(OPENGL_ES)
</del><ins>+#if USE(OPENGL_ES)
</ins><span class="cx">     GCGLuint m_depthBuffer { 0 };
</span><span class="cx">     GCGLuint m_stencilBuffer { 0 };
</span><span class="cx"> #endif
</span><span class="lines">@@ -665,48 +545,8 @@
</span><span class="cx">     GCGLuint m_depthStencilBuffer { 0 };
</span><span class="cx"> 
</span><span class="cx">     GCGLuint m_internalColorFormat { 0 };
</span><del>-#if USE(ANGLE)
-    GCGLuint m_internalDepthStencilFormat { 0 };
-#endif
-    struct GraphicsContextGLState {
-        GCGLuint boundReadFBO { 0 };
-        GCGLuint boundDrawFBO { 0 };
-        GCGLenum activeTextureUnit { GraphicsContextGL::TEXTURE0 };
</del><span class="cx"> 
</span><del>-        using BoundTextureMap = HashMap<GCGLenum,
-            std::pair<GCGLuint, GCGLenum>,
-            IntHash<GCGLenum>,
-            WTF::UnsignedWithZeroKeyHashTraits<GCGLuint>,
-            PairHashTraits<WTF::UnsignedWithZeroKeyHashTraits<GCGLuint>, WTF::UnsignedWithZeroKeyHashTraits<GCGLuint>>
-        >;
-        BoundTextureMap boundTextureMap;
-        GCGLuint currentBoundTexture() const { return boundTexture(activeTextureUnit); }
-        GCGLuint boundTexture(GCGLenum textureUnit) const
-        {
-            auto iterator = boundTextureMap.find(textureUnit);
-            if (iterator != boundTextureMap.end())
-                return iterator->value.first;
-            return 0;
-        }
</del><span class="cx"> 
</span><del>-        GCGLuint currentBoundTarget() const { return boundTarget(activeTextureUnit); }
-        GCGLenum boundTarget(GCGLenum textureUnit) const
-        {
-            auto iterator = boundTextureMap.find(textureUnit);
-            if (iterator != boundTextureMap.end())
-                return iterator->value.second;
-            return 0;
-        }
-
-        void setBoundTexture(GCGLenum textureUnit, GCGLuint texture, GCGLenum target)
-        {
-            boundTextureMap.set(textureUnit, std::make_pair(texture, target));
-        }
-
-        using TextureSeedCount = HashCountedSet<GCGLuint, IntHash<GCGLuint>, WTF::UnsignedWithZeroKeyHashTraits<GCGLuint>>;
-        TextureSeedCount textureSeedCount;
-    };
-
</del><span class="cx">     GraphicsContextGLState m_state;
</span><span class="cx"> 
</span><span class="cx">     // For multisampling
</span><span class="lines">@@ -714,16 +554,6 @@
</span><span class="cx">     GCGLuint m_multisampleDepthStencilBuffer { 0 };
</span><span class="cx">     GCGLuint m_multisampleColorBuffer { 0 };
</span><span class="cx"> 
</span><del>-#if USE(ANGLE)
-    // For preserveDrawingBuffer:true without multisampling.
-    GCGLuint m_preserveDrawingBufferTexture { 0 };
-    // Attaches m_texture when m_preserveDrawingBufferTexture is non-zero.
-    GCGLuint m_preserveDrawingBufferFBO { 0 };
-    // Queried at display startup.
-    EGLint m_drawingBufferTextureTarget { -1 };
-
-#endif
-
</del><span class="cx">     // Errors raised by synthesizeGLError().
</span><span class="cx">     ListHashSet<GCGLenum> m_syntheticErrors;
</span><span class="cx"> 
</span><span class="lines">@@ -744,29 +574,8 @@
</span><span class="cx"> #if USE(CAIRO)
</span><span class="cx">     PlatformGLObject m_vao { 0 };
</span><span class="cx"> #endif
</span><del>-
-#if PLATFORM(COCOA)
-    // Backing store for the the buffer which is eventually used for display.
-    // When preserveDrawingBuffer == false, this is the drawing buffer backing store.
-    // When preserveDrawingBuffer == true, this is blitted to during display prepare.
-    std::unique_ptr<IOSurface> m_displayBufferBacking;
-    void* m_displayBufferPbuffer { nullptr };
-#endif
-#if PLATFORM(MAC)
-    bool m_switchesGPUOnDisplayReconfiguration { false };
-    ScopedHighPerformanceGPURequest m_highPerformanceGPURequest;
-#endif
-#if ENABLE(VIDEO) && USE(AVFOUNDATION)
-    std::unique_ptr<GraphicsContextGLCVANGLE> m_cv;
-#endif
-#if USE(ANGLE)
-    bool m_useFenceSyncForDisplayRateLimit = false;
-    static constexpr size_t maxPendingFrames = 3;
-    size_t m_oldestFrameCompletionFence { 0 };
-    ScopedGLFence m_frameCompletionFences[maxPendingFrames];
-#endif
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><del>-#endif // ENABLE(WEBGL)
</del><ins>+#endif // ENABLE(WEBGL) && !USE(ANGLE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsopenglGraphicsContextGLOpenGLCommoncpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp (286292 => 286293)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp  2021-11-30 14:23:53 UTC (rev 286292)
+++ trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp     2021-11-30 14:54:52 UTC (rev 286293)
</span><span class="lines">@@ -1,2884 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010, 2014 Apple Inc. All rights reserved.
- * Copyright (C) 2011 Google Inc. All rights reserved.
- * Copyright (C) 2012 ChangSeok Oh <shivamidow@gmail.com>
- * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "GraphicsContextGLOpenGL.h"
-
-#if ENABLE(WEBGL) && !USE(ANGLE)
-
-#if USE(OPENGL_ES)
-#include "ExtensionsGLOpenGLES.h"
-#else
-#include "ExtensionsGLOpenGL.h"
-#endif
-#include "ANGLEWebKitBridge.h"
-#include "GraphicsContext.h"
-#include "ImageBuffer.h"
-#include "IntRect.h"
-#include "IntSize.h"
-#include "Logging.h"
-#include "PixelBuffer.h"
-#include "TemporaryOpenGLSetting.h"
-#include "WebGLRenderingContextBase.h"
-#include <JavaScriptCore/RegularExpression.h>
-#include <cstring>
-#include <wtf/HexNumber.h>
-#include <wtf/MainThread.h>
-#include <wtf/ThreadSpecific.h>
-#include <wtf/UniqueArray.h>
-#include <wtf/Vector.h>
-#include <wtf/text/CString.h>
-#include <wtf/text/StringBuilder.h>
-
-#if USE(LIBEPOXY)
-#include "EpoxyShims.h"
-#elif USE(OPENGL_ES)
-#include "OpenGLESShims.h"
-#elif PLATFORM(GTK) || PLATFORM(WIN)
-#include "OpenGLShims.h"
-#endif
-
-namespace WebCore {
-
-static ThreadSpecific<ShaderNameHash*>& getCurrentNameHashMapForShader()
-{
-    static std::once_flag onceFlag;
-    static ThreadSpecific<ShaderNameHash*>* sharedNameHash;
-    std::call_once(onceFlag, [] {
-        sharedNameHash = new ThreadSpecific<ShaderNameHash*>;
-    });
-
-    return *sharedNameHash;
-}
-
-static void setCurrentNameHashMapForShader(ShaderNameHash* shaderNameHash)
-{
-    *getCurrentNameHashMapForShader() = shaderNameHash;
-}
-
-// Hash function used by the ANGLE translator/compiler to do
-// symbol name mangling. Since this is a static method, before
-// calling compileShader we set currentNameHashMapForShader
-// to point to the map kept by the current instance of GraphicsContextGLOpenGL.
-
-static uint64_t nameHashForShader(const char* name, size_t length)
-{
-    if (!length)
-        return 0;
-
-    CString nameAsCString = CString(name);
-
-    // Look up name in our local map.
-    ShaderNameHash*& currentNameHashMapForShader = *getCurrentNameHashMapForShader();
-    ShaderNameHash::iterator findResult = currentNameHashMapForShader->find(nameAsCString);
-    if (findResult != currentNameHashMapForShader->end())
-        return findResult->value;
-
-    unsigned hashValue = nameAsCString.hash();
-
-    // Convert the 32-bit hash from CString::hash into a 64-bit result
-    // by shifting then adding the size of our table. Overflow would
-    // only be a problem if we're already hashing to the same value (and
-    // we're hoping that over the lifetime of the context we
-    // don't have that many symbols).
-
-    uint64_t result = hashValue;
-    result = (result << 32) + (currentNameHashMapForShader->size() + 1);
-
-    currentNameHashMapForShader->set(nameAsCString, result);
-    return result;
-}
-
-void GraphicsContextGLOpenGL::validateDepthStencil(const char* packedDepthStencilExtension)
-{
-    auto attrs = contextAttributes();
-
-    ExtensionsGLOpenGLCommon& extensions = getExtensions();
-    if (attrs.stencil) {
-        if (extensions.supports(packedDepthStencilExtension)) {
-            extensions.ensureEnabled(packedDepthStencilExtension);
-            // Force depth if stencil is true.
-            attrs.depth = true;
-        } else
-            attrs.stencil = false;
-        setContextAttributes(attrs);
-    }
-    if (attrs.antialias && !m_isForWebGL2) {
-        if (!extensions.supports("GL_ANGLE_framebuffer_multisample")) {
-            attrs.antialias = false;
-            setContextAttributes(attrs);
-        } else
-            extensions.ensureEnabled("GL_ANGLE_framebuffer_multisample");
-    }
-}
-
-void GraphicsContextGLOpenGL::prepareTexture()
-{
-    if (m_layerComposited)
-        return;
-
-    if (!makeContextCurrent())
-        return;
-
-
-#if !USE(COORDINATED_GRAPHICS)
-    TemporaryOpenGLSetting scopedScissor(GL_SCISSOR_TEST, GL_FALSE);
-    TemporaryOpenGLSetting scopedDither(GL_DITHER, GL_FALSE);
-#endif
-
-    if (contextAttributes().antialias)
-        resolveMultisamplingIfNecessary();
-
-#if USE(COORDINATED_GRAPHICS)
-    std::swap(m_texture, m_compositorTexture);
-    std::swap(m_texture, m_intermediateTexture);
-    ::glBindFramebuffer(GL_FRAMEBUFFER, m_fbo);
-    ::glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, m_texture, 0);
-    glFlush();
-
-    ASSERT(m_state.boundReadFBO == m_state.boundDrawFBO);
-    if (m_state.boundDrawFBO != m_fbo)
-        ::glBindFramebufferEXT(GraphicsContextGL::FRAMEBUFFER, m_state.boundDrawFBO);
-    else
-        ::glBindFramebufferEXT(GraphicsContextGL::FRAMEBUFFER, m_fbo);
-    return;
-#endif
-
-    ::glActiveTexture(GL_TEXTURE0);
-    ::glBindTexture(GL_TEXTURE_2D, m_state.boundTarget(GL_TEXTURE0) == GL_TEXTURE_2D ? m_state.boundTexture(GL_TEXTURE0) : 0);
-    ::glActiveTexture(m_state.activeTextureUnit);
-    ASSERT(m_state.boundReadFBO == m_state.boundDrawFBO);
-    if (m_state.boundDrawFBO != m_fbo)
-        ::glBindFramebufferEXT(GraphicsContextGL::FRAMEBUFFER, m_state.boundDrawFBO);
-    ::glFlush();
-}
-
-std::optional<PixelBuffer> GraphicsContextGLOpenGL::readRenderingResults()
-{
-    bool mustRestoreFBO = false;
-    if (contextAttributes().antialias) {
-        resolveMultisamplingIfNecessary();
-        ::glBindFramebufferEXT(GraphicsContextGL::FRAMEBUFFER, m_fbo);
-        mustRestoreFBO = true;
-    } else {
-        ASSERT(m_state.boundReadFBO == m_state.boundDrawFBO);
-        if (m_state.boundDrawFBO != m_fbo) {
-            mustRestoreFBO = true;
-            ::glBindFramebufferEXT(GraphicsContextGL::FRAMEBUFFER, m_fbo);
-        }
-    }
-    auto result = readPixelsForPaintResults();
-    if (mustRestoreFBO)
-        ::glBindFramebufferEXT(GraphicsContextGL::FRAMEBUFFER, m_state.boundDrawFBO);
-    return result;
-}
-
-void GraphicsContextGLOpenGL::reshape(int width, int height)
-{
-    if (width == m_currentWidth && height == m_currentHeight)
-        return;
-
-    ASSERT(width >= 0 && height >= 0);
-    if (width < 0 || height < 0)
-        return;
-
-    if (!makeContextCurrent())
-        return;
-
-    markContextChanged();
-
-    m_currentWidth = width;
-    m_currentHeight = height;
-
-    validateAttributes();
-
-    TemporaryOpenGLSetting scopedScissor(GL_SCISSOR_TEST, GL_FALSE);
-    TemporaryOpenGLSetting scopedDither(GL_DITHER, GL_FALSE);
-    
-    bool mustRestoreFBO = reshapeFBOs(IntSize(width, height));
-
-    // Initialize renderbuffers to 0.
-    GLfloat clearColor[] = {0, 0, 0, 0}, clearDepth = 0;
-    GLint clearStencil = 0;
-    GLboolean colorMask[] = {GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE}, depthMask = GL_TRUE;
-    GLuint stencilMask = 0xffffffff, stencilMaskBack = 0xffffffff;
-    GLbitfield clearMask = GL_COLOR_BUFFER_BIT;
-    ::glGetFloatv(GL_COLOR_CLEAR_VALUE, clearColor);
-    ::glClearColor(0, 0, 0, 0);
-    ::glGetBooleanv(GL_COLOR_WRITEMASK, colorMask);
-    ::glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
-
-    auto attrs = contextAttributes();
-
-    if (attrs.depth) {
-        ::glGetFloatv(GL_DEPTH_CLEAR_VALUE, &clearDepth);
-        GraphicsContextGLOpenGL::clearDepth(1);
-        ::glGetBooleanv(GL_DEPTH_WRITEMASK, &depthMask);
-        ::glDepthMask(GL_TRUE);
-        clearMask |= GL_DEPTH_BUFFER_BIT;
-    }
-    if (attrs.stencil) {
-        ::glGetIntegerv(GL_STENCIL_CLEAR_VALUE, &clearStencil);
-        ::glClearStencil(0);
-        ::glGetIntegerv(GL_STENCIL_WRITEMASK, reinterpret_cast<GLint*>(&stencilMask));
-        ::glGetIntegerv(GL_STENCIL_BACK_WRITEMASK, reinterpret_cast<GLint*>(&stencilMaskBack));
-        ::glStencilMaskSeparate(GL_FRONT, 0xffffffff);
-        ::glStencilMaskSeparate(GL_BACK, 0xffffffff);
-        clearMask |= GL_STENCIL_BUFFER_BIT;
-    }
-
-    ::glClear(clearMask);
-
-    ::glClearColor(clearColor[0], clearColor[1], clearColor[2], clearColor[3]);
-    ::glColorMask(colorMask[0], colorMask[1], colorMask[2], colorMask[3]);
-    if (attrs.depth) {
-        GraphicsContextGLOpenGL::clearDepth(clearDepth);
-        ::glDepthMask(depthMask);
-    }
-    if (attrs.stencil) {
-        ::glClearStencil(clearStencil);
-        ::glStencilMaskSeparate(GL_FRONT, stencilMask);
-        ::glStencilMaskSeparate(GL_BACK, stencilMaskBack);
-    }
-
-    if (mustRestoreFBO)
-        ::glBindFramebufferEXT(GraphicsContextGL::FRAMEBUFFER, m_state.boundDrawFBO);
-
-    auto error = ::glGetError();
-    if (error != GL_NO_ERROR) {
-        RELEASE_LOG(WebGL, "Fatal: OpenGL error during GraphicsContextGL buffer initialization (%d).", error);
-        forceContextLost();
-        return;
-    }
-
-    ::glFlush();
-}
-
-bool GraphicsContextGLOpenGL::checkVaryingsPacking(PlatformGLObject vertexShader, PlatformGLObject fragmentShader) const
-{
-    ASSERT(m_shaderSourceMap.contains(vertexShader));
-    ASSERT(m_shaderSourceMap.contains(fragmentShader));
-    const auto& vertexEntry = m_shaderSourceMap.find(vertexShader)->value;
-    const auto& fragmentEntry = m_shaderSourceMap.find(fragmentShader)->value;
-
-    HashMap<String, sh::ShaderVariable> combinedVaryings;
-    for (const auto& vertexSymbol : vertexEntry.varyingMap) {
-        const String& symbolName = vertexSymbol.key;
-        // The varying map includes variables for each index of an array variable.
-        // We only want a single variable to represent the array.
-        if (symbolName.endsWith("]"))
-            continue;
-
-        // Don't count built in varyings.
-        if (symbolName == "gl_FragCoord" || symbolName == "gl_FrontFacing" || symbolName == "gl_PointCoord")
-            continue;
-
-        const auto& fragmentSymbol = fragmentEntry.varyingMap.find(symbolName);
-        if (fragmentSymbol != fragmentEntry.varyingMap.end())
-            combinedVaryings.add(symbolName, fragmentSymbol->value);
-    }
-
-    size_t numVaryings = combinedVaryings.size();
-    if (!numVaryings)
-        return true;
-
-    std::vector<sh::ShaderVariable> variables;
-    variables.reserve(combinedVaryings.size());
-    for (const auto& varyingSymbol : combinedVaryings.values())
-        variables.push_back(varyingSymbol);
-
-    GCGLint maxVaryingVectors = 0;
-#if USE(OPENGL_ES)
-    ::glGetIntegerv(MAX_VARYING_VECTORS, &maxVaryingVectors);
-#else
-    if (m_isForWebGL2)
-        ::glGetIntegerv(GL_MAX_VARYING_VECTORS, &maxVaryingVectors);
-    else {
-        GCGLint maxVaryingFloats = 0;
-        ::glGetIntegerv(GL_MAX_VARYING_FLOATS, &maxVaryingFloats);
-        maxVaryingVectors = maxVaryingFloats / 4;
-    }
-#endif
-    return sh::CheckVariablesWithinPackingLimits(maxVaryingVectors, variables);
-}
-
-bool GraphicsContextGLOpenGL::precisionsMatch(PlatformGLObject vertexShader, PlatformGLObject fragmentShader) const
-{
-    ASSERT(m_shaderSourceMap.contains(vertexShader));
-    ASSERT(m_shaderSourceMap.contains(fragmentShader));
-    const auto& vertexEntry = m_shaderSourceMap.find(vertexShader)->value;
-    const auto& fragmentEntry = m_shaderSourceMap.find(fragmentShader)->value;
-
-    HashMap<String, sh::GLenum> vertexSymbolPrecisionMap;
-
-    for (const auto& entry : vertexEntry.uniformMap) {
-        const std::string& mappedName = entry.value.get().mappedName;
-        vertexSymbolPrecisionMap.add(String(mappedName.c_str(), mappedName.length()), entry.value.get().precision);
-    }
-
-    for (const auto& entry : fragmentEntry.uniformMap) {
-        const std::string& mappedName = entry.value.get().mappedName;
-        const auto& vertexSymbol = vertexSymbolPrecisionMap.find(String(mappedName.c_str(), mappedName.length()));
-        if (vertexSymbol != vertexSymbolPrecisionMap.end() && vertexSymbol->value != entry.value.get().precision)
-            return false;
-    }
-
-    return true;
-}
-
-void GraphicsContextGLOpenGL::activeTexture(GCGLenum texture)
-{
-    if (!makeContextCurrent())
-        return;
-
-    m_state.activeTextureUnit = texture;
-    ::glActiveTexture(texture);
-}
-
-void GraphicsContextGLOpenGL::attachShader(PlatformGLObject program, PlatformGLObject shader)
-{
-    ASSERT(program);
-    ASSERT(shader);
-    if (!makeContextCurrent())
-        return;
-
-    m_shaderProgramSymbolCountMap.remove(program);
-    ::glAttachShader(program, shader);
-}
-
-void GraphicsContextGLOpenGL::bindAttribLocation(PlatformGLObject program, GCGLuint index, const String& name)
-{
-    ASSERT(program);
-    if (!makeContextCurrent())
-        return;
-
-    String mappedName = mappedSymbolName(program, SHADER_SYMBOL_TYPE_ATTRIBUTE, name);
-    LOG(WebGL, "::bindAttribLocation is mapping %s to %s", name.utf8().data(), mappedName.utf8().data());
-    ::glBindAttribLocation(program, index, mappedName.utf8().data());
-}
-
-void GraphicsContextGLOpenGL::bindBuffer(GCGLenum target, PlatformGLObject buffer)
-{
-    if (!makeContextCurrent())
-        return;
-
-    ::glBindBuffer(target, buffer);
-}
-
-void GraphicsContextGLOpenGL::bindFramebuffer(GCGLenum target, PlatformGLObject buffer)
-{
-    if (!makeContextCurrent())
-        return;
-
-    GLuint fbo;
-    if (buffer)
-        fbo = buffer;
-    else
-        fbo = (contextAttributes().antialias ? m_multisampleFBO : m_fbo);
-    ASSERT(target == GL_FRAMEBUFFER);
-    ASSERT(m_state.boundReadFBO == m_state.boundDrawFBO);
-    if (fbo != m_state.boundDrawFBO) {
-        ::glBindFramebufferEXT(target, fbo);
-        m_state.boundDrawFBO = m_state.boundReadFBO = fbo;
-    }
-}
-
-void GraphicsContextGLOpenGL::bindRenderbuffer(GCGLenum target, PlatformGLObject renderbuffer)
-{
-    if (!makeContextCurrent())
-        return;
-
-    ::glBindRenderbufferEXT(target, renderbuffer);
-}
-
-
-void GraphicsContextGLOpenGL::bindTexture(GCGLenum target, PlatformGLObject texture)
-{
-    if (!makeContextCurrent())
-        return;
-
-    m_state.setBoundTexture(m_state.activeTextureUnit, texture, target);
-    ::glBindTexture(target, texture);
-}
-
-void GraphicsContextGLOpenGL::blendColor(GCGLclampf red, GCGLclampf green, GCGLclampf blue, GCGLclampf alpha)
-{
-    if (!makeContextCurrent())
-        return;
-
-    ::glBlendColor(red, green, blue, alpha);
-}
-
-void GraphicsContextGLOpenGL::blendEquation(GCGLenum mode)
-{
-    if (!makeContextCurrent())
-        return;
-
-    ::glBlendEquation(mode);
-}
-
-void GraphicsContextGLOpenGL::blendEquationSeparate(GCGLenum modeRGB, GCGLenum modeAlpha)
-{
-    if (!makeContextCurrent())
-        return;
-
-    ::glBlendEquationSeparate(modeRGB, modeAlpha);
-}
-
-
-void GraphicsContextGLOpenGL::blendFunc(GCGLenum sfactor, GCGLenum dfactor)
-{
-    if (!makeContextCurrent())
-        return;
-
-    ::glBlendFunc(sfactor, dfactor);
-}       
-
-void GraphicsContextGLOpenGL::blendFuncSeparate(GCGLenum srcRGB, GCGLenum dstRGB, GCGLenum srcAlpha, GCGLenum dstAlpha)
-{
-    if (!makeContextCurrent())
-        return;
-
-    ::glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
-}
-
-void GraphicsContextGLOpenGL::bufferData(GCGLenum target, GCGLsizeiptr size, GCGLenum usage)
-{
-    if (!makeContextCurrent())
-        return;
-
-    ::glBufferData(target, size, 0, usage);
-}
-
-void GraphicsContextGLOpenGL::bufferData(GCGLenum target, GCGLSpan<const void> data, GCGLenum usage)
-{
-    if (!makeContextCurrent())
-        return;
-
-    ::glBufferData(target, data.bufSize, data.data, usage);
-}
-
-void GraphicsContextGLOpenGL::bufferSubData(GCGLenum target, GCGLintptr offset, GCGLSpan<const GCGLvoid> data)
-{
-    if (!makeContextCurrent())
-        return;
-
-    ::glBufferSubData(target, offset, data.bufSize, data.data);
-}
-
-GCGLenum GraphicsContextGLOpenGL::checkFramebufferStatus(GCGLenum target)
-{
-    if (!makeContextCurrent())
-        return GL_INVALID_OPERATION;
-
-    return ::glCheckFramebufferStatusEXT(target);
-}
-
-void GraphicsContextGLOpenGL::clearColor(GCGLclampf r, GCGLclampf g, GCGLclampf b, GCGLclampf a)
-{
-    if (!makeContextCurrent())
-        return;
-
-    ::glClearColor(r, g, b, a);
-}
-
-void GraphicsContextGLOpenGL::clear(GCGLbitfield mask)
-{
-    if (!makeContextCurrent())
-        return;
-
-    ::glClear(mask);
-    checkGPUStatus();
-}
-
-void GraphicsContextGLOpenGL::clearStencil(GCGLint s)
-{
-    if (!makeContextCurrent())
-        return;
-
-    ::glClearStencil(s);
-}
-
-void GraphicsContextGLOpenGL::colorMask(GCGLboolean red, GCGLboolean green, GCGLboolean blue, GCGLboolean alpha)
-{
-    if (!makeContextCurrent())
-        return;
-
-    ::glColorMask(red, green, blue, alpha);
-}
-
-void GraphicsContextGLOpenGL::compileShader(PlatformGLObject shader)
-{
-    ASSERT(shader);
-    if (!makeContextCurrent())
-        return;
-
-    // Turn on name mapping. Due to the way ANGLE name hashing works, we
-    // point a global hashmap to the map owned by this context.
-    ShBuiltInResources ANGLEResources = m_compiler.getResources();
-    ShHashFunction64 previousHashFunction = ANGLEResources.HashFunction;
-    ANGLEResources.HashFunction = nameHashForShader;
-
-    if (!nameHashMapForShaders)
-        nameHashMapForShaders = makeUnique<ShaderNameHash>();
-    setCurrentNameHashMapForShader(nameHashMapForShaders.get());
-    m_compiler.setResources(ANGLEResources);
-
-    String translatedShaderSource = m_extensions->getTranslatedShaderSourceANGLE(shader);
-
-    ANGLEResources.HashFunction = previousHashFunction;
-    m_compiler.setResources(ANGLEResources);
-    setCurrentNameHashMapForShader(nullp