mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
This changes Gfx::ScalingMode to reflect the three modes of scaling we support using Skia, which makes it a bit easier to reason about the mode to select. New is ::BilinearMipmap, which uses linear interpolation between mipmap levels to produce higher quality downscaled images. The cubic resampling options Mitchell and its sibling CatmullRom both produced weird artifacts or resulted in a worse quality than BilinearMipmap when downscaling. We might not have been using these correctly, but the new ::BilinearMipmap method seems to mirror what Chrome uses for downscaled images.
20 lines
454 B
HTML
20 lines
454 B
HTML
<!DOCTYPE html>
|
|
<link rel="match" href="../expected/image-downscaling-ref.html" />
|
|
<meta name="fuzzy" content="maxDifference=0-1;totalPixels=0-1">
|
|
<style>
|
|
#a {
|
|
width: 40px;
|
|
}
|
|
#b {
|
|
height: 40px;
|
|
width: 80px;
|
|
}
|
|
#c {
|
|
height: 80px;
|
|
width: 20px;
|
|
}
|
|
</style>
|
|
<img id="a" src="../data/angled-stripes.png">
|
|
<img id="b" src="../data/angled-stripes.png">
|
|
<img id="c" src="../data/angled-stripes.png">
|