perf: don't create unused menuitem icons (#47128)
GTK >= 3.90.0 removed support for menuitem icons. When Electron is built with GTK >= 3.90.0, our code builds these icons and then throws them away unused. Instead, let's just not build them. Our gtk_util::GdkPixbufFromSkBitmap utility uses BGRAToRGBA and is expensive to call. Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
parent
ae232703de
commit
8f908ffce2
2 changed files with 6 additions and 14 deletions
|
@ -26,8 +26,6 @@ using MenuActivatedCallback = base::RepeatingCallback<void(GtkWidget*)>;
|
|||
|
||||
// Builds GtkImageMenuItems.
|
||||
GtkWidget* BuildMenuItemWithImage(const std::string& label, GtkWidget* image);
|
||||
GtkWidget* BuildMenuItemWithImage(const std::string& label,
|
||||
const gfx::Image& icon);
|
||||
GtkWidget* BuildMenuItemWithLabel(const std::string& label);
|
||||
|
||||
ui::MenuModel* ModelForMenuItem(GtkMenuItem* menu_item);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue