[PATCH 2/4] d2d1: Add standard properties to effect.
Ziqing Hui
zhui at codeweavers.com
Thu Jul 29 23:13:04 CDT 2021
Hi Henri,
On 7/29/21 10:50 PM, Henri Verbeet wrote:
> On Tue, 27 Jul 2021 at 13:11, Ziqing Hui <zhui at codeweavers.com> wrote:
>> @@ -572,6 +579,12 @@ struct d2d_effect
>> LONG refcount;
>>
>> ID2D1Factory *factory;
>> + CLSID clsid;
>> + BOOL cached;
>> + UINT min_inputs;
>> + UINT max_inputs;
>> + D2D1_BUFFER_PRECISION precision;
>> + struct d2d_property standard_properties[10];
>> };
>>
> I don't think the fixed-size array of an arbitrary size is great.
Should we allocate the standard_properties field by heap_alloc()
or use "struct d2d_property standard_properties[D2D1_PROPERTY_MAX_INPUTS - D2D1_PROPERTY_CLSID + 1];"
or just remove this field?
> More, if these are static properties, there's really not much of a
> point in storing them like that; we could just as well store a static
> const table, not entirely unlike the builtin_effects[] table from
> patch 1/4.
Does it means like we should use something like this:
struct d2d_effect
{
....
const struct d2d_info *info;
}
> Like patch 1/4, most of this patch is dead code.
I submit a new patch set which makes min_inputs and max_inputs "alive".
I am planning to submit a V2 version of this patch set after that patch set is accepted.
More information about the wine-devel
mailing list