Issue #2657 - Remove -moz-samplesize resize-decoding for low-vram mobiles

Resolves #2657
This commit is contained in:
Moonchild 2024-11-20 14:10:10 +01:00 committed by roytam1
commit ef5f052d97
18 changed files with 13 additions and 193 deletions

View file

@ -1,41 +0,0 @@
<!DOCTYPE html>
<html class="reftest-wait">
<body>
<img id="test">
</body>
<script>
var image = new Image;
image.onload = function() {
// Create a canvas.
var canvas = document.createElement('canvas');
canvas.width = 100;
canvas.height = 100;
// Draw the image into the canvas.
var ctx = canvas.getContext('2d');
ctx.drawImage(image, 0, 0);
// Convert the image into a blob URI and use it as #test's src.
canvas.toBlob(function(blob) {
var uri = window.URL.createObjectURL(blob);
uri += '#-moz-samplesize=8';
var testImage = document.getElementById('test');
testImage.onload = testImage.onerror = function() {
// Take the snapshot.
document.documentElement.removeAttribute('class');
};
testImage.src = uri;
}, 'image/jpeg', 0.99);
}
// Start loading the image.
image.src = 'image.png';
</script>
</html>

View file

@ -1,40 +0,0 @@
<!DOCTYPE html>
<html class="reftest-wait">
<body>
<img id="test">
</body>
<script>
var image = new Image;
image.onload = function() {
// Create a canvas.
var canvas = document.createElement('canvas');
canvas.width = 100;
canvas.height = 100;
// Draw the image into the canvas.
var ctx = canvas.getContext('2d');
ctx.drawImage(image, 0, 0);
// Convert the image into a blob URI and use it as #test's src.
canvas.toBlob(function(blob) {
var uri = window.URL.createObjectURL(blob);
var testImage = document.getElementById('test');
testImage.onload = testImage.onerror = function() {
// Take the snapshot.
document.documentElement.removeAttribute('class');
};
testImage.src = uri;
}, 'image/jpeg', 0.99);
}
// Start loading the image.
image.src = 'image.png';
</script>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 840 B

View file

@ -1,7 +0,0 @@
# Blob URI tests
# Test that blob URIs don't get merged if they have different ref params.
# (We run the test twice to check both cached and non-cached cases.)
default-preferences pref(image.mozsamplesize.enabled,true)
!= blob-uri-with-ref-param.html blob-uri-with-ref-param-notref.html
!= blob-uri-with-ref-param.html blob-uri-with-ref-param-notref.html

View file

@ -52,5 +52,3 @@ random-if(Android) == jpg-srgb-icc.jpg jpg-srgb-icc.png
# "Here is the beginning of a boundary," and --$(boundary)-- means "All done
# sending you parts.")
HTTP == webcam-simulacrum.mjpg blue.jpg
pref(image.mozsamplesize.enabled,true) fuzzy(21,256) == jpg-size-32x32.jpg#-moz-samplesize=2 jpg-size-16x16.png
pref(image.mozsamplesize.enabled,true) fuzzy(92,16) == jpg-size-32x32.jpg#-moz-samplesize=8 jpg-size-4x4.png

View file

@ -46,8 +46,5 @@ include color-management/reftest.list
# Downscaling tests
include downscaling/reftest.list
# Blob URI tests
include blob/reftest.list
# Lossless encoders
skip-if(Android) include encoders-lossless/reftest.list