winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
June 2020
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
947 discussions
Start a n
N
ew thread
Anton Baskanov : quartz/filtergraph: Count renderers in IMediaControl::Pause and ::Run.
by Alexandre Julliard
11 Jun '20
11 Jun '20
Module: wine Branch: master Commit: e92c851d95497fbb36000be17f78b70ee3b2bf09 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e92c851d95497fbb36000be1…
Author: Anton Baskanov <baskanov(a)gmail.com> Date: Wed Jun 10 23:09:07 2020 +0700 quartz/filtergraph: Count renderers in IMediaControl::Pause and ::Run. Some filters (e.g. MediaStreamFilter) can become renderers when they are already in the graph. Signed-off-by: Anton Baskanov <baskanov(a)gmail.com> Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/filtergraph.c | 23 +++++++++++++++++------ dlls/quartz/tests/filtergraph.c | 11 +++++++---- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index b1968069b8..0d0ccc2b62 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -691,9 +691,6 @@ static HRESULT WINAPI FilterGraph2_AddFilter(IFilterGraph2 *iface, entry->seeking = NULL; ++graph->version; - if (is_renderer(entry)) - ++graph->nRenderers; - return duplicate_name ? VFW_S_DUPLICATE_NAME : hr; } @@ -766,9 +763,6 @@ static HRESULT WINAPI FilterGraph2_RemoveFilter(IFilterGraph2 *iface, IBaseFilte hr = IBaseFilter_JoinFilterGraph(pFilter, NULL, NULL); if (SUCCEEDED(hr)) { - if (is_renderer(entry)) - --This->nRenderers; - IBaseFilter_SetSyncSource(pFilter, NULL); IBaseFilter_Release(pFilter); if (entry->seeking) @@ -5171,6 +5165,19 @@ static HRESULT WINAPI MediaFilter_Stop(IMediaFilter *iface) return hr; } +static void update_render_count(IFilterGraphImpl *graph) +{ + /* Some filters (e.g. MediaStreamFilter) can become renderers when they are + * already in the graph. */ + struct filter *filter; + graph->nRenderers = 0; + LIST_FOR_EACH_ENTRY(filter, &graph->filters, struct filter, entry) + { + if (is_renderer(filter)) + ++graph->nRenderers; + } +} + static HRESULT WINAPI MediaFilter_Pause(IMediaFilter *iface) { IFilterGraphImpl *graph = impl_from_IMediaFilter(iface); @@ -5187,6 +5194,8 @@ static HRESULT WINAPI MediaFilter_Pause(IMediaFilter *iface) return S_OK; } + update_render_count(graph); + if (graph->defaultclock && !graph->refClock) IFilterGraph2_SetDefaultSyncSource(&graph->IFilterGraph2_iface); @@ -5229,6 +5238,8 @@ static HRESULT WINAPI MediaFilter_Run(IMediaFilter *iface, REFERENCE_TIME start) } graph->EcCompleteCount = 0; + update_render_count(graph); + if (graph->defaultclock && !graph->refClock) IFilterGraph2_SetDefaultSyncSource(&graph->IFilterGraph2_iface); diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index d1c081681a..50c2402c32 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -3463,10 +3463,6 @@ static void test_ec_complete(void) testsource_init(&source_pins[2], NULL, 0); testfilter_init(&source, source_pins, 3); - filter1.IAMFilterMiscFlags_iface.lpVtbl = &testmiscflags_vtbl; - filter2.IAMFilterMiscFlags_iface.lpVtbl = &testmiscflags_vtbl; - filter1.misc_flags = filter2.misc_flags = AM_FILTER_MISC_FLAGS_IS_RENDERER; - IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control); IFilterGraph2_QueryInterface(graph, &IID_IMediaEvent, (void **)&eventsrc); IFilterGraph2_QueryInterface(graph, &IID_IMediaEventSink, (void **)&eventsink); @@ -3481,8 +3477,15 @@ static void test_ec_complete(void) /* EC_COMPLETE is only delivered to the user after all renderers deliver it. */ + filter1.IAMFilterMiscFlags_iface.lpVtbl = &testmiscflags_vtbl; + filter2.IAMFilterMiscFlags_iface.lpVtbl = &testmiscflags_vtbl; + filter3.IAMFilterMiscFlags_iface.lpVtbl = &testmiscflags_vtbl; + filter1.misc_flags = filter2.misc_flags = AM_FILTER_MISC_FLAGS_IS_RENDERER; + IMediaControl_Run(control); + filter3.misc_flags = AM_FILTER_MISC_FLAGS_IS_RENDERER; + while ((hr = IMediaEvent_GetEvent(eventsrc, &code, ¶m1, ¶m2, 0)) == S_OK) { ok(code != EC_COMPLETE, "Got unexpected EC_COMPLETE.\n");
1
0
0
0
Anton Baskanov : quartz/filtergraph: Always try to query IMediaSeeking if it's not cached yet.
by Alexandre Julliard
11 Jun '20
11 Jun '20
Module: wine Branch: master Commit: 609a832a56b0e313013b05eb5e9e609887b03544 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=609a832a56b0e313013b05eb…
Author: Anton Baskanov <baskanov(a)gmail.com> Date: Wed Jun 10 23:09:06 2020 +0700 quartz/filtergraph: Always try to query IMediaSeeking if it's not cached yet. Signed-off-by: Anton Baskanov <baskanov(a)gmail.com> Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/filtergraph.c | 33 +++++++++++++++++++++++-------- dlls/quartz/tests/filtergraph.c | 43 ++++++++++++++++++++++++++++++++++++++--- 2 files changed, 65 insertions(+), 11 deletions(-) diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index 918c41a3d6..b1968069b8 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -588,6 +588,21 @@ static BOOL has_output_pins(IBaseFilter *filter) return FALSE; } +static void update_seeking(struct filter *filter) +{ + if (!filter->seeking) + { + /* The Legend of Heroes: Trails of Cold Steel II destroys its filter when + * its IMediaSeeking interface is released, so cache the interface instead + * of querying for it every time. + * Some filters (e.g. MediaStreamFilter) can become seekable when they are + * already in the graph, so always try to query IMediaSeeking if it's not + * cached yet. */ + if (FAILED(IBaseFilter_QueryInterface(filter->filter, &IID_IMediaSeeking, (void **)&filter->seeking))) + filter->seeking = NULL; + } +} + static BOOL is_renderer(struct filter *filter) { IAMFilterMiscFlags *flags; @@ -599,8 +614,12 @@ static BOOL is_renderer(struct filter *filter) ret = TRUE; IAMFilterMiscFlags_Release(flags); } - else if (filter->seeking && !has_output_pins(filter->filter)) - ret = TRUE; + else + { + update_seeking(filter); + if (filter->seeking && !has_output_pins(filter->filter)) + ret = TRUE; + } return ret; } @@ -666,15 +685,10 @@ static HRESULT WINAPI FilterGraph2_AddFilter(IFilterGraph2 *iface, IBaseFilter_AddRef(entry->filter = filter); - /* The Legend of Heroes: Trails of Cold Steel II destroys its filter when - * its IMediaSeeking interface is released, so cache the interface instead - * of querying for it every time. */ - if (FAILED(IBaseFilter_QueryInterface(filter, &IID_IMediaSeeking, (void **)&entry->seeking))) - entry->seeking = NULL; - list_add_head(&graph->filters, &entry->entry); list_add_head(&graph->sorted_filters, &entry->sorted_entry); entry->sorting = FALSE; + entry->seeking = NULL; ++graph->version; if (is_renderer(entry)) @@ -2252,6 +2266,7 @@ static HRESULT all_renderers_seek(IFilterGraphImpl *This, fnFoundSeek FoundSeek, LIST_FOR_EACH_ENTRY(filter, &This->filters, struct filter, entry) { + update_seeking(filter); if (!filter->seeking) continue; hr = FoundSeek(This, filter->seeking, arg); @@ -2457,6 +2472,7 @@ static HRESULT WINAPI MediaSeeking_GetStopPosition(IMediaSeeking *iface, LONGLON LIST_FOR_EACH_ENTRY(filter, &graph->filters, struct filter, entry) { + update_seeking(filter); if (!filter->seeking) continue; @@ -2565,6 +2581,7 @@ static HRESULT WINAPI MediaSeeking_SetPositions(IMediaSeeking *iface, LONGLONG * { LONGLONG current = current_ptr ? *current_ptr : 0, stop = stop_ptr ? *stop_ptr : 0; + update_seeking(filter); if (!filter->seeking) continue; diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index a3378efe0b..d1c081681a 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -3619,6 +3619,17 @@ static void test_ec_complete(void) ok(filter3.ref == 1, "Got outstanding refcount %d.\n", filter3.ref); } +/* Remove and re-add the filter, to flush the graph's internal + * IMediaSeeking cache. Don't expose IMediaSeeking when adding, to show + * that it's only queried when needed. */ +static void flush_cached_seeking(IFilterGraph2 *graph, struct testfilter *filter) +{ + IFilterGraph2_RemoveFilter(graph, &filter->IBaseFilter_iface); + filter->IMediaSeeking_iface.lpVtbl = NULL; + IFilterGraph2_AddFilter(graph, &filter->IBaseFilter_iface, NULL); + filter->IMediaSeeking_iface.lpVtbl = &testseek_vtbl; +} + static void test_graph_seeking(void) { struct testfilter filter1, filter2; @@ -3659,9 +3670,6 @@ static void test_graph_seeking(void) testfilter_init(&filter1, NULL, 0); testfilter_init(&filter2, NULL, 0); - filter1.IMediaSeeking_iface.lpVtbl = &testseek_vtbl; - filter2.IMediaSeeking_iface.lpVtbl = &testseek_vtbl; - IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control); IFilterGraph2_QueryInterface(graph, &IID_IMediaSeeking, (void **)&seeking); IFilterGraph2_QueryInterface(graph, &IID_IMediaFilter, (void **)&filter); @@ -3824,6 +3832,8 @@ static void test_graph_seeking(void) IFilterGraph2_AddFilter(graph, &filter1.IBaseFilter_iface, NULL); IFilterGraph2_AddFilter(graph, &filter2.IBaseFilter_iface, NULL); + filter1.IMediaSeeking_iface.lpVtbl = &testseek_vtbl; + filter2.IMediaSeeking_iface.lpVtbl = &testseek_vtbl; filter1.seek_caps = AM_SEEKING_CanDoSegments | AM_SEEKING_CanGetCurrentPos; filter2.seek_caps = AM_SEEKING_CanDoSegments | AM_SEEKING_CanGetDuration; @@ -3833,6 +3843,9 @@ static void test_graph_seeking(void) ok(filter1.seeking_ref > 0, "Unexpected seeking refcount %d.\n", filter1.seeking_ref); ok(filter2.seeking_ref > 0, "Unexpected seeking refcount %d.\n", filter2.seeking_ref); + flush_cached_seeking(graph, &filter1); + flush_cached_seeking(graph, &filter2); + caps = AM_SEEKING_CanDoSegments | AM_SEEKING_CanGetCurrentPos; hr = IMediaSeeking_CheckCapabilities(seeking, &caps); ok(hr == S_FALSE, "Got hr %#x.\n", hr); @@ -3848,6 +3861,9 @@ static void test_graph_seeking(void) ok(hr == E_FAIL, "Got hr %#x.\n", hr); ok(!caps, "Got caps %#x.\n", caps); + flush_cached_seeking(graph, &filter1); + flush_cached_seeking(graph, &filter2); + hr = IMediaSeeking_IsFormatSupported(seeking, &testguid); ok(hr == S_FALSE, "Got hr %#x.\n", hr); @@ -3905,6 +3921,9 @@ static void test_graph_seeking(void) hr = IMediaSeeking_ConvertTimeFormat(seeking, &time, &testguid, 0x123456789a, &TIME_FORMAT_NONE); todo_wine ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + flush_cached_seeking(graph, &filter1); + flush_cached_seeking(graph, &filter2); + filter1.seek_duration = 0x12345; filter2.seek_duration = 0x23456; hr = IMediaSeeking_GetDuration(seeking, &time); @@ -3917,6 +3936,9 @@ static void test_graph_seeking(void) ok(hr == S_OK, "Got hr %#x.\n", hr); ok(time == 0x23456, "Got time %s.\n", wine_dbgstr_longlong(time)); + flush_cached_seeking(graph, &filter1); + flush_cached_seeking(graph, &filter2); + filter1.seek_stop = 0x54321; filter2.seek_stop = 0x65432; hr = IMediaSeeking_GetStopPosition(seeking, &time); @@ -3948,16 +3970,25 @@ static void test_graph_seeking(void) ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); filter1.seek_hr = filter2.seek_hr = S_OK; + flush_cached_seeking(graph, &filter1); + flush_cached_seeking(graph, &filter2); + hr = IMediaSeeking_GetCurrentPosition(seeking, &time); ok(hr == S_OK, "Got hr %#x.\n", hr); ok(!time, "Got time %s.\n", wine_dbgstr_longlong(time)); + flush_cached_seeking(graph, &filter1); + flush_cached_seeking(graph, &filter2); + current = stop = 0xdeadbeef; hr = IMediaSeeking_GetPositions(seeking, ¤t, &stop); ok(hr == S_OK, "Got hr %#x.\n", hr); ok(!current, "Got time %s.\n", wine_dbgstr_longlong(current)); ok(stop == 0x65432, "Got time %s.\n", wine_dbgstr_longlong(stop)); + flush_cached_seeking(graph, &filter1); + flush_cached_seeking(graph, &filter2); + current = 0x123; stop = 0x321; hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning, @@ -4025,6 +4056,9 @@ static void test_graph_seeking(void) ok(filter2.seek_current == 0x123, "Got time %s.\n", wine_dbgstr_longlong(filter2.seek_current)); ok(filter2.seek_stop == 0x321, "Got time %s.\n", wine_dbgstr_longlong(filter2.seek_stop)); + flush_cached_seeking(graph, &filter1); + flush_cached_seeking(graph, &filter2); + hr = IMediaSeeking_SetRate(seeking, 2.0); ok(hr == S_OK, "Got hr %#x.\n", hr); todo_wine ok(filter1.seek_rate == 2.0, "Got rate %.16e.\n", filter1.seek_rate); @@ -4040,6 +4074,9 @@ static void test_graph_seeking(void) todo_wine ok(filter1.seek_rate == -1.0, "Got rate %.16e.\n", filter1.seek_rate); todo_wine ok(filter2.seek_rate == -1.0, "Got rate %.16e.\n", filter2.seek_rate); + flush_cached_seeking(graph, &filter1); + flush_cached_seeking(graph, &filter2); + hr = IMediaSeeking_GetRate(seeking, &rate); ok(hr == S_OK, "Got hr %#x.\n", hr); todo_wine ok(rate == -1.0, "Got rate %.16e.\n", rate);
1
0
0
0
Zhiyi Zhang : winemac.drv: Set DM_POSITION and DM_DISPLAYORIENTATION when reporting registry display settings.
by Alexandre Julliard
10 Jun '20
10 Jun '20
Module: wine Branch: master Commit: 343043153b44fa46a2081fa8a2c171eac7c8dab6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=343043153b44fa46a2081fa8…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Wed Jun 3 22:28:46 2020 +0800 winemac.drv: Set DM_POSITION and DM_DISPLAYORIENTATION when reporting registry display settings. Set DM_POSITION and DM_DISPLAYORIENTATION when calling EnumDisplaySettings(ENUM_REGISTRY_SETTINGS). DM_DISPLAYFIXEDOUTPUT is not set because it is not necessarily reported according to tests. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Ken Thomases <ken(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winemac.drv/display.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/winemac.drv/display.c b/dlls/winemac.drv/display.c index 050bf05da9..1a3cc349b5 100644 --- a/dlls/winemac.drv/display.c +++ b/dlls/winemac.drv/display.c @@ -193,7 +193,9 @@ static BOOL read_registry_settings(DEVMODEW *dm) dm->dmFields |= DM_DISPLAYFLAGS; query_value("DefaultSettings.XPanning", &dm->dmPosition.x); query_value("DefaultSettings.YPanning", &dm->dmPosition.y); + dm->dmFields |= DM_POSITION; query_value("DefaultSettings.Orientation", &dm->dmDisplayOrientation); + dm->dmFields |= DM_DISPLAYORIENTATION; query_value("DefaultSettings.FixedOutput", &dm->dmDisplayFixedOutput); #undef query_value
1
0
0
0
Brendan Shanks : winemac.drv: Ensure output IDs are unique for mirrored displays.
by Alexandre Julliard
10 Jun '20
10 Jun '20
Module: wine Branch: master Commit: 988d31b696b2bdc7a0aa6fc626cd50f034dd05ec URL:
https://source.winehq.org/git/wine.git/?a=commit;h=988d31b696b2bdc7a0aa6fc6…
Author: Brendan Shanks <bshanks(a)codeweavers.com> Date: Tue Jun 2 17:46:46 2020 -0700 winemac.drv: Ensure output IDs are unique for mirrored displays. Signed-off-by: Brendan Shanks <bshanks(a)codeweavers.com> Signed-off-by: Ken Thomases <ken(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winemac.drv/display.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/winemac.drv/display.c b/dlls/winemac.drv/display.c index 5bbea22d3a..050bf05da9 100644 --- a/dlls/winemac.drv/display.c +++ b/dlls/winemac.drv/display.c @@ -1545,7 +1545,7 @@ done: * Return FALSE on failure and TRUE on success. */ static BOOL macdrv_init_monitor(HDEVINFO devinfo, const struct macdrv_monitor *monitor, int monitor_index, - int video_index, const LUID *gpu_luid) + int video_index, const LUID *gpu_luid, UINT output_id) { SP_DEVINFO_DATA device_data = {sizeof(SP_DEVINFO_DATA)}; WCHAR nameW[MAX_PATH]; @@ -1573,7 +1573,7 @@ static BOOL macdrv_init_monitor(HDEVINFO devinfo, const struct macdrv_monitor *m /* Write DEVPROPKEY_MONITOR_OUTPUT_ID */ if (!SetupDiSetDevicePropertyW(devinfo, &device_data, &DEVPROPKEY_MONITOR_OUTPUT_ID, - DEVPROP_TYPE_UINT32, (const BYTE *)&video_index, sizeof(video_index), 0)) + DEVPROP_TYPE_UINT32, (const BYTE *)&output_id, sizeof(output_id), 0)) goto done; /* Create driver key */ @@ -1685,6 +1685,7 @@ void macdrv_init_display_devices(BOOL force) WCHAR guidW[40]; WCHAR driverW[1024]; LUID gpu_luid; + UINT output_id = 0; mutex = CreateMutexW(NULL, FALSE, init_mutexW); WaitForSingleObject(mutex, INFINITE); @@ -1736,7 +1737,7 @@ void macdrv_init_display_devices(BOOL force) for (monitor = 0; monitor < monitor_count; monitor++) { TRACE("monitor: %#x %s\n", monitor, monitors[monitor].name); - if (!macdrv_init_monitor(monitor_devinfo, &monitors[monitor], monitor, video_index, &gpu_luid)) + if (!macdrv_init_monitor(monitor_devinfo, &monitors[monitor], monitor, video_index, &gpu_luid, output_id++)) goto done; }
1
0
0
0
Brendan Shanks : winex11.drv: Ensure output IDs are unique for mirrored displays.
by Alexandre Julliard
10 Jun '20
10 Jun '20
Module: wine Branch: master Commit: e3eb89d5ebb759e975698b97ed8b547a9de3853f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e3eb89d5ebb759e975698b97…
Author: Brendan Shanks <bshanks(a)codeweavers.com> Date: Tue Jun 2 17:45:25 2020 -0700 winex11.drv: Ensure output IDs are unique for mirrored displays. Signed-off-by: Brendan Shanks <bshanks(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winex11.drv/display.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/winex11.drv/display.c b/dlls/winex11.drv/display.c index cf661f9f06..4acd729962 100644 --- a/dlls/winex11.drv/display.c +++ b/dlls/winex11.drv/display.c @@ -484,7 +484,7 @@ done: } static BOOL X11DRV_InitMonitor(HDEVINFO devinfo, const struct x11drv_monitor *monitor, int monitor_index, - int video_index, const LUID *gpu_luid) + int video_index, const LUID *gpu_luid, UINT output_id) { SP_DEVINFO_DATA device_data = {sizeof(SP_DEVINFO_DATA)}; WCHAR bufferW[MAX_PATH]; @@ -509,7 +509,7 @@ static BOOL X11DRV_InitMonitor(HDEVINFO devinfo, const struct x11drv_monitor *mo /* Write DEVPROPKEY_MONITOR_OUTPUT_ID */ if (!SetupDiSetDevicePropertyW(devinfo, &device_data, &DEVPROPKEY_MONITOR_OUTPUT_ID, - DEVPROP_TYPE_UINT32, (const BYTE *)&video_index, sizeof(video_index), 0)) + DEVPROP_TYPE_UINT32, (const BYTE *)&output_id, sizeof(output_id), 0)) goto done; /* Create driver key */ @@ -614,6 +614,7 @@ void X11DRV_DisplayDevices_Init(BOOL force) WCHAR guidW[40]; WCHAR driverW[1024]; LUID gpu_luid; + UINT output_id = 0; mutex = get_display_device_init_mutex(); @@ -664,7 +665,7 @@ void X11DRV_DisplayDevices_Init(BOOL force) for (monitor = 0; monitor < monitor_count; monitor++) { TRACE("monitor: %#x %s\n", monitor, wine_dbgstr_w(monitors[monitor].name)); - if (!X11DRV_InitMonitor(monitor_devinfo, &monitors[monitor], monitor, video_index, &gpu_luid)) + if (!X11DRV_InitMonitor(monitor_devinfo, &monitors[monitor], monitor, video_index, &gpu_luid, output_id++)) goto done; }
1
0
0
0
Zhiyi Zhang : gdi32/tests: Remove tests for VidPnSourceId.
by Alexandre Julliard
10 Jun '20
10 Jun '20
Module: wine Branch: master Commit: f0ebaffc6a84cce2fccf54bb5623279e56bab9ee URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f0ebaffc6a84cce2fccf54bb…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Sun May 24 22:20:54 2020 +0800 gdi32/tests: Remove tests for VidPnSourceId. VidPnSourceId may be zero for non-primary adapters. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/tests/driver.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/dlls/gdi32/tests/driver.c b/dlls/gdi32/tests/driver.c index ed83a72813..6172d4a798 100644 --- a/dlls/gdi32/tests/driver.c +++ b/dlls/gdi32/tests/driver.c @@ -86,11 +86,6 @@ static void test_D3DKMTOpenAdapterFromGdiDisplayName(void) } ok(open_adapter_gdi_desc.hAdapter, "Expect not null.\n"); - if (display_device.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE) - ok(open_adapter_gdi_desc.VidPnSourceId == 0, "Got unexpected value %#x.\n", - open_adapter_gdi_desc.VidPnSourceId); - else - ok(open_adapter_gdi_desc.VidPnSourceId, "Got unexpected value %#x.\n", open_adapter_gdi_desc.VidPnSourceId); close_adapter_desc.hAdapter = open_adapter_gdi_desc.hAdapter; status = pD3DKMTCloseAdapter(&close_adapter_desc); @@ -135,12 +130,6 @@ static void test_D3DKMTOpenAdapterFromHdc(void) status = pD3DKMTOpenAdapterFromHdc(&open_adapter_hdc_desc); todo_wine ok(status == STATUS_SUCCESS, "Got unexpected return code %#x.\n", status); todo_wine ok(open_adapter_hdc_desc.hAdapter, "Expect not null.\n"); - if (display_device.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE) - ok(open_adapter_hdc_desc.VidPnSourceId == 0, "Got unexpected value %#x.\n", - open_adapter_hdc_desc.VidPnSourceId); - else - todo_wine ok(open_adapter_hdc_desc.VidPnSourceId, "Got unexpected value %#x.\n", - open_adapter_hdc_desc.VidPnSourceId); DeleteDC(hdc); if (status == STATUS_SUCCESS)
1
0
0
0
Jacek Caban : msvcp: Use BitScanReverse in log2i.
by Alexandre Julliard
10 Jun '20
10 Jun '20
Module: wine Branch: master Commit: 03b4bffbbbb9fbe0ea19f59662a6877867929e72 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=03b4bffbbbb9fbe0ea19f596…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Jun 10 14:22:00 2020 +0200 msvcp: Use BitScanReverse in log2i. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcp90/misc.c | 31 +++---------------------------- 1 file changed, 3 insertions(+), 28 deletions(-) diff --git a/dlls/msvcp90/misc.c b/dlls/msvcp90/misc.c index 4fb7ab24c1..563086c074 100644 --- a/dlls/msvcp90/misc.c +++ b/dlls/msvcp90/misc.c @@ -1889,37 +1889,12 @@ typedef struct compact_block int size_check; }compact_block; -/* based on wined3d_log2i from wined3d.h */ /* Return the integer base-2 logarithm of (x|1). Result is 0 for x == 0. */ static inline unsigned int log2i(unsigned int x) { -#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3))) - return __builtin_clz(x|1) ^ 0x1f; -#else - static const unsigned int l[] = - { - ~0u, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - }; - unsigned int i; - - x |= 1; - return (i = x >> 16) ? (x = i >> 8) ? l[x] + 24 : l[i] + 16 : (i = x >> 8) ? l[i] + 8 : l[x]; -#endif + unsigned int index; + BitScanReverse(&index, x|1); + return index; } /* ?_Segment_index_of@_Concurrent_vector_base_v4@details@Concurrency@@KAII@Z */
1
0
0
0
Jacek Caban : mshtml: Add IHTMLCSSStyleDeclaration2::perspective implementation.
by Alexandre Julliard
10 Jun '20
10 Jun '20
Module: wine Branch: master Commit: 3fc74752834ca063eb2f5001a2849956131a36dc URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3fc74752834ca063eb2f5001…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Jun 10 18:21:59 2020 +0200 mshtml: Add IHTMLCSSStyleDeclaration2::perspective implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/htmlstyle.c | 13 +++++++++---- dlls/mshtml/htmlstyle.h | 1 + dlls/mshtml/tests/style.c | 18 ++++++++++++++++++ 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 6df930e19a..02de13580f 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -812,6 +812,11 @@ static const style_tbl_entry_t style_tbl[] = { DISPID_IHTMLCSSSTYLEDECLARATION_PAGEBREAKBEFORE, DISPID_A_PAGEBREAKBEFORE }, + { + L"perspective", + DISPID_IHTMLCSSSTYLEDECLARATION2_PERSPECTIVE, + DISPID_UNKNOWN + }, { positionW, DISPID_IHTMLCSSSTYLEDECLARATION_POSITION, @@ -9709,15 +9714,15 @@ static HRESULT WINAPI HTMLCSSStyleDeclaration2_get_backfaceVisibility(IHTMLCSSSt static HRESULT WINAPI HTMLCSSStyleDeclaration2_put_perspective(IHTMLCSSStyleDeclaration2 *iface, VARIANT v) { CSSStyle *This = impl_from_IHTMLCSSStyleDeclaration2(iface); - FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); - return E_NOTIMPL; + TRACE("(%p)->(%s)\n", This, debugstr_variant(&v)); + return set_style_property_var(This, STYLEID_PERSPECTIVE, &v); } static HRESULT WINAPI HTMLCSSStyleDeclaration2_get_perspective(IHTMLCSSStyleDeclaration2 *iface, VARIANT *p) { CSSStyle *This = impl_from_IHTMLCSSStyleDeclaration2(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, p); + return get_style_property_var(This, STYLEID_PERSPECTIVE, p); } static HRESULT WINAPI HTMLCSSStyleDeclaration2_put_perspectiveOrigin(IHTMLCSSStyleDeclaration2 *iface, BSTR v) diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h index 8746558fde..a21dfe88d3 100644 --- a/dlls/mshtml/htmlstyle.h +++ b/dlls/mshtml/htmlstyle.h @@ -128,6 +128,7 @@ typedef enum { STYLEID_PADDING_TOP, STYLEID_PAGE_BREAK_AFTER, STYLEID_PAGE_BREAK_BEFORE, + STYLEID_PERSPECTIVE, STYLEID_POSITION, STYLEID_RIGHT, STYLEID_TABLE_LAYOUT, diff --git a/dlls/mshtml/tests/style.c b/dlls/mshtml/tests/style.c index 2ed6ef2e22..69f1e61cac 100644 --- a/dlls/mshtml/tests/style.c +++ b/dlls/mshtml/tests/style.c @@ -1088,6 +1088,24 @@ static void test_css_style_declaration2(IHTMLCSSStyleDeclaration2 *css_style) hres = IHTMLCSSStyleDeclaration2_get_columnRule(css_style, &str); ok(hres == S_OK, "get_columnRule failed: %08x\n", hres); ok(!str, "columnRule = %s\n", wine_dbgstr_w(str)); + + V_VT(&v) = VT_ERROR; + hres = IHTMLCSSStyleDeclaration2_get_perspective(css_style, &v); + ok(hres == S_OK, "get_perspective failed: %08x\n", hres); + ok(V_VT(&v) == VT_BSTR && !V_BSTR(&v), "perspective = %s\n", wine_dbgstr_variant(&v)); + VariantClear(&v); + + V_VT(&v) = VT_BSTR; + V_BSTR(&v) = SysAllocString(L"100px"); + hres = IHTMLCSSStyleDeclaration2_put_perspective(css_style, v); + ok(hres == S_OK, "put_perspective failed: %08x\n", hres); + VariantClear(&v); + + V_VT(&v) = VT_ERROR; + hres = IHTMLCSSStyleDeclaration2_get_perspective(css_style, &v); + ok(hres == S_OK, "get_perspective failed: %08x\n", hres); + ok(V_VT(&v) == VT_BSTR && V_BSTR(&v) && !lstrcmpW(V_BSTR(&v), L"100px"), "perspective = %s\n", wine_dbgstr_variant(&v)); + VariantClear(&v); } static void test_body_style(IHTMLStyle *style)
1
0
0
0
Nikolay Sivov : dwrite: Share same cluster for bases and following diacritics in initial map.
by Alexandre Julliard
10 Jun '20
10 Jun '20
Module: wine Branch: master Commit: 796f34e81f62124ffb5b03c64ef63f9d4bae90d7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=796f34e81f62124ffb5b03c6…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Jun 10 17:21:33 2020 +0300 dwrite: Share same cluster for bases and following diacritics in initial map. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/opentype.c | 26 ++++++++++++++++++++++---- dlls/dwrite/tests/layout.c | 16 ++++++---------- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/dlls/dwrite/opentype.c b/dlls/dwrite/opentype.c index 1f0174ad72..72cc6f4c93 100644 --- a/dlls/dwrite/opentype.c +++ b/dlls/dwrite/opentype.c @@ -5834,13 +5834,23 @@ static unsigned int opentype_is_default_ignorable(unsigned int codepoint) (codepoint >= 0x180b && codepoint <= 0x180e) || (codepoint >= 0x200b && codepoint <= 0x200f); } +static unsigned int opentype_is_diacritic(unsigned int codepoint) +{ + WCHAR ch = codepoint; + WORD type = 0; + /* Ignore higher planes for now. */ + if (codepoint > 0xffff) return 0; + GetStringTypeW(CT_CTYPE3, &ch, 1, &type); + return !!(type & C3_DIACRITIC); +} + static void opentype_get_nominal_glyphs(struct scriptshaping_context *context, const struct shaping_features *features) { unsigned int rtlm_mask = shaping_features_get_mask(features, DWRITE_MAKE_OPENTYPE_TAG('r','t','l','m'), NULL); const struct shaping_font_ops *font = context->cache->font; + unsigned int i, g, c, codepoint, cluster_start_idx = 0; UINT16 *clustermap = context->u.subst.clustermap; const WCHAR *text = context->text; - unsigned int i, g, c, codepoint; BOOL bmp; memset(context->u.subst.glyph_props, 0, context->u.subst.max_glyph_count * sizeof(*context->u.subst.glyph_props)); @@ -5873,17 +5883,25 @@ static void opentype_get_nominal_glyphs(struct scriptshaping_context *context, c context->u.buffer.glyphs[g] = font->get_glyph(context->cache->context, codepoint); context->u.buffer.glyph_props[g].justification = SCRIPT_JUSTIFY_CHARACTER; - context->u.buffer.glyph_props[g].isClusterStart = 1; opentype_set_subst_glyph_props(context, g); + + /* Group diacritics with preceding base. Glyph class is ignored here. */ + if (!g || !opentype_is_diacritic(codepoint)) + { + context->u.buffer.glyph_props[g].isClusterStart = 1; + cluster_start_idx = g; + } + if (opentype_is_default_ignorable(codepoint)) context->u.buffer.glyph_props[g].isZeroWidthSpace = 1; context->u.buffer.glyph_props[g].components = 1; context->glyph_count++; - clustermap[i] = i; + /* Set initial cluster map here, it's used for setting user features masks. */ + clustermap[i] = cluster_start_idx; if (!bmp) { - clustermap[i + 1] = i; + clustermap[i + 1] = cluster_start_idx; ++i; } } diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c index d19f91311d..2e309f14b7 100644 --- a/dlls/dwrite/tests/layout.c +++ b/dlls/dwrite/tests/layout.c @@ -2630,13 +2630,11 @@ if (0) { /* crashes on native */ count = 0; hr = IDWriteTextLayout1_GetClusterMetrics(layout1, clusters, 4, &count); ok(hr == S_OK, "got 0x%08x\n", hr); -todo_wine - ok(count == 3, "got %u\n", count); -if (count == 3) { + ok(count == 3, "Unexpected cluster count %u.\n", count); ok(clusters[0].length == 1, "got %u\n", clusters[0].length); ok(clusters[1].length == 2, "got %u\n", clusters[1].length); ok(clusters[2].length == 1, "got %u\n", clusters[2].length); -} + /* pair kerning flag participates in itemization - combining characters breaks */ range.startPosition = 0; @@ -5235,9 +5233,8 @@ static void test_SetUnderline(void) count = 0; hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, ARRAY_SIZE(clusters), &count); - ok(hr == S_OK, "got 0x%08x\n", hr); -todo_wine - ok(count == 3, "got %u\n", count); + ok(hr == S_OK, "Failed to get cluster metrics, hr %#x.\n", hr); + ok(count == 3, "Unexpected cluster count %u.\n", count); range.startPosition = 0; range.length = 2; @@ -5246,9 +5243,8 @@ todo_wine count = 0; hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, ARRAY_SIZE(clusters), &count); - ok(hr == S_OK, "got 0x%08x\n", hr); -todo_wine - ok(count == 3, "got %u\n", count); + ok(hr == S_OK, "Failed to get cluster metrics, hr %#x.\n", hr); + ok(count == 3, "Unexpected cluster count %u.\n", count); flush_sequence(sequences, RENDERER_ID); hr = IDWriteTextLayout_Draw(layout, NULL, &testrenderer, 0.0, 0.0);
1
0
0
0
Nikolay Sivov : dwrite: Fix CreateInMemoryFontFileLoader() prototype.
by Alexandre Julliard
10 Jun '20
10 Jun '20
Module: wine Branch: master Commit: 8cddbdd78592ed9518cf08461323a48019c43948 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8cddbdd78592ed9518cf0846…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Jun 10 17:21:32 2020 +0300 dwrite: Fix CreateInMemoryFontFileLoader() prototype. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/dwrite_private.h | 2 +- dlls/dwrite/font.c | 4 ++-- dlls/dwrite/main.c | 3 ++- dlls/dwrite/tests/font.c | 20 ++++++++------------ include/dwrite_3.idl | 2 +- 5 files changed, 14 insertions(+), 17 deletions(-) diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index e53b4dba0b..38863b85bd 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -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(IDWriteFontFileLoader**) DECLSPEC_HIDDEN; +extern HRESULT create_inmemory_fileloader(IDWriteInMemoryFontFileLoader **loader) DECLSPEC_HIDDEN; extern HRESULT create_font_resource(IDWriteFactory7 *factory, IDWriteFontFile *file, UINT32 face_index, IDWriteFontResource **resource) DECLSPEC_HIDDEN; diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index d8d892c9ef..baee8d1e49 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -6832,7 +6832,7 @@ static const IDWriteInMemoryFontFileLoaderVtbl inmemoryfontfileloadervtbl = inmemoryfontfileloader_GetFileCount, }; -HRESULT create_inmemory_fileloader(IDWriteFontFileLoader **ret) +HRESULT create_inmemory_fileloader(IDWriteInMemoryFontFileLoader **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; } diff --git a/dlls/dwrite/main.c b/dlls/dwrite/main.c index b940d0d801..a96874b2c2 100644 --- a/dlls/dwrite/main.c +++ b/dlls/dwrite/main.c @@ -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); diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c index f8abbf9e4b..07baf112ee 100644 --- a/dlls/dwrite/tests/font.c +++ b/dlls/dwrite/tests/font.c @@ -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; + IDWriteInMemoryFontFileLoader *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); + IDWriteInMemoryFontFileLoader_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, &fileloader); 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(fileloader, key, key_size, &stream); ok(hr == S_OK, "got %#x\n", hr); - IDWriteFontFileLoader_Release(loader); + IDWriteFontFileLoader_Release(fileloader); 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); diff --git a/include/dwrite_3.idl b/include/dwrite_3.idl index 54d204f39f..f5ee6157cd 100644 --- a/include/dwrite_3.idl +++ b/include/dwrite_3.idl @@ -923,7 +923,7 @@ interface IDWriteInMemoryFontFileLoader : IDWriteFontFileLoader interface IDWriteFactory5 : IDWriteFactory4 { HRESULT CreateFontSetBuilder(IDWriteFontSetBuilder1 **fontset_builder); - HRESULT CreateInMemoryFontFileLoader(IDWriteFontFileLoader **loader); + HRESULT CreateInMemoryFontFileLoader(IDWriteInMemoryFontFileLoader **loader); HRESULT CreateHttpFontFileLoader( WCHAR const *referrer_url, WCHAR const *extra_headers,
1
0
0
0
← Newer
1
...
51
52
53
54
55
56
57
...
95
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
Results per page:
10
25
50
100
200