mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-04-01 12:03:08 +00:00
Bug 1006123, part 2: Add reftest for high-quality image downscaling. r=seth
This commit is contained in:
parent
0014fc1ded
commit
4296ce21ad
BIN
image/test/reftest/downscaling/downscale-1-bigimage.png
Normal file
BIN
image/test/reftest/downscaling/downscale-1-bigimage.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 195 B |
8
image/test/reftest/downscaling/downscale-1-ref.html
Normal file
8
image/test/reftest/downscaling/downscale-1-ref.html
Normal file
@ -0,0 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
<!-- Any copyright is dedicated to the Public Domain.
|
||||
- http://creativecommons.org/publicdomain/zero/1.0/ -->
|
||||
<html>
|
||||
<body>
|
||||
<img src="downscale-1-smallimage.png">
|
||||
</body>
|
||||
</html>
|
BIN
image/test/reftest/downscaling/downscale-1-smallimage.png
Normal file
BIN
image/test/reftest/downscaling/downscale-1-smallimage.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 88 B |
24
image/test/reftest/downscaling/downscale-1.html
Normal file
24
image/test/reftest/downscaling/downscale-1.html
Normal file
@ -0,0 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<!-- Any copyright is dedicated to the Public Domain.
|
||||
- http://creativecommons.org/publicdomain/zero/1.0/ -->
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<script>
|
||||
function snapshot() {
|
||||
document.documentElement.removeAttribute('class');
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<!-- NOTE: Using setTimeout to wait for high-quality downscaled version of
|
||||
image to be ready, because there's nothing better we can do. If we fix
|
||||
Bug 1006883, we can do away with this setTimeout.
|
||||
|
||||
For now, the setTimeout is just here to increase the likelihood that we
|
||||
actually test the high-quality downscaled version of the image. If the
|
||||
setTimeout happens to fire before the high-quality downscaled rendering is
|
||||
ready, then this the test will pass without testing what it's trying to
|
||||
test, which is fine as long as that's rare. -->
|
||||
<body onload="setTimeout(snapshot, 50)">
|
||||
<img src="downscale-1-bigimage.png" style="height: 20px; width: 20px">
|
||||
</body>
|
||||
</html>
|
28
image/test/reftest/downscaling/reftest.list
Normal file
28
image/test/reftest/downscaling/reftest.list
Normal file
@ -0,0 +1,28 @@
|
||||
# Reftests for downscaling
|
||||
#
|
||||
# Downscaling can be a lossy process, so a bit of mismatch is acceptable here,
|
||||
# as long as it's barely noticable visually. When necessary, this can be
|
||||
# explicitly allowed via 'fuzzy'/'fuzzy-if' annotations.
|
||||
#
|
||||
# IMPORTANT: For robustness, each test should be listed *twice* in this
|
||||
# manifest -- once with the high quality downscaling pref disabled, and once
|
||||
# with this pref enabled. The pref is set via "default-preferences", so
|
||||
# simply appending a new test to the lists below each of those lines should be
|
||||
# sufficient.
|
||||
#
|
||||
# Also note that Mac OS X has its own system-level downscaling algorithm, so
|
||||
# tests here may need Mac-specific "fuzzy-if(cocoaWidget,...)" annotations.
|
||||
|
||||
# RUN TESTS WITH HIGH QUALITY DOWNSCALING DISABLED:
|
||||
# =================================================
|
||||
default-preferences pref(image.high_quality_downscaling.enabled,false)
|
||||
|
||||
fuzzy-if(cocoaWidget,106,31) == downscale-1.html downscale-1-ref.html
|
||||
|
||||
|
||||
# RUN TESTS WITH HIGH QUALITY DOWNSCALING ENABLED:
|
||||
# ================================================
|
||||
# High-quality downscaling enabled:
|
||||
default-preferences pref(image.high_quality_downscaling.enabled,true)
|
||||
|
||||
fuzzy(31,127) == downscale-1.html downscale-1-ref.html
|
@ -43,5 +43,8 @@ include generic/reftest.list
|
||||
# Color management test
|
||||
include color-management/reftest.list
|
||||
|
||||
# Downscaling tests
|
||||
include downscaling/reftest.list
|
||||
|
||||
# Lossless encoders
|
||||
skip-if(Android||B2G) include encoders-lossless/reftest.list # bug 783621
|
||||
|
Loading…
x
Reference in New Issue
Block a user