mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:17:34 +00:00
LibGUI: Avoid unnecessary Gfx::Bitmap cloning in FileIconProvider
This commit is contained in:
parent
0c02dfcad5
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;
|
RefPtr<Gfx::Bitmap> bitmap;
|
||||||
if (section.is_undefined()) {
|
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 {
|
} else {
|
||||||
bitmap = Gfx::load_png_from_memory(reinterpret_cast<const u8*>(section.raw_data()), section.size());
|
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