2022-04-18 13:24:32 +09:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: deepak1556 <hop2deep@gmail.com>
|
|
|
|
Date: Thu, 7 Apr 2022 20:30:16 +0900
|
2024-05-09 15:51:42 +02:00
|
|
|
Subject: Make gtk::GetLibGdkPixbuf public
|
2022-04-18 13:24:32 +09:00
|
|
|
|
2024-05-09 15:51:42 +02:00
|
|
|
Allows embedders to get a handle to the gdk_pixbuf
|
|
|
|
library already loaded in the process.
|
2022-04-18 13:24:32 +09:00
|
|
|
|
|
|
|
diff --git a/ui/gtk/gtk_compat.cc b/ui/gtk/gtk_compat.cc
|
2025-07-17 11:36:50 -04:00
|
|
|
index bcd86e7a9e870b274d0c6487a691f23ad1888079..4b192c90ce82ddddaedf14970919447e8f43dd7c 100644
|
2022-04-18 13:24:32 +09:00
|
|
|
--- a/ui/gtk/gtk_compat.cc
|
|
|
|
+++ b/ui/gtk/gtk_compat.cc
|
2025-07-17 11:36:50 -04:00
|
|
|
@@ -68,11 +68,6 @@ void* GetLibGio() {
|
2022-06-19 17:42:30 -07:00
|
|
|
return libgio;
|
|
|
|
}
|
|
|
|
|
|
|
|
-void* GetLibGdkPixbuf() {
|
|
|
|
- static void* libgdk_pixbuf = DlOpen("libgdk_pixbuf-2.0.so.0");
|
|
|
|
- return libgdk_pixbuf;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
void* GetLibGdk3() {
|
|
|
|
static void* libgdk3 = DlOpen("libgdk-3.so.0");
|
|
|
|
return libgdk3;
|
2025-07-17 11:36:50 -04:00
|
|
|
@@ -165,6 +160,11 @@ gfx::Insets InsetsFromGtkBorder(const GtkBorder& border) {
|
2022-04-18 13:24:32 +09:00
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
2022-06-19 17:42:30 -07:00
|
|
|
+void* GetLibGdkPixbuf() {
|
|
|
|
+ static void* libgdk_pixbuf = DlOpen("libgdk_pixbuf-2.0.so.0");
|
|
|
|
+ return libgdk_pixbuf;
|
|
|
|
+}
|
2022-04-18 13:24:32 +09:00
|
|
|
+
|
2025-07-17 11:36:50 -04:00
|
|
|
bool LoadGtk(ui::LinuxUiBackend backend) {
|
|
|
|
static bool loaded = LoadGtkImpl(backend);
|
2022-04-18 13:24:32 +09:00
|
|
|
return loaded;
|
|
|
|
diff --git a/ui/gtk/gtk_compat.h b/ui/gtk/gtk_compat.h
|
2025-07-17 11:36:50 -04:00
|
|
|
index 841e2e8fcdbe2da4aac487badd4d352476e461a2..e458df649546fa3bee10e24f0edac147186cc152 100644
|
2022-04-18 13:24:32 +09:00
|
|
|
--- a/ui/gtk/gtk_compat.h
|
|
|
|
+++ b/ui/gtk/gtk_compat.h
|
2025-07-17 11:36:50 -04:00
|
|
|
@@ -42,6 +42,9 @@ using SkColor = uint32_t;
|
2022-04-18 13:24:32 +09:00
|
|
|
|
|
|
|
namespace gtk {
|
|
|
|
|
2022-06-19 17:42:30 -07:00
|
|
|
+// Get handle to the currently loaded gdk_pixbuf library in the process.
|
|
|
|
+void* GetLibGdkPixbuf();
|
2022-04-18 13:24:32 +09:00
|
|
|
+
|
|
|
|
// Loads libgtk and related libraries and returns true on success.
|
2025-07-17 11:36:50 -04:00
|
|
|
bool LoadGtk(ui::LinuxUiBackend backend);
|
2022-04-18 13:24:32 +09:00
|
|
|
|