Nikolay Sivov : d2d1/effect: Add D2D1_PROPERTY_PRECISION property.
Alexandre Julliard
julliard at winehq.org
Mon Jun 27 16:12:52 CDT 2022
Module: wine
Branch: master
Commit: 58ba801fd22ab09e7aa3d1253a0508fbe24802e3
URL: https://source.winehq.org/git/wine.git/?a=commit;h=58ba801fd22ab09e7aa3d1253a0508fbe24802e3
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Mon Jun 27 01:21:31 2022 +0300
d2d1/effect: Add D2D1_PROPERTY_PRECISION property.
Signed-off-by: Nikolay Sivov <nsivov at 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));
More information about the wine-cvs
mailing list