[vlc-commits] text_renderer: freetype: add define for font debug / drop debug code

Francois Cartegnie git at videolan.org
Wed Jan 15 15:11:23 CET 2020


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Jan 14 09:17:04 2020 +0100| [23d0759d661a69d794765e6f3a72150a7db988c3] | committer: Francois Cartegnie

text_renderer: freetype: add define for font debug / drop debug code

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=23d0759d661a69d794765e6f3a72150a7db988c3
---

 modules/text_renderer/freetype/freetype.c       | 2 +-
 modules/text_renderer/freetype/platform_fonts.c | 2 ++
 modules/text_renderer/freetype/platform_fonts.h | 5 +++++
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/modules/text_renderer/freetype/freetype.c b/modules/text_renderer/freetype/freetype.c
index 65c2386553..829bc23862 100644
--- a/modules/text_renderer/freetype/freetype.c
+++ b/modules/text_renderer/freetype/freetype.c
@@ -1538,7 +1538,7 @@ static void Destroy( vlc_object_t *p_this )
     filter_t *p_filter = (filter_t *)p_this;
     filter_sys_t *p_sys = p_filter->p_sys;
 
-#if 0
+#ifdef DEBUG_PLATFORM_FONTS
     msg_Dbg( p_filter, "------------------" );
     msg_Dbg( p_filter, "p_sys->p_families:" );
     msg_Dbg( p_filter, "------------------" );
diff --git a/modules/text_renderer/freetype/platform_fonts.c b/modules/text_renderer/freetype/platform_fonts.c
index e586a06353..d2f2c7def3 100644
--- a/modules/text_renderer/freetype/platform_fonts.c
+++ b/modules/text_renderer/freetype/platform_fonts.c
@@ -383,6 +383,7 @@ error:
     return NULL;
 }
 
+#ifdef DEBUG_PLATFORM_FONTS
 void DumpFamily( filter_t *p_filter, const vlc_family_t *p_family,
                  bool b_dump_fonts, int i_max_families )
 {
@@ -434,6 +435,7 @@ void DumpDictionary( filter_t *p_filter, const vlc_dictionary_t *p_dict,
     }
     free( ppsz_keys );
 }
+#endif
 
 char* ToLower( const char *psz_src )
 {
diff --git a/modules/text_renderer/freetype/platform_fonts.h b/modules/text_renderer/freetype/platform_fonts.h
index e43787caa5..db06bd2035 100644
--- a/modules/text_renderer/freetype/platform_fonts.h
+++ b/modules/text_renderer/freetype/platform_fonts.h
@@ -44,6 +44,9 @@
 # include "config.h"
 #endif
 
+/* Debug Stuff */
+//#define DEBUG_PLATFORM_FONTS
+
 #include "freetype.h"
 
 #ifdef __cplusplus
@@ -269,11 +272,13 @@ vlc_family_t *InitDefaultList( filter_t *p_filter, const char *const *ppsz_defau
                                int i_size );
 
 /* Debug Helpers */
+#ifdef DEBUG_PLATFORM_FONTS
 void DumpFamily( filter_t *p_filter, const vlc_family_t *p_family,
                  bool b_dump_fonts, int i_max_families );
 
 void DumpDictionary( filter_t *p_filter, const vlc_dictionary_t *p_dict,
                      bool b_dump_fonts, int i_max_families );
+#endif
 
 /* String helpers */
 char* ToLower( const char *psz_src );



More information about the vlc-commits mailing list