mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibGfx: Minor style tweaks in Painter
No behavior change.
This commit is contained in:
parent
8571209560
commit
dfb12e2a73
Notes:
sideshowbarker
2024-07-18 22:52:31 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/dfb12e2a738 Pull-request: https://github.com/SerenityOS/serenity/pull/5109
1 changed files with 3 additions and 2 deletions
|
@ -527,7 +527,7 @@ void Painter::blit_with_opacity(const IntPoint& position, const Gfx::Bitmap& sou
|
|||
return draw_scaled_bitmap({ position, safe_src_rect.size() }, source, safe_src_rect, opacity);
|
||||
|
||||
auto dst_rect = IntRect(position, safe_src_rect.size()).translated(translation());
|
||||
auto clipped_rect = IntRect::intersection(dst_rect, clip_rect());
|
||||
auto clipped_rect = dst_rect.intersected(clip_rect());
|
||||
if (clipped_rect.is_empty())
|
||||
return;
|
||||
|
||||
|
@ -541,8 +541,9 @@ void Painter::blit_with_opacity(const IntPoint& position, const Gfx::Bitmap& sou
|
|||
const int first_column = clipped_rect.left() - dst_rect.left();
|
||||
const int last_column = clipped_rect.right() - dst_rect.left();
|
||||
RGBA32* dst = m_target->scanline(clipped_rect.y()) + clipped_rect.x();
|
||||
const RGBA32* src = source.scanline(src_rect.top() + first_row) + src_rect.left() + first_column;
|
||||
const size_t dst_skip = m_target->pitch() / sizeof(RGBA32);
|
||||
|
||||
const RGBA32* src = source.scanline(src_rect.top() + first_row) + src_rect.left() + first_column;
|
||||
const unsigned src_skip = source.pitch() / sizeof(RGBA32);
|
||||
|
||||
// FIXME: This does the wrong thing if source has an alpha channel: It ignores it and pretends that every pixel in source is fully opaque.
|
||||
|
|
Loading…
Reference in a new issue