3 Sep
2014
3 Sep
'14
11:45 a.m.
Aric Stewart <aric(a)codeweavers.com> writes:
@@ -1121,6 +1188,24 @@ static void get_font_properties(struct dwrite_font *font, HDC hdc) } }
+static HRESULT create_font_from_data(struct dwrite_font_data *data, IDWriteFont **font) +{ + HRESULT hr; + struct dwrite_font *This; + + hr = create_font_base(font); + if (FAILED(hr)) + return hr; + + This = impl_from_IDWriteFont(*font); + + heap_free(This->data); + This->data = data; + InterlockedIncrement(&This->data->ref); + + return S_OK; +}
That looks unnecessarily complicated. Why allocate and initialize the data only to immediately replace it? -- Alexandre Julliard julliard(a)winehq.org