libgimp: clean comment.

I am unsure about the previous commit (see MR !2568), though it should
not be hurtful either. At least though, let's not leave duplicate
comments. So merging the 2 comments and making the remaining text a bit
more technically correct.
This commit is contained in:
Jehan 2025-12-05 21:20:26 +01:00
parent 0ab24ae1b5
commit 7787a90b8d
2 changed files with 8 additions and 14 deletions

View file

@ -1179,10 +1179,6 @@ _gimp_config (GPConfig *config)
"application-license", "GPL3",
NULL);
/* XXX Running gegl_init() before gegl_config() is not appreciated by
* GEGL and generates a bunch of CRITICALs.
*/
g_clear_object (&_check_custom_color1);
_check_custom_color1 = gegl_color_new (NULL);
pixel = g_bytes_get_data (config->check_custom_color1, &bpp);

View file

@ -290,16 +290,14 @@ gimp_plug_in_class_init (GimpPlugInClass *klass)
g_object_class_install_properties (object_class, N_PROPS, props);
/* GIMP uses GeglColor so GEGL must be init.
* GEGL depends on BABL so it must be init.
*
* XXX Usually would call gegl_init which calls babl_init.
* But when call gegl_init before gegl_config,
* GEGL loads its libraries (also called plugins) twice
* and GObject throws CRITICAL re multiple register of GTypes
* "Two different plugins tried to register".
* See related XXX comment in libgimp/gimp.c
* See gegl#427
/* libgimp creates GeglColor-s in _gimp_config(), which requires at
* least babl to be initialized.
* We don't call gegl_init() because gegl_config() does not appreciate
* being called after, which generates a bunch of CRITICALs (see
* commit b06fe36970c and gegl#427).
* Therefore gegl_init() still needs to be called manually by plug-ins
* if necessary (it is called by gimp_ui_init() too, but this only
* applies to GUI plug-ins).
*/
babl_init ();
}