Bug 1248323: P3. Add test for NV12/YUV422 readback. r=me

reftest is disabled on windows due to localized try readback errors that can't be reproduced.

MozReview-Commit-ID: 379PZsRE5d6

--HG--
extra : rebase_source : b990572c0f33860998eb5485824e417387d3e204
This commit is contained in:
Matt Woodrow 2015-02-26 08:01:07 +13:00
parent 5d1c0dea05
commit 3bf68e972e
5 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="1.1">
<!-- use an empty g to force filters.svg to load before onload -->
<use xlink:href="../filters.svg#empty" />
<foreignObject filter="url(../filters.svg#ThresholdRGB)" x="0" y="0" height="100%" width="100%">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<body>
<script>
function done() {
document.documentElement.removeAttribute("class");
}
</script>
<video id="video" src="short.mp4" onloadeddata="done()"/>
</body>
</html>
</foreignObject>
</svg>

After

Width:  |  Height:  |  Size: 618 B

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="1.1">
<!-- use an empty g to force filters.svg to load before onload -->
<use xlink:href="../filters.svg#empty" />
<foreignObject filter="url(../filters.svg#ThresholdRGB)" x="0" y="0" height="100%" width="100%">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<body>
<canvas id="canvas" width="320" height="240"></canvas>
<script>
function draw() {
var video = document.getElementById("video");
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
try {
ctx.drawImage(video, 0, 0, video.videoWidth, video.videoHeight);
} catch (e) {
}
document.documentElement.removeAttribute("class");
}
</script>
<video id="video" src="short.mp4" onloadeddata="draw()" style="opacity:0"></video>
</body>
</html>
</foreignObject>
</svg>

After

Width:  |  Height:  |  Size: 930 B

View File

@ -0,0 +1 @@
skip-if(B2G||Mulet||winWidget) == canvas-1.xhtml canvas-1-ref.xhtml

Binary file not shown.

View File

@ -262,6 +262,9 @@ skip-if(!B2G&&browserIsRemote) include ogg-video/reftest.list
# webm-video/
skip-if(!B2G&&browserIsRemote) include webm-video/reftest.list
# mp4-video/
skip-if(!B2G&&browserIsRemote) include mp4-video/reftest.list
# parser/
include ../../parser/htmlparser/tests/reftest/reftest.list