<!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>[168639] trunk</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/168639">168639</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-05-12 13:13:44 -0700 (Mon, 12 May 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Implement EXT_shader_texture_lod in WebGL.
https://bugs.webkit.org/show_bug.cgi?id=128985
&lt;rdar://problem/16111396&gt;

Source/WebCore:
Based on Chromium patch by bajones@chromium.org.
https://src.chromium.org/viewvc/blink?revision=171465&amp;view=revision

Patch by Alex Christensen &lt;achristensen@webkit.org&gt; on 2014-05-12
Reviewed by Dean Jackson.

Test: webgl/conformance/extensions/ext-shader-texture-lod.html

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
Added new EXTShaderTextureLOD files.
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::toJS):
Added EXTShaderTextureLOD.
* html/canvas/EXTShaderTextureLOD.cpp: Added.
(WebCore::EXTShaderTextureLOD::EXTShaderTextureLOD):
(WebCore::EXTShaderTextureLOD::~EXTShaderTextureLOD):
(WebCore::EXTShaderTextureLOD::getName):
* html/canvas/EXTShaderTextureLOD.h: Added.
* html/canvas/EXTShaderTextureLOD.idl: Added.
* html/canvas/WebGLExtension.h:
Added EXTShaderTextureLODName.
* html/canvas/WebGLObject.cpp:
Removed unused inclusion of EXTTextureFilterAnisotropic.h.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getExtension):
Added EXT_shader_texture_lod.
* html/canvas/WebGLRenderingContext.h:
Added a EXTShaderTextureLOD member variable.

LayoutTests:
Based on Firefox patch by Vladimir Vukicevic.
https://bug965848.bugzilla.mozilla.org/attachment.cgi?id=8367994

Patch by Alex Christensen &lt;achristensen@webkit.org&gt; on 2014-05-12
Reviewed by Dean Jackson.

