1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:27:44 +00:00

LibWeb: Move to_gfx_scaling_mode() helper

There's no longer any reason to have this in StyleValue.h
This commit is contained in:
Sam Atkins 2023-03-30 14:48:34 +01:00 committed by Andreas Kling
parent d64ddeaec4
commit 7d29262b8b
2 changed files with 16 additions and 16 deletions

View file

@ -36,22 +36,6 @@
namespace Web::CSS {
// FIXME: Find a better place for this helper.
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:
return Gfx::Painter::ScalingMode::BilinearBlend;
case CSS::ImageRendering::CrispEdges:
return Gfx::Painter::ScalingMode::NearestNeighbor;
case CSS::ImageRendering::Pixelated:
return Gfx::Painter::ScalingMode::SmoothPixels;
}
VERIFY_NOT_REACHED();
}
template<typename T>
struct ValueComparingNonnullRefPtr : public NonnullRefPtr<T> {
using NonnullRefPtr<T>::NonnullRefPtr;