Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Unified Diff: third_party/webgl/sdk/tests/extra/slow-shader-example.html

Issue 7452004: Updated WebGL snapshot to 15100. (Closed) Base URL: http://src.chromium.org/svn/trunk/deps
Patch Set: Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/webgl/sdk/tests/extra/offscreen-issue.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/webgl/sdk/tests/extra/slow-shader-example.html
diff --git a/third_party/webgl/sdk/tests/extra/slow-shader-example.html b/third_party/webgl/sdk/tests/extra/slow-shader-example.html
index 185f0fb984a783aa56b0ec709a3f18807834fe8c..549983257b71d201e9efa883c69c10e8502c96fc 100644
--- a/third_party/webgl/sdk/tests/extra/slow-shader-example.html
+++ b/third_party/webgl/sdk/tests/extra/slow-shader-example.html
@@ -32,9 +32,13 @@ window.onload = main;
debug("Tests drawing a very slow shader.");
var wtu = WebGLTestUtils;
var canvas = document.getElementById("example");
+canvas.addEventListener("webglcontextlost", function(e) { e.preventDefault(); }, false);
+canvas.addEventListener("webglcontextrestored", function(e) { }, false);
var gl = wtu.create3DContext(canvas);
-var texSize = gl.getParameter(gl.MAX_TEXTURE_SIZE);
-debug("Max Texture size: " + texSize);
+var maxTexSize = gl.getParameter(gl.MAX_TEXTURE_SIZE);
+var texSize = Math.min(maxTexSize, 1024);
+debug("Max Texture size: " + maxTexSize);
+debug("Texture size: " + texSize);
var shaderSource =
document.getElementById("slow").text.replace(/\$size/g, texSize + ".0");
wtu.glErrorShouldBe(gl, gl.NO_ERROR, "after getting a context");
@@ -110,5 +114,3 @@ successfullyParsed = true;
</script>
</body>
</html>
-
-
« no previous file with comments | « third_party/webgl/sdk/tests/extra/offscreen-issue.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698