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 2022
----- 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
2 participants
791 discussions
Start a n
N
ew thread
Alexandre Julliard : msvcrt: Move the strncpy_s() implementation to string.c.
by Alexandre Julliard
27 Jun '22
27 Jun '22
Module: wine Branch: master Commit: 3514e65f261b74beba75be49e1f9b3b292d1e69b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3514e65f261b74beba75be49…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jun 27 10:48:11 2022 +0200 msvcrt: Move the strncpy_s() implementation to string.c. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/heap.c | 38 -------------------------------------- dlls/msvcrt/string.c | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/dlls/msvcrt/heap.c b/dlls/msvcrt/heap.c index 049c4e0cd93..bf06c37e2c5 100644 --- a/dlls/msvcrt/heap.c +++ b/dlls/msvcrt/heap.c @@ -827,44 +827,6 @@ int CDECL wmemcpy_s(wchar_t *dest, size_t numberOfElements, } #endif -/********************************************************************* - * strncpy_s (MSVCRT.@) - */ -int CDECL strncpy_s(char *dest, size_t numberOfElements, - const char *src, size_t count) -{ - size_t i, end; - - TRACE("(%p %Iu %s %Iu)\n", dest, numberOfElements, debugstr_a(src), count); - - if(!count) { - if(dest && numberOfElements) - *dest = 0; - return 0; - } - - if (!MSVCRT_CHECK_PMT(dest != NULL)) return EINVAL; - if (!MSVCRT_CHECK_PMT(src != NULL)) return EINVAL; - if (!MSVCRT_CHECK_PMT(numberOfElements != 0)) return EINVAL; - - if(count!=_TRUNCATE && count<numberOfElements) - end = count; - else - end = numberOfElements-1; - - for(i=0; i<end && src[i]; i++) - dest[i] = src[i]; - - if(!src[i] || end==count || count==_TRUNCATE) { - dest[i] = '\0'; - return 0; - } - - MSVCRT_INVALID_PMT("dest[numberOfElements] is too small", EINVAL); - dest[0] = '\0'; - return EINVAL; -} - BOOL msvcrt_init_heap(void) { heap = HeapCreate(0, 0, 0); diff --git a/dlls/msvcrt/string.c b/dlls/msvcrt/string.c index 181a161481c..f0bfcbd591b 100644 --- a/dlls/msvcrt/string.c +++ b/dlls/msvcrt/string.c @@ -1268,6 +1268,44 @@ char* __cdecl strncpy(char *dst, const char *src, size_t len) return dst; } +/****************************************************************** + * strncpy_s (MSVCRT.@) + */ +int CDECL strncpy_s(char *dest, size_t numberOfElements, + const char *src, size_t count) +{ + size_t i, end; + + TRACE("(%p %Iu %s %Iu)\n", dest, numberOfElements, debugstr_a(src), count); + + if(!count) { + if(dest && numberOfElements) + *dest = 0; + return 0; + } + + if (!MSVCRT_CHECK_PMT(dest != NULL)) return EINVAL; + if (!MSVCRT_CHECK_PMT(src != NULL)) return EINVAL; + if (!MSVCRT_CHECK_PMT(numberOfElements != 0)) return EINVAL; + + if(count!=_TRUNCATE && count<numberOfElements) + end = count; + else + end = numberOfElements-1; + + for(i=0; i<end && src[i]; i++) + dest[i] = src[i]; + + if(!src[i] || end==count || count==_TRUNCATE) { + dest[i] = '\0'; + return 0; + } + + MSVCRT_INVALID_PMT("dest[numberOfElements] is too small", EINVAL); + dest[0] = '\0'; + return EINVAL; +} + /********************************************************************* * strcpy (MSVCRT.@) */
1
0
0
0
Ziqing Hui : d2d1/effect: Add a transform graph stub.
by Alexandre Julliard
27 Jun '22
27 Jun '22
Module: wine Branch: master Commit: aa7a4b7803c8fe4ddc0a24234f62aa22afbf713e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=aa7a4b7803c8fe4ddc0a2423…
Author: Ziqing Hui <zhui(a)codeweavers.com> Date: Mon Jun 27 10:11:36 2022 +0300 d2d1/effect: Add a transform graph stub. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/d2d1/d2d1_private.h | 7 +++ dlls/d2d1/effect.c | 144 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 150 insertions(+), 1 deletion(-) diff --git a/dlls/d2d1/d2d1_private.h b/dlls/d2d1/d2d1_private.h index 2e966da1520..7e74f5dd959 100644 --- a/dlls/d2d1/d2d1_private.h +++ b/dlls/d2d1/d2d1_private.h @@ -648,6 +648,12 @@ struct d2d_effect_registration struct d2d_effect_registration * d2d_factory_get_registered_effect(ID2D1Factory *factory, const GUID *effect_id) DECLSPEC_HIDDEN; +struct d2d_transform_graph +{ + ID2D1TransformGraph ID2D1TransformGraph_iface; + LONG refcount; +}; + struct d2d_effect { ID2D1Effect ID2D1Effect_iface; @@ -657,6 +663,7 @@ struct d2d_effect ID2D1EffectImpl *impl; struct d2d_effect_properties properties; struct d2d_effect_context *effect_context; + struct d2d_transform_graph *graph; ID2D1Image **inputs; size_t inputs_size; size_t input_count; diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c index 66edab36c79..7abee71e6d9 100644 --- a/dlls/d2d1/effect.c +++ b/dlls/d2d1/effect.c @@ -20,6 +20,136 @@ WINE_DEFAULT_DEBUG_CHANNEL(d2d); +static inline struct d2d_transform_graph *impl_from_ID2D1TransformGraph(ID2D1TransformGraph *iface) +{ + return CONTAINING_RECORD(iface, struct d2d_transform_graph, ID2D1TransformGraph_iface); +} + +static HRESULT STDMETHODCALLTYPE d2d_transform_graph_QueryInterface(ID2D1TransformGraph *iface, REFIID iid, void **out) +{ + TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out); + + if (IsEqualGUID(iid, &IID_ID2D1TransformGraph) + || IsEqualGUID(iid, &IID_IUnknown)) + { + ID2D1TransformGraph_AddRef(iface); + *out = iface; + return S_OK; + } + + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG STDMETHODCALLTYPE d2d_transform_graph_AddRef(ID2D1TransformGraph *iface) +{ + struct d2d_transform_graph *graph =impl_from_ID2D1TransformGraph(iface); + ULONG refcount = InterlockedIncrement(&graph->refcount); + + TRACE("%p increasing refcount to %lu.\n", iface, refcount); + + return refcount; +} + +static ULONG STDMETHODCALLTYPE d2d_transform_graph_Release(ID2D1TransformGraph *iface) +{ + struct d2d_transform_graph *graph = impl_from_ID2D1TransformGraph(iface); + ULONG refcount = InterlockedDecrement(&graph->refcount); + + TRACE("%p decreasing refcount to %lu.\n", iface, refcount); + + if (!refcount) + free(graph); + + return refcount; +} + +static UINT32 STDMETHODCALLTYPE d2d_transform_graph_GetInputCount(ID2D1TransformGraph *iface) +{ + FIXME("iface %p stub!\n", iface); + + return 0; +} + +static HRESULT STDMETHODCALLTYPE d2d_transform_graph_SetSingleTransformNode(ID2D1TransformGraph *iface, + ID2D1TransformNode *node) +{ + FIXME("iface %p, node %p stub!\n", iface, node); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d2d_transform_graph_AddNode(ID2D1TransformGraph *iface, ID2D1TransformNode *node) +{ + FIXME("iface %p, node %p stub!\n", iface, node); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d2d_transform_graph_RemoveNode(ID2D1TransformGraph *iface, ID2D1TransformNode *node) +{ + FIXME("iface %p, node %p stub!\n", iface, node); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d2d_transform_graph_SetOutputNode(ID2D1TransformGraph *iface, ID2D1TransformNode *node) +{ + FIXME("iface %p, node %p stub!\n", iface, node); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d2d_transform_graph_ConnectNode(ID2D1TransformGraph *iface, + ID2D1TransformNode *from_node, ID2D1TransformNode *to_node, UINT32 index) +{ + FIXME("iface %p, from_node %p, to_node %p, index %u stub!\n", iface, from_node, to_node, index); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d2d_transform_graph_ConnectToEffectInput(ID2D1TransformGraph *iface, + UINT32 input_index, ID2D1TransformNode *node, UINT32 node_index) +{ + FIXME("iface %p, input_index %u, node %p, node_index %u stub!\n", iface, input_index, node, node_index); + + return E_NOTIMPL; +} + +static void STDMETHODCALLTYPE d2d_transform_graph_Clear(ID2D1TransformGraph *iface) +{ + FIXME("iface %p stub!\n", iface); +} + +static HRESULT STDMETHODCALLTYPE d2d_transform_graph_SetPassthroughGraph(ID2D1TransformGraph *iface, UINT32 index) +{ + FIXME("iface %p, index %u stub!\n", iface, index); + + return E_NOTIMPL; +} + +static const ID2D1TransformGraphVtbl d2d_transform_graph_vtbl = +{ + d2d_transform_graph_QueryInterface, + d2d_transform_graph_AddRef, + d2d_transform_graph_Release, + d2d_transform_graph_GetInputCount, + d2d_transform_graph_SetSingleTransformNode, + d2d_transform_graph_AddNode, + d2d_transform_graph_RemoveNode, + d2d_transform_graph_SetOutputNode, + d2d_transform_graph_ConnectNode, + d2d_transform_graph_ConnectToEffectInput, + d2d_transform_graph_Clear, + d2d_transform_graph_SetPassthroughGraph, +}; + +static void d2d_transform_graph_init(struct d2d_transform_graph *graph) +{ + graph->ID2D1TransformGraph_iface.lpVtbl = &d2d_transform_graph_vtbl; + graph->refcount = 1; +} + static HRESULT STDMETHODCALLTYPE d2d_effect_impl_QueryInterface(ID2D1EffectImpl *iface, REFIID iid, void **out) { TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out); @@ -771,6 +901,7 @@ static void d2d_effect_cleanup(struct d2d_effect *effect) } free(effect->inputs); ID2D1EffectContext_Release(&effect->effect_context->ID2D1EffectContext_iface); + ID2D1TransformGraph_Release(&effect->graph->ID2D1TransformGraph_iface); d2d_effect_properties_cleanup(&effect->properties); if (effect->impl) ID2D1EffectImpl_Release(effect->impl); @@ -1130,6 +1261,7 @@ HRESULT d2d_effect_create(struct d2d_device_context *context, const CLSID *effec const struct d2d_effect_info *builtin = NULL; struct d2d_effect_context *effect_context; const struct d2d_effect_registration *reg; + struct d2d_transform_graph *graph; PD2D1_EFFECT_FACTORY factory; struct d2d_effect *object; WCHAR clsidW[39]; @@ -1160,8 +1292,16 @@ HRESULT d2d_effect_create(struct d2d_device_context *context, const CLSID *effec return E_OUTOFMEMORY; d2d_effect_context_init(effect_context, context); + if (!(graph = calloc(1, sizeof(*graph)))) + { + ID2D1EffectContext_Release(&effect_context->ID2D1EffectContext_iface); + return E_OUTOFMEMORY; + } + d2d_transform_graph_init(graph); + if (!(object = calloc(1, sizeof(*object)))) { + ID2D1TransformGraph_Release(&graph->ID2D1TransformGraph_iface); ID2D1EffectContext_Release(&effect_context->ID2D1EffectContext_iface); return E_OUTOFMEMORY; } @@ -1170,6 +1310,7 @@ HRESULT d2d_effect_create(struct d2d_device_context *context, const CLSID *effec object->ID2D1Image_iface.lpVtbl = &d2d_effect_image_vtbl; object->refcount = 1; object->effect_context = effect_context; + object->graph = graph; /* Create properties */ StringFromGUID2(effect_id, clsidW, ARRAY_SIZE(clsidW)); @@ -1210,7 +1351,8 @@ HRESULT d2d_effect_create(struct d2d_device_context *context, const CLSID *effec return hr; } - if (FAILED(hr = ID2D1EffectImpl_Initialize(object->impl, &effect_context->ID2D1EffectContext_iface, NULL /* FIXME */))) + if (FAILED(hr = ID2D1EffectImpl_Initialize(object->impl, &effect_context->ID2D1EffectContext_iface, + &graph->ID2D1TransformGraph_iface))) { WARN("Failed to initialize effect, hr %#lx.\n", hr); ID2D1Effect_Release(&object->ID2D1Effect_iface);
1
0
0
0
Nikolay Sivov : d2d1/tests: Enable effect context tests on Wine.
by Alexandre Julliard
27 Jun '22
27 Jun '22
Module: wine Branch: master Commit: 906b659752beab7d47066ce244e53d524e2874c4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=906b659752beab7d47066ce2…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Jun 27 01:31:28 2022 +0300 d2d1/tests: Enable effect context tests on Wine. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/d2d1/tests/d2d1.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index 9aeb41b76b1..6ba4d8cec59 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -10886,8 +10886,6 @@ static void test_effect_context(BOOL d3d11) hr = ID2D1Effect_GetValueByName(effect, L"Context", D2D1_PROPERTY_TYPE_IUNKNOWN, (BYTE *)&effect_context, sizeof(effect_context)); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - if (!strcmp(winetest_platform, "wine")) - goto done; /* Test shader loading */ loaded = ID2D1EffectContext_IsShaderLoaded(effect_context, &GUID_TestVertexShader); @@ -10920,9 +10918,7 @@ static void test_effect_context(BOOL d3d11) loaded = ID2D1EffectContext_IsShaderLoaded(effect_context, &GUID_TestPixelShader); ok(loaded, "Shader is not loaded.\n"); -done: - if (effect) - ID2D1Effect_Release(effect); + ID2D1Effect_Release(effect); hr = ID2D1Factory1_UnregisterEffect(factory, &CLSID_TestEffect); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); release_test_context(&ctx);
1
0
0
0
Nikolay Sivov : d2d1/effect: Add D2D1_PROPERTY_PRECISION property.
by Alexandre Julliard
27 Jun '22
27 Jun '22
Module: wine Branch: master Commit: 58ba801fd22ab09e7aa3d1253a0508fbe24802e3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=58ba801fd22ab09e7aa3d125…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Jun 27 01:21:31 2022 +0300 d2d1/effect: Add D2D1_PROPERTY_PRECISION property. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/d2d1/effect.c | 3 +++ dlls/d2d1/tests/d2d1.c | 10 +++------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c index 69db6747abc..66edab36c79 100644 --- a/dlls/d2d1/effect.c +++ b/dlls/d2d1/effect.c @@ -181,6 +181,7 @@ HRESULT d2d_effect_properties_add(struct d2d_effect_properties *props, const WCH switch (p->type) { case D2D1_PROPERTY_TYPE_UINT32: + case D2D1_PROPERTY_TYPE_ENUM: _uint32 = wcstoul(value, NULL, 10); src = &_uint32; break; @@ -347,6 +348,7 @@ static HRESULT d2d_effect_property_set_value(const struct d2d_effect *effect, { case D2D1_PROPERTY_TYPE_BOOL: case D2D1_PROPERTY_TYPE_UINT32: + case D2D1_PROPERTY_TYPE_ENUM: memcpy(properties->data.ptr + prop->data.offset, value, size); break; default: @@ -1199,6 +1201,7 @@ HRESULT d2d_effect_create(struct d2d_device_context *context, const CLSID *effec d2d_effect_properties_add(&object->properties, L"CLSID", D2D1_PROPERTY_CLSID, D2D1_PROPERTY_TYPE_CLSID, clsidW); d2d_effect_properties_add(&object->properties, L"Cached", D2D1_PROPERTY_CACHED, D2D1_PROPERTY_TYPE_BOOL, L"false"); + d2d_effect_properties_add(&object->properties, L"Precision", D2D1_PROPERTY_PRECISION, D2D1_PROPERTY_TYPE_ENUM, L"0"); if (FAILED(hr = factory((IUnknown **)&object->impl))) { diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index 9156afa71c5..9aeb41b76b1 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -10424,9 +10424,8 @@ static void test_effect(BOOL d3d11) hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_PRECISION, D2D1_PROPERTY_TYPE_ENUM, (BYTE *)&precision, sizeof(precision)); - todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - if (hr == S_OK) - ok(precision == D2D1_BUFFER_PRECISION_UNKNOWN, "Got unexpected precision %u.\n", precision); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + ok(precision == D2D1_BUFFER_PRECISION_UNKNOWN, "Got unexpected precision %u.\n", precision); hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_MIN_INPUTS, D2D1_PROPERTY_TYPE_UINT32, (BYTE *)&min_inputs, sizeof(min_inputs)); @@ -11032,10 +11031,8 @@ static void test_effect_properties(BOOL d3d11) hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_PRECISION, D2D1_PROPERTY_TYPE_ENUM, (BYTE *)&precision, sizeof(precision)); - todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - if (SUCCEEDED(hr)) - ok(precision == D2D1_BUFFER_PRECISION_UNKNOWN, "Got unexpected precision %#x.\n", precision); + ok(precision == D2D1_BUFFER_PRECISION_UNKNOWN, "Got unexpected precision %#x.\n", precision); hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_MIN_INPUTS, D2D1_PROPERTY_TYPE_UINT32, (BYTE *)&min_inputs, sizeof(min_inputs)); @@ -11071,7 +11068,6 @@ static void test_effect_properties(BOOL d3d11) ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = ID2D1Effect_SetValue(effect, D2D1_PROPERTY_PRECISION, D2D1_PROPERTY_TYPE_ENUM, (BYTE *)&precision, sizeof(precision)); - todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = ID2D1Effect_SetValue(effect, D2D1_PROPERTY_MIN_INPUTS, D2D1_PROPERTY_TYPE_UINT32, (BYTE *)&min_inputs, sizeof(min_inputs));
1
0
0
0
Nikolay Sivov : d2d1/effect: Use known names for automatically added properties.
by Alexandre Julliard
27 Jun '22
27 Jun '22
Module: wine Branch: master Commit: cda5f68a647f187d1de0d4c844c528d2135d047f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=cda5f68a647f187d1de0d4c8…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Jun 27 00:33:40 2022 +0300 d2d1/effect: Use known names for automatically added properties. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/d2d1/effect.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c index 672cac2a0cd..69db6747abc 100644 --- a/dlls/d2d1/effect.c +++ b/dlls/d2d1/effect.c @@ -1175,9 +1175,9 @@ HRESULT d2d_effect_create(struct d2d_device_context *context, const CLSID *effec { WCHAR max_inputs[32]; swprintf(max_inputs, ARRAY_SIZE(max_inputs), L"%lu", builtin->max_inputs); - d2d_effect_properties_add(&object->properties, L"", D2D1_PROPERTY_MIN_INPUTS, + d2d_effect_properties_add(&object->properties, L"MinInputs", D2D1_PROPERTY_MIN_INPUTS, D2D1_PROPERTY_TYPE_UINT32, L"1"); - d2d_effect_properties_add(&object->properties, L"", D2D1_PROPERTY_MAX_INPUTS, + d2d_effect_properties_add(&object->properties, L"MaxInputs", D2D1_PROPERTY_MAX_INPUTS, D2D1_PROPERTY_TYPE_UINT32, max_inputs); d2d_effect_SetInputCount(&object->ID2D1Effect_iface, builtin->default_input_count); @@ -1187,9 +1187,9 @@ HRESULT d2d_effect_create(struct d2d_device_context *context, const CLSID *effec else { d2d_effect_duplicate_properties(&object->properties, ®->properties); - d2d_effect_properties_add(&object->properties, L"", D2D1_PROPERTY_MIN_INPUTS, + d2d_effect_properties_add(&object->properties, L"MinInputs", D2D1_PROPERTY_MIN_INPUTS, D2D1_PROPERTY_TYPE_UINT32, L"1"); - d2d_effect_properties_add(&object->properties, L"", D2D1_PROPERTY_MAX_INPUTS, + d2d_effect_properties_add(&object->properties, L"MaxInputs", D2D1_PROPERTY_MAX_INPUTS, D2D1_PROPERTY_TYPE_UINT32, L"1" /* FIXME */); d2d_effect_SetInputCount(&object->ID2D1Effect_iface, 1); @@ -1197,7 +1197,7 @@ HRESULT d2d_effect_create(struct d2d_device_context *context, const CLSID *effec factory = reg->factory; } - d2d_effect_properties_add(&object->properties, L"", D2D1_PROPERTY_CLSID, D2D1_PROPERTY_TYPE_CLSID, clsidW); + d2d_effect_properties_add(&object->properties, L"CLSID", D2D1_PROPERTY_CLSID, D2D1_PROPERTY_TYPE_CLSID, clsidW); d2d_effect_properties_add(&object->properties, L"Cached", D2D1_PROPERTY_CACHED, D2D1_PROPERTY_TYPE_BOOL, L"false"); if (FAILED(hr = factory((IUnknown **)&object->impl)))
1
0
0
0
Nikolay Sivov : d2d1/effect: Use property binding methods.
by Alexandre Julliard
27 Jun '22
27 Jun '22
Module: wine Branch: master Commit: e2908463b96ab57088f202a35bd6274a047d8091 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e2908463b96ab57088f202a3…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Jun 27 00:25:02 2022 +0300 d2d1/effect: Use property binding methods. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/d2d1/effect.c | 39 ++++++++++++++++++++++++++++++++------- dlls/d2d1/tests/d2d1.c | 12 +----------- 2 files changed, 33 insertions(+), 18 deletions(-) diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c index 3e587eb7547..672cac2a0cd 100644 --- a/dlls/d2d1/effect.c +++ b/dlls/d2d1/effect.c @@ -278,11 +278,16 @@ static UINT32 d2d_effect_properties_get_value_size(const struct d2d_effect *effe const struct d2d_effect_properties *properties, UINT32 index) { struct d2d_effect_property *prop; + UINT32 size; if (!(prop = d2d_effect_properties_get_property_by_index(properties, index))) return 0; - /* FIXME: use gettter */ + if (prop->get_function) + { + if (FAILED(prop->get_function((IUnknown *)effect->impl, NULL, 0, &size))) return 0; + return size; + } return prop->size; } @@ -300,10 +305,13 @@ static HRESULT d2d_effect_property_get_value(const struct d2d_effect *effect, const struct d2d_effect_properties *properties, const struct d2d_effect_property *prop, D2D1_PROPERTY_TYPE type, BYTE *value, UINT32 size) { + UINT32 actual_size; + if (type != D2D1_PROPERTY_TYPE_UNKNOWN && prop->type != type) return E_INVALIDARG; if (prop->type != D2D1_PROPERTY_TYPE_STRING && prop->size != size) return E_INVALIDARG; - /* FIXME: use getter */ + if (prop->get_function) + return prop->get_function((IUnknown *)effect->impl, value, size, &actual_size); switch (prop->type) { @@ -321,12 +329,29 @@ static HRESULT d2d_effect_property_get_value(const struct d2d_effect *effect, return S_OK; } -static HRESULT d2d_effect_property_set_value(struct d2d_effect_property *property, +static HRESULT d2d_effect_property_set_value(const struct d2d_effect *effect, + struct d2d_effect_properties *properties, struct d2d_effect_property *prop, D2D1_PROPERTY_TYPE type, const BYTE *value, UINT32 size) { - if (property->readonly) return E_INVALIDARG; + if (prop->readonly) return E_INVALIDARG; + if (type != D2D1_PROPERTY_TYPE_UNKNOWN && prop->type != type) return E_INVALIDARG; + if (prop->get_function && !prop->set_function) return E_INVALIDARG; + if (prop->index < 0x80000000 && !prop->set_function) return E_INVALIDARG; + + if (prop->set_function) + return prop->set_function((IUnknown *)effect->impl, value, size); + + if (prop->size != size) return E_INVALIDARG; - FIXME("Unimplemented.\n"); + switch (prop->type) + { + case D2D1_PROPERTY_TYPE_BOOL: + case D2D1_PROPERTY_TYPE_UINT32: + memcpy(properties->data.ptr + prop->data.offset, value, size); + break; + default: + FIXME("Unhandled type %u.\n", prop->type); + } return S_OK; } @@ -877,7 +902,7 @@ static HRESULT STDMETHODCALLTYPE d2d_effect_SetValueByName(ID2D1Effect *iface, c if (!(prop = d2d_effect_properties_get_property_by_name(&effect->properties, name))) return D2DERR_INVALID_PROPERTY; - return d2d_effect_property_set_value(prop, type, value, value_size); + return d2d_effect_property_set_value(effect, &effect->properties, prop, type, value, value_size); } static HRESULT STDMETHODCALLTYPE d2d_effect_SetValue(ID2D1Effect *iface, UINT32 index, D2D1_PROPERTY_TYPE type, @@ -891,7 +916,7 @@ static HRESULT STDMETHODCALLTYPE d2d_effect_SetValue(ID2D1Effect *iface, UINT32 if (!(prop = d2d_effect_properties_get_property_by_index(&effect->properties, index))) return D2DERR_INVALID_PROPERTY; - return d2d_effect_property_set_value(prop, type, value, value_size); + return d2d_effect_property_set_value(effect, &effect->properties, prop, type, value, value_size); } static HRESULT STDMETHODCALLTYPE d2d_effect_GetValueByName(ID2D1Effect *iface, const WCHAR *name, diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index 9e64b1354c4..9156afa71c5 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -10818,7 +10818,6 @@ static void test_effect_register(BOOL d3d11) hr = ID2D1Effect_GetValueByName(effect, L"Context", D2D1_PROPERTY_TYPE_IUNKNOWN, (BYTE *)&effect_context, sizeof(effect_context)); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - todo_wine ok(integer == 10, "Got unexpected integer %u.\n", integer); ok(effect_context == NULL, "Got unexpected effect context %p.\n", effect_context); ID2D1Effect_Release(effect); @@ -10837,7 +10836,6 @@ static void test_effect_register(BOOL d3d11) hr = ID2D1Effect_GetValueByName(effect, L"Context", D2D1_PROPERTY_TYPE_IUNKNOWN, (BYTE *)&effect_context, sizeof(effect_context)); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - todo_wine ok(integer == 10, "Got unexpected integer %u.\n", integer); ok(effect_context == NULL, "Got unexpected effect context %p.\n", effect_context); ID2D1Effect_Release(effect); @@ -11107,31 +11105,26 @@ static void test_effect_properties(BOOL d3d11) hr = ID2D1Effect_GetValueByName(effect, L"Context", D2D1_PROPERTY_TYPE_IUNKNOWN, (BYTE *)&effect_context, sizeof(effect_context)); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - todo_wine ok(effect_context != NULL && effect_context != (ID2D1EffectContext *)0xdeadbeef, "Got unexpected effect context %p.\n", effect_context); effect_context = (ID2D1EffectContext *)0xdeadbeef; hr = ID2D1Effect_GetValue(effect, 0, D2D1_PROPERTY_TYPE_IUNKNOWN, (BYTE *)&effect_context, sizeof(effect_context)); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - todo_wine ok(effect_context != NULL && effect_context != (ID2D1EffectContext *)0xdeadbeef, "Got unexpected effect context %p.\n", effect_context); hr = ID2D1Effect_SetValue(effect, 0, D2D1_PROPERTY_TYPE_IUNKNOWN, (BYTE *)&effect_context, sizeof(effect_context)); - todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); integer = 0xdeadbeef; hr = ID2D1Effect_GetValueByName(effect, L"Integer", D2D1_PROPERTY_TYPE_UINT32, (BYTE *)&integer, sizeof(integer)); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - todo_wine ok(integer == 10, "Got unexpected integer %u.", integer); integer = 0xdeadbeef; hr = ID2D1Effect_GetValue(effect, 1, D2D1_PROPERTY_TYPE_UINT32, (BYTE *)&integer, sizeof(integer)); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - todo_wine ok(integer == 10, "Got unexpected integer %u.", integer); integer = 20; @@ -11140,8 +11133,7 @@ static void test_effect_properties(BOOL d3d11) integer = 0xdeadbeef; hr = ID2D1Effect_GetValue(effect, 1, D2D1_PROPERTY_TYPE_UINT32, (BYTE *)&integer, sizeof(integer)); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - todo_wine - ok(integer == 20, "Got unexpected integer %u.", integer); + ok(integer == 20, "Got unexpected integer %u\n.", integer); ID2D1Effect_Release(effect); hr = ID2D1Factory1_UnregisterEffect(factory, &CLSID_TestEffect); @@ -11173,10 +11165,8 @@ static void test_effect_properties(BOOL d3d11) ok(integer == 0, "Got unexpected integer %u.", integer); hr = ID2D1Effect_SetValue(effect, 0, D2D1_PROPERTY_TYPE_IUNKNOWN, (BYTE *)&effect_context, sizeof(effect_context)); - todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); hr = ID2D1Effect_SetValue(effect, 1, D2D1_PROPERTY_TYPE_UINT32, (BYTE *)&integer, sizeof(integer)); - todo_wine ok(hr == E_INVALIDARG || broken(hr == S_OK) /* win8 */, "Got unexpected hr %#lx.\n", hr); ID2D1Effect_Release(effect);
1
0
0
0
Ziqing Hui : d2d1/effect: Create implementation instance for the effect object.
by Alexandre Julliard
27 Jun '22
27 Jun '22
Module: wine Branch: master Commit: 49c801d0ed435e9de52da395fdef691726f69923 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=49c801d0ed435e9de52da395…
Author: Ziqing Hui <zhui(a)codeweavers.com> Date: Sun Jun 26 23:58:03 2022 +0300 d2d1/effect: Create implementation instance for the effect object. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/d2d1/d2d1_private.h | 1 + dlls/d2d1/effect.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) diff --git a/dlls/d2d1/d2d1_private.h b/dlls/d2d1/d2d1_private.h index e5d600ec1c9..2e966da1520 100644 --- a/dlls/d2d1/d2d1_private.h +++ b/dlls/d2d1/d2d1_private.h @@ -654,6 +654,7 @@ struct d2d_effect ID2D1Image ID2D1Image_iface; LONG refcount; + ID2D1EffectImpl *impl; struct d2d_effect_properties properties; struct d2d_effect_context *effect_context; ID2D1Image **inputs; diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c index 9085981b733..3e587eb7547 100644 --- a/dlls/d2d1/effect.c +++ b/dlls/d2d1/effect.c @@ -20,6 +20,67 @@ WINE_DEFAULT_DEBUG_CHANNEL(d2d); +static HRESULT STDMETHODCALLTYPE d2d_effect_impl_QueryInterface(ID2D1EffectImpl *iface, REFIID iid, void **out) +{ + TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out); + + if (IsEqualGUID(iid, &IID_ID2D1EffectImpl) + || IsEqualGUID(iid, &IID_IUnknown)) + { + ID2D1EffectImpl_AddRef(iface); + *out = iface; + return S_OK; + } + + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG STDMETHODCALLTYPE d2d_effect_impl_AddRef(ID2D1EffectImpl *iface) +{ + return 2; +} + +static ULONG STDMETHODCALLTYPE d2d_effect_impl_Release(ID2D1EffectImpl *iface) +{ + return 1; +} + +static HRESULT STDMETHODCALLTYPE d2d_effect_impl_Initialize(ID2D1EffectImpl *iface, + ID2D1EffectContext *context, ID2D1TransformGraph *graph) +{ + return S_OK; +} + +static HRESULT STDMETHODCALLTYPE d2d_effect_impl_PrepareForRender(ID2D1EffectImpl *iface, D2D1_CHANGE_TYPE type) +{ + return S_OK; +} + +static HRESULT STDMETHODCALLTYPE d2d_effect_impl_SetGraph(ID2D1EffectImpl *iface, ID2D1TransformGraph *graph) +{ + return E_NOTIMPL; +} + +static const ID2D1EffectImplVtbl d2d_effect_impl_vtbl = +{ + d2d_effect_impl_QueryInterface, + d2d_effect_impl_AddRef, + d2d_effect_impl_Release, + d2d_effect_impl_Initialize, + d2d_effect_impl_PrepareForRender, + d2d_effect_impl_SetGraph, +}; + +static HRESULT STDMETHODCALLTYPE builtin_factory_stub(IUnknown **effect_impl) +{ + static ID2D1EffectImpl builtin_stub = { &d2d_effect_impl_vtbl }; + + *effect_impl = (IUnknown *)&builtin_stub; + + return S_OK; +} + struct d2d_effect_info { const CLSID *clsid; @@ -684,6 +745,8 @@ static void d2d_effect_cleanup(struct d2d_effect *effect) free(effect->inputs); ID2D1EffectContext_Release(&effect->effect_context->ID2D1EffectContext_iface); d2d_effect_properties_cleanup(&effect->properties); + if (effect->impl) + ID2D1EffectImpl_Release(effect->impl); } static HRESULT STDMETHODCALLTYPE d2d_effect_QueryInterface(ID2D1Effect *iface, REFIID iid, void **out) @@ -1040,9 +1103,11 @@ HRESULT d2d_effect_create(struct d2d_device_context *context, const CLSID *effec const struct d2d_effect_info *builtin = NULL; struct d2d_effect_context *effect_context; const struct d2d_effect_registration *reg; + PD2D1_EFFECT_FACTORY factory; struct d2d_effect *object; WCHAR clsidW[39]; unsigned int i; + HRESULT hr; if (!(reg = d2d_factory_get_registered_effect(context->factory, effect_id))) { @@ -1091,6 +1156,8 @@ HRESULT d2d_effect_create(struct d2d_device_context *context, const CLSID *effec D2D1_PROPERTY_TYPE_UINT32, max_inputs); d2d_effect_SetInputCount(&object->ID2D1Effect_iface, builtin->default_input_count); + + factory = builtin_factory_stub; } else { @@ -1102,11 +1169,26 @@ HRESULT d2d_effect_create(struct d2d_device_context *context, const CLSID *effec d2d_effect_SetInputCount(&object->ID2D1Effect_iface, 1); + factory = reg->factory; } d2d_effect_properties_add(&object->properties, L"", D2D1_PROPERTY_CLSID, D2D1_PROPERTY_TYPE_CLSID, clsidW); d2d_effect_properties_add(&object->properties, L"Cached", D2D1_PROPERTY_CACHED, D2D1_PROPERTY_TYPE_BOOL, L"false"); + if (FAILED(hr = factory((IUnknown **)&object->impl))) + { + WARN("Failed to create implementation object, hr %#lx.\n", hr); + ID2D1Effect_Release(&object->ID2D1Effect_iface); + return hr; + } + + if (FAILED(hr = ID2D1EffectImpl_Initialize(object->impl, &effect_context->ID2D1EffectContext_iface, NULL /* FIXME */))) + { + WARN("Failed to initialize effect, hr %#lx.\n", hr); + ID2D1Effect_Release(&object->ID2D1Effect_iface); + return hr; + } + *effect = &object->ID2D1Effect_iface; TRACE("Created effect %p.\n", *effect);
1
0
0
0
Nikolay Sivov : d2d1/effect: Mark custom properties as writable.
by Alexandre Julliard
27 Jun '22
27 Jun '22
Module: wine Branch: master Commit: 4bb4469e43b3de442064feea68a898c11f3ff0d3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4bb4469e43b3de442064feea…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun Jun 26 23:47:10 2022 +0300 d2d1/effect: Mark custom properties as writable. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/d2d1/effect.c | 9 ++++----- dlls/d2d1/tests/d2d1.c | 4 +++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c index 72ee5dd5fb1..9085981b733 100644 --- a/dlls/d2d1/effect.c +++ b/dlls/d2d1/effect.c @@ -89,15 +89,14 @@ HRESULT d2d_effect_properties_add(struct d2d_effect_properties *props, const WCH p = &props->properties[props->count++]; p->index = index; - if (p->index < 0x80000000) props->custom_count++; - - if (index == D2D1_PROPERTY_CACHED - || index == D2D1_PROPERTY_PRECISION) + if (p->index < 0x80000000) { + props->custom_count++; + /* FIXME: this should probably be controller by subproperty */ p->readonly = FALSE; } else - p->readonly = TRUE; + p->readonly = index != D2D1_PROPERTY_CACHED && index != D2D1_PROPERTY_PRECISION; p->name = wcsdup(name); p->type = type; if (p->type == D2D1_PROPERTY_TYPE_STRING) diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index 3f152c5c2b8..9e64b1354c4 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -11119,6 +11119,7 @@ static void test_effect_properties(BOOL d3d11) "Got unexpected effect context %p.\n", effect_context); hr = ID2D1Effect_SetValue(effect, 0, D2D1_PROPERTY_TYPE_IUNKNOWN, (BYTE *)&effect_context, sizeof(effect_context)); + todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); integer = 0xdeadbeef; @@ -11135,7 +11136,6 @@ static void test_effect_properties(BOOL d3d11) integer = 20; hr = ID2D1Effect_SetValue(effect, 1, D2D1_PROPERTY_TYPE_UINT32, (BYTE *)&integer, sizeof(integer)); - todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); integer = 0xdeadbeef; hr = ID2D1Effect_GetValue(effect, 1, D2D1_PROPERTY_TYPE_UINT32, (BYTE *)&integer, sizeof(integer)); @@ -11173,8 +11173,10 @@ static void test_effect_properties(BOOL d3d11) ok(integer == 0, "Got unexpected integer %u.", integer); hr = ID2D1Effect_SetValue(effect, 0, D2D1_PROPERTY_TYPE_IUNKNOWN, (BYTE *)&effect_context, sizeof(effect_context)); + todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); hr = ID2D1Effect_SetValue(effect, 1, D2D1_PROPERTY_TYPE_UINT32, (BYTE *)&integer, sizeof(integer)); + todo_wine ok(hr == E_INVALIDARG || broken(hr == S_OK) /* win8 */, "Got unexpected hr %#lx.\n", hr); ID2D1Effect_Release(effect);
1
0
0
0
Nikolay Sivov : d2d1/effect: Implement custom effects creation.
by Alexandre Julliard
27 Jun '22
27 Jun '22
Module: wine Branch: master Commit: 9f3523c5b2a8e68b068f193524bc4fce4fcf9024 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9f3523c5b2a8e68b068f1935…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun Jun 26 22:42:45 2022 +0300 d2d1/effect: Implement custom effects creation. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/d2d1/d2d1_private.h | 25 +++++---- dlls/d2d1/effect.c | 123 +++++++++++++++++++++++++++++++++---------- dlls/d2d1/factory.c | 30 +++++++---- dlls/d2d1/tests/d2d1.c | 133 +++++++++++++++++++++++------------------------ 4 files changed, 193 insertions(+), 118 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=9f3523c5b2a8e68b068f…
1
0
0
0
Nikolay Sivov : d2d1/effect: Mark most of system properties as read-only.
by Alexandre Julliard
27 Jun '22
27 Jun '22
Module: wine Branch: master Commit: 71c23a421d2589644cf86d1181d5870599b4f454 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=71c23a421d2589644cf86d11…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun Jun 26 19:17:45 2022 +0300 d2d1/effect: Mark most of system properties as read-only. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/d2d1/d2d1_private.h | 1 + dlls/d2d1/effect.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/dlls/d2d1/d2d1_private.h b/dlls/d2d1/d2d1_private.h index 0db9dd6d360..d2cb78b9b69 100644 --- a/dlls/d2d1/d2d1_private.h +++ b/dlls/d2d1/d2d1_private.h @@ -615,6 +615,7 @@ struct d2d_effect_property WCHAR *name; D2D1_PROPERTY_TYPE type; UINT32 index; + BOOL readonly; union { size_t offset; diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c index 46e53693277..9a9cac84f5f 100644 --- a/dlls/d2d1/effect.c +++ b/dlls/d2d1/effect.c @@ -81,6 +81,14 @@ HRESULT d2d_effect_properties_add(struct d2d_effect_properties *props, const WCH p = &props->properties[props->count++]; p->index = index; if (p->index < 0x80000000) props->custom_count++; + + if (index == D2D1_PROPERTY_CACHED + || index == D2D1_PROPERTY_PRECISION) + { + p->readonly = FALSE; + } + else + p->readonly = TRUE; p->name = wcsdup(name); p->type = type; if (p->type == D2D1_PROPERTY_TYPE_STRING) @@ -213,6 +221,8 @@ static HRESULT d2d_effect_property_get_value(const struct d2d_effect *effect, static HRESULT d2d_effect_property_set_value(struct d2d_effect_property *property, D2D1_PROPERTY_TYPE type, const BYTE *value, UINT32 size) { + if (property->readonly) return E_INVALIDARG; + FIXME("Unimplemented.\n"); return S_OK;
1
0
0
0
← Newer
1
...
11
12
13
14
15
16
17
...
80
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
Results per page:
10
25
50
100
200