Open Bug 1462431 Opened 2 years ago Updated 2 years ago
Expand scope of sizes we can downscale-on-decode at
We should support downscaling when one dimension is equal to or less than the native image size. For example, 32000x100 should allow downscaling to 100x100. Additionally if we want 200x200, we should allow downscaling to 200x100. While the drawing will still need to upscale, it will only need to upscale in one dimension. The display quality should be unaffected, and our memory footprint will be lower.
Assignee: nobody → aosmond
Status: NEW → ASSIGNED
Priority: -- → P3
Attachment #8976675 - Flags: review?(tnikkel)
Attachment #8976675 - Flags: review?(tnikkel) → review+
Pushed by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/272880e5ca08 Expand image downscale-on-decode to perform best effort sizing. r=tnikkel
Backout by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/7d3ae4f78bd1 Backed out changeset 272880e5ca08 for failing on /test/unit/test_imgtools.js
Backed out changeset 272880e5ca08 (bug 1462431) for failing on /test/unit/test_imgtools.js Backout link: https://hg.mozilla.org/integration/mozilla-inbound/rev/7d3ae4f78bd11c724c187c39dc6e0fcab2fcc3bb Push with failures: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=272880e5ca089e6b2f8905a731930e0613665415 Log link: https://treeherder.mozilla.org/logviewer.html#?job_id=179104452&repo=mozilla-inbound&lineNumber=11428 Log snippet: 00:36:19 INFO - TEST-START | image/test/unit/test_imgtools.js 00:36:19 WARNING - TEST-UNEXPECTED-FAIL | image/test/unit/test_imgtools.js | xpcshell return code: 0
It appears with my changes we are now using high quality scaling to produce a frame at 32x16, where as before it would produce a 32x32 unscaled frame which was subsequently downscaled (not high quality) using the draw target. This is why the results are different. I will regenerate the image files. (There is also lots of room to improve in imgTools and at least some of this code is still used by things like the favicon service. We shouldn't be recreating the surface if we already have a data surface, and we probably should be using skia instead of cairo if we must use a draw target to rescale. Sigh. New bug?)
Pushed by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/6c8bf287d25b Expand image downscale-on-decode to perform best effort sizing. r=tnikkel
Backed out again because of Wr3 failures. Not a real problem, just slight scaling differences I believe but now I want to force it to run all tests on try to avoid another failure coming out of the woodwork...
Backout by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/3880e9b11a7a Backed out changeset 6c8bf287d25b for web platform reftest failure. r=aosmond
It seems the failing tests only run on Linux, given there is no failure on Mac/Windows/Android: https://treeherder.mozilla.org/#/jobs?repo=try&revision=8b3db2b313626545b8465f7074ee8c2f55d7617f WebRender and baseline yield different failures due to choosing to scale the images in wildly different ways: https://treeherder.mozilla.org/#/jobs?repo=try&revision=7aeb530e02baa1fb7812f1ef3ebde6019c67474f I can easily add fuzzing for the given tests although I do have some mild concern something is going wrong with the test. Further more, I am unable to reproduce the failures locally.
Also, I thought downscale on decode is disabled during most reftests by default. Hm. The evidence is clear that it is enabled however. Maybe the webplatform reftests are special.
Yes, it looks like it doesn't disable downscaling for web-platform-tests: https://searchfox.org/mozilla-central/rev/9769f2300a17d3dfbebcfb457b1244bd624275e3/testing/profiles/profiles.json#8 And I probably need to add a special pref change here: https://searchfox.org/mozilla-central/rev/9769f2300a17d3dfbebcfb457b1244bd624275e3/testing/web-platform/tests/tools/wptrunner/wptrunner/browsers/firefox.py#210
With downscaling disabled: https://treeherder.mozilla.org/#/jobs?repo=try&revision=2cf174a0a4cc687d5527dd3028a86ea3ca937fcf&selectedJob=179353143 Two unexpected passes that can be corrected, and two small amounts of fuzz.
You need to log in before you can comment on or make changes to this bug.