mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 02:29:21 +00:00
Revert "LibWeb: Use box sampling instead of bilinear scaling when downscaling"
This reverts commit b79fd3d1a9
.
This commit is contained in:
parent
fb1a151fe3
commit
77db621be5
Notes:
sideshowbarker
2024-07-17 06:29:49 +09:00
Author: https://github.com/awesomekling
Commit: 77db621be5
5 changed files with 6 additions and 13 deletions
|
@ -102,10 +102,8 @@ Optional<CSSPixels> ImageStyleValue::natural_height() const
|
|||
|
||||
void ImageStyleValue::paint(PaintContext& context, DevicePixelRect const& dest_rect, CSS::ImageRendering image_rendering) const
|
||||
{
|
||||
if (auto* b = bitmap(m_current_frame_index); b != nullptr) {
|
||||
auto scaling_mode = to_gfx_scaling_mode(image_rendering, bitmap(0)->rect(), dest_rect.to_type<int>());
|
||||
context.painter().draw_scaled_bitmap(dest_rect.to_type<int>(), *b, bitmap(0)->rect(), 1.f, scaling_mode);
|
||||
}
|
||||
if (auto* b = bitmap(m_current_frame_index); b != nullptr)
|
||||
context.painter().draw_scaled_bitmap(dest_rect.to_type<int>(), *b, bitmap(0)->rect(), 1.0f, to_gfx_scaling_mode(image_rendering));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue