<!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>[269317] branches/safari-610-branch/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/269317">269317</a></dd>
<dt>Author</dt> <dd>alancoon@apple.com</dd>
<dt>Date</dt> <dd>2020-11-03 11:14:11 -0800 (Tue, 03 Nov 2020)</dd>
</dl>

<h3>Log Message</h3>
<pre>Cherry-pick <a href="http://trac.webkit.org/projects/webkit/changeset/266364">r266364</a>. rdar://problem/70970205

    Implement WEBGL_compressed_texture_s3tc_srgb extension
    https://bugs.webkit.org/show_bug.cgi?id=215973

    Patch by James Darpinian <jdarpinian@chromium.org> on 2020-08-31
    Reviewed by Dean Jackson.

    Source/ThirdParty/ANGLE:

    * src/libANGLE/renderer/gl/formatutilsgl.cpp:
    (rx::nativegl::ExtAndVersionOrExt):
    (rx::nativegl::BuildInternalFormatInfoMap):

    Source/WebCore:

    Tested by webgl/2.0.0/conformance/extensions/webgl-compressed-texture-s3tc-srgb.html

    * CMakeLists.txt:
    * DerivedSources.make:
    * Sources.txt:
    * WebCore.xcodeproj/project.pbxproj:
    * bindings/js/JSDOMConvertWebGL.cpp:
    (WebCore::convertToJSValue):
    * html/canvas/WebGLCompressedTextureS3TCsRGB.cpp: Added.
    (WebCore::WebGLCompressedTextureS3TCsRGB::WebGLCompressedTextureS3TCsRGB):
    (WebCore::WebGLCompressedTextureS3TCsRGB::getName const):
    (WebCore::WebGLCompressedTextureS3TCsRGB::supported):
    * html/canvas/WebGLCompressedTextureS3TCsRGB.h: Added.
    * html/canvas/WebGLCompressedTextureS3TCsRGB.idl: Added.
    * html/canvas/WebGLExtension.h:
    * html/canvas/WebGLRenderingContext.cpp:
    (WebCore::WebGLRenderingContext::getExtension):
    (WebCore::WebGLRenderingContext::getSupportedExtensions):
    * html/canvas/WebGLRenderingContextBase.cpp:
    (WebCore::WebGLRenderingContextBase::extensionIsEnabled):
    (WebCore::WebGLRenderingContextBase::validateCompressedTexFuncData):
    (WebCore::WebGLRenderingContextBase::validateCompressedTexDimensions):
    (WebCore::WebGLRenderingContextBase::validateCompressedTexSubDimensions):
    * html/canvas/WebGLRenderingContextBase.h:
    * platform/graphics/ExtensionsGL.h:

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266364 268f45cc-cd09-0410-ab3c-d52691b4dbfc</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari610branchSourceThirdPartyANGLEChangeLog">branches/safari-610-branch/Source/ThirdParty/ANGLE/ChangeLog</a></li>
<li><a href="#branchessafari610branchSourceThirdPartyANGLEsrclibANGLErendererglformatutilsglcpp">branches/safari-610-branch/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/formatutilsgl.cpp</a></li>
<li><a href="#branchessafari610branchSourceWebCoreCMakeListstxt">branches/safari-610-branch/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#branchessafari610branchSourceWebCoreChangeLog">branches/safari-610-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari610branchSourceWebCoreDerivedSourcesmake">branches/safari-610-branch/Source/WebCore/DerivedSources.make</a></li>
<li><a href="#branchessafari610branchSourceWebCoreSourcestxt">branches/safari-610-branch/Source/WebCore/Sources.txt</a></li>
<li><a href="#branchessafari610branchSourceWebCoreWebCorexcodeprojprojectpbxproj">branches/safari-610-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#branchessafari610branchSourceWebCorebindingsjsJSDOMConvertWebGLcpp">branches/safari-610-branch/Source/WebCore/bindings/js/JSDOMConvertWebGL.cpp</a></li>
<li><a href="#branchessafari610branchSourceWebCorehtmlcanvasWebGLExtensionh">branches/safari-610-branch/Source/WebCore/html/canvas/WebGLExtension.h</a></li>
<li><a href="#branchessafari610branchSourceWebCorehtmlcanvasWebGLRenderingContextcpp">branches/safari-610-branch/Source/WebCore/html/canvas/WebGLRenderingContext.cpp</a></li>
<li><a href="#branchessafari610branchSourceWebCorehtmlcanvasWebGLRenderingContextBasecpp">branches/safari-610-branch/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp</a></li>
<li><a href="#branchessafari610branchSourceWebCorehtmlcanvasWebGLRenderingContextBaseh">branches/safari-610-branch/Source/WebCore/html/canvas/WebGLRenderingContextBase.h</a></li>
<li><a href="#branchessafari610branchSourceWebCoreplatformgraphicsExtensionsGLh">branches/safari-610-branch/Source/WebCore/platform/graphics/ExtensionsGL.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari610branchSourceWebCorehtmlcanvasWebGLCompressedTextureS3TCsRGBcpp">branches/safari-610-branch/Source/WebCore/html/canvas/WebGLCompressedTextureS3TCsRGB.cpp</a></li>
<li><a href="#branchessafari610branchSourceWebCorehtmlcanvasWebGLCompressedTextureS3TCsRGBh">branches/safari-610-branch/Source/WebCore/html/canvas/WebGLCompressedTextureS3TCsRGB.h</a></li>
<li><a href="#branchessafari610branchSourceWebCorehtmlcanvasWebGLCompressedTextureS3TCsRGBidl">branches/safari-610-branch/Source/WebCore/html/canvas/WebGLCompressedTextureS3TCsRGB.idl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari610branchSourceThirdPartyANGLEChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-610-branch/Source/ThirdParty/ANGLE/ChangeLog (269316 => 269317)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-610-branch/Source/ThirdParty/ANGLE/ChangeLog     2020-11-03 19:14:05 UTC (rev 269316)
+++ branches/safari-610-branch/Source/ThirdParty/ANGLE/ChangeLog        2020-11-03 19:14:11 UTC (rev 269317)
</span><span class="lines">@@ -1,3 +1,60 @@
</span><ins>+2020-11-02  Alan Coon  <alancoon@apple.com>
+
+        Cherry-pick r266364. rdar://problem/70970205
+
+    Implement WEBGL_compressed_texture_s3tc_srgb extension
+    https://bugs.webkit.org/show_bug.cgi?id=215973
+    
+    Patch by James Darpinian <jdarpinian@chromium.org> on 2020-08-31
+    Reviewed by Dean Jackson.
+    
+    Source/ThirdParty/ANGLE:
+    
+    * src/libANGLE/renderer/gl/formatutilsgl.cpp:
+    (rx::nativegl::ExtAndVersionOrExt):
+    (rx::nativegl::BuildInternalFormatInfoMap):
+    
+    Source/WebCore:
+    
+    Tested by webgl/2.0.0/conformance/extensions/webgl-compressed-texture-s3tc-srgb.html
+    
+    * CMakeLists.txt:
+    * DerivedSources.make:
+    * Sources.txt:
+    * WebCore.xcodeproj/project.pbxproj:
+    * bindings/js/JSDOMConvertWebGL.cpp:
+    (WebCore::convertToJSValue):
+    * html/canvas/WebGLCompressedTextureS3TCsRGB.cpp: Added.
+    (WebCore::WebGLCompressedTextureS3TCsRGB::WebGLCompressedTextureS3TCsRGB):
+    (WebCore::WebGLCompressedTextureS3TCsRGB::getName const):
+    (WebCore::WebGLCompressedTextureS3TCsRGB::supported):
+    * html/canvas/WebGLCompressedTextureS3TCsRGB.h: Added.
+    * html/canvas/WebGLCompressedTextureS3TCsRGB.idl: Added.
+    * html/canvas/WebGLExtension.h:
+    * html/canvas/WebGLRenderingContext.cpp:
+    (WebCore::WebGLRenderingContext::getExtension):
+    (WebCore::WebGLRenderingContext::getSupportedExtensions):
+    * html/canvas/WebGLRenderingContextBase.cpp:
+    (WebCore::WebGLRenderingContextBase::extensionIsEnabled):
+    (WebCore::WebGLRenderingContextBase::validateCompressedTexFuncData):
+    (WebCore::WebGLRenderingContextBase::validateCompressedTexDimensions):
+    (WebCore::WebGLRenderingContextBase::validateCompressedTexSubDimensions):
+    * html/canvas/WebGLRenderingContextBase.h:
+    * platform/graphics/ExtensionsGL.h:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266364 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-08-31  James Darpinian  <jdarpinian@chromium.org>
+
+            Implement WEBGL_compressed_texture_s3tc_srgb extension
+            https://bugs.webkit.org/show_bug.cgi?id=215973
+
+            Reviewed by Dean Jackson.
+
+            * src/libANGLE/renderer/gl/formatutilsgl.cpp:
+            (rx::nativegl::ExtAndVersionOrExt):
+            (rx::nativegl::BuildInternalFormatInfoMap):
+
</ins><span class="cx"> 2020-10-29  Russell Epstein  <repstein@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Cherry-pick r269118. rdar://problem/70795320
</span></span></pre></div>
<a id="branchessafari610branchSourceThirdPartyANGLEsrclibANGLErendererglformatutilsglcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-610-branch/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/formatutilsgl.cpp (269316 => 269317)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-610-branch/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/formatutilsgl.cpp    2020-11-03 19:14:05 UTC (rev 269316)
+++ branches/safari-610-branch/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/formatutilsgl.cpp       2020-11-03 19:14:11 UTC (rev 269317)
</span><span class="lines">@@ -50,6 +50,21 @@
</span><span class="cx">     return requirement;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+// supported = requiredExt && (version || requiredWithoutVersionExt)
+static inline SupportRequirement ExtAndVersionOrExt(const std::string &requiredExt,
+                                                    GLuint major,
+                                                    GLuint minor,
+                                                    const std::string &requiredWithoutVersionExt)
+{
+    SupportRequirement requirement;
+    requirement.requiredExtensions.resize(1);
+    angle::SplitStringAlongWhitespace(requiredExt, &requirement.requiredExtensions[0]);
+    requirement.version.major = major;
+    requirement.version.minor = minor;
+    angle::SplitStringAlongWhitespace(requiredWithoutVersionExt, &requirement.versionExtensions);
+    return requirement;
+}
+
</ins><span class="cx"> // supported = version
</span><span class="cx"> static inline SupportRequirement VersionOnly(GLuint major, GLuint minor)
</span><span class="cx"> {
</span><span class="lines">@@ -325,11 +340,11 @@
</span><span class="cx">     InsertFormatMapping(&map, GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE, ExtsOnly("GL_EXT_texture_compression_s3tc"),     AlwaysSupported(), NeverSupported(), ExtsOnly("GL_ANGLE_texture_compression_dxt5", "GL_EXT_texture_compression_s3tc"), AlwaysSupported(), NeverSupported(),                      NeverSupported()                );
</span><span class="cx"> 
</span><span class="cx">     // From GL_EXT_texture_compression_s3tc_srgb
</span><del>-    //                       | Format                                | OpenGL texture support                                         | Filter           | Render          | OpenGL ES texture support                                                                             | Filter           | OpenGL ES texture attachment support | OpenGL ES renderbuffer support |
-    InsertFormatMapping(&map, GL_COMPRESSED_SRGB_S3TC_DXT1_EXT,       ExtsOnly("GL_EXT_texture_compression_s3tc GL_EXT_texture_sRGB"), AlwaysSupported(), NeverSupported(), ExtsOnly("GL_EXT_texture_compression_s3tc_srgb", "GL_EXT_texture_compression_s3tc GL_NV_sRGB_formats"), AlwaysSupported(), NeverSupported(),                      NeverSupported()                );
-    InsertFormatMapping(&map, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, ExtsOnly("GL_EXT_texture_compression_s3tc GL_EXT_texture_sRGB"), AlwaysSupported(), NeverSupported(), ExtsOnly("GL_EXT_texture_compression_s3tc_srgb", "GL_EXT_texture_compression_s3tc GL_NV_sRGB_formats"), AlwaysSupported(), NeverSupported(),                      NeverSupported()                );
-    InsertFormatMapping(&map, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, ExtsOnly("GL_EXT_texture_compression_s3tc GL_EXT_texture_sRGB"), AlwaysSupported(), NeverSupported(), ExtsOnly("GL_EXT_texture_compression_s3tc_srgb", "GL_EXT_texture_compression_s3tc GL_NV_sRGB_formats"), AlwaysSupported(), NeverSupported(),                      NeverSupported()                );
-    InsertFormatMapping(&map, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, ExtsOnly("GL_EXT_texture_compression_s3tc GL_EXT_texture_sRGB"), AlwaysSupported(), NeverSupported(), ExtsOnly("GL_EXT_texture_compression_s3tc_srgb", "GL_EXT_texture_compression_s3tc GL_NV_sRGB_formats"), AlwaysSupported(), NeverSupported(),                      NeverSupported()                );
</del><ins>+    //                       | Format                                | OpenGL texture support                                                            | Filter           | Render          | OpenGL ES texture support                                                                             | Filter           | OpenGL ES texture attachment support | OpenGL ES renderbuffer support |
+    InsertFormatMapping(&map, GL_COMPRESSED_SRGB_S3TC_DXT1_EXT,       ExtAndVersionOrExt("GL_EXT_texture_compression_s3tc", 2, 1, "GL_EXT_texture_sRGB"), AlwaysSupported(), NeverSupported(), ExtsOnly("GL_EXT_texture_compression_s3tc_srgb", "GL_EXT_texture_compression_s3tc GL_NV_sRGB_formats"), AlwaysSupported(), NeverSupported(),                      NeverSupported()                );
+    InsertFormatMapping(&map, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, ExtAndVersionOrExt("GL_EXT_texture_compression_s3tc", 2, 1, "GL_EXT_texture_sRGB"), AlwaysSupported(), NeverSupported(), ExtsOnly("GL_EXT_texture_compression_s3tc_srgb", "GL_EXT_texture_compression_s3tc GL_NV_sRGB_formats"), AlwaysSupported(), NeverSupported(),                      NeverSupported()                );
+    InsertFormatMapping(&map, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, ExtAndVersionOrExt("GL_EXT_texture_compression_s3tc", 2, 1, "GL_EXT_texture_sRGB"), AlwaysSupported(), NeverSupported(), ExtsOnly("GL_EXT_texture_compression_s3tc_srgb", "GL_EXT_texture_compression_s3tc GL_NV_sRGB_formats"), AlwaysSupported(), NeverSupported(),                      NeverSupported()                );
+    InsertFormatMapping(&map, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, ExtAndVersionOrExt("GL_EXT_texture_compression_s3tc", 2, 1, "GL_EXT_texture_sRGB"), AlwaysSupported(), NeverSupported(), ExtsOnly("GL_EXT_texture_compression_s3tc_srgb", "GL_EXT_texture_compression_s3tc GL_NV_sRGB_formats"), AlwaysSupported(), NeverSupported(),                      NeverSupported()                );
</ins><span class="cx"> 
</span><span class="cx">     // From GL_OES_compressed_ETC1_RGB8_texture
</span><span class="cx">     InsertFormatMapping(&map, GL_ETC1_RGB8_OES,                   VersionOrExts(4, 3, "GL_ARB_ES3_compatibility"), AlwaysSupported(), NeverSupported(), VersionOrExts(3, 0, "GL_OES_compressed_ETC1_RGB8_texture"),       AlwaysSupported(), NeverSupported(),                      NeverSupported()                );
</span></span></pre></div>
<a id="branchessafari610branchSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: branches/safari-610-branch/Source/WebCore/CMakeLists.txt (269316 => 269317)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-610-branch/Source/WebCore/CMakeLists.txt 2020-11-03 19:14:05 UTC (rev 269316)
+++ branches/safari-610-branch/Source/WebCore/CMakeLists.txt    2020-11-03 19:14:11 UTC (rev 269317)
</span><span class="lines">@@ -1421,6 +1421,7 @@
</span><span class="cx">         html/canvas/WebGLCompressedTextureETC1.cpp
</span><span class="cx">         html/canvas/WebGLCompressedTexturePVRTC.cpp
</span><span class="cx">         html/canvas/WebGLCompressedTextureS3TC.cpp
</span><ins>+        html/canvas/WebGLCompressedTextureS3TCsRGB.cpp
</ins><span class="cx">         html/canvas/WebGLContextEvent.cpp
</span><span class="cx">         html/canvas/WebGLContextGroup.cpp
</span><span class="cx">         html/canvas/WebGLContextObject.cpp
</span><span class="lines">@@ -1477,6 +1478,7 @@
</span><span class="cx">     html/canvas/WebGLCompressedTextureETC1.idl
</span><span class="cx">     html/canvas/WebGLCompressedTexturePVRTC.idl
</span><span class="cx">     html/canvas/WebGLCompressedTextureS3TC.idl
</span><ins>+    html/canvas/WebGLCompressedTextureS3TCsRGB.idl
</ins><span class="cx">     html/canvas/WebGLContextAttributes.idl
</span><span class="cx">     html/canvas/WebGLContextEvent.idl
</span><span class="cx">     html/canvas/WebGLDebugRendererInfo.idl
</span></span></pre></div>
<a id="branchessafari610branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-610-branch/Source/WebCore/ChangeLog (269316 => 269317)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-610-branch/Source/WebCore/ChangeLog      2020-11-03 19:14:05 UTC (rev 269316)
+++ branches/safari-610-branch/Source/WebCore/ChangeLog 2020-11-03 19:14:11 UTC (rev 269317)
</span><span class="lines">@@ -1,5 +1,84 @@
</span><span class="cx"> 2020-11-02  Alan Coon  <alancoon@apple.com>
</span><span class="cx"> 
</span><ins>+        Cherry-pick r266364. rdar://problem/70970205
+
+    Implement WEBGL_compressed_texture_s3tc_srgb extension
+    https://bugs.webkit.org/show_bug.cgi?id=215973
+    
+    Patch by James Darpinian <jdarpinian@chromium.org> on 2020-08-31
+    Reviewed by Dean Jackson.
+    
+    Source/ThirdParty/ANGLE:
+    
+    * src/libANGLE/renderer/gl/formatutilsgl.cpp:
+    (rx::nativegl::ExtAndVersionOrExt):
+    (rx::nativegl::BuildInternalFormatInfoMap):
+    
+    Source/WebCore:
+    
+    Tested by webgl/2.0.0/conformance/extensions/webgl-compressed-texture-s3tc-srgb.html
+    
+    * CMakeLists.txt:
+    * DerivedSources.make:
+    * Sources.txt:
+    * WebCore.xcodeproj/project.pbxproj:
+    * bindings/js/JSDOMConvertWebGL.cpp:
+    (WebCore::convertToJSValue):
+    * html/canvas/WebGLCompressedTextureS3TCsRGB.cpp: Added.
+    (WebCore::WebGLCompressedTextureS3TCsRGB::WebGLCompressedTextureS3TCsRGB):
+    (WebCore::WebGLCompressedTextureS3TCsRGB::getName const):
+    (WebCore::WebGLCompressedTextureS3TCsRGB::supported):
+    * html/canvas/WebGLCompressedTextureS3TCsRGB.h: Added.
+    * html/canvas/WebGLCompressedTextureS3TCsRGB.idl: Added.
+    * html/canvas/WebGLExtension.h:
+    * html/canvas/WebGLRenderingContext.cpp:
+    (WebCore::WebGLRenderingContext::getExtension):
+    (WebCore::WebGLRenderingContext::getSupportedExtensions):
+    * html/canvas/WebGLRenderingContextBase.cpp:
+    (WebCore::WebGLRenderingContextBase::extensionIsEnabled):
+    (WebCore::WebGLRenderingContextBase::validateCompressedTexFuncData):
+    (WebCore::WebGLRenderingContextBase::validateCompressedTexDimensions):
+    (WebCore::WebGLRenderingContextBase::validateCompressedTexSubDimensions):
+    * html/canvas/WebGLRenderingContextBase.h:
+    * platform/graphics/ExtensionsGL.h:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266364 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-08-31  James Darpinian  <jdarpinian@chromium.org>
+
+            Implement WEBGL_compressed_texture_s3tc_srgb extension
+            https://bugs.webkit.org/show_bug.cgi?id=215973
+
+            Reviewed by Dean Jackson.
+
+            Tested by webgl/2.0.0/conformance/extensions/webgl-compressed-texture-s3tc-srgb.html
+
+            * CMakeLists.txt:
+            * DerivedSources.make:
+            * Sources.txt:
+            * WebCore.xcodeproj/project.pbxproj:
+            * bindings/js/JSDOMConvertWebGL.cpp:
+            (WebCore::convertToJSValue):
+            * html/canvas/WebGLCompressedTextureS3TCsRGB.cpp: Added.
+            (WebCore::WebGLCompressedTextureS3TCsRGB::WebGLCompressedTextureS3TCsRGB):
+            (WebCore::WebGLCompressedTextureS3TCsRGB::getName const):
+            (WebCore::WebGLCompressedTextureS3TCsRGB::supported):
+            * html/canvas/WebGLCompressedTextureS3TCsRGB.h: Added.
+            * html/canvas/WebGLCompressedTextureS3TCsRGB.idl: Added.
+            * html/canvas/WebGLExtension.h:
+            * html/canvas/WebGLRenderingContext.cpp:
+            (WebCore::WebGLRenderingContext::getExtension):
+            (WebCore::WebGLRenderingContext::getSupportedExtensions):
+            * html/canvas/WebGLRenderingContextBase.cpp:
+            (WebCore::WebGLRenderingContextBase::extensionIsEnabled):
+            (WebCore::WebGLRenderingContextBase::validateCompressedTexFuncData):
+            (WebCore::WebGLRenderingContextBase::validateCompressedTexDimensions):
+            (WebCore::WebGLRenderingContextBase::validateCompressedTexSubDimensions):
+            * html/canvas/WebGLRenderingContextBase.h:
+            * platform/graphics/ExtensionsGL.h:
+
+2020-11-02  Alan Coon  <alancoon@apple.com>
+
</ins><span class="cx">         Cherry-pick r266362. rdar://problem/70970398
</span><span class="cx"> 
</span><span class="cx">     WebGL goes in a bad state where glContext.createProgram() returns null
</span></span></pre></div>
<a id="branchessafari610branchSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: branches/safari-610-branch/Source/WebCore/DerivedSources.make (269316 => 269317)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-610-branch/Source/WebCore/DerivedSources.make    2020-11-03 19:14:05 UTC (rev 269316)
+++ branches/safari-610-branch/Source/WebCore/DerivedSources.make       2020-11-03 19:14:11 UTC (rev 269317)
</span><span class="lines">@@ -938,6 +938,7 @@
</span><span class="cx">     $(WebCore)/html/canvas/WebGLCompressedTextureETC1.idl \
</span><span class="cx">     $(WebCore)/html/canvas/WebGLCompressedTexturePVRTC.idl \
</span><span class="cx">     $(WebCore)/html/canvas/WebGLCompressedTextureS3TC.idl \
</span><ins>+    $(WebCore)/html/canvas/WebGLCompressedTextureS3TCsRGB.idl \
</ins><span class="cx">     $(WebCore)/html/canvas/WebGLContextAttributes.idl \
</span><span class="cx">     $(WebCore)/html/canvas/WebGLContextEvent.idl \
</span><span class="cx">     $(WebCore)/html/canvas/WebGLDebugRendererInfo.idl \
</span></span></pre></div>
<a id="branchessafari610branchSourceWebCoreSourcestxt"></a>
<div class="modfile"><h4>Modified: branches/safari-610-branch/Source/WebCore/Sources.txt (269316 => 269317)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-610-branch/Source/WebCore/Sources.txt    2020-11-03 19:14:05 UTC (rev 269316)
+++ branches/safari-610-branch/Source/WebCore/Sources.txt       2020-11-03 19:14:11 UTC (rev 269317)
</span><span class="lines">@@ -1259,6 +1259,7 @@
</span><span class="cx"> html/canvas/WebGLCompressedTextureETC1.cpp
</span><span class="cx"> html/canvas/WebGLCompressedTexturePVRTC.cpp
</span><span class="cx"> html/canvas/WebGLCompressedTextureS3TC.cpp
</span><ins>+html/canvas/WebGLCompressedTextureS3TCsRGB.cpp
</ins><span class="cx"> html/canvas/WebGLContextEvent.cpp
</span><span class="cx"> html/canvas/WebGLContextGroup.cpp
</span><span class="cx"> html/canvas/WebGLContextObject.cpp
</span><span class="lines">@@ -3532,6 +3533,7 @@
</span><span class="cx"> JSWebGLCompressedTextureETC1.cpp
</span><span class="cx"> JSWebGLCompressedTexturePVRTC.cpp
</span><span class="cx"> JSWebGLCompressedTextureS3TC.cpp
</span><ins>+JSWebGLCompressedTextureS3TCsRGB.cpp
</ins><span class="cx"> JSWebGLContextAttributes.cpp
</span><span class="cx"> JSWebGLContextEvent.cpp
</span><span class="cx"> JSWebGLDebugRendererInfo.cpp
</span></span></pre></div>
<a id="branchessafari610branchSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: branches/safari-610-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj (269316 => 269317)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-610-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj      2020-11-03 19:14:05 UTC (rev 269316)
+++ branches/safari-610-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2020-11-03 19:14:11 UTC (rev 269317)
</span><span class="lines">@@ -11957,6 +11957,9 @@
</span><span class="cx">          A31C4E5116E02B08002F7957 /* JSOESTextureHalfFloat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSOESTextureHalfFloat.cpp; sourceTree = "<group>"; };
</span><span class="cx">          A31C4E5316E02B40002F7957 /* JSOESTextureHalfFloat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSOESTextureHalfFloat.h; sourceTree = "<group>"; };
</span><span class="cx">          A334BD822194E4610000D77F /* SSLKeyGenerator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SSLKeyGenerator.cpp; sourceTree = "<group>"; };
</span><ins>+               A33C9F9124F835AA000F0845 /* WebGLCompressedTextureS3TCsRGB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGLCompressedTextureS3TCsRGB.h; sourceTree = "<group>"; };
+               A33C9F9324F835AB000F0845 /* WebGLCompressedTextureS3TCsRGB.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebGLCompressedTextureS3TCsRGB.cpp; sourceTree = "<group>"; };
+               A33C9F9424F835AB000F0845 /* WebGLCompressedTextureS3TCsRGB.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebGLCompressedTextureS3TCsRGB.idl; sourceTree = "<group>"; };
</ins><span class="cx">           A3AF9D81203252EE006CAD06 /* UserAgentCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UserAgentCocoa.mm; sourceTree = "<group>"; };
</span><span class="cx">          A3AF9D8220325324006CAD06 /* UserAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserAgent.h; sourceTree = "<group>"; };
</span><span class="cx">          A3AF9D8320325691006CAD06 /* UserAgentIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UserAgentIOS.mm; sourceTree = "<group>"; };
</span><span class="lines">@@ -19280,6 +19283,9 @@
</span><span class="cx">                          6E3FAE8C14733FDB00E42306 /* WebGLCompressedTextureS3TC.cpp */,
</span><span class="cx">                          6E3FAE8D14733FDB00E42306 /* WebGLCompressedTextureS3TC.h */,
</span><span class="cx">                          6E3FAE9014733FEA00E42306 /* WebGLCompressedTextureS3TC.idl */,
</span><ins>+                               A33C9F9324F835AB000F0845 /* WebGLCompressedTextureS3TCsRGB.cpp */,
+                               A33C9F9124F835AA000F0845 /* WebGLCompressedTextureS3TCsRGB.h */,
+                               A33C9F9424F835AB000F0845 /* WebGLCompressedTextureS3TCsRGB.idl */,
</ins><span class="cx">                           6E4E91AA10F7FB3100A2779C /* WebGLContextAttributes.h */,
</span><span class="cx">                          6E4E91AB10F7FB3100A2779C /* WebGLContextAttributes.idl */,
</span><span class="cx">                          93F6F1EA127F70B10055CB06 /* WebGLContextEvent.cpp */,
</span></span></pre></div>
<a id="branchessafari610branchSourceWebCorebindingsjsJSDOMConvertWebGLcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-610-branch/Source/WebCore/bindings/js/JSDOMConvertWebGL.cpp (269316 => 269317)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-610-branch/Source/WebCore/bindings/js/JSDOMConvertWebGL.cpp      2020-11-03 19:14:05 UTC (rev 269316)
+++ branches/safari-610-branch/Source/WebCore/bindings/js/JSDOMConvertWebGL.cpp 2020-11-03 19:14:11 UTC (rev 269317)
</span><span class="lines">@@ -52,6 +52,7 @@
</span><span class="cx"> #include "JSWebGLCompressedTextureETC1.h"
</span><span class="cx"> #include "JSWebGLCompressedTexturePVRTC.h"
</span><span class="cx"> #include "JSWebGLCompressedTextureS3TC.h"
</span><ins>+#include "JSWebGLCompressedTextureS3TCsRGB.h"
</ins><span class="cx"> #include "JSWebGLDebugRendererInfo.h"
</span><span class="cx"> #include "JSWebGLDebugShaders.h"
</span><span class="cx"> #include "JSWebGLDepthTexture.h"
</span><span class="lines">@@ -204,6 +205,8 @@
</span><span class="cx">         return toJS(&lexicalGlobalObject, &globalObject, static_cast<WebGLCompressedTexturePVRTC&>(extension));
</span><span class="cx">     case WebGLExtension::WebGLCompressedTextureS3TCName:
</span><span class="cx">         return toJS(&lexicalGlobalObject, &globalObject, static_cast<WebGLCompressedTextureS3TC&>(extension));
</span><ins>+    case WebGLExtension::WebGLCompressedTextureS3TCsRGBName:
+        return toJS(&lexicalGlobalObject, &globalObject, static_cast<WebGLCompressedTextureS3TCsRGB&>(extension));
</ins><span class="cx">     case WebGLExtension::WebGLCompressedTextureASTCName:
</span><span class="cx">         return toJS(&lexicalGlobalObject, &globalObject, static_cast<WebGLCompressedTextureASTC&>(extension));
</span><span class="cx">     case WebGLExtension::WebGLDepthTextureName:
</span></span></pre></div>
<a id="branchessafari610branchSourceWebCorehtmlcanvasWebGLCompressedTextureS3TCsRGBcpp"></a>
<div class="addfile"><h4>Added: branches/safari-610-branch/Source/WebCore/html/canvas/WebGLCompressedTextureS3TCsRGB.cpp (0 => 269317)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-610-branch/Source/WebCore/html/canvas/WebGLCompressedTextureS3TCsRGB.cpp                         (rev 0)
+++ branches/safari-610-branch/Source/WebCore/html/canvas/WebGLCompressedTextureS3TCsRGB.cpp    2020-11-03 19:14:11 UTC (rev 269317)
</span><span class="lines">@@ -0,0 +1,63 @@
</span><ins>+/*
+ * Copyright (C) 2020 Google 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 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 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"
+
+#if ENABLE(WEBGL)
+#include "WebGLCompressedTextureS3TCsRGB.h"
+
+#include "ExtensionsGL.h"
+#include "WebGLRenderingContextBase.h"
+
+namespace WebCore {
+
+WebGLCompressedTextureS3TCsRGB::WebGLCompressedTextureS3TCsRGB(WebGLRenderingContextBase& context)
+    : WebGLExtension(context)
+{
+    auto& extensions = context.graphicsContextGL()->getExtensions();
+    extensions.ensureEnabled("GL_EXT_texture_compression_s3tc_srgb");
+
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_SRGB_S3TC_DXT1_EXT);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT);
+    context.addCompressedTextureFormat(ExtensionsGL::COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT);
+}
+
+WebGLCompressedTextureS3TCsRGB::~WebGLCompressedTextureS3TCsRGB() = default;
+
+WebGLExtension::ExtensionName WebGLCompressedTextureS3TCsRGB::getName() const
+{
+    return WebGLCompressedTextureS3TCsRGBName;
+}
+
+bool WebGLCompressedTextureS3TCsRGB::supported(WebGLRenderingContextBase& context)
+{
+    auto& extensions = context.graphicsContextGL()->getExtensions();
+    return extensions.supports("GL_EXT_texture_compression_s3tc_srgb");
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(WEBGL)
</ins></span></pre></div>
<a id="branchessafari610branchSourceWebCorehtmlcanvasWebGLCompressedTextureS3TCsRGBh"></a>
<div class="addfile"><h4>Added: branches/safari-610-branch/Source/WebCore/html/canvas/WebGLCompressedTextureS3TCsRGB.h (0 => 269317)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-610-branch/Source/WebCore/html/canvas/WebGLCompressedTextureS3TCsRGB.h                           (rev 0)
+++ branches/safari-610-branch/Source/WebCore/html/canvas/WebGLCompressedTextureS3TCsRGB.h      2020-11-03 19:14:11 UTC (rev 269317)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+/*
+ * Copyright (C) 2020 Google 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 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 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)
+
+#include "WebGLExtension.h"
+
+namespace WebCore {
+
+class WebGLTexture;
+
+class WebGLCompressedTextureS3TCsRGB final : public WebGLExtension {
+public:
+    explicit WebGLCompressedTextureS3TCsRGB(WebGLRenderingContextBase&);
+    virtual ~WebGLCompressedTextureS3TCsRGB();
+
+    static bool supported(WebGLRenderingContextBase&);
+
+    ExtensionName getName() const override;
+};
+
+} // namespace WebCore
+
+#endif
</ins></span></pre></div>
<a id="branchessafari610branchSourceWebCorehtmlcanvasWebGLCompressedTextureS3TCsRGBidl"></a>
<div class="addfile"><h4>Added: branches/safari-610-branch/Source/WebCore/html/canvas/WebGLCompressedTextureS3TCsRGB.idl (0 => 269317)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-610-branch/Source/WebCore/html/canvas/WebGLCompressedTextureS3TCsRGB.idl                         (rev 0)
+++ branches/safari-610-branch/Source/WebCore/html/canvas/WebGLCompressedTextureS3TCsRGB.idl    2020-11-03 19:14:11 UTC (rev 269317)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+/*
+ * Copyright (C) 2020 Google 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 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 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.
+ */
+
+[
+    Conditional=WEBGL,
+    DoNotCheckConstants,
+    GenerateIsReachable=ImplWebGLRenderingContext,
+    NoInterfaceObject,
+] interface WebGLCompressedTextureS3TCsRGB {
+    const unsigned long COMPRESSED_SRGB_S3TC_DXT1_EXT = 0x8C4C;
+    const unsigned long COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT = 0x8C4D;
+    const unsigned long COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT = 0x8C4E;
+    const unsigned long COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT = 0x8C4F;
+};
</ins></span></pre></div>
<a id="branchessafari610branchSourceWebCorehtmlcanvasWebGLExtensionh"></a>
<div class="modfile"><h4>Modified: branches/safari-610-branch/Source/WebCore/html/canvas/WebGLExtension.h (269316 => 269317)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-610-branch/Source/WebCore/html/canvas/WebGLExtension.h   2020-11-03 19:14:05 UTC (rev 269316)
+++ branches/safari-610-branch/Source/WebCore/html/canvas/WebGLExtension.h      2020-11-03 19:14:11 UTC (rev 269317)
</span><span class="lines">@@ -52,6 +52,7 @@
</span><span class="cx">         WebGLDebugRendererInfoName,
</span><span class="cx">         WebGLDebugShadersName,
</span><span class="cx">         WebGLCompressedTextureS3TCName,
</span><ins>+        WebGLCompressedTextureS3TCsRGBName,
</ins><span class="cx">         WebGLDepthTextureName,
</span><span class="cx">         WebGLDrawBuffersName,
</span><span class="cx">         OESElementIndexUintName,
</span></span></pre></div>
<a id="branchessafari610branchSourceWebCorehtmlcanvasWebGLRenderingContextcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-610-branch/Source/WebCore/html/canvas/WebGLRenderingContext.cpp (269316 => 269317)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-610-branch/Source/WebCore/html/canvas/WebGLRenderingContext.cpp  2020-11-03 19:14:05 UTC (rev 269316)
+++ branches/safari-610-branch/Source/WebCore/html/canvas/WebGLRenderingContext.cpp     2020-11-03 19:14:11 UTC (rev 269317)
</span><span class="lines">@@ -58,6 +58,7 @@
</span><span class="cx"> #include "WebGLCompressedTextureETC1.h"
</span><span class="cx"> #include "WebGLCompressedTexturePVRTC.h"
</span><span class="cx"> #include "WebGLCompressedTextureS3TC.h"
</span><ins>+#include "WebGLCompressedTextureS3TCsRGB.h"
</ins><span class="cx"> #include "WebGLDebugRendererInfo.h"
</span><span class="cx"> #include "WebGLDebugShaders.h"
</span><span class="cx"> #include "WebGLDepthTexture.h"
</span><span class="lines">@@ -164,6 +165,7 @@
</span><span class="cx">     ENABLE_IF_REQUESTED(WebGLCompressedTextureETC1, m_webglCompressedTextureETC1, "WEBGL_compressed_texture_etc1", WebGLCompressedTextureETC1::supported(*this));
</span><span class="cx">     ENABLE_IF_REQUESTED(WebGLCompressedTexturePVRTC, m_webglCompressedTexturePVRTC, "WEBKIT_WEBGL_compressed_texture_pvrtc", WebGLCompressedTexturePVRTC::supported(*this));
</span><span class="cx">     ENABLE_IF_REQUESTED(WebGLCompressedTextureS3TC, m_webglCompressedTextureS3TC, "WEBGL_compressed_texture_s3tc", WebGLCompressedTextureS3TC::supported(*this));
</span><ins>+    ENABLE_IF_REQUESTED(WebGLCompressedTextureS3TCsRGB, m_webglCompressedTextureS3TCsRGB, "WEBGL_compressed_texture_s3tc_srgb", WebGLCompressedTextureS3TCsRGB::supported(*this));
</ins><span class="cx">     ENABLE_IF_REQUESTED(WebGLDepthTexture, m_webglDepthTexture, "WEBGL_depth_texture", WebGLDepthTexture::supported(*m_context));
</span><span class="cx">     if (equalIgnoringASCIICase(name, "WEBGL_draw_buffers")) {
</span><span class="cx">         if (!m_webglDrawBuffers) {
</span><span class="lines">@@ -243,6 +245,8 @@
</span><span class="cx">         result.append("WEBKIT_WEBGL_compressed_texture_pvrtc"_s);
</span><span class="cx">     if (WebGLCompressedTextureS3TC::supported(*this))
</span><span class="cx">         result.append("WEBGL_compressed_texture_s3tc"_s);
</span><ins>+    if (WebGLCompressedTextureS3TCsRGB::supported(*this))
+        result.append("WEBGL_compressed_texture_s3tc_srgb"_s);
</ins><span class="cx">     if (WebGLDepthTexture::supported(*m_context))
</span><span class="cx">         result.append("WEBGL_depth_texture"_s);
</span><span class="cx">     if (supportsDrawBuffers())
</span></span></pre></div>
<a id="branchessafari610branchSourceWebCorehtmlcanvasWebGLRenderingContextBasecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-610-branch/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp (269316 => 269317)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-610-branch/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp      2020-11-03 19:14:05 UTC (rev 269316)
+++ branches/safari-610-branch/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp 2020-11-03 19:14:11 UTC (rev 269317)
</span><span class="lines">@@ -81,6 +81,7 @@
</span><span class="cx"> #include "WebGLCompressedTextureETC1.h"
</span><span class="cx"> #include "WebGLCompressedTexturePVRTC.h"
</span><span class="cx"> #include "WebGLCompressedTextureS3TC.h"
</span><ins>+#include "WebGLCompressedTextureS3TCsRGB.h"
</ins><span class="cx"> #include "WebGLContextAttributes.h"
</span><span class="cx"> #include "WebGLContextEvent.h"
</span><span class="cx"> #include "WebGLContextGroup.h"
</span><span class="lines">@@ -3728,6 +3729,7 @@
</span><span class="cx">     CHECK_EXTENSION(m_webglCompressedTextureETC1, "WEBGL_compressed_texture_etc1");
</span><span class="cx">     CHECK_EXTENSION(m_webglCompressedTexturePVRTC, "WEBKIT_WEBGL_compressed_texture_pvrtc");
</span><span class="cx">     CHECK_EXTENSION(m_webglCompressedTextureS3TC, "WEBGL_compressed_texture_s3tc");
</span><ins>+    CHECK_EXTENSION(m_webglCompressedTextureS3TCsRGB, "WEBGL_compressed_texture_s3tc_srgb");
</ins><span class="cx">     CHECK_EXTENSION(m_webglDepthTexture, "WEBGL_depth_texture");
</span><span class="cx">     CHECK_EXTENSION(m_webglDrawBuffers, "WEBGL_draw_buffers");
</span><span class="cx">     CHECK_EXTENSION(m_angleInstancedArrays, "ANGLE_instanced_arrays");
</span><span class="lines">@@ -6615,6 +6617,8 @@
</span><span class="cx">     switch (format) {
</span><span class="cx">     case ExtensionsGL::COMPRESSED_RGB_S3TC_DXT1_EXT:
</span><span class="cx">     case ExtensionsGL::COMPRESSED_RGBA_S3TC_DXT1_EXT:
</span><ins>+    case ExtensionsGL::COMPRESSED_SRGB_S3TC_DXT1_EXT:
+    case ExtensionsGL::COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:
</ins><span class="cx">     case ExtensionsGL::COMPRESSED_ATC_RGB_AMD:
</span><span class="cx">     case ExtensionsGL::ETC1_RGB8_OES: {
</span><span class="cx">         const int kBlockSize = 8;
</span><span class="lines">@@ -6627,6 +6631,8 @@
</span><span class="cx">     }
</span><span class="cx">     case ExtensionsGL::COMPRESSED_RGBA_S3TC_DXT3_EXT:
</span><span class="cx">     case ExtensionsGL::COMPRESSED_RGBA_S3TC_DXT5_EXT:
</span><ins>+    case ExtensionsGL::COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:
+    case ExtensionsGL::COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:
</ins><span class="cx">     case ExtensionsGL::COMPRESSED_ATC_RGBA_EXPLICIT_ALPHA_AMD:
</span><span class="cx">     case ExtensionsGL::COMPRESSED_ATC_RGBA_INTERPOLATED_ALPHA_AMD:
</span><span class="cx">         {
</span><span class="lines">@@ -6737,7 +6743,11 @@
</span><span class="cx">     case ExtensionsGL::COMPRESSED_RGB_S3TC_DXT1_EXT:
</span><span class="cx">     case ExtensionsGL::COMPRESSED_RGBA_S3TC_DXT1_EXT:
</span><span class="cx">     case ExtensionsGL::COMPRESSED_RGBA_S3TC_DXT3_EXT:
</span><del>-    case ExtensionsGL::COMPRESSED_RGBA_S3TC_DXT5_EXT: {
</del><ins>+    case ExtensionsGL::COMPRESSED_RGBA_S3TC_DXT5_EXT:
+    case ExtensionsGL::COMPRESSED_SRGB_S3TC_DXT1_EXT:
+    case ExtensionsGL::COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:
+    case ExtensionsGL::COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:
+    case ExtensionsGL::COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: {
</ins><span class="cx">         const GCGLsizei kBlockWidth = 4;
</span><span class="cx">         const GCGLsizei kBlockHeight = 4;
</span><span class="cx">         const GCGLint maxTextureSize = target ? m_maxTextureSize : m_maxCubeMapTextureSize;
</span><span class="lines">@@ -6817,7 +6827,11 @@
</span><span class="cx">     case ExtensionsGL::COMPRESSED_RGB_S3TC_DXT1_EXT:
</span><span class="cx">     case ExtensionsGL::COMPRESSED_RGBA_S3TC_DXT1_EXT:
</span><span class="cx">     case ExtensionsGL::COMPRESSED_RGBA_S3TC_DXT3_EXT:
</span><del>-    case ExtensionsGL::COMPRESSED_RGBA_S3TC_DXT5_EXT: {
</del><ins>+    case ExtensionsGL::COMPRESSED_RGBA_S3TC_DXT5_EXT:
+    case ExtensionsGL::COMPRESSED_SRGB_S3TC_DXT1_EXT:
+    case ExtensionsGL::COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:
+    case ExtensionsGL::COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:
+    case ExtensionsGL::COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: {
</ins><span class="cx">         const int kBlockWidth = 4;
</span><span class="cx">         const int kBlockHeight = 4;
</span><span class="cx">         if ((xoffset % kBlockWidth) || (yoffset % kBlockHeight)) {
</span></span></pre></div>
<a id="branchessafari610branchSourceWebCorehtmlcanvasWebGLRenderingContextBaseh"></a>
<div class="modfile"><h4>Modified: branches/safari-610-branch/Source/WebCore/html/canvas/WebGLRenderingContextBase.h (269316 => 269317)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-610-branch/Source/WebCore/html/canvas/WebGLRenderingContextBase.h        2020-11-03 19:14:05 UTC (rev 269316)
+++ branches/safari-610-branch/Source/WebCore/html/canvas/WebGLRenderingContextBase.h   2020-11-03 19:14:11 UTC (rev 269317)
</span><span class="lines">@@ -96,6 +96,7 @@
</span><span class="cx"> class WebGLCompressedTextureETC1;
</span><span class="cx"> class WebGLCompressedTexturePVRTC;
</span><span class="cx"> class WebGLCompressedTextureS3TC;
</span><ins>+class WebGLCompressedTextureS3TCsRGB;
</ins><span class="cx"> class WebGLContextGroup;
</span><span class="cx"> class WebGLContextObject;
</span><span class="cx"> class WebGLDebugRendererInfo;
</span><span class="lines">@@ -436,6 +437,7 @@
</span><span class="cx">     friend class WebGLCompressedTextureETC1;
</span><span class="cx">     friend class WebGLCompressedTexturePVRTC;
</span><span class="cx">     friend class WebGLCompressedTextureS3TC;
</span><ins>+    friend class WebGLCompressedTextureS3TCsRGB;
</ins><span class="cx">     friend class WebGLRenderingContextErrorMessageCallback;
</span><span class="cx">     friend class WebGLVertexArrayObjectOES;
</span><span class="cx">     friend class WebGLVertexArrayObject;
</span><span class="lines">@@ -683,6 +685,7 @@
</span><span class="cx">     RefPtr<WebGLCompressedTextureETC1> m_webglCompressedTextureETC1;
</span><span class="cx">     RefPtr<WebGLCompressedTexturePVRTC> m_webglCompressedTexturePVRTC;
</span><span class="cx">     RefPtr<WebGLCompressedTextureS3TC> m_webglCompressedTextureS3TC;
</span><ins>+    RefPtr<WebGLCompressedTextureS3TCsRGB> m_webglCompressedTextureS3TCsRGB;
</ins><span class="cx">     RefPtr<WebGLDepthTexture> m_webglDepthTexture;
</span><span class="cx">     RefPtr<WebGLDrawBuffers> m_webglDrawBuffers;
</span><span class="cx">     RefPtr<ANGLEInstancedArrays> m_angleInstancedArrays;
</span></span></pre></div>
<a id="branchessafari610branchSourceWebCoreplatformgraphicsExtensionsGLh"></a>
<div class="modfile"><h4>Modified: branches/safari-610-branch/Source/WebCore/platform/graphics/ExtensionsGL.h (269316 => 269317)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-610-branch/Source/WebCore/platform/graphics/ExtensionsGL.h       2020-11-03 19:14:05 UTC (rev 269316)
+++ branches/safari-610-branch/Source/WebCore/platform/graphics/ExtensionsGL.h  2020-11-03 19:14:11 UTC (rev 269317)
</span><span class="lines">@@ -67,6 +67,7 @@
</span><span class="cx">     //     on this extension)
</span><span class="cx">     //   GL_EXT_texture_compression_dxt1
</span><span class="cx">     //   GL_EXT_texture_compression_s3tc
</span><ins>+    //   GL_EXT_texture_compression_s3tc_srgb
</ins><span class="cx">     //   GL_OES_compressed_ETC1_RGB8_texture
</span><span class="cx">     //   GL_IMG_texture_compression_pvrtc
</span><span class="cx">     //   GL_KHR_texture_compression_astc_hdr
</span><span class="lines">@@ -155,6 +156,12 @@
</span><span class="cx">         COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2,
</span><span class="cx">         COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3,
</span><span class="cx"> 
</span><ins>+        // GL_EXT_texture_compression_s3tc_srgb
+        COMPRESSED_SRGB_S3TC_DXT1_EXT = 0x8C4C,
+        COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT = 0x8C4D,
+        COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT = 0x8C4E,
+        COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT = 0x8C4F,
+
</ins><span class="cx">         // GL_OES_compressed_ETC1_RGB8_texture
</span><span class="cx">         ETC1_RGB8_OES = 0x8D64,
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>