From 6ae52e89dc0a7fce667595081ffc1897797d71d6 Mon Sep 17 00:00:00 2001 From: Raymond Zhao <7199958+rzhao271@users.noreply.github.com> Date: Mon, 13 Jun 2022 22:09:21 +0000 Subject: [PATCH] Merge gdk_pixbuf stubs into gtk stubs --- BUILD.gn | 10 ---------- shell/browser/ui/electron_gdk_pixbuf.fragment | 1 - shell/browser/ui/electron_gdk_pixbuf.sigs | 3 --- shell/browser/ui/electron_gtk.fragment | 3 ++- shell/browser/ui/electron_gtk.sigs | 5 ++++- shell/browser/ui/gtk_util.cc | 2 +- shell/browser/ui/message_box_gtk.cc | 2 +- 7 files changed, 8 insertions(+), 18 deletions(-) delete mode 100644 shell/browser/ui/electron_gdk_pixbuf.fragment delete mode 100644 shell/browser/ui/electron_gdk_pixbuf.sigs diff --git a/BUILD.gn b/BUILD.gn index 80150f8c1cb44..9b62fb12029d4 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -94,15 +94,6 @@ if (is_linux) { logging_function = "LogNoop()" logging_include = "ui/gtk/log_noop.h" } - - generate_stubs("electron_gdk_pixbuf_stubs") { - sigs = [ "shell/browser/ui/electron_gdk_pixbuf.sigs" ] - extra_header = "shell/browser/ui/electron_gdk_pixbuf.fragment" - output_name = "electron_gdk_pixbuf_stubs" - public_deps = [ "//ui/gtk:gtk_config" ] - logging_function = "LogNoop()" - logging_include = "ui/gtk/log_noop.h" - } } declare_args() { @@ -562,7 +553,6 @@ source_set("electron_lib") { if (is_linux) { libs = [ "xshmfence" ] deps += [ - ":electron_gdk_pixbuf_stubs", ":electron_gtk_stubs", ":libnotify_loader", "//build/config/linux/gtk", diff --git a/shell/browser/ui/electron_gdk_pixbuf.fragment b/shell/browser/ui/electron_gdk_pixbuf.fragment deleted file mode 100644 index bc16bc088ef23..0000000000000 --- a/shell/browser/ui/electron_gdk_pixbuf.fragment +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/shell/browser/ui/electron_gdk_pixbuf.sigs b/shell/browser/ui/electron_gdk_pixbuf.sigs deleted file mode 100644 index ae7ed9ed7a4bb..0000000000000 --- a/shell/browser/ui/electron_gdk_pixbuf.sigs +++ /dev/null @@ -1,3 +0,0 @@ -GdkPixbuf* gdk_pixbuf_new(GdkColorspace colorspace, gboolean has_alpha, int bits_per_sample, int width, int height) -GdkPixbuf* gdk_pixbuf_scale_simple(const GdkPixbuf* src, int dest_width, int dest_height, GdkInterpType interp_type) -guchar* gdk_pixbuf_get_pixels(const GdkPixbuf* pixbuf) diff --git a/shell/browser/ui/electron_gtk.fragment b/shell/browser/ui/electron_gtk.fragment index 74a31b23585ac..677c382087029 100644 --- a/shell/browser/ui/electron_gtk.fragment +++ b/shell/browser/ui/electron_gtk.fragment @@ -1 +1,2 @@ -#include \ No newline at end of file +#include +#include diff --git a/shell/browser/ui/electron_gtk.sigs b/shell/browser/ui/electron_gtk.sigs index 451fc74a953d6..7669df87d90ee 100644 --- a/shell/browser/ui/electron_gtk.sigs +++ b/shell/browser/ui/electron_gtk.sigs @@ -4,4 +4,7 @@ void gtk_native_dialog_show(GtkNativeDialog* self); void gtk_native_dialog_hide(GtkNativeDialog* self); gint gtk_native_dialog_run(GtkNativeDialog* self); void gtk_native_dialog_destroy(GtkNativeDialog* self); -GType gtk_native_dialog_get_type(void); \ No newline at end of file +GType gtk_native_dialog_get_type(void); +GdkPixbuf* gdk_pixbuf_new(GdkColorspace colorspace, gboolean has_alpha, int bits_per_sample, int width, int height) +GdkPixbuf* gdk_pixbuf_scale_simple(const GdkPixbuf* src, int dest_width, int dest_height, GdkInterpType interp_type) +guchar* gdk_pixbuf_get_pixels(const GdkPixbuf* pixbuf) diff --git a/shell/browser/ui/gtk_util.cc b/shell/browser/ui/gtk_util.cc index 3b8db6c20fd94..7fc6154bf99f3 100644 --- a/shell/browser/ui/gtk_util.cc +++ b/shell/browser/ui/gtk_util.cc @@ -12,7 +12,7 @@ #include "base/no_destructor.h" #include "base/strings/string_number_conversions.h" -#include "electron/electron_gdk_pixbuf_stubs.h" +#include "electron/electron_gtk_stubs.h" #include "third_party/skia/include/core/SkBitmap.h" #include "third_party/skia/include/core/SkColor.h" #include "third_party/skia/include/core/SkUnPreMultiply.h" diff --git a/shell/browser/ui/message_box_gtk.cc b/shell/browser/ui/message_box_gtk.cc index 95b45c23ab9dd..6266dad29ef51 100644 --- a/shell/browser/ui/message_box_gtk.cc +++ b/shell/browser/ui/message_box_gtk.cc @@ -11,7 +11,7 @@ #include "base/no_destructor.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" -#include "electron/electron_gdk_pixbuf_stubs.h" +#include "electron/electron_gtk_stubs.h" #include "shell/browser/browser.h" #include "shell/browser/native_window_observer.h" #include "shell/browser/native_window_views.h"