<!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
<rdar://problem/16111396>
Source/WebCore:
Based on Chromium patch by bajones@chromium.org.
https://src.chromium.org/viewvc/blink?revision=171465&view=revision
Patch by Alex Christensen <achristensen@webkit.org> 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 <achristensen@webkit.org> 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 <achristensen@webkit.org>
+
+ Implement EXT_shader_texture_lod in WebGL.
+ https://bugs.webkit.org/show_bug.cgi?id=128985
+ <rdar://problem/16111396>
+
+ 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 <mhock@apple.com>
</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>+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for ext-shader-texture-lod.html</title>
+<script type="text/javascript" src="../../../resources/js-test-pre.js"></script>
+<script type="text/javascript" src="../../resources/webkit-webgl-test-harness.js"></script>
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href="../../resources/webgl_test_files/conformance/extensions/ext-shader-texture-lod.html">../../resources/webgl_test_files/conformance/extensions/ext-shader-texture-lod.html</a>
+<div id="result"></div>
+<div id="iframe">
+<iframe src="../../resources/webgl_test_files/conformance/extensions/ext-shader-texture-lod.html" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
</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>+ <!--
+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.
+ -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL EXT_shader_texture_lod Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src="../../resources/desktop-gl-constants.js" type="text/javascript"></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<canvas id="canvas" width="256" height="256" style="width: 50px; height: 50px;"> </canvas>
+<div id="console"></div>
+<!-- Shaders for testing standard derivatives -->
+
+<!-- Shader omitting the required #extension pragma -->
+<script id="missingPragmaFragmentShader" type="x-shader/x-fragment">
+precision mediump float;
+varying vec2 texCoord0v;
+void main() {
+ vec4 color = texture2DLodEXT(tex, texCoord0v, lod);
+ gl_FragColor = vec4(dx, dy, w, 1.0);
+}
+</script>
+
+<!-- Shader to test macro definition -->
+<script id="macroFragmentShader" type="x-shader/x-fragment">
+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
+}
+</script>
+
+<!-- Shader with required #extension pragma -->
+<script id="testFragmentShader" type="x-shader/x-fragment">
+#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;
+}
+</script>
+
+<!-- Shaders to link with test fragment shaders -->
+<script id="goodVertexShader" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+attribute vec2 texCoord0;
+varying vec2 texCoord0v;
+void main() {
+ texCoord0v = texCoord0;
+ gl_Position = vPosition;
+}
+</script>
+
+<!-- Shaders to test output -->
+<script id="outputVertexShader" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+attribute vec2 texCoord0;
+varying vec2 texCoord0v;
+void main() {
+ texCoord0v = texCoord0;
+ gl_Position = vPosition;
+}
+</script>
+<script id="outputFragmentShader" type="x-shader/x-fragment">
+#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;
+}
+</script>
+
+<script>
+description("This test verifies the functionality of the EXT_shader_texture_lod extension, if it is available.");
+
+debug("");
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("canvas");
+
+shouldBe("canvas.width", "256");
+shouldBe("canvas.height", "256");
+
+var gl = wtu.create3DContext(canvas);
+var ext = null;
+
+if (!gl) {
+ testFailed("WebGL context does not exist");
+} else {
+ testPassed("WebGL context exists");
+
+ // Run tests with extension disabled
+ runShaderTests(false);
+
+ // Query the extension and store globally so shouldBe can access it
+ ext = gl.getExtension("EXT_shader_texture_lod");
+ if (!ext) {
+ testPassed("No EXT_shader_texture_lod support -- this is legal");
+
+ runSupportedTest(false);
+ } else {
+ testPassed("Successfully enabled EXT_shader_texture_lod extension");
+
+ runSupportedTest(true);
+
+ runShaderTests(true);
+ runOutputTests();
+ runUniqueObjectTest();
+ runReferenceCycleTest();
+ }
+}
+
+function runSupportedTest(extensionEnabled) {
+ var supported = gl.getSupportedExtensions();
+ if (supported.indexOf("EXT_shader_texture_lod") >= 0) {
+ if (extensionEnabled) {
+ testPassed("EXT_shader_texture_lod listed as supported and getExtension succeeded");
+ } else {
+ testFailed("EXT_shader_texture_lod listed as supported but getExtension failed");
+ }
+ } else {
+ if (extensionEnabled) {
+ testFailed("EXT_shader_texture_lod not listed as supported but getExtension succeeded");
+ } else {
+ testPassed("EXT_shader_texture_lod not listed as supported and getExtension failed -- this is legal");
+ }
+ }
+}
+
+function runShaderTests(extensionEnabled) {
+ debug("");
+ debug("Testing various shader compiles with extension " + (extensionEnabled ? "enabled" : "disabled"));
+
+ // Expect the macro shader to succeed ONLY if enabled
+ var macroFragmentProgram = wtu.loadProgramFromScriptExpectError(gl, "goodVertexShader", "macroFragmentShader");
+ if (extensionEnabled) {
+ if (macroFragmentProgram) {
+ // Expected result
+ testPassed("GL_EXT_shader_texture_lod defined in shaders when extension is enabled");
+ } else {
+ testFailed("GL_EXT_shader_texture_lod not defined in shaders when extension is enabled");
+ }
+ } else {
+ if (macroFragmentProgram) {
+ testFailed("GL_EXT_shader_texture_lod defined in shaders when extension is disabled");
+ } else {
+ testPassed("GL_EXT_shader_texture_lod not defined in shaders when extension disabled");
+ }
+ }
+
+ // Always expect the shader missing the #pragma to fail (whether enabled or not)
+ var missingPragmaFragmentProgram = wtu.loadProgramFromScriptExpectError(gl, "goodVertexShader", "missingPragmaFragmentShader");
+ if (missingPragmaFragmentProgram) {
+ testFailed("Shader built-ins allowed without #extension pragma");
+ } else {
+ testPassed("Shader built-ins disallowed without #extension pragma");
+ }
+
+ // Try to compile a shader using the built-ins that should only succeed if enabled
+ var testFragmentProgram = wtu.loadProgramFromScriptExpectError(gl, "goodVertexShader", "testFragmentShader");
+ if (extensionEnabled) {
+ if (testFragmentProgram) {
+ testPassed("Shader built-ins compiled successfully when extension enabled");
+ } else {
+ testFailed("Shader built-ins failed to compile when extension enabled");
+ }
+ } else {
+ if (testFragmentProgram) {
+ testFailed("Shader built-ins compiled successfully when extension disabled");
+ } else {
+ testPassed("Shader built-ins failed to compile when extension disabled");
+ }
+ }
+}
+
+function runOutputTests() {
+ debug("Testing various draws for valid built-in function behavior");
+
+ canvas.width = 256; canvas.height = 256;
+ gl.viewport(0, 0, canvas.width, canvas.height);
+
+ var program = wtu.setupProgram(gl, ["outputVertexShader", "outputFragmentShader"], ['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("9 colors are needed (9 mips for 256x256 texture), only have " + colors.length);
+ } else {
+        testPassed("9 colors found (9 mips for 256x256 texture)");
+ }
+
+ 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 < 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, "lod");
+
+ for (var ii = 0; ii < colors.length; ++ii) {
+        gl.uniform1f(loc, ii);
+        var color = colors[ii];
+        wtu.drawQuad(gl);
+        wtu.checkCanvas(
+         gl, color.color,
+         "256x256 texture drawn to 256x256 dest with lod = " + ii +
+                " should be " + color.name);
+ }
+
+ glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors.");
+}
+
+function runUniqueObjectTest()
+{
+ debug("Testing that getExtension() returns the same object each time");
+ gl.getExtension("EXT_shader_texture_lod").myProperty = 2;
+ gc();
+ shouldBe('gl.getExtension("EXT_shader_texture_lod").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("Testing reference cycles between context and extension objects");
+ var ext = gl.getExtension("EXT_shader_texture_lod");
+
+ // 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("");
+successfullyParsed = true;
+</script>
+<script>finishTest();</script>
+
+</body>
+</html>
</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 <achristensen@webkit.org>
+
+ Implement EXT_shader_texture_lod in WebGL.
+ https://bugs.webkit.org/show_bug.cgi?id=128985
+ <rdar://problem/16111396>
+
+ Based on Chromium patch by bajones@chromium.org.
+ https://src.chromium.org/viewvc/blink?revision=171465&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 <mhock@apple.com>
</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 "JSCanvasRenderingContext.cpp"
</span><span class="cx"> #include "JSCanvasRenderingContext2D.cpp"
</span><span class="cx"> #if ENABLE(WEBGL)
</span><ins>+#include "JSEXTShaderTextureLOD.cpp"
</ins><span class="cx"> #include "JSEXTTextureFilterAnisotropic.cpp"
</span><span class="cx"> #include "JSOESElementIndexUint.cpp"
</span><span class="cx"> #include "JSOESStandardDerivatives.cpp"
</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"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
</span><span class="cx"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
</span><span class="cx"> </ClCompile>
</span><ins>+ <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSEXTShaderTextureLOD.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
+ </ClCompile>
</ins><span class="cx"> <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSEXTTextureFilterAnisotropic.cpp">
</span><span class="cx"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</span><span class="cx"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
</span><span class="lines">@@ -6488,6 +6502,7 @@
</span><span class="cx"> <ClCompile Include="..\html\canvas\ANGLEInstancedArrays.cpp" />
</span><span class="cx"> <ClCompile Include="..\html\canvas\CanvasContextAttributes.cpp" />
</span><span class="cx"> <ClCompile Include="..\html\canvas\CanvasPathMethods.cpp" />
</span><ins>+ <ClCompile Include="..\html\canvas\EXTShaderTextureLOD.cpp" />
</ins><span class="cx"> <ClCompile Include="..\html\canvas\EXTTextureFilterAnisotropic.cpp" />
</span><span class="cx"> <ClCompile Include="..\html\canvas\OESElementIndexUint.cpp" />
</span><span class="cx"> <ClCompile Include="..\html\canvas\OESStandardDerivatives.cpp" />
</span><span class="lines">@@ -18547,6 +18562,7 @@
</span><span class="cx"> <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\XMLViewerJS.h" />
</span><span class="cx"> <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\XPathGrammar.h" />
</span><span class="cx"> <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSANGLEInstancedArrays.h" />
</span><ins>+ <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSEXTShaderTextureLOD.h" />
</ins><span class="cx"> <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSEXTTextureFilterAnisotropic.h" />
</span><span class="cx"> <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSOESElementIndexUint.h" />
</span><span class="cx"> <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSOESStandardDerivatives.h" />
</span><span class="lines">@@ -18722,6 +18738,7 @@
</span><span class="cx"> <ClInclude Include="..\html\canvas\ANGLEInstancedArrays.h" />
</span><span class="cx"> <ClInclude Include="..\html\canvas\CanvasContextAttributes.h" />
</span><span class="cx"> <ClInclude Include="..\html\canvas\CanvasPathMethods.h" />
</span><ins>+ <ClInclude Include="..\html\canvas\EXTShaderTextureLOD.h" />
</ins><span class="cx"> <ClInclude Include="..\html\canvas\EXTTextureFilterAnisotropic.h" />
</span><span class="cx"> <ClInclude Include="..\html\canvas\OESElementIndexUint.h" />
</span><span class="cx"> <ClInclude Include="..\html\canvas\OESStandardDerivatives.h" />
</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"> <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSANGLEInstancedArrays.cpp">
</span><span class="cx"> <Filter>DerivedSources</Filter>
</span><span class="cx"> </ClCompile>
</span><ins>+ <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSEXTShaderTextureLOD.cpp">
+ <Filter>DerivedSources</Filter>
+ </ClCompile>
</ins><span class="cx"> <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSEXTTextureFilterAnisotropic.cpp">
</span><span class="cx"> <Filter>DerivedSources</Filter>
</span><span class="cx"> </ClCompile>
</span><span class="lines">@@ -6637,6 +6640,9 @@
</span><span class="cx"> <ClCompile Include="..\html\canvas\OESVertexArrayObject.cpp">
</span><span class="cx"> <Filter>html\canvas</Filter>
</span><span class="cx"> </ClCompile>
</span><ins>+ <ClCompile Include="..\html\canvas\EXTShaderTextureLOD.cpp">
+ <Filter>html\canvas</Filter>
+ </ClCompile>
</ins><span class="cx"> <ClCompile Include="..\html\canvas\EXTTextureFilterAnisotropic.cpp">
</span><span class="cx"> <Filter>html\canvas</Filter>
</span><span class="cx"> </ClCompile>
</span><span class="lines">@@ -14334,6 +14340,9 @@
</span><span class="cx"> <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSWebGLVertexArrayObjectOES.h">
</span><span class="cx"> <Filter>DerivedSources</Filter>
</span><span class="cx"> </ClInclude>
</span><ins>+ <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSEXTShaderTextureLOD.h">
+ <Filter>DerivedSources</Filter>
+ </ClInclude>
</ins><span class="cx"> <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSEXTTextureFilterAnisotropic.h">
</span><span class="cx"> <Filter>DerivedSources</Filter>
</span><span class="cx"> </ClInclude>
</span><span class="lines">@@ -14466,6 +14475,9 @@
</span><span class="cx"> <ClInclude Include="..\html\canvas\OESVertexArrayObject.h">
</span><span class="cx"> <Filter>html\canvas</Filter>
</span><span class="cx"> </ClInclude>
</span><ins>+ <ClInclude Include="..\html\canvas\EXTShaderTextureLOD.h">
+ <Filter>html\canvas</Filter>
+ </ClInclude>
</ins><span class="cx"> <ClInclude Include="..\html\canvas\EXTTextureFilterAnisotropic.h">
</span><span class="cx"> <Filter>html\canvas</Filter>
</span><span class="cx"> </ClInclude>
</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 = "<group>"; };
</span><span class="cx">                 5B30695B18B3D3450099D5E8 /* WebGLDrawBuffers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebGLDrawBuffers.h; path = canvas/WebGLDrawBuffers.h; sourceTree = "<group>"; };
</span><span class="cx">                 5B30695C18B3D3450099D5E8 /* WebGLDrawBuffers.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = WebGLDrawBuffers.idl; path = canvas/WebGLDrawBuffers.idl; sourceTree = "<group>"; };
</span><ins>+                5C4304AD191AC908000E2BC0 /* EXTShaderTextureLOD.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EXTShaderTextureLOD.cpp; path = canvas/EXTShaderTextureLOD.cpp; sourceTree = "<group>"; };
+                5C4304AE191AC908000E2BC0 /* EXTShaderTextureLOD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EXTShaderTextureLOD.h; path = canvas/EXTShaderTextureLOD.h; sourceTree = "<group>"; };
+                5C4304AF191AC908000E2BC0 /* EXTShaderTextureLOD.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = EXTShaderTextureLOD.idl; path = canvas/EXTShaderTextureLOD.idl; sourceTree = "<group>"; };
+                5C4304B3191AEF46000E2BC0 /* JSEXTShaderTextureLOD.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSEXTShaderTextureLOD.cpp; sourceTree = "<group>"; };
+                5C4304B4191AEF46000E2BC0 /* JSEXTShaderTextureLOD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSEXTShaderTextureLOD.h; sourceTree = "<group>"; };
</ins><span class="cx">                 5D21A80013ECE5DF00BB7064 /* WebVTTParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebVTTParser.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 5D21A80113ECE5DF00BB7064 /* WebVTTParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebVTTParser.h; sourceTree = "<group>"; };
</span><span class="cx">                 5D4B8C5211E52C8B00BBB62F /* WebCore.exp.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebCore.exp.in; sourceTree = "<group>"; };
</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 "JSWebGLRenderingContext.h"
</span><span class="cx">
</span><span class="cx"> #include "ANGLEInstancedArrays.h"
</span><ins>+#include "EXTShaderTextureLOD.h"
</ins><span class="cx"> #include "EXTTextureFilterAnisotropic.h"
</span><span class="cx"> #include "ExceptionCode.h"
</span><span class="cx"> #include "HTMLCanvasElement.h"
</span><span class="cx"> #include "HTMLImageElement.h"
</span><span class="cx"> #include "JSANGLEInstancedArrays.h"
</span><ins>+#include "JSEXTShaderTextureLOD.h"
</ins><span class="cx"> #include "JSEXTTextureFilterAnisotropic.h"
</span><span class="cx"> #include "JSHTMLCanvasElement.h"
</span><span class="cx"> #include "JSHTMLImageElement.h"
</span><span class="lines">@@ -205,6 +207,8 @@
</span><span class="cx"> switch (extension->getName()) {
</span><span class="cx"> case WebGLExtension::WebGLLoseContextName:
</span><span class="cx"> return toJS(exec, globalObject, static_cast<WebGLLoseContext*>(extension));
</span><ins>+ case WebGLExtension::EXTShaderTextureLODName:
+ return toJS(exec, globalObject, static_cast<EXTShaderTextureLOD*>(extension));
</ins><span class="cx"> case WebGLExtension::EXTTextureFilterAnisotropicName:
</span><span class="cx"> return toJS(exec, globalObject, static_cast<EXTTextureFilterAnisotropic*>(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 "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if ENABLE(WEBGL)
+#include "EXTShaderTextureLOD.h"
+
+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 "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef EXTShaderTextureLOD_h
+#define EXTShaderTextureLOD_h
+
+#include "WebGLExtension.h"
+
+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 "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+ 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 "WebGLObject.h"
</span><span class="cx">
</span><del>-#include "EXTTextureFilterAnisotropic.h"
</del><span class="cx"> #include "WebGLCompressedTextureS3TC.h"
</span><span class="cx"> #include "WebGLContextGroup.h"
</span><span class="cx"> #include "WebGLDebugRendererInfo.h"
</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 "CachedImage.h"
</span><span class="cx"> #include "DOMWindow.h"
</span><span class="cx"> #include "Document.h"
</span><ins>+#include "EXTShaderTextureLOD.h"
</ins><span class="cx"> #include "EXTTextureFilterAnisotropic.h"
</span><span class="cx"> #include "ExceptionCode.h"
</span><span class="cx"> #include "Extensions3D.h"
</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, "EXT_shader_texture_lod")
+ && m_context->getExtensions()->supports("GL_ARB_shader_texture_lod")) {
+ if (!m_extShaderTextureLOD) {
+ m_context->getExtensions()->ensureEnabled("GL_EXT_shader_texture_lod");
+ m_extShaderTextureLOD = std::make_unique<EXTShaderTextureLOD>(this);
+ }
+ return m_extShaderTextureLOD.get();
+ }
</ins><span class="cx"> if (equalIgnoringCase(name, "WEBKIT_EXT_texture_filter_anisotropic")
</span><span class="cx"> && m_context->getExtensions()->supports("GL_EXT_texture_filter_anisotropic")) {
</span><span class="cx"> if (!m_extTextureFilterAnisotropic) {
</span><span class="lines">@@ -3039,6 +3048,8 @@
</span><span class="cx"> result.append("OES_texture_half_float_linear");
</span><span class="cx"> if (m_context->getExtensions()->supports("GL_OES_standard_derivatives"))
</span><span class="cx"> result.append("OES_standard_derivatives");
</span><ins>+ if (m_context->getExtensions()->supports("GL_ARB_shader_texture_lod"))
+ result.append("EXT_shader_texture_lod");
</ins><span class="cx"> if (m_context->getExtensions()->supports("GL_EXT_texture_filter_anisotropic"))
</span><span class="cx"> result.append("WEBKIT_EXT_texture_filter_anisotropic");
</span><span class="cx"> if (m_context->getExtensions()->supports("GL_OES_vertex_array_object"))
</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<EXTTextureFilterAnisotropic> m_extTextureFilterAnisotropic;
</span><ins>+ std::unique_ptr<EXTShaderTextureLOD> m_extShaderTextureLOD;
</ins><span class="cx"> std::unique_ptr<OESTextureFloat> m_oesTextureFloat;
</span><span class="cx"> std::unique_ptr<OESTextureFloatLinear> m_oesTextureFloatLinear;
</span><span class="cx"> std::unique_ptr<OESTextureHalfFloat> 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 == "GL_OES_element_index_uint")
</span><span class="cx"> return true;
</span><del>-
</del><ins>+
+ if (name == "GL_EXT_shader_texture_lod")
+ return m_availableExtensions.contains("GL_EXT_shader_texture_lod");
+
</ins><span class="cx"> if (name == "GL_EXT_texture_filter_anisotropic")
</span><span class="cx"> return m_availableExtensions.contains("GL_EXT_texture_filter_anisotropic");
</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->getIntegerv(Extensions3D::MAX_DRAW_BUFFERS_EXT, &ANGLEResources.MaxDrawBuffers);
</span><span class="cx"> compiler.setResources(ANGLEResources);
</span><span class="cx"> }
</span><ins>+ } else if (name == "GL_EXT_shader_texture_lod") {
+ // Enable support in ANGLE (if not enabled already)
+ ANGLEWebKitBridge& compiler = m_context->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>