[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

enne at google.com enne at google.com
Sun Feb 20 22:50:04 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit 5c5afbed78d3002dff16cec445e7369bff9ad7ff
Author: enne at google.com <enne at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jan 12 00:39:20 2011 +0000

    2011-01-11  Adrienne Walker  <enne at google.com>
    
            Reviewed by Kenneth Russell.
    
            Sync WebGL texImage2D video test from Khronos and re-enable it.
            https://bugs.webkit.org/show_bug.cgi?id=44459
    
            * fast/canvas/webgl/resources/quadrants.mp4: Removed.
            * fast/canvas/webgl/resources/quadrants.ogv: Removed.
            * fast/canvas/webgl/resources/red-green.mp4: Added.
            * fast/canvas/webgl/resources/red-green.theora.ogv: Added.
            * fast/canvas/webgl/resources/red-green.webmvp8.webm: Added.
            * fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-expected.txt:
            * fast/canvas/webgl/tex-image-and-sub-image-2d-with-video.html:
            * platform/chromium-gpu/test_expectations.txt:
            * platform/chromium/test_expectations.txt:
            * platform/mac-snowleopard/Skipped:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75570 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 96e35e3..3eab913 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,21 @@
+2011-01-11  Adrienne Walker  <enne at google.com>
+
+        Reviewed by Kenneth Russell.
+
+        Sync WebGL texImage2D video test from Khronos and re-enable it.
+        https://bugs.webkit.org/show_bug.cgi?id=44459
+
+        * fast/canvas/webgl/resources/quadrants.mp4: Removed.
+        * fast/canvas/webgl/resources/quadrants.ogv: Removed.
+        * fast/canvas/webgl/resources/red-green.mp4: Added.
+        * fast/canvas/webgl/resources/red-green.theora.ogv: Added.
+        * fast/canvas/webgl/resources/red-green.webmvp8.webm: Added.
+        * fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-expected.txt:
+        * fast/canvas/webgl/tex-image-and-sub-image-2d-with-video.html:
+        * platform/chromium-gpu/test_expectations.txt:
+        * platform/chromium/test_expectations.txt:
+        * platform/mac-snowleopard/Skipped:
+
 2011-01-11  Mihai Parparita  <mihaip at chromium.org>
 
         Unreviewed, new chromium-mac baselines.
diff --git a/LayoutTests/fast/canvas/webgl/resources/quadrants.mp4 b/LayoutTests/fast/canvas/webgl/resources/quadrants.mp4
deleted file mode 100644
index bab4f8d..0000000
Binary files a/LayoutTests/fast/canvas/webgl/resources/quadrants.mp4 and /dev/null differ
diff --git a/LayoutTests/fast/canvas/webgl/resources/quadrants.ogv b/LayoutTests/fast/canvas/webgl/resources/quadrants.ogv
deleted file mode 100644
index 13f5568..0000000
Binary files a/LayoutTests/fast/canvas/webgl/resources/quadrants.ogv and /dev/null differ
diff --git a/LayoutTests/fast/canvas/webgl/resources/red-green.mp4 b/LayoutTests/fast/canvas/webgl/resources/red-green.mp4
new file mode 100644
index 0000000..4bd6d59
Binary files /dev/null and b/LayoutTests/fast/canvas/webgl/resources/red-green.mp4 differ
diff --git a/LayoutTests/fast/canvas/webgl/resources/red-green.theora.ogv b/LayoutTests/fast/canvas/webgl/resources/red-green.theora.ogv
new file mode 100644
index 0000000..1543915
Binary files /dev/null and b/LayoutTests/fast/canvas/webgl/resources/red-green.theora.ogv differ
diff --git a/LayoutTests/fast/canvas/webgl/resources/red-green.webmvp8.webm b/LayoutTests/fast/canvas/webgl/resources/red-green.webmvp8.webm
new file mode 100644
index 0000000..fde59a1
Binary files /dev/null and b/LayoutTests/fast/canvas/webgl/resources/red-green.webmvp8.webm differ
diff --git a/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-expected.txt b/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-expected.txt
index 9bc08ac..ae3e24a 100644
--- a/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-expected.txt
+++ b/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-expected.txt
@@ -1,39 +1,28 @@
- 
-Verify texImage2D and texSubImage2D code paths taking Videos
+Verify texImage2D and texSubImage2D code paths taking Video Elements
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
-Testing texImage2D with flipY=false
-PASS pixelAt(0, 0) is red
-PASS pixelAt(bufWidth-1, 0) is green
-PASS pixelAt(0, bufHeight-1) is yellow
-PASS pixelAt(bufWidth-1, bufHeight-1) is blue
 Testing texImage2D with flipY=true
-PASS pixelAt(0, 0) is yellow
-PASS pixelAt(bufWidth-1, 0) is blue
-PASS pixelAt(0, bufHeight-1) is red
-PASS pixelAt(bufWidth-1, bufHeight-1) is green
-Testing TexSubImage2D with flipY=false, scale=2, ox=0, oy=0
-PASS pixelAt(0, 0) is red
-PASS pixelAt(bufWidth-1, 0) is black
-PASS pixelAt(0, bufHeight-1) is black
-PASS pixelAt(bufWidth-1, bufHeight-1) is black
-Testing TexSubImage2D with flipY=true, scale=2, ox=0, oy=0
-PASS pixelAt(0, 0) is yellow
-PASS pixelAt(bufWidth-1, 0) is black
-PASS pixelAt(0, bufHeight-1) is black
-PASS pixelAt(bufWidth-1, bufHeight-1) is black
-Testing TexSubImage2D with flipY=false, scale=2, ox=0.5, oy=0.5
-PASS pixelAt(0, 0) is black
-PASS pixelAt(bufWidth-1, 0) is black
-PASS pixelAt(0, bufHeight-1) is black
-PASS pixelAt(bufWidth-1, bufHeight-1) is blue
-Testing TexSubImage2D with flipY=true, scale=2, ox=0.5, oy=0.5
-PASS pixelAt(0, 0) is black
-PASS pixelAt(bufWidth-1, 0) is black
-PASS pixelAt(0, bufHeight-1) is black
-PASS pixelAt(bufWidth-1, bufHeight-1) is green
+Checking lower left corner
+PASS shouldBe 0,255,0
+Checking upper left corner
+PASS shouldBe 255,0,0
+Testing texImage2D with flipY=false
+Checking lower left corner
+PASS shouldBe 255,0,0
+Checking upper left corner
+PASS shouldBe 0,255,0
+Testing texSubImage2D with flipY=true
+Checking lower left corner
+PASS shouldBe 0,255,0
+Checking upper left corner
+PASS shouldBe 255,0,0
+Testing texSubImage2D with flipY=false
+Checking lower left corner
+PASS shouldBe 255,0,0
+Checking upper left corner
+PASS shouldBe 0,255,0
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
+ 
diff --git a/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video.html b/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video.html
index 1eae5d4..0189c63 100644
--- a/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video.html
+++ b/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video.html
@@ -4,20 +4,19 @@
 <script src="../../js/resources/js-test-pre.js"></script>
 <script src="resources/webgl-test.js"></script>
 <script src="resources/webgl-test-utils.js"></script>
-<script src="../../../media/media-file.js"></script>
 <script>
 var wtu = WebGLTestUtils;
 var gl = null;
 var textureLoc = null;
 var successfullyParsed = false;
 
+if (window.initNonKhronosFramework) {
+    window.initNonKhronosFramework(true);
+}
+
 function init()
 {
-    if (window.initNonKhronosFramework) {
-        window.initNonKhronosFramework(true);
-    }
-
-    description('Verify texImage2D and texSubImage2D code paths taking Videos');
+    description('Verify texImage2D and texSubImage2D code paths taking Video Elements');
 
     var canvas = document.getElementById("example");
     gl = wtu.create3DContext(canvas);
@@ -28,127 +27,90 @@ function init()
 
     textureLoc = gl.getUniformLocation(gl.program, "tex");
 
-    var mediaFile = findMediaFile("video", "resources/quadrants");
-    loadVideo(mediaFile);
+    var video = document.getElementById("vid");
+    video.addEventListener(
+        "playing", function() { runTest(video); }, true);
+    video.play();
 }
 
-function loadVideo(src) {
-    var video = document.getElementsByTagName('video')[0];
-
-    function startVideo() {
-        // Resize canvas to fit video.
-        var canvas = document.getElementsByTagName('canvas')[0];
-        canvas.width = video.videoWidth;
-        canvas.height = video.videoHeight;
-
-        runTest(video);
-    };
-    video.addEventListener("canplay", startVideo);
-    video.src = src;
-}
-
-// These declarations need to be global for "shouldBe" to see them
+// These two declarations need to be global for "shouldBe" to see them
 var buf = null;
-var bufWidth;
-var bufHeight;
-var red = [255, 0, 0, 255];
-var green = [0, 255, 0, 255];
-var blue = [0, 0, 255, 255];
-var yellow = [255, 255, 0, 255];
-var black = [0, 0, 0, 255];
-var clear = [127, 127, 127, 255];
-function pixelAt(x, y) {
-    var index = y * bufWidth * 4 + x * 4;
-    return [buf[index], buf[index+1], buf[index+2], buf[index+3]];
-}
-
-function runOneIteration(video, flipY, useTexSubImage2D, ulColor, urColor, blColor, brColor, ox, oy, scale) {
-    var canvas = document.getElementsByTagName('canvas')[0];
-    gl.viewport(0, 0, canvas.width, canvas.height);
+var idx = 0;
+var pixel = [0, 0, 0];
+var correctColor = null;
 
+function runOneIteration(videoElement, useTexSubImage2D, flipY, topColor, bottomColor)
+{
+    debug('Testing ' + (useTexSubImage2D ? 'texSubImage2D' : 'texImage2D') +
+          ' with flipY=' + flipY);
     gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
     // Disable any writes to the alpha channel
     gl.colorMask(1, 1, 1, 0);
-
     var texture = gl.createTexture();
     // Bind the texture to texture unit 0
     gl.bindTexture(gl.TEXTURE_2D, texture);
     // Set up texture parameters
     gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
     gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
     // Set up pixel store parameters
     gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, flipY);
     gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
-    // Upload the image into the texture
+    // Upload the videoElement into the texture
     if (useTexSubImage2D) {
-        // Fill initial texture with black.
-        var texWidth = scale * canvas.width;
-        var texHeight = scale * canvas.height;
-        gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, texWidth, texHeight, 0,
+        // Initialize the texture to black first
+        gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,
+                      videoElement.videoWidth, videoElement.videoHeight, 0,
                       gl.RGBA, gl.UNSIGNED_BYTE, null);
-
-        gl.texSubImage2D(gl.TEXTURE_2D, 0, ox * texWidth, oy * texHeight, gl.RGBA, gl.UNSIGNED_BYTE, video);
-        debug('Testing TexSubImage2D with flipY=' + flipY +', scale=' + scale + ', ox=' + ox + ', oy=' + oy);
+        gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, videoElement);
     } else {
-        debug('Testing texImage2D with flipY=' + flipY);
-        gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, video);
+        gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, videoElement);
     }
 
