<!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>[208747] trunk/Source/WebCore</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/208747">208747</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2016-11-15 12:55:29 -0800 (Tue, 15 Nov 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[WebGL] Remove unused Chromium-specific OpenGL extensions
https://bugs.webkit.org/show_bug.cgi?id=164782

Reviewed by Dean Jackson.

No new tests because there is no behavior change.

* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::copyBufferSubData):
(WebCore::WebGL2RenderingContext::clear):
(WebCore::WebGL2RenderingContext::getExtension):
* html/canvas/WebGLCompressedTextureS3TC.cpp:
(WebCore::WebGLCompressedTextureS3TC::supported):
* html/canvas/WebGLDepthTexture.cpp:
(WebCore::WebGLDepthTexture::supported):
* html/canvas/WebGLDrawBuffers.cpp:
(WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements):
* html/canvas/WebGLFramebuffer.cpp:
(WebCore::WebGLFramebuffer::onAccess):
* html/canvas/WebGLFramebuffer.h:
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getExtension):
(WebCore::WebGLRenderingContext::clear):
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::setupFlags):
(WebCore::WebGLRenderingContextBase::bufferData):
(WebCore::WebGLRenderingContextBase::bufferSubData):
(WebCore::WebGLRenderingContextBase::copyTexSubImage2D):
(WebCore::WebGLRenderingContextBase::validateDrawArrays):
(WebCore::WebGLRenderingContextBase::validateDrawElements):
(WebCore::WebGLRenderingContextBase::readPixels):
(WebCore::WebGLRenderingContextBase::texImage2DBase):
(WebCore::WebGLRenderingContextBase::copyTexImage2D):
* html/canvas/WebGLRenderingContextBase.h:
(WebCore::WebGLRenderingContextBase::isGLES2NPOTStrict):
(WebCore::WebGLRenderingContextBase::isErrorGeneratedOnOutOfBoundsAccesses): Deleted.
(WebCore::WebGLRenderingContextBase::isResourceSafe): Deleted.
* platform/graphics/GraphicsContext3D.cpp:
(WebCore::GraphicsContext3D::texImage2DResourceSafe):
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::isResourceSafe): Deleted.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGL2RenderingContextcpp">trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLCompressedTextureS3TCcpp">trunk/Source/WebCore/html/canvas/WebGLCompressedTextureS3TC.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLDepthTexturecpp">trunk/Source/WebCore/html/canvas/WebGLDepthTexture.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLDrawBufferscpp">trunk/Source/WebCore/html/canvas/WebGLDrawBuffers.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLFramebuffercpp">trunk/Source/WebCore/html/canvas/WebGLFramebuffer.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLFramebufferh">trunk/Source/WebCore/html/canvas/WebGLFramebuffer.h</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLRenderingContextcpp">trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLRenderingContextBasecpp">trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLRenderingContextBaseh">trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsContext3Dcpp">trunk/Source/WebCore/platform/graphics/GraphicsContext3D.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsContext3Dh">trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsopenglGraphicsContext3DOpenGLCommoncpp">trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (208746 => 208747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-11-15 20:35:44 UTC (rev 208746)
+++ trunk/Source/WebCore/ChangeLog        2016-11-15 20:55:29 UTC (rev 208747)
</span><span class="lines">@@ -1,3 +1,48 @@
</span><ins>+2016-11-15  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        [WebGL] Remove unused Chromium-specific OpenGL extensions
+        https://bugs.webkit.org/show_bug.cgi?id=164782
+
+        Reviewed by Dean Jackson.
+
+        No new tests because there is no behavior change.
+
+        * html/canvas/WebGL2RenderingContext.cpp:
+        (WebCore::WebGL2RenderingContext::copyBufferSubData):
+        (WebCore::WebGL2RenderingContext::clear):
+        (WebCore::WebGL2RenderingContext::getExtension):
+        * html/canvas/WebGLCompressedTextureS3TC.cpp:
+        (WebCore::WebGLCompressedTextureS3TC::supported):
+        * html/canvas/WebGLDepthTexture.cpp:
+        (WebCore::WebGLDepthTexture::supported):
+        * html/canvas/WebGLDrawBuffers.cpp:
+        (WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements):
+        * html/canvas/WebGLFramebuffer.cpp:
+        (WebCore::WebGLFramebuffer::onAccess):
+        * html/canvas/WebGLFramebuffer.h:
+        * html/canvas/WebGLRenderingContext.cpp:
+        (WebCore::WebGLRenderingContext::getExtension):
+        (WebCore::WebGLRenderingContext::clear):
+        * html/canvas/WebGLRenderingContextBase.cpp:
+        (WebCore::WebGLRenderingContextBase::setupFlags):
+        (WebCore::WebGLRenderingContextBase::bufferData):
+        (WebCore::WebGLRenderingContextBase::bufferSubData):
+        (WebCore::WebGLRenderingContextBase::copyTexSubImage2D):
+        (WebCore::WebGLRenderingContextBase::validateDrawArrays):
+        (WebCore::WebGLRenderingContextBase::validateDrawElements):
+        (WebCore::WebGLRenderingContextBase::readPixels):
+        (WebCore::WebGLRenderingContextBase::texImage2DBase):
+        (WebCore::WebGLRenderingContextBase::copyTexImage2D):
+        * html/canvas/WebGLRenderingContextBase.h:
+        (WebCore::WebGLRenderingContextBase::isGLES2NPOTStrict):
+        (WebCore::WebGLRenderingContextBase::isErrorGeneratedOnOutOfBoundsAccesses): Deleted.
+        (WebCore::WebGLRenderingContextBase::isResourceSafe): Deleted.
+        * platform/graphics/GraphicsContext3D.cpp:
+        (WebCore::GraphicsContext3D::texImage2DResourceSafe):
+        * platform/graphics/GraphicsContext3D.h:
+        * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
+        (WebCore::GraphicsContext3D::isResourceSafe): Deleted.
+
</ins><span class="cx"> 2016-11-14  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Correct handling of changing input type
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGL2RenderingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp (208746 => 208747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp        2016-11-15 20:35:44 UTC (rev 208746)
+++ trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp        2016-11-15 20:55:29 UTC (rev 208747)
</span><span class="lines">@@ -198,11 +198,9 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!this-&gt;isErrorGeneratedOnOutOfBoundsAccesses()) {
-        if (!writeBuffer-&gt;associateCopyBufferSubData(*readBuffer, checkedReadOffset.unsafeGet(), checkedWriteOffset.unsafeGet(), checkedSize.unsafeGet())) {
-            this-&gt;synthesizeGLError(GraphicsContext3D::INVALID_VALUE, &quot;copyBufferSubData&quot;, &quot;offset out of range&quot;);
-            return;
-        }
</del><ins>+    if (!writeBuffer-&gt;associateCopyBufferSubData(*readBuffer, checkedReadOffset.unsafeGet(), checkedWriteOffset.unsafeGet(), checkedSize.unsafeGet())) {
+        this-&gt;synthesizeGLError(GraphicsContext3D::INVALID_VALUE, &quot;copyBufferSubData&quot;, &quot;offset out of range&quot;);
+        return;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     m_context-&gt;moveErrorsToSyntheticErrorList();
</span><span class="lines">@@ -440,7 +438,7 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx">     const char* reason = &quot;framebuffer incomplete&quot;;
</span><del>-    if (m_framebufferBinding &amp;&amp; !m_framebufferBinding-&gt;onAccess(graphicsContext3D(), !isResourceSafe(), &amp;reason)) {
</del><ins>+    if (m_framebufferBinding &amp;&amp; !m_framebufferBinding-&gt;onAccess(graphicsContext3D(), &amp;reason)) {
</ins><span class="cx">         synthesizeGLError(GraphicsContext3D::INVALID_FRAMEBUFFER_OPERATION, &quot;clear&quot;, reason);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -914,10 +912,8 @@
</span><span class="cx">     }
</span><span class="cx">     if (equalIgnoringASCIICase(name, &quot;WEBGL_depth_texture&quot;)
</span><span class="cx">         &amp;&amp; WebGLDepthTexture::supported(*graphicsContext3D())) {
</span><del>-        if (!m_webglDepthTexture) {
-            m_context-&gt;getExtensions().ensureEnabled(&quot;GL_CHROMIUM_depth_texture&quot;);
</del><ins>+        if (!m_webglDepthTexture)
</ins><span class="cx">             m_webglDepthTexture = std::make_unique&lt;WebGLDepthTexture&gt;(*this);
</span><del>-        }
</del><span class="cx">         return m_webglDepthTexture.get();
</span><span class="cx">     }
</span><span class="cx">     if (equalIgnoringASCIICase(name, &quot;WEBGL_debug_renderer_info&quot;)) {
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLCompressedTextureS3TCcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLCompressedTextureS3TC.cpp (208746 => 208747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLCompressedTextureS3TC.cpp        2016-11-15 20:35:44 UTC (rev 208746)
+++ trunk/Source/WebCore/html/canvas/WebGLCompressedTextureS3TC.cpp        2016-11-15 20:55:29 UTC (rev 208747)
</span><span class="lines">@@ -56,9 +56,7 @@
</span><span class="cx"> {
</span><span class="cx">     auto&amp; extensions = context.graphicsContext3D()-&gt;getExtensions();
</span><span class="cx">     return extensions.supports(&quot;GL_EXT_texture_compression_s3tc&quot;)
</span><del>-        || (extensions.supports(&quot;GL_EXT_texture_compression_dxt1&quot;)
-            &amp;&amp; extensions.supports(&quot;GL_CHROMIUM_texture_compression_dxt3&quot;)
-            &amp;&amp; extensions.supports(&quot;GL_CHROMIUM_texture_compression_dxt5&quot;));
</del><ins>+        || extensions.supports(&quot;GL_EXT_texture_compression_dxt1&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLDepthTexturecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLDepthTexture.cpp (208746 => 208747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLDepthTexture.cpp        2016-11-15 20:35:44 UTC (rev 208746)
+++ trunk/Source/WebCore/html/canvas/WebGLDepthTexture.cpp        2016-11-15 20:55:29 UTC (rev 208747)
</span><span class="lines">@@ -50,8 +50,7 @@
</span><span class="cx"> bool WebGLDepthTexture::supported(GraphicsContext3D&amp; context)
</span><span class="cx"> {
</span><span class="cx">     Extensions3D&amp; extensions = context.getExtensions();
</span><del>-    return extensions.supports(&quot;GL_CHROMIUM_depth_texture&quot;)
-        || extensions.supports(&quot;GL_OES_depth_texture&quot;)
</del><ins>+    return extensions.supports(&quot;GL_OES_depth_texture&quot;)
</ins><span class="cx">         || extensions.supports(&quot;GL_ARB_depth_texture&quot;);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLDrawBufferscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLDrawBuffers.cpp (208746 => 208747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLDrawBuffers.cpp        2016-11-15 20:35:44 UTC (rev 208746)
+++ trunk/Source/WebCore/html/canvas/WebGLDrawBuffers.cpp        2016-11-15 20:55:29 UTC (rev 208747)
</span><span class="lines">@@ -103,9 +103,8 @@
</span><span class="cx">     context-&gt;bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, fbo);
</span><span class="cx"> 
</span><span class="cx">     const unsigned char buffer[4] = { 0, 0, 0, 0 }; // textures are required to be initialized for other ports.
</span><del>-    bool supportsDepth = (context-&gt;getExtensions().supports(&quot;GL_CHROMIUM_depth_texture&quot;)
-        || context-&gt;getExtensions().supports(&quot;GL_OES_depth_texture&quot;)
-        || context-&gt;getExtensions().supports(&quot;GL_ARB_depth_texture&quot;));
</del><ins>+    bool supportsDepth = context-&gt;getExtensions().supports(&quot;GL_OES_depth_texture&quot;)
+        || context-&gt;getExtensions().supports(&quot;GL_ARB_depth_texture&quot;);
</ins><span class="cx">     bool supportsDepthStencil = (context-&gt;getExtensions().supports(&quot;GL_EXT_packed_depth_stencil&quot;)
</span><span class="cx">         || context-&gt;getExtensions().supports(&quot;GL_OES_packed_depth_stencil&quot;));
</span><span class="cx">     Platform3DObject depthStencil = 0;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLFramebuffercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLFramebuffer.cpp (208746 => 208747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLFramebuffer.cpp        2016-11-15 20:35:44 UTC (rev 208746)
+++ trunk/Source/WebCore/html/canvas/WebGLFramebuffer.cpp        2016-11-15 20:55:29 UTC (rev 208747)
</span><span class="lines">@@ -479,13 +479,11 @@
</span><span class="cx">     return GraphicsContext3D::FRAMEBUFFER_COMPLETE;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool WebGLFramebuffer::onAccess(GraphicsContext3D* context3d, bool needToInitializeAttachments, const char** reason)
</del><ins>+bool WebGLFramebuffer::onAccess(GraphicsContext3D* context3d, const char** reason)
</ins><span class="cx"> {
</span><span class="cx">     if (checkStatus(reason) != GraphicsContext3D::FRAMEBUFFER_COMPLETE)
</span><span class="cx">         return false;
</span><del>-    if (needToInitializeAttachments)
-        return initializeAttachments(context3d, reason);
-    return true;
</del><ins>+    return initializeAttachments(context3d, reason);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool WebGLFramebuffer::hasStencilBuffer() const
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLFramebufferh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLFramebuffer.h (208746 => 208747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLFramebuffer.h        2016-11-15 20:35:44 UTC (rev 208746)
+++ trunk/Source/WebCore/html/canvas/WebGLFramebuffer.h        2016-11-15 20:55:29 UTC (rev 208747)
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx">     // Return false if the framebuffer is incomplete; otherwise initialize
</span><span class="cx">     // the buffers if they haven't been initialized and
</span><span class="cx">     // needToInitializeAttachments is true.
</span><del>-    bool onAccess(GraphicsContext3D*, bool needToInitializeAttachments, const char** reason);
</del><ins>+    bool onAccess(GraphicsContext3D*, const char** reason);
</ins><span class="cx"> 
</span><span class="cx">     // Software version of glCheckFramebufferStatus(), except that when
</span><span class="cx">     // FRAMEBUFFER_COMPLETE is returned, it is still possible for
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLRenderingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp (208746 => 208747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp        2016-11-15 20:35:44 UTC (rev 208746)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp        2016-11-15 20:55:29 UTC (rev 208747)
</span><span class="lines">@@ -210,10 +210,8 @@
</span><span class="cx">     }
</span><span class="cx">     if (equalIgnoringASCIICase(name, &quot;WEBGL_depth_texture&quot;)
</span><span class="cx">         &amp;&amp; WebGLDepthTexture::supported(*graphicsContext3D())) {
</span><del>-        if (!m_webglDepthTexture) {
-            m_context-&gt;getExtensions().ensureEnabled(&quot;GL_CHROMIUM_depth_texture&quot;);
</del><ins>+        if (!m_webglDepthTexture)
</ins><span class="cx">             m_webglDepthTexture = std::make_unique&lt;WebGLDepthTexture&gt;(*this);
</span><del>-        }
</del><span class="cx">         return m_webglDepthTexture.get();
</span><span class="cx">     }
</span><span class="cx">     if (equalIgnoringASCIICase(name, &quot;WEBGL_draw_buffers&quot;) &amp;&amp; supportsDrawBuffers()) {
</span><span class="lines">@@ -456,7 +454,7 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx">     const char* reason = &quot;framebuffer incomplete&quot;;
</span><del>-    if (m_framebufferBinding &amp;&amp; !m_framebufferBinding-&gt;onAccess(graphicsContext3D(), !isResourceSafe(), &amp;reason)) {
</del><ins>+    if (m_framebufferBinding &amp;&amp; !m_framebufferBinding-&gt;onAccess(graphicsContext3D(), &amp;reason)) {
</ins><span class="cx">         synthesizeGLError(GraphicsContext3D::INVALID_FRAMEBUFFER_OPERATION, &quot;clear&quot;, reason);
</span><span class="cx">         return;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLRenderingContextBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp (208746 => 208747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp        2016-11-15 20:35:44 UTC (rev 208746)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp        2016-11-15 20:55:29 UTC (rev 208747)
</span><span class="lines">@@ -575,8 +575,6 @@
</span><span class="cx">         m_synthesizedErrorsToConsole = page-&gt;settings().webGLErrorsToConsoleEnabled();
</span><span class="cx"> 
</span><span class="cx">     m_isGLES2Compliant = m_context-&gt;isGLES2Compliant();
</span><del>-    m_isErrorGeneratedOnOutOfBoundsAccesses = m_context-&gt;getExtensions().isEnabled(&quot;GL_CHROMIUM_strict_attribs&quot;);
-    m_isResourceSafe = m_context-&gt;getExtensions().isEnabled(&quot;GL_CHROMIUM_resource_safe&quot;);
</del><span class="cx">     if (m_isGLES2Compliant) {
</span><span class="cx">         m_isGLES2NPOTStrict = !m_context-&gt;getExtensions().isEnabled(&quot;GL_OES_texture_npot&quot;);
</span><span class="cx">         m_isDepthStencilSupported = m_context-&gt;getExtensions().isEnabled(&quot;GL_OES_packed_depth_stencil&quot;);
</span><span class="lines">@@ -1091,11 +1089,9 @@
</span><span class="cx">         synthesizeGLError(GraphicsContext3D::INVALID_VALUE, &quot;bufferData&quot;, &quot;size == 0&quot;);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><del>-    if (!isErrorGeneratedOnOutOfBoundsAccesses()) {
-        if (!buffer-&gt;associateBufferData(static_cast&lt;GC3Dsizeiptr&gt;(size))) {
-            synthesizeGLError(GraphicsContext3D::INVALID_VALUE, &quot;bufferData&quot;, &quot;invalid buffer&quot;);
-            return;
-        }
</del><ins>+    if (!buffer-&gt;associateBufferData(static_cast&lt;GC3Dsizeiptr&gt;(size))) {
+        synthesizeGLError(GraphicsContext3D::INVALID_VALUE, &quot;bufferData&quot;, &quot;invalid buffer&quot;);
+        return;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     m_context-&gt;moveErrorsToSyntheticErrorList();
</span><span class="lines">@@ -1119,11 +1115,9 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     WTF::visit([&amp;](auto&amp; data) {
</span><del>-        if (!this-&gt;isErrorGeneratedOnOutOfBoundsAccesses()) {
-            if (!buffer-&gt;associateBufferData(data.get())) {
-                this-&gt;synthesizeGLError(GraphicsContext3D::INVALID_VALUE, &quot;bufferData&quot;, &quot;invalid buffer&quot;);
-                return;
-            }
</del><ins>+        if (!buffer-&gt;associateBufferData(data.get())) {
+            this-&gt;synthesizeGLError(GraphicsContext3D::INVALID_VALUE, &quot;bufferData&quot;, &quot;invalid buffer&quot;);
+            return;
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         m_context-&gt;moveErrorsToSyntheticErrorList();
</span><span class="lines">@@ -1150,11 +1144,9 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     WTF::visit([&amp;](auto&amp; data) {
</span><del>-        if (!this-&gt;isErrorGeneratedOnOutOfBoundsAccesses()) {
-            if (!buffer-&gt;associateBufferSubData(static_cast&lt;GC3Dintptr&gt;(offset), data.get())) {
-                this-&gt;synthesizeGLError(GraphicsContext3D::INVALID_VALUE, &quot;bufferSubData&quot;, &quot;offset out of range&quot;);
-                return;
-            }
</del><ins>+        if (!buffer-&gt;associateBufferSubData(static_cast&lt;GC3Dintptr&gt;(offset), data.get())) {
+            this-&gt;synthesizeGLError(GraphicsContext3D::INVALID_VALUE, &quot;bufferSubData&quot;, &quot;offset out of range&quot;);
+            return;
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         m_context-&gt;moveErrorsToSyntheticErrorList();
</span><span class="lines">@@ -1355,45 +1347,41 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx">     const char* reason = &quot;framebuffer incomplete&quot;;
</span><del>-    if (m_framebufferBinding &amp;&amp; !m_framebufferBinding-&gt;onAccess(graphicsContext3D(), !isResourceSafe(), &amp;reason)) {
</del><ins>+    if (m_framebufferBinding &amp;&amp; !m_framebufferBinding-&gt;onAccess(graphicsContext3D(), &amp;reason)) {
</ins><span class="cx">         synthesizeGLError(GraphicsContext3D::INVALID_FRAMEBUFFER_OPERATION, &quot;copyTexSubImage2D&quot;, reason);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx">     clearIfComposited();
</span><del>-    if (isResourceSafe())
-        m_context-&gt;copyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
-    else {
-        GC3Dint clippedX, clippedY;
-        GC3Dsizei clippedWidth, clippedHeight;
-        if (clip2D(x, y, width, height, getBoundFramebufferWidth(), getBoundFramebufferHeight(), &amp;clippedX, &amp;clippedY, &amp;clippedWidth, &amp;clippedHeight)) {
-            GC3Denum format;
-            GC3Denum type;
-            if (!GraphicsContext3D::possibleFormatAndTypeForInternalFormat(tex-&gt;getInternalFormat(target, level), format, type)) {
-                synthesizeGLError(GraphicsContext3D::INVALID_ENUM, &quot;copyTexSubImage2D&quot;, &quot;Texture has unknown internal format&quot;);
</del><ins>+
+    GC3Dint clippedX, clippedY;
+    GC3Dsizei clippedWidth, clippedHeight;
+    if (clip2D(x, y, width, height, getBoundFramebufferWidth(), getBoundFramebufferHeight(), &amp;clippedX, &amp;clippedY, &amp;clippedWidth, &amp;clippedHeight)) {
+        GC3Denum format;
+        GC3Denum type;
+        if (!GraphicsContext3D::possibleFormatAndTypeForInternalFormat(tex-&gt;getInternalFormat(target, level), format, type)) {
+            synthesizeGLError(GraphicsContext3D::INVALID_ENUM, &quot;copyTexSubImage2D&quot;, &quot;Texture has unknown internal format&quot;);
+            return;
+        }
+        std::unique_ptr&lt;unsigned char[]&gt; zero;
+        if (width &amp;&amp; height) {
+            unsigned size;
+            GC3Denum error = m_context-&gt;computeImageSizeInBytes(format, type, width, height, m_unpackAlignment, &amp;size, 0);
+            if (error != GraphicsContext3D::NO_ERROR) {
+                synthesizeGLError(error, &quot;copyTexSubImage2D&quot;, &quot;bad dimensions&quot;);
</ins><span class="cx">                 return;
</span><span class="cx">             }
</span><del>-            std::unique_ptr&lt;unsigned char[]&gt; zero;
-            if (width &amp;&amp; height) {
-                unsigned int size;
-                GC3Denum error = m_context-&gt;computeImageSizeInBytes(format, type, width, height, m_unpackAlignment, &amp;size, 0);
-                if (error != GraphicsContext3D::NO_ERROR) {
-                    synthesizeGLError(error, &quot;copyTexSubImage2D&quot;, &quot;bad dimensions&quot;);
-                    return;
-                }
-                zero = std::make_unique&lt;unsigned char[]&gt;(size);
-                if (!zero) {
-                    synthesizeGLError(GraphicsContext3D::INVALID_VALUE, &quot;copyTexSubImage2D&quot;, &quot;out of memory&quot;);
-                    return;
-                }
-                memset(zero.get(), 0, size);
</del><ins>+            zero = std::make_unique&lt;unsigned char[]&gt;(size);
+            if (!zero) {
+                synthesizeGLError(GraphicsContext3D::INVALID_VALUE, &quot;copyTexSubImage2D&quot;, &quot;out of memory&quot;);
+                return;
</ins><span class="cx">             }
</span><del>-            m_context-&gt;texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, zero.get());
-            if (clippedWidth &gt; 0 &amp;&amp; clippedHeight &gt; 0)
-                m_context-&gt;copyTexSubImage2D(target, level, xoffset + clippedX - x, yoffset + clippedY - y,
-                                             clippedX, clippedY, clippedWidth, clippedHeight);
-        } else
-            m_context-&gt;copyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
-    }
</del><ins>+            memset(zero.get(), 0, size);
+        }
+        m_context-&gt;texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, zero.get());
+        if (clippedWidth &gt; 0 &amp;&amp; clippedHeight &gt; 0)
+            m_context-&gt;copyTexSubImage2D(target, level, xoffset + clippedX - x, yoffset + clippedY - y, clippedX, clippedY, clippedWidth, clippedHeight);
+    } else
+        m_context-&gt;copyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RefPtr&lt;WebGLBuffer&gt; WebGLRenderingContextBase::createBuffer()
</span><span class="lines">@@ -1818,29 +1806,22 @@
</span><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!isErrorGeneratedOnOutOfBoundsAccesses()) {
-        // Ensure we have a valid rendering state
-        Checked&lt;GC3Dint, RecordOverflow&gt; checkedFirst(first);
-        Checked&lt;GC3Dint, RecordOverflow&gt; checkedCount(count);
-        Checked&lt;GC3Dint, RecordOverflow&gt; checkedSum = checkedFirst + checkedCount;
-        Checked&lt;GC3Dint, RecordOverflow&gt; checkedPrimitiveCount(primitiveCount);
-        if (checkedSum.hasOverflowed() || checkedPrimitiveCount.hasOverflowed() || !validateVertexAttributes(checkedSum.unsafeGet(), checkedPrimitiveCount.unsafeGet())) {
-            synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, functionName, &quot;attempt to access out of bounds arrays&quot;);
-            return false;
-        }
-        if (!validateSimulatedVertexAttrib0(checkedSum.unsafeGet() - 1)) {
-            synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, functionName, &quot;attempt to access outside the bounds of the simulated vertexAttrib0 array&quot;);
-            return false;
-        }
-    } else {
-        if (!validateVertexAttributes(0)) {
-            synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, functionName, &quot;attribs not setup correctly&quot;);
-            return false;
-        }
</del><ins>+    // Ensure we have a valid rendering state.
+    Checked&lt;GC3Dint, RecordOverflow&gt; checkedFirst(first);
+    Checked&lt;GC3Dint, RecordOverflow&gt; checkedCount(count);
+    Checked&lt;GC3Dint, RecordOverflow&gt; checkedSum = checkedFirst + checkedCount;
+    Checked&lt;GC3Dint, RecordOverflow&gt; checkedPrimitiveCount(primitiveCount);
+    if (checkedSum.hasOverflowed() || checkedPrimitiveCount.hasOverflowed() || !validateVertexAttributes(checkedSum.unsafeGet(), checkedPrimitiveCount.unsafeGet())) {
+        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, functionName, &quot;attempt to access out of bounds arrays&quot;);
+        return false;
</ins><span class="cx">     }
</span><ins>+    if (!validateSimulatedVertexAttrib0(checkedSum.unsafeGet() - 1)) {
+        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, functionName, &quot;attempt to access outside the bounds of the simulated vertexAttrib0 array&quot;);
+        return false;
+    }
</ins><span class="cx"> 
</span><span class="cx">     const char* reason = &quot;framebuffer incomplete&quot;;
</span><del>-    if (m_framebufferBinding &amp;&amp; !m_framebufferBinding-&gt;onAccess(graphicsContext3D(), !isResourceSafe(), &amp;reason)) {
</del><ins>+    if (m_framebufferBinding &amp;&amp; !m_framebufferBinding-&gt;onAccess(graphicsContext3D(), &amp;reason)) {
</ins><span class="cx">         synthesizeGLError(GraphicsContext3D::INVALID_FRAMEBUFFER_OPERATION, functionName, reason);
</span><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="lines">@@ -1889,44 +1870,36 @@
</span><span class="cx">         synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, functionName, &quot;no ELEMENT_ARRAY_BUFFER bound&quot;);
</span><span class="cx">         return false;
</span><span class="cx">     }
</span><ins>+
+    // Ensure we have a valid rendering state.
+    if (!validateElementArraySize(count, type, static_cast&lt;GC3Dintptr&gt;(offset))) {
+        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, functionName, &quot;request out of bounds for current ELEMENT_ARRAY_BUFFER&quot;);
+        return false;
+    }
+    if (!count)
+        return false;
</ins><span class="cx">     
</span><del>-    if (!isErrorGeneratedOnOutOfBoundsAccesses()) {
-        // Ensure we have a valid rendering state
-        if (!validateElementArraySize(count, type, static_cast&lt;GC3Dintptr&gt;(offset))) {
-            synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, functionName, &quot;request out of bounds for current ELEMENT_ARRAY_BUFFER&quot;);
-            return false;
-        }
-        if (!count)
-            return false;
-        
-        Checked&lt;GC3Dint, RecordOverflow&gt; checkedCount(count);
-        Checked&lt;GC3Dint, RecordOverflow&gt; checkedPrimitiveCount(primitiveCount);
-        if (checkedCount.hasOverflowed() || checkedPrimitiveCount.hasOverflowed()) {
</del><ins>+    Checked&lt;GC3Dint, RecordOverflow&gt; checkedCount(count);
+    Checked&lt;GC3Dint, RecordOverflow&gt; checkedPrimitiveCount(primitiveCount);
+    if (checkedCount.hasOverflowed() || checkedPrimitiveCount.hasOverflowed()) {
+        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, functionName, &quot;attempt to access out of bounds arrays&quot;);
+        return false;
+    }
+    
+    if (!validateIndexArrayConservative(type, numElements) || !validateVertexAttributes(numElements, checkedPrimitiveCount.unsafeGet())) {
+        if (!validateIndexArrayPrecise(checkedCount.unsafeGet(), type, static_cast&lt;GC3Dintptr&gt;(offset), numElements) || !validateVertexAttributes(numElements, checkedPrimitiveCount.unsafeGet())) {
</ins><span class="cx">             synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, functionName, &quot;attempt to access out of bounds arrays&quot;);
</span><span class="cx">             return false;
</span><span class="cx">         }
</span><del>-        
-        if (!validateIndexArrayConservative(type, numElements) || !validateVertexAttributes(numElements, checkedPrimitiveCount.unsafeGet())) {
-            if (!validateIndexArrayPrecise(checkedCount.unsafeGet(), type, static_cast&lt;GC3Dintptr&gt;(offset), numElements) || !validateVertexAttributes(numElements, checkedPrimitiveCount.unsafeGet())) {
-                synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, functionName, &quot;attempt to access out of bounds arrays&quot;);
-                return false;
-            }
-        }
</del><ins>+    }
</ins><span class="cx"> 
</span><del>-        if (!validateSimulatedVertexAttrib0(numElements)) {
-            synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, functionName, &quot;attempt to access outside the bounds of the simulated vertexAttrib0 array&quot;);
-            return false;
-        }
-
-    } else {
-        if (!validateVertexAttributes(0)) {
-            synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, functionName, &quot;attribs not setup correctly&quot;);
-            return false;
-        }
</del><ins>+    if (!validateSimulatedVertexAttrib0(numElements)) {
+        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, functionName, &quot;attempt to access outside the bounds of the simulated vertexAttrib0 array&quot;);
+        return false;
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     const char* reason = &quot;framebuffer incomplete&quot;;
</span><del>-    if (m_framebufferBinding &amp;&amp; !m_framebufferBinding-&gt;onAccess(graphicsContext3D(), !isResourceSafe(), &amp;reason)) {
</del><ins>+    if (m_framebufferBinding &amp;&amp; !m_framebufferBinding-&gt;onAccess(graphicsContext3D(), &amp;reason)) {
</ins><span class="cx">         synthesizeGLError(GraphicsContext3D::INVALID_FRAMEBUFFER_OPERATION, functionName, reason);
</span><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="lines">@@ -3014,7 +2987,7 @@
</span><span class="cx">     GC3Denum internalFormat = 0;
</span><span class="cx">     if (m_framebufferBinding) {
</span><span class="cx">         const char* reason = &quot;framebuffer incomplete&quot;;
</span><del>-        if (!m_framebufferBinding-&gt;onAccess(graphicsContext3D(), !isResourceSafe(), &amp;reason)) {
</del><ins>+        if (!m_framebufferBinding-&gt;onAccess(graphicsContext3D(), &amp;reason)) {
</ins><span class="cx">             synthesizeGLError(GraphicsContext3D::INVALID_FRAMEBUFFER_OPERATION, &quot;readPixels&quot;, reason);
</span><span class="cx">             return;
</span><span class="cx">         }
</span><span class="lines">@@ -3283,18 +3256,8 @@
</span><span class="cx">     ASSERT(tex);
</span><span class="cx">     ASSERT(validateNPOTTextureLevel(width, height, level, &quot;texImage2D&quot;));
</span><span class="cx">     if (!pixels) {
</span><del>-        // Note: Chromium's OpenGL implementation clears textures and isResourceSafe() is therefore true.
-        // For other implementations, if they are using ANGLE_depth_texture, ANGLE depth textures
-        // can not be cleared with texImage2D and must be cleared by binding to an fbo and calling
-        // clear.
-        if (isResourceSafe())
-            m_context-&gt;texImage2D(target, level, internalFormat, width, height, border, format, type, nullptr);
-        else {
-            bool succeed = m_context-&gt;texImage2DResourceSafe(target, level, internalFormat, width, height,
-                                                             border, format, type, m_unpackAlignment);
-            if (!succeed)
-                return;
-        }
</del><ins>+        if (!m_context-&gt;texImage2DResourceSafe(target, level, internalFormat, width, height, border, format, type, m_unpackAlignment))
+            return;
</ins><span class="cx">     } else {
</span><span class="cx">         ASSERT(validateSettableTexInternalFormat(&quot;texImage2D&quot;, internalFormat));
</span><span class="cx">         m_context-&gt;moveErrorsToSyntheticErrorList();
</span><span class="lines">@@ -3978,26 +3941,24 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx">     const char* reason = &quot;framebuffer incomplete&quot;;
</span><del>-    if (m_framebufferBinding &amp;&amp; !m_framebufferBinding-&gt;onAccess(graphicsContext3D(), !isResourceSafe(), &amp;reason)) {
</del><ins>+    if (m_framebufferBinding &amp;&amp; !m_framebufferBinding-&gt;onAccess(graphicsContext3D(), &amp;reason)) {
</ins><span class="cx">         synthesizeGLError(GraphicsContext3D::INVALID_FRAMEBUFFER_OPERATION, &quot;copyTexImage2D&quot;, reason);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx">     clearIfComposited();
</span><del>-    if (isResourceSafe())
</del><ins>+
+    GC3Dint clippedX, clippedY;
+    GC3Dsizei clippedWidth, clippedHeight;
+    if (clip2D(x, y, width, height, getBoundFramebufferWidth(), getBoundFramebufferHeight(), &amp;clippedX, &amp;clippedY, &amp;clippedWidth, &amp;clippedHeight)) {
+        m_context-&gt;texImage2DResourceSafe(target, level, internalFormat, width, height, border,
+            internalFormat, GraphicsContext3D::UNSIGNED_BYTE, m_unpackAlignment);
+        if (clippedWidth &gt; 0 &amp;&amp; clippedHeight &gt; 0) {
+            m_context-&gt;copyTexSubImage2D(target, level, clippedX - x, clippedY - y,
+                clippedX, clippedY, clippedWidth, clippedHeight);
+        }
+    } else
</ins><span class="cx">         m_context-&gt;copyTexImage2D(target, level, internalFormat, x, y, width, height, border);
</span><del>-    else {
-        GC3Dint clippedX, clippedY;
-        GC3Dsizei clippedWidth, clippedHeight;
-        if (clip2D(x, y, width, height, getBoundFramebufferWidth(), getBoundFramebufferHeight(), &amp;clippedX, &amp;clippedY, &amp;clippedWidth, &amp;clippedHeight)) {
-            m_context-&gt;texImage2DResourceSafe(target, level, internalFormat, width, height, border,
-                internalFormat, GraphicsContext3D::UNSIGNED_BYTE, m_unpackAlignment);
-            if (clippedWidth &gt; 0 &amp;&amp; clippedHeight &gt; 0) {
-                m_context-&gt;copyTexSubImage2D(target, level, clippedX - x, clippedY - y,
-                    clippedX, clippedY, clippedWidth, clippedHeight);
-            }
-        } else
-            m_context-&gt;copyTexImage2D(target, level, internalFormat, x, y, width, height, border);
-    }
</del><ins>+
</ins><span class="cx">     // FIXME: if the framebuffer is not complete, none of the below should be executed.
</span><span class="cx">     tex-&gt;setLevelInfo(target, level, internalFormat, width, height, GraphicsContext3D::UNSIGNED_BYTE);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLRenderingContextBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h (208746 => 208747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h        2016-11-15 20:35:44 UTC (rev 208746)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h        2016-11-15 20:55:29 UTC (rev 208747)
</span><span class="lines">@@ -371,10 +371,6 @@
</span><span class="cx">     bool isGLES2Compliant() { return m_isGLES2Compliant; }
</span><span class="cx">     // Query if the GL implementation is NPOT strict.
</span><span class="cx">     bool isGLES2NPOTStrict() { return m_isGLES2NPOTStrict; }
</span><del>-    // Query if the GL implementation generates errors on out-of-bounds buffer accesses.
-    bool isErrorGeneratedOnOutOfBoundsAccesses() { return m_isErrorGeneratedOnOutOfBoundsAccesses; }
-    // Query if the GL implementation initializes textures/renderbuffers to 0.
-    bool isResourceSafe() { return m_isResourceSafe; }
</del><span class="cx">     // Query if depth_stencil buffer is supported.
</span><span class="cx">     bool isDepthStencilSupported() { return m_isDepthStencilSupported; }
</span><span class="cx"> 
</span><span class="lines">@@ -536,8 +532,6 @@
</span><span class="cx"> 
</span><span class="cx">     bool m_isGLES2Compliant;
</span><span class="cx">     bool m_isGLES2NPOTStrict;
</span><del>-    bool m_isErrorGeneratedOnOutOfBoundsAccesses;
-    bool m_isResourceSafe;
</del><span class="cx">     bool m_isDepthStencilSupported;
</span><span class="cx">     bool m_isRobustnessEXTSupported;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsContext3Dcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext3D.cpp (208746 => 208747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsContext3D.cpp        2016-11-15 20:35:44 UTC (rev 208746)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext3D.cpp        2016-11-15 20:55:29 UTC (rev 208747)
</span><span class="lines">@@ -147,7 +147,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(unpackAlignment == 1 || unpackAlignment == 2 || unpackAlignment == 4 || unpackAlignment == 8);
</span><span class="cx">     std::unique_ptr&lt;unsigned char[]&gt; zero;
</span><del>-    if (!isResourceSafe() &amp;&amp; width &gt; 0 &amp;&amp; height &gt; 0) {
</del><ins>+    if (width &gt; 0 &amp;&amp; height &gt; 0) {
</ins><span class="cx">         unsigned int size;
</span><span class="cx">         GC3Denum error = computeImageSizeInBytes(format, type, width, height, unpackAlignment, &amp;size, 0);
</span><span class="cx">         if (error != GraphicsContext3D::NO_ERROR) {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsContext3Dh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h (208746 => 208747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h        2016-11-15 20:35:44 UTC (rev 208746)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h        2016-11-15 20:55:29 UTC (rev 208747)
</span><span class="lines">@@ -1306,7 +1306,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     int m_currentWidth, m_currentHeight;
</span><del>-    bool isResourceSafe();
</del><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx">     RetainPtr&lt;WebGLLayer&gt; m_webGLLayer;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsopenglGraphicsContext3DOpenGLCommoncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp (208746 => 208747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp        2016-11-15 20:35:44 UTC (rev 208746)
+++ trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp        2016-11-15 20:55:29 UTC (rev 208747)
</span><span class="lines">@@ -156,11 +156,6 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool GraphicsContext3D::isResourceSafe()
-{
-    return false;
-}
-
</del><span class="cx"> void GraphicsContext3D::paintRenderingResultsToCanvas(ImageBuffer* imageBuffer)
</span><span class="cx"> {
</span><span class="cx">     int rowBytes = m_currentWidth * 4;
</span></span></pre>
</div>
</div>

</body>
</html>