Commit 43ce2bf5 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

d2d1/effect: Use effect property types identifier directly in initializers.

parent aa2aa203
......@@ -361,25 +361,25 @@ static HRESULT d2d_effect_properties_internal_add(struct d2d_effect_properties *
{
static const UINT32 sizes[] =
{
0, /* D2D1_PROPERTY_TYPE_UNKNOWN */
0, /* D2D1_PROPERTY_TYPE_STRING */
sizeof(BOOL), /* D2D1_PROPERTY_TYPE_BOOL */
sizeof(UINT32), /* D2D1_PROPERTY_TYPE_UINT32 */
sizeof(INT32), /* D2D1_PROPERTY_TYPE_INT32 */
sizeof(float), /* D2D1_PROPERTY_TYPE_FLOAT */
2 * sizeof(float), /* D2D1_PROPERTY_TYPE_VECTOR2 */
3 * sizeof(float), /* D2D1_PROPERTY_TYPE_VECTOR3 */
4 * sizeof(float), /* D2D1_PROPERTY_TYPE_VECTOR4 */
0, /* FIXME: D2D1_PROPERTY_TYPE_BLOB */
sizeof(void *), /* D2D1_PROPERTY_TYPE_IUNKNOWN */
sizeof(UINT32), /* D2D1_PROPERTY_TYPE_ENUM */
sizeof(UINT32), /* D2D1_PROPERTY_TYPE_ARRAY */
sizeof(CLSID), /* D2D1_PROPERTY_TYPE_CLSID */
6 * sizeof(float), /* D2D1_PROPERTY_TYPE_MATRIX_3X2 */
12 * sizeof(float), /* D2D1_PROPERTY_TYPE_MATRIX_4X3 */
16 * sizeof(float), /* D2D1_PROPERTY_TYPE_MATRIX_4X4 */
20 * sizeof(float), /* D2D1_PROPERTY_TYPE_MATRIX_5X4 */
sizeof(void *), /* D2D1_PROPERTY_TYPE_COLOR_CONTEXT */
[D2D1_PROPERTY_TYPE_UNKNOWN] = 0,
[D2D1_PROPERTY_TYPE_STRING] = 0,
[D2D1_PROPERTY_TYPE_BOOL] = sizeof(BOOL),
[D2D1_PROPERTY_TYPE_UINT32] = sizeof(UINT32),
[D2D1_PROPERTY_TYPE_INT32] = sizeof(INT32),
[D2D1_PROPERTY_TYPE_FLOAT] = sizeof(float),
[D2D1_PROPERTY_TYPE_VECTOR2] = sizeof(D2D_VECTOR_2F),
[D2D1_PROPERTY_TYPE_VECTOR3] = sizeof(D2D_VECTOR_3F),
[D2D1_PROPERTY_TYPE_VECTOR4] = sizeof(D2D_VECTOR_4F),
[D2D1_PROPERTY_TYPE_BLOB] = 0 /* FIXME */,
[D2D1_PROPERTY_TYPE_IUNKNOWN] = sizeof(IUnknown *),
[D2D1_PROPERTY_TYPE_ENUM] = sizeof(UINT32),
[D2D1_PROPERTY_TYPE_ARRAY] = sizeof(UINT32),
[D2D1_PROPERTY_TYPE_CLSID] = sizeof(CLSID),
[D2D1_PROPERTY_TYPE_MATRIX_3X2] = sizeof(D2D_MATRIX_3X2_F),
[D2D1_PROPERTY_TYPE_MATRIX_4X3] = sizeof(D2D_MATRIX_4X3_F),
[D2D1_PROPERTY_TYPE_MATRIX_4X4] = sizeof(D2D_MATRIX_4X4_F),
[D2D1_PROPERTY_TYPE_MATRIX_5X4] = sizeof(D2D_MATRIX_5X4_F),
[D2D1_PROPERTY_TYPE_COLOR_CONTEXT] = sizeof(ID2D1ColorContext *),
};
struct d2d_effect_property *p;
HRESULT hr;
......
......@@ -677,25 +677,25 @@ static HRESULT parse_effect_get_property_type(IXmlReader *reader, D2D1_PROPERTY_
{
static const WCHAR *types[] =
{
L"", /* D2D1_PROPERTY_TYPE_UNKNOWN */
L"string", /* D2D1_PROPERTY_TYPE_STRING */
L"bool", /* D2D1_PROPERTY_TYPE_BOOL */
L"uint32", /* D2D1_PROPERTY_TYPE_UINT32 */
L"int32", /* D2D1_PROPERTY_TYPE_INT32 */
L"float", /* D2D1_PROPERTY_TYPE_FLOAT */
L"vector2", /* D2D1_PROPERTY_TYPE_VECTOR2 */
L"vector3", /* D2D1_PROPERTY_TYPE_VECTOR3 */
L"vector4", /* D2D1_PROPERTY_TYPE_VECTOR4 */
L"blob", /* D2D1_PROPERTY_TYPE_BLOB */
L"iunknown", /* D2D1_PROPERTY_TYPE_IUNKNOWN */
L"enum", /* D2D1_PROPERTY_TYPE_ENUM */
L"array", /* D2D1_PROPERTY_TYPE_ARRAY */
L"clsid", /* D2D1_PROPERTY_TYPE_CLSID */
L"matrix3x2", /* D2D1_PROPERTY_TYPE_MATRIX_3X2 */
L"matrix4x3", /* D2D1_PROPERTY_TYPE_MATRIX_4X3 */
L"matrix4x4", /* D2D1_PROPERTY_TYPE_MATRIX_4X4 */
L"matrix5x4", /* D2D1_PROPERTY_TYPE_MATRIX_5X4 */
L"colorcontext", /* D2D1_PROPERTY_TYPE_COLOR_CONTEXT */
[D2D1_PROPERTY_TYPE_UNKNOWN] = L"",
[D2D1_PROPERTY_TYPE_STRING] = L"string",
[D2D1_PROPERTY_TYPE_BOOL] = L"bool",
[D2D1_PROPERTY_TYPE_UINT32] = L"uint32",
[D2D1_PROPERTY_TYPE_INT32] = L"int32",
[D2D1_PROPERTY_TYPE_FLOAT] = L"float",
[D2D1_PROPERTY_TYPE_VECTOR2] = L"vector2",
[D2D1_PROPERTY_TYPE_VECTOR3] = L"vector3",
[D2D1_PROPERTY_TYPE_VECTOR4] = L"vector4",
[D2D1_PROPERTY_TYPE_BLOB] = L"blob",
[D2D1_PROPERTY_TYPE_IUNKNOWN] = L"iunknown",
[D2D1_PROPERTY_TYPE_ENUM] = L"enum",
[D2D1_PROPERTY_TYPE_ARRAY] = L"array",
[D2D1_PROPERTY_TYPE_CLSID] = L"clsid",
[D2D1_PROPERTY_TYPE_MATRIX_3X2] = L"matrix3x2",
[D2D1_PROPERTY_TYPE_MATRIX_4X3] = L"matrix4x3",
[D2D1_PROPERTY_TYPE_MATRIX_4X4] = L"matrix4x4",
[D2D1_PROPERTY_TYPE_MATRIX_5X4] = L"matrix5x4",
[D2D1_PROPERTY_TYPE_COLOR_CONTEXT] = L"colorcontext",
};
unsigned int i;
WCHAR *value;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment