[vlc-commits] freetype: stick to single precision
Rémi Denis-Courmont
git at videolan.org
Wed Aug 13 22:23:08 CEST 2014
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Aug 13 22:45:07 2014 +0300| [81af7a3559a2002f2dc7b49917ca3f14d2992f4c] | committer: Rémi Denis-Courmont
freetype: stick to single precision
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=81af7a3559a2002f2dc7b49917ca3f14d2992f4c
---
modules/text_renderer/freetype.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/text_renderer/freetype.c b/modules/text_renderer/freetype.c
index 55b85a5..50056e7 100644
--- a/modules/text_renderer/freetype.c
+++ b/modules/text_renderer/freetype.c
@@ -1860,7 +1860,7 @@ static int Init_FT( vlc_object_t *p_this,
if( SetFontSize( p_filter, 0 ) != VLC_SUCCESS ) goto error;
p_sys->p_stroker = NULL;
- if( f_outline_thickness > 0.001 )
+ if( f_outline_thickness > .001f )
{
i_error = FT_Stroker_New( p_sys->p_library, &p_sys->p_stroker );
if( i_error )
@@ -1928,8 +1928,8 @@ static int Create( vlc_object_t *p_this )
float f_shadow_angle = var_InheritFloat( p_filter, "freetype-shadow-angle" );
float f_shadow_distance = var_InheritFloat( p_filter, "freetype-shadow-distance" );
f_shadow_distance = VLC_CLIP( f_shadow_distance, 0, 1 );
- p_sys->f_shadow_vector_x = f_shadow_distance * cos(2 * M_PI * f_shadow_angle / 360);
- p_sys->f_shadow_vector_y = f_shadow_distance * sin(2 * M_PI * f_shadow_angle / 360);
+ p_sys->f_shadow_vector_x = f_shadow_distance * cosf((float)(2. * M_PI) * f_shadow_angle / 360);
+ p_sys->f_shadow_vector_y = f_shadow_distance * sinf((float)(2. * M_PI) * f_shadow_angle / 360);
/* Set default psz_fontname */
if( !psz_fontname || !*psz_fontname )
More information about the vlc-commits
mailing list