Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
32e1b2cb
Commit
32e1b2cb
authored
Apr 24, 2013
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
freetype: fix color rendering (close #8484)
parent
9ce54ab9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
modules/text_renderer/freetype.c
modules/text_renderer/freetype.c
+15
-8
No files found.
modules/text_renderer/freetype.c
View file @
32e1b2cb
...
@@ -1192,11 +1192,11 @@ static inline int RenderAXYZ( filter_t *p_filter,
...
@@ -1192,11 +1192,11 @@ static inline int RenderAXYZ( filter_t *p_filter,
/* Initialize the picture background */
/* Initialize the picture background */
vlc_mutex_lock
(
&
p_sys
->
lock
);
vlc_mutex_lock
(
&
p_sys
->
lock
);
uint8_t
i_opacity
=
p_sys
->
i_background_opacity
;
uint8_t
i_opacity
=
p_sys
->
i_background_opacity
;
uint
8
_t
i_background_color
=
p_sys
->
i_background_color
;
uint
32
_t
i_background_color
=
p_sys
->
i_background_color
;
uint8_t
i_shadow_opacity
=
p_sys
->
i_shadow_opacity
;
uint8_t
i_shadow_opacity
=
p_sys
->
i_shadow_opacity
;
uint8_t
i_outline_opacity
=
p_sys
->
i_outline_opacity
;
uint8_t
i_outline_opacity
=
p_sys
->
i_outline_opacity
;
uint
8
_t
i_shadow_color
=
p_sys
->
i_shadow_color
;
uint
32
_t
i_shadow_color
=
p_sys
->
i_shadow_color
;
uint
8
_t
i_outline_color
=
p_sys
->
i_outline_color
;
uint
32
_t
i_outline_color
=
p_sys
->
i_outline_color
;
vlc_mutex_unlock
(
&
p_sys
->
lock
);
vlc_mutex_unlock
(
&
p_sys
->
lock
);
uint8_t
i_x
,
i_y
,
i_z
;
uint8_t
i_x
,
i_y
,
i_z
;
...
@@ -1694,9 +1694,11 @@ static text_style_t *GetStyleFromFontStack( filter_sys_t *p_sys,
...
@@ -1694,9 +1694,11 @@ static text_style_t *GetStyleFromFontStack( filter_sys_t *p_sys,
int
i_style_flags
)
int
i_style_flags
)
{
{
char
*
psz_fontname
=
NULL
;
char
*
psz_fontname
=
NULL
;
vlc_mutex_lock
(
&
p_sys
->
lock
);
uint32_t
i_font_color
=
p_sys
->
i_font_color
&
0x00ffffff
;
uint32_t
i_font_color
=
p_sys
->
i_font_color
&
0x00ffffff
;
uint32_t
i_karaoke_bg_color
=
i_font_color
;
int
i_font_size
=
p_sys
->
i_font_size
;
int
i_font_size
=
p_sys
->
i_font_size
;
vlc_mutex_unlock
(
&
p_sys
->
lock
);
uint32_t
i_karaoke_bg_color
=
i_font_color
;
if
(
PeekFont
(
p_fonts
,
&
psz_fontname
,
&
i_font_size
,
if
(
PeekFont
(
p_fonts
,
&
psz_fontname
,
&
i_font_size
,
&
i_font_color
,
&
i_karaoke_bg_color
)
)
&
i_font_color
,
&
i_karaoke_bg_color
)
)
...
@@ -1787,11 +1789,16 @@ static int ProcessNodes( filter_t *p_filter,
...
@@ -1787,11 +1789,16 @@ static int ProcessNodes( filter_t *p_filter,
}
}
else
else
{
{
vlc_mutex_lock
(
&
p_sys
->
lock
);
uint32_t
i_font_size
=
p_sys
->
i_font_size
;
uint32_t
i_font_color
=
p_sys
->
i_font_color
;
uint32_t
i_font_opacity
=
p_sys
->
i_font_opacity
;
vlc_mutex_unlock
(
&
p_sys
->
lock
);
rv
=
PushFont
(
&
p_fonts
,
rv
=
PushFont
(
&
p_fonts
,
p_sys
->
psz_fontfamily
,
p_sys
->
psz_fontfamily
,
p_sys
->
i_font_size
,
i_font_size
,
(
p_sys
->
i_font_color
&
0xffffff
)
|
(
i_font_color
&
0xffffff
)
|
((
p_sys
->
i_font_opacity
&
0xff
)
<<
24
),
((
i_font_opacity
&
0xff
)
<<
24
),
0x00ffffff
);
0x00ffffff
);
}
}
if
(
p_sys
->
b_font_bold
)
if
(
p_sys
->
b_font_bold
)
...
@@ -2690,7 +2697,7 @@ static int RenderCommon( filter_t *p_filter, subpicture_region_t *p_region_out,
...
@@ -2690,7 +2697,7 @@ static int RenderCommon( filter_t *p_filter, subpicture_region_t *p_region_out,
else
{
else
{
vlc_mutex_lock
(
&
p_sys
->
lock
);
vlc_mutex_lock
(
&
p_sys
->
lock
);
uint8_t
i_font_size
=
p_sys
->
i_font_size
;
uint8_t
i_font_size
=
p_sys
->
i_font_size
;
uint
8
_t
i_font_color
=
p_sys
->
i_font_color
;
uint
32
_t
i_font_color
=
p_sys
->
i_font_color
;
uint8_t
i_font_opacity
=
p_sys
->
i_font_opacity
;
uint8_t
i_font_opacity
=
p_sys
->
i_font_opacity
;
vlc_mutex_unlock
(
&
p_sys
->
lock
);
vlc_mutex_unlock
(
&
p_sys
->
lock
);
p_style
=
CreateStyle
(
p_sys
->
psz_fontfamily
,
p_style
=
CreateStyle
(
p_sys
->
psz_fontfamily
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment