[PATCH 1/5] wined3d: Decouple private data from the resource structure (try 5).

Stefan Dösinger stefandoesinger at gmail.com
Thu Mar 6 12:40:41 CST 2014


Am 06.03.2014 um 18:58 schrieb Henri Verbeet <hverbeet at gmail.com>:

> On 6 March 2014 16:59, Stefan Dösinger <stefan at codeweavers.com> wrote:
>> +static inline HRESULT wined3d_private_store_free_private_data(struct wined3d_private_store *store, const GUID *guid)
>> +{
>> +    struct wined3d_private_data *entry;
>> +
>> +    entry = wined3d_private_store_get_private_data(store, guid);
>> +    if (!entry)
>> +        return WINED3DERR_NOTFOUND;
>> +
>> +    if (entry->flags & WINED3DSPD_IUNKNOWN)
>> +        IUnknown_Release(entry->content.object);
>> +    else
>> +        HeapFree(GetProcessHeap(), 0, entry->content.data);
>> +
>> +    list_remove(&entry->entry);
>> +    HeapFree(GetProcessHeap(), 0, entry);
>> +
>> +    return WINED3D_OK;
>> +}
> I think it would make more sense to pass this a struct
> wined3d_private_data pointer instead of a GUID.
I prefer to keep it this way. The bigger the difference between the original resource API and these helper functions is the bigger the wrapper functions in each client dll become.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20140306/d451e36d/attachment.sig>


More information about the wine-devel mailing list