Bug 1502761 - Add reftests for ImageRendering on video (NativeTexture external images). r=nical

Add reftests that test the ImageRendering property on video (NativeTexture external images), JS-based ImageRendering changes and inequality of results between different ImageRendering settings. Also include a simple h264 mp4 with minimal lossy encoding. OSX fuzzing values determined by try run.
This commit is contained in:
Henrik Winnemöller 2018-10-29 00:51:50 +01:00
Родитель c78ff51afb
Коммит de0535b7e0
6 изменённых файлов: 93 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,21 @@
<!DOCTYPE HTML>
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html reftest-zoom="2">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>test video image-rendering css auto</title>
<style type="text/css">
#v1 {
image-rendering: auto;
}
</style>
</head>
<body>
<video src="qr.mp4" preload="metadata" id="v1" style="position:absolute; left:0; top:0"></video>
</body>
</html>

Просмотреть файл

@ -0,0 +1,21 @@
<!DOCTYPE HTML>
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html reftest-zoom="2">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>test video image-rendering css -moz-crisp-edges</title>
<style type="text/css">
#v1 {
image-rendering: -moz-crisp-edges;
}
</style>
</head>
<body>
<video src="qr.mp4" preload="metadata" id="v1" style="position:absolute; left:0; top:0"></video>
</body>
</html>

Просмотреть файл

@ -0,0 +1,18 @@
<!DOCTYPE HTML>
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html reftest-zoom="2">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>reference video image-rendering</title>
</head>
<body>
<img style="position:absolute; left:0; top:0; image-rendering: -moz-crisp-edges"
src=" data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKQAAACkAQMAAAAjexcCAAAABlBMVEX///8AAABVwtN+AAABO0lEQVRIx9XUwYHCMBBD0elA/Xc5HYivwQcK0AXjZK2Xg9YhZP5u2F5pNWtrL1Z0mfJI1sDEknoXzKRriUVFDHKtqtBwmNRTpkc7q5FCHbW9P4NY0RtWKuQXK5rbnT3cjfGQOkqVRpuQzLqinLx7GzB/rrqllOX2yPfETEkVu84VH7uji7DmarJFrKg9ztlpNkNbUURMqtIU6+gCbIOkjF1XlPH2QhsnLkxF3xdp3yZs2jpKi46IRx01MzS5MXNlFV29n/TBsupoWmRKQ9mQtqKKH5F8VtEVUWkzdu/Qivr7KJtL8i5hKrq+f58FbpK3o1dwNmkctZSRa5x9o6I33g/wmjwdJS0LiE+63VEOlikSRWmbjhok3PvNTurpPSscQ5iaMrMJ7N75Jc1ce8RhEzpqe/nE0sqpof82PrI5/KRnFwqAAAAAAElFTkSuQmCC"
>
</body>
</html>

Просмотреть файл

@ -0,0 +1,30 @@
<!DOCTYPE HTML>
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html reftest-zoom="2" class="reftest-wait">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>test video image-rendering script change</title>
<style type="text/css">
#v1 {
image-rendering: auto;
}
</style>
<script type="text/javascript">
function updateImageRendering() {
var video = document.getElementById("v1");
video.style.imageRendering = '-moz-crisp-edges';
document.documentElement.removeAttribute('class');
}
window.addEventListener("MozReftestInvalidate", updateImageRendering);
</script>
</head>
<body>
<video src="qr.mp4" preload="metadata" id="v1" style="position:absolute; left:0; top:0"></video>
</body>
</html>

Двоичные данные
layout/reftests/mp4-video/qr.mp4 Normal file

Двоичный файл не отображается.

Просмотреть файл

@ -1 +1,4 @@
skip-if(winWidget) == canvas-1.xhtml canvas-1-ref.xhtml
skip-if(Android) fuzzy-if(OSX,1-1,107584-107584) == image-rendering-css.html image-rendering-ref.html
skip-if(Android) fuzzy-if(OSX,1-1,107584-107584) == image-rendering-script.html image-rendering-ref.html
skip-if(Android) fuzzy-if(OSX,0-1,0-107584) != image-rendering-css.html image-rendering-css-auto.html