Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
7b6b6bf8
Commit
7b6b6bf8
authored
Jun 19, 2011
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Directly store alpha in font_stack_t::text_style_t (freetype).
parent
e32bee08
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
modules/misc/text_renderer/freetype.c
modules/misc/text_renderer/freetype.c
+5
-5
No files found.
modules/misc/text_renderer/freetype.c
View file @
7b6b6bf8
...
@@ -623,7 +623,7 @@ static int RenderYUVP( filter_t *p_filter, subpicture_region_t *p_region,
...
@@ -623,7 +623,7 @@ static int RenderYUVP( filter_t *p_filter, subpicture_region_t *p_region,
/* Calculate text color components
/* Calculate text color components
* Only use the first color */
* Only use the first color */
int
i_alpha
=
0xff
-
((
p_line
->
p_character
[
0
].
i_color
>>
24
)
&
0xff
)
;
int
i_alpha
=
(
p_line
->
p_character
[
0
].
i_color
>>
24
)
&
0xff
;
YUVFromRGB
(
p_line
->
p_character
[
0
].
i_color
,
&
i_y
,
&
i_u
,
&
i_v
);
YUVFromRGB
(
p_line
->
p_character
[
0
].
i_color
,
&
i_y
,
&
i_u
,
&
i_v
);
/* Build palette */
/* Build palette */
...
@@ -846,7 +846,7 @@ static int RenderYUVA( filter_t *p_filter,
...
@@ -846,7 +846,7 @@ static int RenderYUVA( filter_t *p_filter,
continue
;
continue
;
uint32_t
i_color
=
ch
->
i_color
;
uint32_t
i_color
=
ch
->
i_color
;
i_a
=
0xff
-
((
i_color
>>
24
)
&
0xff
)
;
i_a
=
(
i_color
>>
24
)
&
0xff
;
if
(
g
==
0
)
if
(
g
==
0
)
{
{
i_a
=
i_a
*
p_sys
->
i_outline_opacity
/
255
;
i_a
=
i_a
*
p_sys
->
i_outline_opacity
/
255
;
...
@@ -1160,7 +1160,7 @@ static int HandleFontAttributes( xml_reader_t *p_xml_reader,
...
@@ -1160,7 +1160,7 @@ static int HandleFontAttributes( xml_reader_t *p_xml_reader,
int
rv
;
int
rv
;
char
*
psz_fontname
=
NULL
;
char
*
psz_fontname
=
NULL
;
uint32_t
i_font_color
=
0xffffff
;
uint32_t
i_font_color
=
0xffffff
;
int
i_font_alpha
=
0
;
int
i_font_alpha
=
255
;
uint32_t
i_karaoke_bg_color
=
0x00ffffff
;
uint32_t
i_karaoke_bg_color
=
0x00ffffff
;
int
i_font_size
=
24
;
int
i_font_size
=
24
;
...
@@ -1365,7 +1365,7 @@ static int ProcessNodes( filter_t *p_filter,
...
@@ -1365,7 +1365,7 @@ static int ProcessNodes( filter_t *p_filter,
p_sys
->
psz_fontfamily
,
p_sys
->
psz_fontfamily
,
p_sys
->
i_font_size
,
p_sys
->
i_font_size
,
(
p_sys
->
i_font_color
&
0xffffff
)
|
(
p_sys
->
i_font_color
&
0xffffff
)
|
((
(
255
-
p_sys
->
i_font_opacity
)
&
0xff
)
<<
24
),
((
p_sys
->
i_font_opacity
&
0xff
)
<<
24
),
0x00ffffff
);
0x00ffffff
);
}
}
#endif
#endif
...
@@ -2206,7 +2206,7 @@ static int RenderCommon( filter_t *p_filter, subpicture_region_t *p_region_out,
...
@@ -2206,7 +2206,7 @@ static int RenderCommon( filter_t *p_filter, subpicture_region_t *p_region_out,
p_style
=
CreateStyle
(
p_sys
->
psz_fontfamily
,
p_style
=
CreateStyle
(
p_sys
->
psz_fontfamily
,
p_sys
->
i_font_size
,
p_sys
->
i_font_size
,
(
p_sys
->
i_font_color
&
0xffffff
)
|
(
p_sys
->
i_font_color
&
0xffffff
)
|
((
(
255
-
p_sys
->
i_font_opacity
)
&
0xff
)
<<
24
),
((
p_sys
->
i_font_opacity
&
0xff
)
<<
24
),
0x00ffffff
,
0
);
0x00ffffff
,
0
);
i_text_length
=
SetupText
(
p_filter
,
i_text_length
=
SetupText
(
p_filter
,
...
...
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