move the pdfium lock init
move it inside the existing ONCE see https://github.com/libvips/libvips/pull/1857
This commit is contained in:
parent
62ad3c222e
commit
5556f1ec65
|
@ -5,6 +5,7 @@
|
||||||
- add VipsInterpolate and guint64 support to C++ API
|
- add VipsInterpolate and guint64 support to C++ API
|
||||||
- add VImage::new_from_memory_steal [Zeranoe]
|
- add VImage::new_from_memory_steal [Zeranoe]
|
||||||
- vipsthumbnail supports stdin / stdout thumbnailing
|
- vipsthumbnail supports stdin / stdout thumbnailing
|
||||||
|
- have a lock just for pdfium [DarthSim]
|
||||||
|
|
||||||
6/9/20 started 8.10.2
|
6/9/20 started 8.10.2
|
||||||
- update magicksave/load profile handling [kelilevi]
|
- update magicksave/load profile handling [kelilevi]
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
* - shut down the input file as soon as we can [kleisauke]
|
* - shut down the input file as soon as we can [kleisauke]
|
||||||
* 8/8/19
|
* 8/8/19
|
||||||
* - add locks, since pdfium is not threadsafe in any way
|
* - add locks, since pdfium is not threadsafe in any way
|
||||||
|
* 13/10/20
|
||||||
|
* - have a lock just for pdfium [DarthSim]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -169,6 +171,8 @@ vips_pdfium_init_cb( void *dummy )
|
||||||
{
|
{
|
||||||
FPDF_LIBRARY_CONFIG config;
|
FPDF_LIBRARY_CONFIG config;
|
||||||
|
|
||||||
|
vips_pdfium_mutex = vips_g_mutex_new();
|
||||||
|
|
||||||
config.version = 2;
|
config.version = 2;
|
||||||
config.m_pUserFontPaths = NULL;
|
config.m_pUserFontPaths = NULL;
|
||||||
config.m_pIsolate = NULL;
|
config.m_pIsolate = NULL;
|
||||||
|
@ -524,19 +528,9 @@ vips_foreign_load_pdf_load( VipsForeignLoad *load )
|
||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *
|
|
||||||
vips_pdfium_init_mutex( void *data )
|
|
||||||
{
|
|
||||||
vips_pdfium_mutex = vips_g_mutex_new();
|
|
||||||
return( NULL );
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
vips_foreign_load_pdf_class_init( VipsForeignLoadPdfClass *class )
|
vips_foreign_load_pdf_class_init( VipsForeignLoadPdfClass *class )
|
||||||
{
|
{
|
||||||
static GOnce vips_pdfium_once = G_ONCE_INIT;
|
|
||||||
VIPS_ONCE( &vips_pdfium_once, vips_pdfium_init_mutex, NULL );
|
|
||||||
|
|
||||||
GObjectClass *gobject_class = G_OBJECT_CLASS( class );
|
GObjectClass *gobject_class = G_OBJECT_CLASS( class );
|
||||||
VipsObjectClass *object_class = (VipsObjectClass *) class;
|
VipsObjectClass *object_class = (VipsObjectClass *) class;
|
||||||
VipsForeignLoadClass *load_class = (VipsForeignLoadClass *) class;
|
VipsForeignLoadClass *load_class = (VipsForeignLoadClass *) class;
|
||||||
|
|
Loading…
Reference in New Issue