1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 09:47:35 +00:00

Revert "LibWeb: Use box sampling instead of bilinear scaling when downscaling"

This reverts commit b79fd3d1a9.
This commit is contained in:
Andreas Kling 2023-05-19 13:33:52 +02:00
parent fb1a151fe3
commit 77db621be5
5 changed files with 6 additions and 13 deletions

View file

@ -185,14 +185,12 @@ struct BorderRadiusData {
};
// FIXME: Find a better place for this helper.
inline Gfx::Painter::ScalingMode to_gfx_scaling_mode(CSS::ImageRendering css_value, Gfx::IntRect source, Gfx::IntRect target)
inline Gfx::Painter::ScalingMode to_gfx_scaling_mode(CSS::ImageRendering css_value)
{
switch (css_value) {
case CSS::ImageRendering::Auto:
case CSS::ImageRendering::HighQuality:
case CSS::ImageRendering::Smooth:
if (target.width() < source.width() || target.height() < source.height())
return Gfx::Painter::ScalingMode::BoxSampling;
return Gfx::Painter::ScalingMode::BilinearBlend;
case CSS::ImageRendering::CrispEdges:
return Gfx::Painter::ScalingMode::NearestNeighbor;