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
76b1f3fd
Commit
76b1f3fd
authored
May 26, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 26, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Use temporary buffers for GetGlyphs().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5625a8e5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
analyzer.c
dlls/dwrite/analyzer.c
+7
-2
dwrite_private.h
dlls/dwrite/dwrite_private.h
+1
-0
shape.c
dlls/dwrite/shape.c
+1
-1
No files found.
dlls/dwrite/analyzer.c
View file @
76b1f3fd
...
...
@@ -1173,10 +1173,11 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphs(IDWriteTextAnalyzer2 *iface,
context
.
length
=
length
;
context
.
is_rtl
=
is_rtl
;
context
.
is_sideways
=
is_sideways
;
context
.
u
.
subst
.
glyphs
=
glyphs
;
context
.
u
.
subst
.
glyph_props
=
glyph_props
;
context
.
u
.
subst
.
glyphs
=
heap_calloc
(
max_glyph_count
,
sizeof
(
*
glyphs
))
;
context
.
u
.
subst
.
glyph_props
=
heap_calloc
(
max_glyph_count
,
sizeof
(
*
glyph_props
))
;
context
.
u
.
subst
.
clustermap
=
clustermap
;
context
.
u
.
subst
.
max_glyph_count
=
max_glyph_count
;
context
.
u
.
subst
.
capacity
=
max_glyph_count
;
context
.
u
.
subst
.
digits
=
digits
;
context
.
language_tag
=
get_opentype_language
(
locale
);
context
.
user_features
.
features
=
features
;
...
...
@@ -1190,10 +1191,14 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphs(IDWriteTextAnalyzer2 *iface,
if
(
SUCCEEDED
(
hr
))
{
*
actual_glyph_count
=
context
.
glyph_count
;
memcpy
(
glyphs
,
context
.
u
.
subst
.
glyphs
,
context
.
glyph_count
*
sizeof
(
*
glyphs
));
memcpy
(
glyph_props
,
context
.
u
.
subst
.
glyph_props
,
context
.
glyph_count
*
sizeof
(
*
glyph_props
));
hr
=
default_shaping_ops
.
set_text_glyphs_props
(
&
context
,
clustermap
,
glyphs
,
*
actual_glyph_count
,
text_props
,
glyph_props
);
}
heap_free
(
context
.
u
.
subst
.
glyph_props
);
heap_free
(
context
.
u
.
subst
.
glyphs
);
heap_free
(
context
.
glyph_infos
);
return
hr
;
...
...
dlls/dwrite/dwrite_private.h
View file @
76b1f3fd
...
...
@@ -491,6 +491,7 @@ struct scriptshaping_context
DWRITE_SHAPING_GLYPH_PROPERTIES
*
glyph_props
;
UINT16
*
clustermap
;
unsigned
int
max_glyph_count
;
unsigned
int
capacity
;
const
WCHAR
*
digits
;
}
subst
;
}
u
;
...
...
dlls/dwrite/shape.c
View file @
76b1f3fd
...
...
@@ -400,5 +400,5 @@ HRESULT shape_get_glyphs(struct scriptshaping_context *context, const unsigned i
heap_free
(
features
.
features
);
return
S_OK
;
return
(
context
->
glyph_count
<=
context
->
u
.
subst
.
max_glyph_count
)
?
S_OK
:
E_NOT_SUFFICIENT_BUFFER
;
}
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