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-03-12 09:37:36 -04:00
|
|
|
index d6ac3233de3165d2be3e5d4fb3e221dca8b8d415..4f15069af07b7adc3e3c45e67e23ec8525668c21 100644
|
2022-04-18 13:24:32 +09:00
|
|
|
--- a/ui/gtk/gtk_compat.cc
|
|
|
|
+++ b/ui/gtk/gtk_compat.cc
|
2025-03-12 09:37:36 -04:00
|
|
|
@@ -69,11 +69,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-03-12 09:37:36 -04:00
|
|
|
@@ -150,6 +145,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
|
|
|
+
|
|
|
|
bool LoadGtk() {
|
|
|
|
static bool loaded = LoadGtkImpl();
|
|
|
|
return loaded;
|
|
|
|
diff --git a/ui/gtk/gtk_compat.h b/ui/gtk/gtk_compat.h
|
2024-05-09 15:51:42 +02:00
|
|
|
index 19f73cc179d82a3729c5fe37883460ac05f4d0c3..17aa0b95bd6158ed02c03095c1687185a057fe62 100644
|
2022-04-18 13:24:32 +09:00
|
|
|
--- a/ui/gtk/gtk_compat.h
|
|
|
|
+++ b/ui/gtk/gtk_compat.h
|
2024-05-09 15:51:42 +02:00
|
|
|
@@ -41,6 +41,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.
|
|
|
|
bool LoadGtk();
|
|
|
|
|