Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
8cddbdd7
Commit
8cddbdd7
authored
Jun 10, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Fix CreateInMemoryFontFileLoader() prototype.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f51d0487
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
17 deletions
+14
-17
dwrite_private.h
dlls/dwrite/dwrite_private.h
+1
-1
font.c
dlls/dwrite/font.c
+2
-2
main.c
dlls/dwrite/main.c
+2
-1
font.c
dlls/dwrite/tests/font.c
+8
-12
dwrite_3.idl
include/dwrite_3.idl
+1
-1
No files found.
dlls/dwrite/dwrite_private.h
View file @
8cddbdd7
...
...
@@ -343,7 +343,7 @@ extern HRESULT create_gdiinterop(IDWriteFactory7 *factory, IDWriteGdiInterop1 **
extern
void
fontface_detach_from_cache
(
IDWriteFontFace5
*
fontface
)
DECLSPEC_HIDDEN
;
extern
void
factory_lock
(
IDWriteFactory7
*
factory
)
DECLSPEC_HIDDEN
;
extern
void
factory_unlock
(
IDWriteFactory7
*
factory
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_inmemory_fileloader
(
IDWrite
FontFileLoader
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_inmemory_fileloader
(
IDWrite
InMemoryFontFileLoader
**
loader
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_font_resource
(
IDWriteFactory7
*
factory
,
IDWriteFontFile
*
file
,
UINT32
face_index
,
IDWriteFontResource
**
resource
)
DECLSPEC_HIDDEN
;
...
...
dlls/dwrite/font.c
View file @
8cddbdd7
...
...
@@ -6832,7 +6832,7 @@ static const IDWriteInMemoryFontFileLoaderVtbl inmemoryfontfileloadervtbl =
inmemoryfontfileloader_GetFileCount
,
};
HRESULT
create_inmemory_fileloader
(
IDWriteFontFileLoader
**
ret
)
HRESULT
create_inmemory_fileloader
(
IDWrite
InMemory
FontFileLoader
**
ret
)
{
struct
dwrite_inmemory_fileloader
*
loader
;
...
...
@@ -6845,7 +6845,7 @@ HRESULT create_inmemory_fileloader(IDWriteFontFileLoader **ret)
loader
->
IDWriteInMemoryFontFileLoader_iface
.
lpVtbl
=
&
inmemoryfontfileloadervtbl
;
loader
->
ref
=
1
;
*
ret
=
(
IDWriteFontFileLoader
*
)
&
loader
->
IDWriteInMemoryFontFileLoader_iface
;
*
ret
=
&
loader
->
IDWriteInMemoryFontFileLoader_iface
;
return
S_OK
;
}
...
...
dlls/dwrite/main.c
View file @
8cddbdd7
...
...
@@ -1627,7 +1627,8 @@ static HRESULT WINAPI dwritefactory5_CreateFontSetBuilder(IDWriteFactory7 *iface
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
dwritefactory5_CreateInMemoryFontFileLoader
(
IDWriteFactory7
*
iface
,
IDWriteFontFileLoader
**
loader
)
static
HRESULT
WINAPI
dwritefactory5_CreateInMemoryFontFileLoader
(
IDWriteFactory7
*
iface
,
IDWriteInMemoryFontFileLoader
**
loader
)
{
TRACE
(
"%p, %p.
\n
"
,
iface
,
loader
);
...
...
dlls/dwrite/tests/font.c
View file @
8cddbdd7
...
...
@@ -8696,8 +8696,9 @@ static void testowner_init(struct testowner_object *object)
static
void
test_inmemory_file_loader
(
void
)
{
IDWriteFontFileStream
*
stream
,
*
stream2
,
*
stream3
;
IDWriteFontFileLoader
*
loader
,
*
loader2
;
IDWrite
InMemory
FontFileLoader
*
loader
,
*
loader2
;
IDWriteInMemoryFontFileLoader
*
inmemory
;
IDWriteFontFileLoader
*
fileloader
;
struct
testowner_object
ownerobject
;
const
void
*
key
,
*
data
,
*
frag_start
;
UINT64
file_size
,
size
,
writetime
;
...
...
@@ -8727,12 +8728,9 @@ static void test_inmemory_file_loader(void)
hr
=
IDWriteFactory5_CreateInMemoryFontFileLoader
(
factory
,
&
loader2
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
ok
(
loader
!=
loader2
,
"unexpected pointer
\n
"
);
IDWriteFontFileLoader_Release
(
loader2
);
IDWrite
InMemory
FontFileLoader_Release
(
loader2
);
hr
=
IDWriteFontFileLoader_QueryInterface
(
loader
,
&
IID_IDWriteInMemoryFontFileLoader
,
(
void
**
)
&
inmemory
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
IDWriteFontFileLoader_Release
(
loader
);
EXPECT_REF
(
inmemory
,
1
);
inmemory
=
loader
;
count
=
IDWriteInMemoryFontFileLoader_GetFileCount
(
inmemory
);
ok
(
!
count
,
"Unexpected file count %u.
\n
"
,
count
);
...
...
@@ -8742,15 +8740,15 @@ static void test_inmemory_file_loader(void)
hr
=
IDWriteFontFace_GetFiles
(
fontface
,
&
count
,
&
file
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
hr
=
IDWriteFontFile_GetLoader
(
file
,
&
loader
);
hr
=
IDWriteFontFile_GetLoader
(
file
,
&
file
loader
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
hr
=
IDWriteFontFile_GetReferenceKey
(
file
,
&
key
,
&
key_size
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
hr
=
IDWriteFontFileLoader_CreateStreamFromKey
(
loader
,
key
,
key_size
,
&
stream
);
hr
=
IDWriteFontFileLoader_CreateStreamFromKey
(
file
loader
,
key
,
key_size
,
&
stream
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
IDWriteFontFileLoader_Release
(
loader
);
IDWriteFontFileLoader_Release
(
file
loader
);
IDWriteFontFile_Release
(
file
);
hr
=
IDWriteFontFileStream_GetFileSize
(
stream
,
&
file_size
);
...
...
@@ -8848,9 +8846,7 @@ static void test_inmemory_file_loader(void)
hr
=
IDWriteFactory5_CreateInMemoryFontFileLoader
(
factory
,
&
loader
);
ok
(
hr
==
S_OK
,
"Failed to create loader, hr %#x.
\n
"
,
hr
);
hr
=
IDWriteFontFileLoader_QueryInterface
(
loader
,
&
IID_IDWriteInMemoryFontFileLoader
,
(
void
**
)
&
inmemory
);
ok
(
hr
==
S_OK
,
"Failed to get in-memory interface, hr %#x.
\n
"
,
hr
);
IDWriteFontFileLoader_Release
(
loader
);
inmemory
=
loader
;
hr
=
IDWriteFactory5_RegisterFontFileLoader
(
factory
,
(
IDWriteFontFileLoader
*
)
inmemory
);
ok
(
hr
==
S_OK
,
"Failed to register loader, hr %#x.
\n
"
,
hr
);
...
...
include/dwrite_3.idl
View file @
8cddbdd7
...
...
@@ -923,7 +923,7 @@ interface IDWriteInMemoryFontFileLoader : IDWriteFontFileLoader
interface
IDWriteFactory5
:
IDWriteFactory4
{
HRESULT
CreateFontSetBuilder
(
IDWriteFontSetBuilder1
**
fontset_builder
)
;
HRESULT
CreateInMemoryFontFileLoader
(
IDWriteFontFileLoader
**
loader
)
;
HRESULT
CreateInMemoryFontFileLoader
(
IDWrite
InMemory
FontFileLoader
**
loader
)
;
HRESULT
CreateHttpFontFileLoader
(
WCHAR
const
*
referrer_url
,
WCHAR
const
*
extra_headers
,
...
...
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