+    var c = document.createElement("canvas");
+    c.width = 16;
+    c.height = 16;
+    c.style.border = "1px solid black";
+    var ctx = c.getContext("2d");
+    ctx.drawImage(videoElement, 0, 0, 16, 16);
+    document.body.appendChild(c);
+
     // Point the uniform sampler to texture unit 0
     gl.uniform1i(textureLoc, 0);
     // Draw the triangles
-    wtu.drawQuad(gl, clear);
-    // Read back the rendering results
-    bufWidth = canvas.width;
-    bufHeight = canvas.height;
-    buf = new Uint8Array(bufWidth * bufHeight * 4);
-    gl.readPixels(0, 0, bufWidth, bufHeight, gl.RGBA, gl.UNSIGNED_BYTE, buf);
-
-    shouldBe("pixelAt(0, 0)", ulColor);
-    shouldBe("pixelAt(bufWidth-1, 0)", urColor);
-    shouldBe("pixelAt(0, bufHeight-1)", blColor);
-    shouldBe("pixelAt(bufWidth-1, bufHeight-1)", brColor);
+    wtu.drawQuad(gl, [0, 0, 0, 255]);
+    // Check a few pixels near the top and bottom and make sure they have
+    // the right color.
+    debug("Checking lower left corner");
+    wtu.checkCanvasRect(gl, 4, 4, 2, 2, bottomColor,
+                        "shouldBe " + bottomColor);
+    debug("Checking upper left corner");
+    wtu.checkCanvasRect(gl, 4, gl.canvas.height - 8, 2, 2, topColor,
+                        "shouldBe " + topColor);
 }
 
