Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
74e951a7
Commit
74e951a7
authored
Dec 07, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Add flag for cached advance presence.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
68dc3d41
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
font.c
dlls/dwrite/font.c
+8
-3
No files found.
dlls/dwrite/font.c
View file @
74e951a7
...
@@ -66,6 +66,7 @@ struct cache_entry
...
@@ -66,6 +66,7 @@ struct cache_entry
struct
cache_key
key
;
struct
cache_key
key
;
float
advance
;
float
advance
;
unsigned
int
has_contours
:
1
;
unsigned
int
has_contours
:
1
;
unsigned
int
has_advance
:
1
;
};
};
static
struct
cache_entry
*
fontface_get_cache_entry
(
struct
dwrite_fontface
*
fontface
,
const
struct
cache_key
*
key
)
static
struct
cache_entry
*
fontface_get_cache_entry
(
struct
dwrite_fontface
*
fontface
,
const
struct
cache_key
*
key
)
...
@@ -97,9 +98,6 @@ static float fontface_get_glyph_advance(struct dwrite_fontface *fontface, float
...
@@ -97,9 +98,6 @@ static float fontface_get_glyph_advance(struct dwrite_fontface *fontface, float
{
{
if
(
!
(
entry
=
calloc
(
1
,
sizeof
(
*
entry
))))
if
(
!
(
entry
=
calloc
(
1
,
sizeof
(
*
entry
))))
return
0
.
0
f
;
return
0
.
0
f
;
entry
->
advance
=
font_funcs
->
get_glyph_advance
(
fontface
->
get_font_object
(
fontface
),
fontsize
,
glyph
,
mode
,
&
value
);
entry
->
has_contours
=
!!
value
;
entry
->
key
=
key
;
entry
->
key
=
key
;
size
=
fontface_get_cache_entry_size
(
entry
);
size
=
fontface_get_cache_entry_size
(
entry
);
...
@@ -123,6 +121,13 @@ static float fontface_get_glyph_advance(struct dwrite_fontface *fontface, float
...
@@ -123,6 +121,13 @@ static float fontface_get_glyph_advance(struct dwrite_fontface *fontface, float
fontface
->
cache
.
size
+=
size
;
fontface
->
cache
.
size
+=
size
;
}
}
if
(
!
entry
->
has_advance
)
{
entry
->
advance
=
font_funcs
->
get_glyph_advance
(
fontface
->
get_font_object
(
fontface
),
fontsize
,
glyph
,
mode
,
&
value
);
entry
->
has_contours
=
!!
value
;
entry
->
has_advance
=
1
;
}
*
has_contours
=
entry
->
has_contours
;
*
has_contours
=
entry
->
has_contours
;
return
entry
->
advance
;
return
entry
->
advance
;
}
}
...
...
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