* webgl/conformance/extensions/ext-shader-texture-lod-expected.txt: Added.
* webgl/conformance/extensions/ext-shader-texture-lod.html: Added.
* webgl/resources/webgl_test_files/conformance/extensions/ext-shader-texture-lod.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcescpp">trunk/Source/WebCore/DerivedSources.cpp</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcesmake">trunk/Source/WebCore/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSWebGLRenderingContextCustomcpp">trunk/Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLExtensionh">trunk/Source/WebCore/html/canvas/WebGLExtension.h</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLObjectcpp">trunk/Source/WebCore/html/canvas/WebGLObject.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLRenderingContextcpp">trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLRenderingContexth">trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsopenglExtensions3DOpenGLcpp">trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsopenglExtensions3DOpenGLCommoncpp">trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestswebglconformanceextensionsextshadertexturelodexpectedtxt">trunk/LayoutTests/webgl/conformance/extensions/ext-shader-texture-lod-expected.txt</a></li>
<li><a href="#trunkLayoutTestswebglconformanceextensionsextshadertexturelodhtml">trunk/LayoutTests/webgl/conformance/extensions/ext-shader-texture-lod.html</a></li>
<li><a href="#trunkLayoutTestswebglresourceswebgl_test_filesconformanceextensionsextshadertexturelodhtml">trunk/LayoutTests/webgl/resources/webgl_test_files/conformance/extensions/ext-shader-texture-lod.html</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasEXTShaderTextureLODcpp">trunk/Source/WebCore/html/canvas/EXTShaderTextureLOD.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasEXTShaderTextureLODh">trunk/Source/WebCore/html/canvas/EXTShaderTextureLOD.h</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasEXTShaderTextureLODidl">trunk/Source/WebCore/html/canvas/EXTShaderTextureLOD.idl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (168638 => 168639)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-05-12 19:54:38 UTC (rev 168638)
+++ trunk/LayoutTests/ChangeLog        2014-05-12 20:13:44 UTC (rev 168639)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2014-05-12  Alex Christensen  &lt;achristensen@webkit.org&gt;
+
+        Implement EXT_shader_texture_lod in WebGL.
+        https://bugs.webkit.org/show_bug.cgi?id=128985
+        &lt;rdar://problem/16111396&gt;
+
+        Based on Firefox patch by Vladimir Vukicevic.
+        https://bug965848.bugzilla.mozilla.org/attachment.cgi?id=8367994
+
+        Reviewed by Dean Jackson.
+
+        * webgl/conformance/extensions/ext-shader-texture-lod-expected.txt: Added.
+        * webgl/conformance/extensions/ext-shader-texture-lod.html: Added.
+        * webgl/resources/webgl_test_files/conformance/extensions/ext-shader-texture-lod.html: Added.
+
</ins><span class="cx"> 2014-05-12  Martin Hock  &lt;mhock@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Disallow drag and drop of non-displayable resources.
</span></span></pre></div>
<a id="trunkLayoutTestswebglconformanceextensionsextshadertexturelodexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/webgl/conformance/extensions/ext-shader-texture-lod-expected.txt (0 => 168639)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/webgl/conformance/extensions/ext-shader-texture-lod-expected.txt                                (rev 0)
+++ trunk/LayoutTests/webgl/conformance/extensions/ext-shader-texture-lod-expected.txt        2014-05-12 20:13:44 UTC (rev 168639)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../resources/webgl_test_files/conformance/extensions/ext-shader-texture-lod.html
+PASS
+
</ins></span></pre></div>
<a id="trunkLayoutTestswebglconformanceextensionsextshadertexturelodhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/webgl/conformance/extensions/ext-shader-texture-lod.html (0 => 168639)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/webgl/conformance/extensions/ext-shader-texture-lod.html                                (rev 0)
+++ trunk/LayoutTests/webgl/conformance/extensions/ext-shader-texture-lod.html        2014-05-12 20:13:44 UTC (rev 168639)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+&lt;!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT --&gt;
+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;title&gt;WebGL Conformance Test Wrapper for ext-shader-texture-lod.html&lt;/title&gt;
+&lt;script type=&quot;text/javascript&quot; src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script type=&quot;text/javascript&quot; src=&quot;../../resources/webkit-webgl-test-harness.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p&gt;This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.&lt;/p&gt;
+Test: &lt;a href=&quot;../../resources/webgl_test_files/conformance/extensions/ext-shader-texture-lod.html&quot;&gt;../../resources/webgl_test_files/conformance/extensions/ext-shader-texture-lod.html&lt;/a&gt;
+&lt;div id=&quot;result&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;iframe&quot;&gt;
+&lt;iframe src=&quot;../../resources/webgl_test_files/conformance/extensions/ext-shader-texture-lod.html&quot; width=&quot;800&quot; height=&quot;600&quot;&gt;&lt;/iframe&gt;
+&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestswebglresourceswebgl_test_filesconformanceextensionsextshadertexturelodhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/webgl/resources/webgl_test_files/conformance/extensions/ext-shader-texture-lod.html (0 => 168639)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/webgl/resources/webgl_test_files/conformance/extensions/ext-shader-texture-lod.html                                (rev 0)
+++ trunk/LayoutTests/webgl/resources/webgl_test_files/conformance/extensions/ext-shader-texture-lod.html        2014-05-12 20:13:44 UTC (rev 168639)
</span><span class="lines">@@ -0,0 +1,280 @@
</span><ins>+ &lt;!--
+Copyright (c) 2011 The Chromium Authors. All rights reserved.
+Use of this source code is governed by a BSD-style license that can be
+found in the LICENSE file.
+ --&gt;
+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;title&gt;WebGL EXT_shader_texture_lod Conformance Tests&lt;/title&gt;
+&lt;link rel=&quot;stylesheet&quot; href=&quot;../../resources/js-test-style.css&quot;/&gt;
+&lt;script src=&quot;../../resources/desktop-gl-constants.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/webgl-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/webgl-test-utils.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;description&quot;&gt;&lt;/div&gt;
+&lt;canvas id=&quot;canvas&quot; width=&quot;256&quot; height=&quot;256&quot; style=&quot;width: 50px; height: 50px;&quot;&gt; &lt;/canvas&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;!-- Shaders for testing standard derivatives --&gt;
+
+&lt;!-- Shader omitting the required #extension pragma --&gt;
+&lt;script id=&quot;missingPragmaFragmentShader&quot; type=&quot;x-shader/x-fragment&quot;&gt;
+precision mediump float;
+varying vec2 texCoord0v;
+void main() {
+    vec4 color = texture2DLodEXT(tex, texCoord0v, lod);
+    gl_FragColor = vec4(dx, dy, w, 1.0);
+}
+&lt;/script&gt;
+
+&lt;!-- Shader to test macro definition --&gt;
+&lt;script id=&quot;macroFragmentShader&quot; type=&quot;x-shader/x-fragment&quot;&gt;
+precision mediump float;
+void main() {
+#ifdef GL_EXT_shader_texture_lod
+    gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
+#else
+    // Error expected
+    #error no GL_EXT_shader_texture_lod;
+#endif
+}
+&lt;/script&gt;
+
+&lt;!-- Shader with required #extension pragma --&gt;
+&lt;script id=&quot;testFragmentShader&quot; type=&quot;x-shader/x-fragment&quot;&gt;
+#extension GL_EXT_shader_texture_lod : enable
+precision mediump float;
+varying vec2 texCoord0v;
+uniform float lod;
+uniform sampler2D tex;
+void main() {
+    vec4 color = texture2DLodEXT(tex, texCoord0v, lod);
+    gl_FragColor = color;
+}
+&lt;/script&gt;
+
+&lt;!-- Shaders to link with test fragment shaders --&gt;
+&lt;script id=&quot;goodVertexShader&quot; type=&quot;x-shader/x-vertex&quot;&gt;
+attribute vec4 vPosition;
+attribute vec2 texCoord0;
+varying vec2 texCoord0v;
+void main() {
+    texCoord0v = texCoord0;
+    gl_Position = vPosition;
+}
+&lt;/script&gt;
+
+&lt;!-- Shaders to test output --&gt;
+&lt;script id=&quot;outputVertexShader&quot; type=&quot;x-shader/x-vertex&quot;&gt;
+attribute vec4 vPosition;
+attribute vec2 texCoord0;
+varying vec2 texCoord0v;
+void main() {
+    texCoord0v = texCoord0;
+    gl_Position = vPosition;
+}
+&lt;/script&gt;
+&lt;script id=&quot;outputFragmentShader&quot; type=&quot;x-shader/x-fragment&quot;&gt;
+#extension GL_EXT_shader_texture_lod : require
+precision mediump float;
+varying vec2 texCoord0v;
+uniform float lod;
+uniform sampler2D tex;
+void main() {
+    vec4 color = texture2DLodEXT(tex, texCoord0v, lod);
+    gl_FragColor = color;
+}
+&lt;/script&gt;
+
+&lt;script&gt;
+description(&quot;This test verifies the functionality of the EXT_shader_texture_lod extension, if it is available.&quot;);
+
+debug(&quot;&quot;);
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById(&quot;canvas&quot;);
+
+shouldBe(&quot;canvas.width&quot;, &quot;256&quot;);
+shouldBe(&quot;canvas.height&quot;, &quot;256&quot;);
+
+var gl = wtu.create3DContext(canvas);
+var ext = null;
+
+if (!gl) {
+    testFailed(&quot;WebGL context does not exist&quot;);
+} else {
+    testPassed(&quot;WebGL context exists&quot;);
+
+    // Run tests with extension disabled
+    runShaderTests(false);
+
+    // Query the extension and store globally so shouldBe can access it
+    ext = gl.getExtension(&quot;EXT_shader_texture_lod&quot;);
+    if (!ext) {
+        testPassed(&quot;No EXT_shader_texture_lod support -- this is legal&quot;);
+
+        runSupportedTest(false);
+    } else {
+        testPassed(&quot;Successfully enabled EXT_shader_texture_lod extension&quot;);
+
+        runSupportedTest(true);
+
+        runShaderTests(true);
+        runOutputTests();
+        runUniqueObjectTest();
+        runReferenceCycleTest();
+    }
+}
+
+function runSupportedTest(extensionEnabled) {
+    var supported = gl.getSupportedExtensions();
+    if (supported.indexOf(&quot;EXT_shader_texture_lod&quot;) &gt;= 0) {
+        if (extensionEnabled) {
+            testPassed(&quot;EXT_shader_texture_lod listed as supported and getExtension succeeded&quot;);
+        } else {
+            testFailed(&quot;EXT_shader_texture_lod listed as supported but getExtension failed&quot;);
+        }
+    } else {
+        if (extensionEnabled) {
+            testFailed(&quot;EXT_shader_texture_lod not listed as supported but getExtension succeeded&quot;);
+        } else {
+            testPassed(&quot;EXT_shader_texture_lod not listed as supported and getExtension failed -- this is legal&quot;);
+        }
+    }
+}
+
+function runShaderTests(extensionEnabled) {
+    debug(&quot;&quot;);
+    debug(&quot;Testing various shader compiles with extension &quot; + (extensionEnabled ? &quot;enabled&quot; : &quot;disabled&quot;));
+
+    // Expect the macro shader to succeed ONLY if enabled
+    var macroFragmentProgram = wtu.loadProgramFromScriptExpectError(gl, &quot;goodVertexShader&quot;, &quot;macroFragmentShader&quot;);
+    if (extensionEnabled) {
+        if (macroFragmentProgram) {
+            // Expected result
+            testPassed(&quot;GL_EXT_shader_texture_lod defined in shaders when extension is enabled&quot;);
+        } else {
+            testFailed(&quot;GL_EXT_shader_texture_lod not defined in shaders when extension is enabled&quot;);
+        }
+    } else {
+        if (macroFragmentProgram) {
+            testFailed(&quot;GL_EXT_shader_texture_lod defined in shaders when extension is disabled&quot;);
+        } else {
+            testPassed(&quot;GL_EXT_shader_texture_lod not defined in shaders when extension disabled&quot;);
+        }
+    }
+
+    // Always expect the shader missing the #pragma to fail (whether enabled or not)
+    var missingPragmaFragmentProgram = wtu.loadProgramFromScriptExpectError(gl, &quot;goodVertexShader&quot;, &quot;missingPragmaFragmentShader&quot;);
+    if (missingPragmaFragmentProgram) {
+        testFailed(&quot;Shader built-ins allowed without #extension pragma&quot;);
+    } else {
+        testPassed(&quot;Shader built-ins disallowed without #extension pragma&quot;);
+    }
+
+    // Try to compile a shader using the built-ins that should only succeed if enabled
+    var testFragmentProgram = wtu.loadProgramFromScriptExpectError(gl, &quot;goodVertexShader&quot;, &quot;testFragmentShader&quot;);
+    if (extensionEnabled) {
+        if (testFragmentProgram) {
+            testPassed(&quot;Shader built-ins compiled successfully when extension enabled&quot;);
+        } else {
+            testFailed(&quot;Shader built-ins failed to compile when extension enabled&quot;);
+        }
+    } else {
+        if (testFragmentProgram) {
+            testFailed(&quot;Shader built-ins compiled successfully when extension disabled&quot;);
+        } else {
+            testPassed(&quot;Shader built-ins failed to compile when extension disabled&quot;);
+        }
+    }
+}
+
+function runOutputTests() {
+    debug(&quot;Testing various draws for valid built-in function behavior&quot;);
+
+    canvas.width = 256; canvas.height = 256;
+    gl.viewport(0, 0, canvas.width, canvas.height);
+
+    var program = wtu.setupProgram(gl, [&quot;outputVertexShader&quot;, &quot;outputFragmentShader&quot;], ['vPosition', 'texCoord0'], [0, 1]);
+    var quadParameters = wtu.setupUnitQuad(gl, 0, 1);
+
+    var colors = [
+        {name: 'red', color:[255, 0, 0, 255]},
+        {name: 'green', color:[0, 255, 0, 255]},
+        {name: 'blue', color:[0, 0, 255, 255]},
+        {name: 'yellow', color:[255, 255, 0, 255]},
+        {name: 'magenta', color:[255, 0, 255, 255]},
+        {name: 'cyan', color:[0, 255, 255, 255]},
+        {name: 'pink', color:[255, 128, 128, 255]},
+        {name: 'gray', color:[128, 128, 128, 255]},
+        {name: 'light green', color:[128, 255, 128, 255]},
+    ];
+
+    if (colors.length != 9) {
+        testFailed(&quot;9 colors are needed (9 mips for 256x256 texture), only have &quot; + colors.length);
+    } else {
+        testPassed(&quot;9 colors found (9 mips for 256x256 texture)&quot;);
+    }
+
+    var tex = gl.createTexture();
+    gl.bindTexture(gl.TEXTURE_2D, tex);
+    gl.texParameteri(
+        gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST_MIPMAP_LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.REPEAT);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.REPEAT);
+
+    for (var ii = 0; ii &lt; colors.length; ++ii) {
+        var color = colors[ii];
+        var size = Math.pow(2, colors.length - ii - 1);
+        wtu.fillTexture(gl, tex, size, size, color.color, ii);
+    }
+
+    var loc = gl.getUniformLocation(program, &quot;lod&quot;);
+
+    for (var ii = 0; ii &lt; colors.length; ++ii) {
+        gl.uniform1f(loc, ii);
+        var color = colors[ii];
+        wtu.drawQuad(gl);
+        wtu.checkCanvas(
+            gl, color.color,
+            &quot;256x256 texture drawn to 256x256 dest with lod = &quot; + ii +
+                &quot; should be &quot; + color.name);
+    }
+
+    glErrorShouldBe(gl, gl.NO_ERROR, &quot;Should be no errors.&quot;);
+}
+
+function runUniqueObjectTest()
+{
+    debug(&quot;Testing that getExtension() returns the same object each time&quot;);
+    gl.getExtension(&quot;EXT_shader_texture_lod&quot;).myProperty = 2;
+    gc();
+    shouldBe('gl.getExtension(&quot;EXT_shader_texture_lod&quot;).myProperty', '2');
+}
+
+function runReferenceCycleTest()
+{
+    // create some reference cycles. The goal is to see if they cause leaks. The point is that
+    // some browser test runners have instrumentation to detect leaked refcounted objects.
+
+    debug(&quot;Testing reference cycles between context and extension objects&quot;);
+    var ext = gl.getExtension(&quot;EXT_shader_texture_lod&quot;);
+
+    // create cycle between extension and context, since the context has to hold a reference to the extension
+    ext.context = gl;
+
+    // create a self-cycle on the extension object
+    ext.ext = ext;
+}
+
+debug(&quot;&quot;);
+successfullyParsed = true;
+&lt;/script&gt;
+&lt;script&gt;finishTest();&lt;/script&gt;
+
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (168638 => 168639)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2014-05-12 19:54:38 UTC (rev 168638)
+++ trunk/Source/WebCore/CMakeLists.txt        2014-05-12 20:13:44 UTC (rev 168639)
</span><span class="lines">@@ -506,6 +506,7 @@
</span><span class="cx">     html/canvas/CanvasRenderingContext.idl
</span><span class="cx">     html/canvas/CanvasRenderingContext2D.idl
</span><span class="cx">     html/canvas/DOMPath.idl
</span><ins>+    html/canvas/EXTShaderTextureLOD.idl
</ins><span class="cx">     html/canvas/EXTTextureFilterAnisotropic.idl
</span><span class="cx">     html/canvas/OESElementIndexUint.idl
</span><span class="cx">     html/canvas/OESStandardDerivatives.idl
</span><span class="lines">@@ -1652,6 +1653,7 @@
</span><span class="cx">     html/canvas/CanvasRenderingContext.cpp
</span><span class="cx">     html/canvas/CanvasRenderingContext2D.cpp
</span><span class="cx">     html/canvas/CanvasStyle.cpp
</span><ins>+    html/canvas/EXTShaderTextureLOD.cpp
</ins><span class="cx">     html/canvas/EXTTextureFilterAnisotropic.cpp
</span><span class="cx">     html/canvas/OESElementIndexUint.cpp
</span><span class="cx">     html/canvas/OESStandardDerivatives.cpp
</span><span class="lines">@@ -2787,6 +2789,7 @@
</span><span class="cx"> 
</span><span class="cx">     list(APPEND WebCore_SOURCES
</span><span class="cx">         html/canvas/ANGLEInstancedArrays.cpp
</span><ins>+        html/canvas/EXTShaderTextureLOD.cpp
</ins><span class="cx">         html/canvas/EXTTextureFilterAnisotropic.cpp
</span><span class="cx">         html/canvas/OESElementIndexUint.cpp
</span><span class="cx">         html/canvas/OESStandardDerivatives.cpp
</span><span class="lines">@@ -2824,6 +2827,7 @@
</span><span class="cx">     )
</span><span class="cx">     list(APPEND WebCore_IDL_FILES
</span><span class="cx">         html/canvas/ANGLEInstancedArrays.idl
</span><ins>+        html/canvas/EXTShaderTextureLOD.idl
</ins><span class="cx">         html/canvas/EXTTextureFilterAnisotropic.idl
</span><span class="cx">         html/canvas/OESElementIndexUint.idl
</span><span class="cx">         html/canvas/OESStandardDerivatives.idl
</span><span class="lines">@@ -2929,11 +2933,11 @@
</span><span class="cx"> endif ()
</span><span class="cx"> 
</span><span class="cx"> list(APPEND WebCore_SOURCES
</span><ins>+    platform/text/TextCodecICU.cpp
+    platform/text/TextEncodingDetectorICU.cpp
</ins><span class="cx">     platform/text/icu/UTextProvider.cpp
</span><span class="cx">     platform/text/icu/UTextProviderLatin1.cpp
</span><span class="cx">     platform/text/icu/UTextProviderUTF16.cpp
</span><del>-    platform/text/TextCodecICU.cpp
-    platform/text/TextEncodingDetectorICU.cpp
</del><span class="cx"> )
</span><span class="cx"> list(APPEND WebCore_INCLUDE_DIRECTORIES
</span><span class="cx">     ${ICU_INCLUDE_DIRS}
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (168638 => 168639)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-05-12 19:54:38 UTC (rev 168638)
+++ trunk/Source/WebCore/ChangeLog        2014-05-12 20:13:44 UTC (rev 168639)
</span><span class="lines">@@ -1,3 +1,42 @@
</span><ins>+2014-05-12  Alex Christensen  &lt;achristensen@webkit.org&gt;
+
+        Implement EXT_shader_texture_lod in WebGL.
+        https://bugs.webkit.org/show_bug.cgi?id=128985
+        &lt;rdar://problem/16111396&gt;
+
+        Based on Chromium patch by bajones@chromium.org.
+        https://src.chromium.org/viewvc/blink?revision=171465&amp;view=revision
+
+        Reviewed by Dean Jackson.
+
+        Test: webgl/conformance/extensions/ext-shader-texture-lod.html
+        
+        * CMakeLists.txt:
+        * DerivedSources.cpp:
+        * DerivedSources.make:
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.vcxproj/WebCore.vcxproj.filters:
+        * WebCore.xcodeproj/project.pbxproj:
+        Added new EXTShaderTextureLOD files.
+        * bindings/js/JSWebGLRenderingContextCustom.cpp:
+        (WebCore::toJS):
+        Added EXTShaderTextureLOD.
+        * html/canvas/EXTShaderTextureLOD.cpp: Added.
+        (WebCore::EXTShaderTextureLOD::EXTShaderTextureLOD):
+        (WebCore::EXTShaderTextureLOD::~EXTShaderTextureLOD):
+        (WebCore::EXTShaderTextureLOD::getName):
+        * html/canvas/EXTShaderTextureLOD.h: Added.
+        * html/canvas/EXTShaderTextureLOD.idl: Added.
+        * html/canvas/WebGLExtension.h:
+        Added EXTShaderTextureLODName.
+        * html/canvas/WebGLObject.cpp:
+        Removed unused inclusion of EXTTextureFilterAnisotropic.h.
+        * html/canvas/WebGLRenderingContext.cpp:
+        (WebCore::WebGLRenderingContext::getExtension):
+        Added EXT_shader_texture_lod.
+        * html/canvas/WebGLRenderingContext.h:
+        Added a EXTShaderTextureLOD member variable.
+
</ins><span class="cx"> 2014-05-12  Martin Hock  &lt;mhock@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Disallow drag and drop of non-displayable resources.
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.cpp (168638 => 168639)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.cpp        2014-05-12 19:54:38 UTC (rev 168638)
+++ trunk/Source/WebCore/DerivedSources.cpp        2014-05-12 20:13:44 UTC (rev 168639)
</span><span class="lines">@@ -41,6 +41,7 @@
</span><span class="cx"> #include &quot;JSCanvasRenderingContext.cpp&quot;
</span><span class="cx"> #include &quot;JSCanvasRenderingContext2D.cpp&quot;
</span><span class="cx"> #if ENABLE(WEBGL)
</span><ins>+#include &quot;JSEXTShaderTextureLOD.cpp&quot;
</ins><span class="cx"> #include &quot;JSEXTTextureFilterAnisotropic.cpp&quot;
</span><span class="cx"> #include &quot;JSOESElementIndexUint.cpp&quot;
</span><span class="cx"> #include &quot;JSOESStandardDerivatives.cpp&quot;
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (168638 => 168639)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2014-05-12 19:54:38 UTC (rev 168638)
+++ trunk/Source/WebCore/DerivedSources.make        2014-05-12 20:13:44 UTC (rev 168639)
</span><span class="lines">@@ -414,6 +414,7 @@
</span><span class="cx">     $(WebCore)/html/canvas/CanvasRenderingContext.idl \
</span><span class="cx">     $(WebCore)/html/canvas/CanvasRenderingContext2D.idl \
</span><span class="cx">     $(WebCore)/html/canvas/DOMPath.idl \
</span><ins>+    $(WebCore)/html/canvas/EXTShaderTextureLOD.idl \
</ins><span class="cx">     $(WebCore)/html/canvas/EXTTextureFilterAnisotropic.idl \
</span><span class="cx">     $(WebCore)/html/canvas/OESElementIndexUint.idl \
</span><span class="cx">     $(WebCore)/html/canvas/OESStandardDerivatives.idl \
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (168638 => 168639)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-05-12 19:54:38 UTC (rev 168638)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-05-12 20:13:44 UTC (rev 168639)
</span><span class="lines">@@ -298,6 +298,20 @@
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><ins>+    &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSEXTShaderTextureLOD.cpp&quot;&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='DebugSuffix|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+    &lt;/ClCompile&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSEXTTextureFilterAnisotropic.cpp&quot;&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="lines">@@ -6488,6 +6502,7 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\html\canvas\ANGLEInstancedArrays.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\html\canvas\CanvasContextAttributes.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\html\canvas\CanvasPathMethods.cpp&quot; /&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\html\canvas\EXTShaderTextureLOD.cpp&quot; /&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\html\canvas\EXTTextureFilterAnisotropic.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\html\canvas\OESElementIndexUint.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\html\canvas\OESStandardDerivatives.cpp&quot; /&gt;
</span><span class="lines">@@ -18547,6 +18562,7 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\XMLViewerJS.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\XPathGrammar.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSANGLEInstancedArrays.h&quot; /&gt;
</span><ins>+    &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSEXTShaderTextureLOD.h&quot; /&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSEXTTextureFilterAnisotropic.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSOESElementIndexUint.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSOESStandardDerivatives.h&quot; /&gt;
</span><span class="lines">@@ -18722,6 +18738,7 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\html\canvas\ANGLEInstancedArrays.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\html\canvas\CanvasContextAttributes.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\html\canvas\CanvasPathMethods.h&quot; /&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\html\canvas\EXTShaderTextureLOD.h&quot; /&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\html\canvas\EXTTextureFilterAnisotropic.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\html\canvas\OESElementIndexUint.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\html\canvas\OESStandardDerivatives.h&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (168638 => 168639)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-05-12 19:54:38 UTC (rev 168638)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-05-12 20:13:44 UTC (rev 168639)
</span><span class="lines">@@ -6511,6 +6511,9 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSANGLEInstancedArrays.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;DerivedSources&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><ins>+    &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSEXTShaderTextureLOD.cpp&quot;&gt;
+      &lt;Filter&gt;DerivedSources&lt;/Filter&gt;
+    &lt;/ClCompile&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSEXTTextureFilterAnisotropic.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;DerivedSources&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="lines">@@ -6637,6 +6640,9 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\html\canvas\OESVertexArrayObject.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;html\canvas&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\html\canvas\EXTShaderTextureLOD.cpp&quot;&gt;
+      &lt;Filter&gt;html\canvas&lt;/Filter&gt;
+    &lt;/ClCompile&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\html\canvas\EXTTextureFilterAnisotropic.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;html\canvas&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="lines">@@ -14334,6 +14340,9 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSWebGLVertexArrayObjectOES.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;DerivedSources&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><ins>+    &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSEXTShaderTextureLOD.h&quot;&gt;
+      &lt;Filter&gt;DerivedSources&lt;/Filter&gt;
+    &lt;/ClInclude&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSEXTTextureFilterAnisotropic.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;DerivedSources&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><span class="lines">@@ -14466,6 +14475,9 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\html\canvas\OESVertexArrayObject.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;html\canvas&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\html\canvas\EXTShaderTextureLOD.h&quot;&gt;
+      &lt;Filter&gt;html\canvas&lt;/Filter&gt;
+    &lt;/ClInclude&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\html\canvas\EXTTextureFilterAnisotropic.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;html\canvas&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (168638 => 168639)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-05-12 19:54:38 UTC (rev 168638)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-05-12 20:13:44 UTC (rev 168639)
</span><span class="lines">@@ -2045,6 +2045,10 @@
</span><span class="cx">                 5B30695D18B3D3450099D5E8 /* WebGLDrawBuffers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5B30695A18B3D3450099D5E8 /* WebGLDrawBuffers.cpp */; };
</span><span class="cx">                 5B30695E18B3D3450099D5E8 /* WebGLDrawBuffers.h in Headers */ = {isa = PBXBuildFile; fileRef = 5B30695B18B3D3450099D5E8 /* WebGLDrawBuffers.h */; };
</span><span class="cx">                 5B7A208D2E12979B4AE19DE6 /* RenderMathMLSpace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DBFCB0EBFF5CD77EBEB35395 /* RenderMathMLSpace.cpp */; };
</span><ins>+                5C4304B0191AC908000E2BC0 /* EXTShaderTextureLOD.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C4304AD191AC908000E2BC0 /* EXTShaderTextureLOD.cpp */; };
+                5C4304B1191AC908000E2BC0 /* EXTShaderTextureLOD.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C4304AE191AC908000E2BC0 /* EXTShaderTextureLOD.h */; };
+                5C4304B5191AEF46000E2BC0 /* JSEXTShaderTextureLOD.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C4304B3191AEF46000E2BC0 /* JSEXTShaderTextureLOD.cpp */; };
+                5C4304B6191AEF46000E2BC0 /* JSEXTShaderTextureLOD.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C4304B4191AEF46000E2BC0 /* JSEXTShaderTextureLOD.h */; };
</ins><span class="cx">                 5D21A80213ECE5DF00BB7064 /* WebVTTParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D21A80013ECE5DF00BB7064 /* WebVTTParser.cpp */; };
</span><span class="cx">                 5D21A80313ECE5DF00BB7064 /* WebVTTParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D21A80113ECE5DF00BB7064 /* WebVTTParser.h */; };
</span><span class="cx">                 5D874F130D161D3200796C3B /* NetscapePlugInStreamLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E227DD0AF589AD00D48324 /* NetscapePlugInStreamLoader.cpp */; };
</span><span class="lines">@@ -9068,6 +9072,11 @@
</span><span class="cx">                 5B30695A18B3D3450099D5E8 /* WebGLDrawBuffers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebGLDrawBuffers.cpp; path = canvas/WebGLDrawBuffers.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5B30695B18B3D3450099D5E8 /* WebGLDrawBuffers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebGLDrawBuffers.h; path = canvas/WebGLDrawBuffers.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5B30695C18B3D3450099D5E8 /* WebGLDrawBuffers.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = WebGLDrawBuffers.idl; path = canvas/WebGLDrawBuffers.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                5C4304AD191AC908000E2BC0 /* EXTShaderTextureLOD.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EXTShaderTextureLOD.cpp; path = canvas/EXTShaderTextureLOD.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5C4304AE191AC908000E2BC0 /* EXTShaderTextureLOD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EXTShaderTextureLOD.h; path = canvas/EXTShaderTextureLOD.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5C4304AF191AC908000E2BC0 /* EXTShaderTextureLOD.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = EXTShaderTextureLOD.idl; path = canvas/EXTShaderTextureLOD.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5C4304B3191AEF46000E2BC0 /* JSEXTShaderTextureLOD.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSEXTShaderTextureLOD.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5C4304B4191AEF46000E2BC0 /* JSEXTShaderTextureLOD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSEXTShaderTextureLOD.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 5D21A80013ECE5DF00BB7064 /* WebVTTParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebVTTParser.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5D21A80113ECE5DF00BB7064 /* WebVTTParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebVTTParser.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5D4B8C5211E52C8B00BBB62F /* WebCore.exp.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebCore.exp.in; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -15531,6 +15540,9 @@
</span><span class="cx">                 49484FAE102CF01E00187DD3 /* canvas */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                5C4304AD191AC908000E2BC0 /* EXTShaderTextureLOD.cpp */,
+                                5C4304AE191AC908000E2BC0 /* EXTShaderTextureLOD.h */,
+                                5C4304AF191AC908000E2BC0 /* EXTShaderTextureLOD.idl */,
</ins><span class="cx">                                 31A795C11888B72400382F90 /* ANGLEInstancedArrays.cpp */,
</span><span class="cx">                                 31A795C21888B72400382F90 /* ANGLEInstancedArrays.h */,
</span><span class="cx">                                 31A795C31888B72400382F90 /* ANGLEInstancedArrays.idl */,
</span><span class="lines">@@ -18328,6 +18340,8 @@
</span><span class="cx">                 A83B79080CCAFF2B000B0825 /* HTML */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                5C4304B3191AEF46000E2BC0 /* JSEXTShaderTextureLOD.cpp */,
+                                5C4304B4191AEF46000E2BC0 /* JSEXTShaderTextureLOD.h */,
</ins><span class="cx">                                 31A795C41888BAD100382F90 /* JSANGLEInstancedArrays.cpp */,
</span><span class="cx">                                 31A795C51888BAD100382F90 /* JSANGLEInstancedArrays.h */,
</span><span class="cx">                                 BE8EF03E171C8FF9009B48C3 /* JSAudioTrack.cpp */,
</span><span class="lines">@@ -23332,6 +23346,7 @@
</span><span class="cx">                                 A80E6CE60A1989CA007FB8C5 /* CSSPrimitiveValue.h in Headers */,
</span><span class="cx">                                 E1ED8AC30CC49BE000BFC557 /* CSSPrimitiveValueMappings.h in Headers */,
</span><span class="cx">                                 A80E6CFF0A1989CA007FB8C5 /* CSSProperty.h in Headers */,
</span><ins>+                                5C4304B6191AEF46000E2BC0 /* JSEXTShaderTextureLOD.h in Headers */,
</ins><span class="cx">                                 78D02BC6154A18DF00B62D05 /* CSSPropertyAnimation.h in Headers */,
</span><span class="cx">                                 656580F409D12B20000E61D7 /* CSSPropertyNames.h in Headers */,
</span><span class="cx">                                 82E3D8DF122EA0D1003AE5BC /* CSSPropertySourceData.h in Headers */,
</span><span class="lines">@@ -23606,6 +23621,7 @@
</span><span class="cx">                                 85DF81990AA77E4B00486AD7 /* DOMHTMLIFrameElement.h in Headers */,
</span><span class="cx">                                 85E711B10AC5D5350053270F /* DOMHTMLIFrameElementInternal.h in Headers */,
</span><span class="cx">                                 85DF81290AA7787200486AD7 /* DOMHTMLImageElement.h in Headers */,
</span><ins>+                                5C4304B1191AC908000E2BC0 /* EXTShaderTextureLOD.h in Headers */,
</ins><span class="cx">                                 85E711B20AC5D5350053270F /* DOMHTMLImageElementInternal.h in Headers */,
</span><span class="cx">                                 85F32AEC0AA63B8700FF3184 /* DOMHTMLInputElement.h in Headers */,
</span><span class="cx">                                 85E711B30AC5D5350053270F /* DOMHTMLInputElementInternal.h in Headers */,
</span><span class="lines">@@ -27702,6 +27718,7 @@
</span><span class="cx">                                 F3810C1B1365A49600ED6E33 /* InspectorWorkerAgent.cpp in Sources */,
</span><span class="cx">                                 F350B73513F1377D00880C43 /* InstrumentingAgents.cpp in Sources */,
</span><span class="cx">                                 2D46F04E17B96FBD005647F0 /* IntPoint.cpp in Sources */,
</span><ins>+                                5C4304B0191AC908000E2BC0 /* EXTShaderTextureLOD.cpp in Sources */,
</ins><span class="cx">                                 B27535600B053814002CE64F /* IntPointCG.cpp in Sources */,
</span><span class="cx">                                 B275357C0B053814002CE64F /* IntPointMac.mm in Sources */,
</span><span class="cx">                                 B27535730B053814002CE64F /* IntRect.cpp in Sources */,
</span><span class="lines">@@ -27755,6 +27772,7 @@
</span><span class="cx">                                 65DF31F309D1CC60000BE325 /* JSCharacterData.cpp in Sources */,
</span><span class="cx">                                 BCC065870F3CE2A700CD2D87 /* JSClientRect.cpp in Sources */,
</span><span class="cx">                                 BCC065890F3CE2A700CD2D87 /* JSClientRectList.cpp in Sources */,
</span><ins>+                                5C4304B5191AEF46000E2BC0 /* JSEXTShaderTextureLOD.cpp in Sources */,
</ins><span class="cx">                                 BCA83E4F0D7CE1E9003421A8 /* JSDataTransfer.cpp in Sources */,
</span><span class="cx">                                 BCA83E520D7CE205003421A8 /* JSDataTransferCustom.cpp in Sources */,
</span><span class="cx">                                 51FB5505113E3E9100821176 /* JSCloseEvent.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSWebGLRenderingContextCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp (168638 => 168639)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp        2014-05-12 19:54:38 UTC (rev 168638)
+++ trunk/Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp        2014-05-12 20:13:44 UTC (rev 168639)
</span><span class="lines">@@ -30,11 +30,13 @@
</span><span class="cx"> #include &quot;JSWebGLRenderingContext.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #include &quot;ANGLEInstancedArrays.h&quot;
</span><ins>+#include &quot;EXTShaderTextureLOD.h&quot;
</ins><span class="cx"> #include &quot;EXTTextureFilterAnisotropic.h&quot;
</span><span class="cx"> #include &quot;ExceptionCode.h&quot;
</span><span class="cx"> #include &quot;HTMLCanvasElement.h&quot;
</span><span class="cx"> #include &quot;HTMLImageElement.h&quot;
</span><span class="cx"> #include &quot;JSANGLEInstancedArrays.h&quot;
</span><ins>+#include &quot;JSEXTShaderTextureLOD.h&quot;
</ins><span class="cx"> #include &quot;JSEXTTextureFilterAnisotropic.h&quot;
</span><span class="cx"> #include &quot;JSHTMLCanvasElement.h&quot;
</span><span class="cx"> #include &quot;JSHTMLImageElement.h&quot;
</span><span class="lines">@@ -205,6 +207,8 @@
</span><span class="cx">     switch (extension-&gt;getName()) {
</span><span class="cx">     case WebGLExtension::WebGLLoseContextName:
</span><span class="cx">         return toJS(exec, globalObject, static_cast&lt;WebGLLoseContext*&gt;(extension));
</span><ins>+    case WebGLExtension::EXTShaderTextureLODName:
+        return toJS(exec, globalObject, static_cast&lt;EXTShaderTextureLOD*&gt;(extension));
</ins><span class="cx">     case WebGLExtension::EXTTextureFilterAnisotropicName:
</span><span class="cx">         return toJS(exec, globalObject, static_cast&lt;EXTTextureFilterAnisotropic*&gt;(extension));
</span><span class="cx">     case WebGLExtension::OESStandardDerivativesName:
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasEXTShaderTextureLODcppfromrev168638trunkSourceWebCorehtmlcanvasWebGLExtensionh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/html/canvas/EXTShaderTextureLOD.cpp (from rev 168638, trunk/Source/WebCore/html/canvas/WebGLExtension.h) (0 => 168639)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/EXTShaderTextureLOD.cpp                                (rev 0)
+++ trunk/Source/WebCore/html/canvas/EXTShaderTextureLOD.cpp        2014-05-12 20:13:44 UTC (rev 168639)
</span><span class="lines">@@ -0,0 +1,49 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 &quot;config.h&quot;
+
+#if ENABLE(WEBGL)
+#include &quot;EXTShaderTextureLOD.h&quot;
+
+namespace WebCore {
+
+EXTShaderTextureLOD::EXTShaderTextureLOD(WebGLRenderingContext* context)
+    : WebGLExtension(context)
+{
+}
+
+EXTShaderTextureLOD::~EXTShaderTextureLOD()
+{
+}
+
+WebGLExtension::ExtensionName EXTShaderTextureLOD::getName() const
+{
+    return EXTShaderTextureLODName;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(WEBGL)
</ins></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasEXTShaderTextureLODhfromrev168638trunkSourceWebCorehtmlcanvasWebGLExtensionh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/html/canvas/EXTShaderTextureLOD.h (from rev 168638, trunk/Source/WebCore/html/canvas/WebGLExtension.h) (0 => 168639)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/EXTShaderTextureLOD.h                                (rev 0)
+++ trunk/Source/WebCore/html/canvas/EXTShaderTextureLOD.h        2014-05-12 20:13:44 UTC (rev 168639)
</span><span class="lines">@@ -0,0 +1,43 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; 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.
+ */
+
+#ifndef EXTShaderTextureLOD_h
+#define EXTShaderTextureLOD_h
+
+#include &quot;WebGLExtension.h&quot;
+
+namespace WebCore {
+
+class EXTShaderTextureLOD : public WebGLExtension {
+public:
+    explicit EXTShaderTextureLOD(WebGLRenderingContext*);
+    virtual ~EXTShaderTextureLOD();
+
+    virtual ExtensionName getName() const override;
+};
+
+} // namespace WebCore
+
+#endif // EXTShaderTextureLOD_h
</ins></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasEXTShaderTextureLODidlfromrev168638trunkSourceWebCorehtmlcanvasWebGLExtensionh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/html/canvas/EXTShaderTextureLOD.idl (from rev 168638, trunk/Source/WebCore/html/canvas/WebGLExtension.h) (0 => 168639)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/EXTShaderTextureLOD.idl                                (rev 0)
+++ trunk/Source/WebCore/html/canvas/EXTShaderTextureLOD.idl        2014-05-12 20:13:44 UTC (rev 168639)
</span><span class="lines">@@ -0,0 +1,31 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; 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.
+ */
+
+[
+    NoInterfaceObject,
+    Conditional=WEBGL,
+    GenerateIsReachable=ImplWebGLRenderingContext
+] interface EXTShaderTextureLOD {
+};
</ins></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLExtensionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLExtension.h (168638 => 168639)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLExtension.h        2014-05-12 19:54:38 UTC (rev 168638)
+++ trunk/Source/WebCore/html/canvas/WebGLExtension.h        2014-05-12 20:13:44 UTC (rev 168639)
</span><span class="lines">@@ -36,6 +36,7 @@
</span><span class="cx">     // Extension names are needed to properly wrap instances in JavaScript objects.
</span><span class="cx">     enum ExtensionName {
</span><span class="cx">         WebGLLoseContextName,
</span><ins>+        EXTShaderTextureLODName,
</ins><span class="cx">         EXTTextureFilterAnisotropicName,
</span><span class="cx">         OESTextureFloatName,
</span><span class="cx">         OESTextureFloatLinearName,
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLObject.cpp (168638 => 168639)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLObject.cpp        2014-05-12 19:54:38 UTC (rev 168638)
+++ trunk/Source/WebCore/html/canvas/WebGLObject.cpp        2014-05-12 20:13:44 UTC (rev 168639)
</span><span class="lines">@@ -29,7 +29,6 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;WebGLObject.h&quot;
</span><span class="cx"> 
</span><del>-#include &quot;EXTTextureFilterAnisotropic.h&quot;
</del><span class="cx"> #include &quot;WebGLCompressedTextureS3TC.h&quot;
</span><span class="cx"> #include &quot;WebGLContextGroup.h&quot;
</span><span class="cx"> #include &quot;WebGLDebugRendererInfo.h&quot;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLRenderingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp (168638 => 168639)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp        2014-05-12 19:54:38 UTC (rev 168638)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp        2014-05-12 20:13:44 UTC (rev 168639)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #include &quot;CachedImage.h&quot;
</span><span class="cx"> #include &quot;DOMWindow.h&quot;
</span><span class="cx"> #include &quot;Document.h&quot;
</span><ins>+#include &quot;EXTShaderTextureLOD.h&quot;
</ins><span class="cx"> #include &quot;EXTTextureFilterAnisotropic.h&quot;
</span><span class="cx"> #include &quot;ExceptionCode.h&quot;
</span><span class="cx"> #include &quot;Extensions3D.h&quot;
</span><span class="lines">@@ -2429,6 +2430,14 @@
</span><span class="cx">     if (isContextLostOrPending())
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><ins>+    if (equalIgnoringCase(name, &quot;EXT_shader_texture_lod&quot;)
+        &amp;&amp; m_context-&gt;getExtensions()-&gt;supports(&quot;GL_ARB_shader_texture_lod&quot;)) {
+        if (!m_extShaderTextureLOD) {
+            m_context-&gt;getExtensions()-&gt;ensureEnabled(&quot;GL_EXT_shader_texture_lod&quot;);
+            m_extShaderTextureLOD = std::make_unique&lt;EXTShaderTextureLOD&gt;(this);
+        }
+        return m_extShaderTextureLOD.get();
+    }
</ins><span class="cx">     if (equalIgnoringCase(name, &quot;WEBKIT_EXT_texture_filter_anisotropic&quot;)
</span><span class="cx">         &amp;&amp; m_context-&gt;getExtensions()-&gt;supports(&quot;GL_EXT_texture_filter_anisotropic&quot;)) {
</span><span class="cx">         if (!m_extTextureFilterAnisotropic) {
</span><span class="lines">@@ -3039,6 +3048,8 @@
</span><span class="cx">         result.append(&quot;OES_texture_half_float_linear&quot;);
</span><span class="cx">     if (m_context-&gt;getExtensions()-&gt;supports(&quot;GL_OES_standard_derivatives&quot;))
</span><span class="cx">         result.append(&quot;OES_standard_derivatives&quot;);
</span><ins>+    if (m_context-&gt;getExtensions()-&gt;supports(&quot;GL_ARB_shader_texture_lod&quot;))
+        result.append(&quot;EXT_shader_texture_lod&quot;);
</ins><span class="cx">     if (m_context-&gt;getExtensions()-&gt;supports(&quot;GL_EXT_texture_filter_anisotropic&quot;))
</span><span class="cx">         result.append(&quot;WEBKIT_EXT_texture_filter_anisotropic&quot;);
</span><span class="cx">     if (m_context-&gt;getExtensions()-&gt;supports(&quot;GL_OES_vertex_array_object&quot;))
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLRenderingContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h (168638 => 168639)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h        2014-05-12 19:54:38 UTC (rev 168638)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h        2014-05-12 20:13:44 UTC (rev 168639)
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx"> 
</span><span class="cx"> class ANGLEInstancedArrays;
</span><span class="cx"> class EXTTextureFilterAnisotropic;
</span><ins>+class EXTShaderTextureLOD;
</ins><span class="cx"> class HTMLImageElement;
</span><span class="cx"> class HTMLVideoElement;
</span><span class="cx"> class ImageBuffer;
</span><span class="lines">@@ -533,6 +534,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Enabled extension objects.
</span><span class="cx">     std::unique_ptr&lt;EXTTextureFilterAnisotropic&gt; m_extTextureFilterAnisotropic;
</span><ins>+    std::unique_ptr&lt;EXTShaderTextureLOD&gt; m_extShaderTextureLOD;
</ins><span class="cx">     std::unique_ptr&lt;OESTextureFloat&gt; m_oesTextureFloat;
</span><span class="cx">     std::unique_ptr&lt;OESTextureFloatLinear&gt; m_oesTextureFloatLinear;
</span><span class="cx">     std::unique_ptr&lt;OESTextureHalfFloat&gt; m_oesTextureHalfFloat;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsopenglExtensions3DOpenGLcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp (168638 => 168639)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp        2014-05-12 19:54:38 UTC (rev 168638)
+++ trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp        2014-05-12 20:13:44 UTC (rev 168639)
</span><span class="lines">@@ -198,7 +198,10 @@
</span><span class="cx">     // Desktop GL always supports UNSIGNED_INT indices
</span><span class="cx">     if (name == &quot;GL_OES_element_index_uint&quot;)
</span><span class="cx">         return true;
</span><del>-
</del><ins>+    
+    if (name == &quot;GL_EXT_shader_texture_lod&quot;)
+        return m_availableExtensions.contains(&quot;GL_EXT_shader_texture_lod&quot;);
+    
</ins><span class="cx">     if (name == &quot;GL_EXT_texture_filter_anisotropic&quot;)
</span><span class="cx">         return m_availableExtensions.contains(&quot;GL_EXT_texture_filter_anisotropic&quot;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsopenglExtensions3DOpenGLCommoncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp (168638 => 168639)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp        2014-05-12 19:54:38 UTC (rev 168638)
+++ trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp        2014-05-12 20:13:44 UTC (rev 168639)
</span><span class="lines">@@ -136,6 +136,14 @@
</span><span class="cx">             m_context-&gt;getIntegerv(Extensions3D::MAX_DRAW_BUFFERS_EXT, &amp;ANGLEResources.MaxDrawBuffers);
</span><span class="cx">             compiler.setResources(ANGLEResources);
</span><span class="cx">         }
</span><ins>+    } else if (name == &quot;GL_EXT_shader_texture_lod&quot;) {
+        // Enable support in ANGLE (if not enabled already)
+        ANGLEWebKitBridge&amp; compiler = m_context-&gt;m_compiler;
+        ShBuiltInResources ANGLEResources = compiler.getResources();
+        if (!ANGLEResources.EXT_shader_texture_lod) {
+            ANGLEResources.EXT_shader_texture_lod = 1;
+            compiler.setResources(ANGLEResources);
+        }
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>