]> www.fi.muni.cz Git - evince.git/blobdiff - pdf/ev-poppler.cc
Use an specific lock for FontConfig. Hopefully it fixes some crashes
[evince.git] / pdf / ev-poppler.cc
index 148c6c56030aafe515429e73c5125720d41b5a74..d4372ad6be7cbb1ffa66488676efc127697c6d52 100644 (file)
@@ -1147,9 +1147,11 @@ make_thumbnail_for_size (PdfDocument   *pdf_document,
                                 width, height);
        gdk_pixbuf_fill (pixbuf, 0xffffffff);
 
+       ev_document_fc_mutex_lock ();
        poppler_page_render_to_pixbuf (poppler_page, 0, 0,
                                       width, height,
                                       scale, rotation, pixbuf);
+       ev_document_fc_mutex_unlock ();
        
 
        g_object_unref (poppler_page);
@@ -1323,7 +1325,7 @@ pdf_document_find_begin (EvDocumentFind   *document,
                                                        search_string);
 }
 
-int
+static int
 pdf_document_find_get_n_results (EvDocumentFind *document_find, int page)
 {
        PdfDocumentSearch *search = PDF_DOCUMENT (document_find)->search;
@@ -1335,7 +1337,7 @@ pdf_document_find_get_n_results (EvDocumentFind *document_find, int page)
        }
 }
 
-gboolean
+static gboolean
 pdf_document_find_get_result (EvDocumentFind *document_find,
                              int             page,
                              int             n_result,
@@ -1366,7 +1368,7 @@ pdf_document_find_get_result (EvDocumentFind *document_find,
        return TRUE;
 }
 
-int
+static int
 pdf_document_find_page_has_results (EvDocumentFind *document_find,
                                    int             page)
 {
@@ -1375,7 +1377,7 @@ pdf_document_find_page_has_results (EvDocumentFind *document_find,
        return search && search->pages[page] != NULL;
 }
 
-double
+static double
 pdf_document_find_get_progress (EvDocumentFind *document_find)
 {
        PdfDocumentSearch *search;
@@ -1543,7 +1545,7 @@ pdf_document_file_exporter_iface_init (EvFileExporterIface *iface)
         iface->end = pdf_document_file_exporter_end;
 }
 
-void
+static void
 pdf_selection_render_selection (EvSelection      *selection,
                                EvRenderContext  *rc,
                                GdkPixbuf       **pixbuf,
@@ -1578,7 +1580,7 @@ pdf_selection_render_selection (EvSelection      *selection,
 }
 
 
-GdkRegion *
+static GdkRegion *
 pdf_selection_get_selection_region (EvSelection     *selection,
                                    EvRenderContext *rc,
                                    EvRectangle     *points)
@@ -1595,7 +1597,7 @@ pdf_selection_get_selection_region (EvSelection     *selection,
        return retval;
 }
 
-GdkRegion *
+static GdkRegion *
 pdf_selection_get_selection_map (EvSelection     *selection,
                                 EvRenderContext *rc)
 {