[6/6] d3drm: Implement GetParent

André Hentschel nerv at dawncrow.de
Sun Jan 8 12:40:42 CST 2012


Am 08.01.2012 20:02, schrieb Nikolay Sivov:
> On 1/8/2012 20:47, André Hentschel wrote:
>> ---
>>   dlls/d3drm/frame.c       |   11 +++++++----
>>   dlls/d3drm/tests/d3drm.c |   16 ++++++++--------
>>   2 files changed, 15 insertions(+), 12 deletions(-)
>>
>> diff --git a/dlls/d3drm/frame.c b/dlls/d3drm/frame.c
>> index 212f7dd..b72700c 100644
>> --- a/dlls/d3drm/frame.c
>> +++ b/dlls/d3drm/frame.c
>> @@ -33,6 +33,7 @@ typedef struct {
>>       IDirect3DRMFrame2 IDirect3DRMFrame2_iface;
>>       IDirect3DRMFrame3 IDirect3DRMFrame3_iface;
>>       LONG ref;
>> +    LPVOID parent;
>>   } IDirect3DRMFrameImpl;
> Parent is store as another frame interface pointer, right? Why void* here?
>>
>>   static const struct IDirect3DRMFrame2Vtbl Direct3DRMFrame2_Vtbl;
>> @@ -336,9 +337,10 @@ static HRESULT WINAPI IDirect3DRMFrame2Impl_GetParent(IDirect3DRMFrame2* iface,
>>   {
>>       IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
>>
>> -    FIXME("(%p/%p)->(%p): stub\n", iface, This, frame);
>> +    TRACE("(%p/%p)->(%p)\n", iface, This, frame);
>>
>> -    return E_NOTIMPL;
>> +    *frame = This->parent;
>> +    return D3DRM_OK;
>>   }
> What looks suspicious is reference counting handling, or absence of it in other words. I'm not familiar with d3d, but this needs tests for parent refcount - is it increased when it's stored? is it properly freed? is it increased after GetParent()?
> 

true, I'll add tests in next patchset


-- 

Best Regards, André Hentschel



More information about the wine-devel mailing list