diff --git a/Userland/Libraries/LibGfx/Painter.cpp b/Userland/Libraries/LibGfx/Painter.cpp index c5176c6f23..132b2c18cc 100644 --- a/Userland/Libraries/LibGfx/Painter.cpp +++ b/Userland/Libraries/LibGfx/Painter.cpp @@ -1097,12 +1097,12 @@ ALWAYS_INLINE static void do_draw_integer_scaled_bitmap(Gfx::Bitmap& target, Int template ALWAYS_INLINE static void do_draw_scaled_bitmap(Gfx::Bitmap& target, IntRect const& dst_rect, IntRect const& clipped_rect, Gfx::Bitmap const& source, FloatRect const& src_rect, GetPixel get_pixel, float opacity) { - auto clipped_src_rect = enclosing_int_rect(src_rect).intersected(source.rect()); + auto int_src_rect = enclosing_int_rect(src_rect); + auto clipped_src_rect = int_src_rect.intersected(source.rect()); if (clipped_src_rect.is_empty()) return; if constexpr (!do_bilinear_blend) { - IntRect int_src_rect = enclosing_int_rect(src_rect); if (dst_rect == clipped_rect && int_src_rect == src_rect && !(dst_rect.width() % int_src_rect.width()) && !(dst_rect.height() % int_src_rect.height())) { int hfactor = dst_rect.width() / int_src_rect.width(); int vfactor = dst_rect.height() / int_src_rect.height();