-function runTest(video)
+function runTest(videoElement)
 {
-    // Original square should have red, green, yellow, blue quadrants,
-    // with a cross in the middle:
-    //
-    // R|G
-    // -+-
-    // Y|B
-
-    // texImage2D the whole texture
-    runOneIteration(video, false, false, "red", "green", "yellow", "blue");
-    runOneIteration(video, true, false, "yellow", "blue", "red", "green");
-
-    // texSubImage2D upper left
-    runOneIteration(video, false, true, "red", "black", "black", "black", 0, 0, 2);
-    runOneIteration(video, true, true, "yellow", "black", "black", "black", 0, 0, 2);
-
-    // texSubImage2D lower right
-    runOneIteration(video, false, true, "black", "black", "black", "blue", 0.5, 0.5, 2);
-    runOneIteration(video, true, true, "black", "black", "black", "green", 0.5, 0.5, 2);
-
-    successfullyParsed = true;
-    var epilogue = document.createElement("script");
-    epilogue.onload = finish;
-    epilogue.src = "../../js/resources/js-test-post.js";
-    document.body.appendChild(epilogue);
-}
-
-function finish() {
-    if (window.nonKhronosFrameworkNotifyDone) {
-        window.nonKhronosFrameworkNotifyDone();
-    }
+    var red = [255, 0, 0];
+    var green = [0, 255, 0];
+    runOneIteration(videoElement, false, true, red, green);
+    runOneIteration(videoElement, false, false, green, red);
+    runOneIteration(videoElement, true, true, red, green);
+    runOneIteration(videoElement, true, false, green, red);
+
+    finishTest();
 }
 </script>
 </head>
 <body onload="init()">
-<video id="sourcevideo"></video>
-<canvas id="example"></canvas>
+<canvas id="example" width="32px" height="32px"></canvas>
 <div id="description"></div>
 <div id="console"></div>
+<video width="640" height="228" id="vid" controls>
+  <source src="resources/red-green.mp4"  type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
+  <source src="resources/red-green.webmvp8.webm" type='video/webm; codecs="vp8, vorbis"' />
+  <source src="resources/red-green.theora.ogv"  type='video/ogg; codecs="theora, vorbis"' />
+</video>
 </body>
 </html>
diff --git a/LayoutTests/platform/chromium-gpu/test_expectations.txt b/LayoutTests/platform/chromium-gpu/test_expectations.txt
index a2caf79..e54c2e1 100644
--- a/LayoutTests/platform/chromium-gpu/test_expectations.txt
+++ b/LayoutTests/platform/chromium-gpu/test_expectations.txt
@@ -200,7 +200,6 @@ BUGWK45991 WIN : canvas/philip/tests/2d.gradient.radial.touch2.html = TEXT
 BUGWK43086 : fast/canvas/canvas-ImageData-behaviour.html = TEXT
 BUGWEBGL : fast/canvas/webgl/css-webkit-canvas-repaint.html = IMAGE
 BUGWEBGL : fast/canvas/webgl/css-webkit-canvas.html = IMAGE
-BUGWEBGL WIN MAC : fast/canvas/webgl/tex-image-and-sub-image-2d-with-video.html = TEXT PASS
 BUGWEBGL WIN : fast/canvas/webgl/tex-image-and-sub-image-2d-with-array-buffer-view.html = CRASH PASS
 BUGWEBGL : fast/canvas/webgl/gl-uniform-arrays.html = TEXT
 BUGWEBGL : fast/canvas/webgl/point-size.html = TEXT
diff --git a/LayoutTests/platform/chromium/test_expectations.txt b/LayoutTests/platform/chromium/test_expectations.txt
index b944c15..cd383d6 100644
--- a/LayoutTests/platform/chromium/test_expectations.txt
+++ b/LayoutTests/platform/chromium/test_expectations.txt
@@ -2543,7 +2543,6 @@ BUGDPRANKE BUGCR60845 WIN LINUX : media/video-poster.html = PASS TEXT
 
 BUGWEBGL : fast/canvas/webgl/css-webkit-canvas-repaint.html = IMAGE
 BUGWEBGL : fast/canvas/webgl/css-webkit-canvas.html = IMAGE
-BUGWEBGL WIN MAC : fast/canvas/webgl/tex-image-and-sub-image-2d-with-video.html = TEXT PASS
 BUGWEBGL WIN : fast/canvas/webgl/tex-image-and-sub-image-2d-with-array-buffer-view.html = CRASH PASS
 BUGWEBGL WIN DEBUG : fast/canvas/webgl/texture-complete.html = PASS TEXT
 BUGWEBGL : fast/canvas/webgl/read-pixels-test.html = TIMEOUT
diff --git a/LayoutTests/platform/mac-snowleopard/Skipped b/LayoutTests/platform/mac-snowleopard/Skipped
index 9bdc2de..01b1ded 100644
--- a/LayoutTests/platform/mac-snowleopard/Skipped
+++ b/LayoutTests/platform/mac-snowleopard/Skipped
@@ -109,9 +109,6 @@ platform/mac/fonts/color-bitmap.html
 # Snow Leopard bot does not support EXT_packed_depth_stencil, which is required by WebGL.
 # https://bugs.webkit.org/show_bug.cgi?id=36925
 fast/canvas/webgl/framebuffer-object-attachment.html
-# The video upload test is failing on the bots for some currently unknown reason.
-# https://bugs.webkit.org/show_bug.cgi?id=44459
-fast/canvas/webgl/tex-image-and-sub-image-2d-with-video.html
 
 # https://bugs.webkit.org/show_bug.cgi?id=52237
 fast/canvas/webgl/read-pixels-test.html

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list