mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
LibGUI: Avoid unnecessary Gfx::Bitmap cloning in FileIconProvider
This commit is contained in:
parent
0c02dfcad5
commit
a2686f9bec
Notes:
sideshowbarker
2024-07-18 20:31:36 +09:00
Author: https://github.com/awesomekling
Commit: a2686f9bec
1 changed files with 1 additions and 1 deletions
|
@ -197,7 +197,7 @@ Icon FileIconProvider::icon_for_executable(const String& path)
|
|||
|
||||
RefPtr<Gfx::Bitmap> bitmap;
|
||||
if (section.is_undefined()) {
|
||||
bitmap = s_executable_icon.bitmap_for_size(icon_section.image_size)->clone();
|
||||
bitmap = s_executable_icon.bitmap_for_size(icon_section.image_size);
|
||||
} else {
|
||||
bitmap = Gfx::load_png_from_memory(reinterpret_cast<const u8*>(section.raw_data()), section.size());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue