mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
ImageDecoder+LibWeb: Perform initial alpha conversion in ImageDecoder
This change moves the initial alpha premultiplication step for all decoded images from WebContent to the ImageDecoder process. This doesn't reduce the overall amount of work, but it can make sites with a lot of images more responsive.
This commit is contained in:
parent
30d9584746
commit
f6f238d15c
Notes:
github-actions[bot]
2025-11-06 16:57:48 +00:00
Author: https://github.com/tcl3
Commit: f6f238d15c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6718
2 changed files with 2 additions and 1 deletions
|
|
@ -160,7 +160,7 @@ void SharedResourceRequest::handle_successful_fetch(URL::URL const& url_string,
|
|||
Vector<AnimatedBitmapDecodedImageData::Frame> frames;
|
||||
for (auto& frame : result.frames) {
|
||||
frames.append(AnimatedBitmapDecodedImageData::Frame {
|
||||
.bitmap = Gfx::ImmutableBitmap::create(*frame.bitmap, Gfx::AlphaType::Premultiplied, result.color_space),
|
||||
.bitmap = Gfx::ImmutableBitmap::create(*frame.bitmap, result.color_space),
|
||||
.duration = static_cast<int>(frame.duration),
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue