[PATCH 2/6] d3drm: Implement IDirect3DRMTexture{2-3}_InitFromImage. (v4)

Aaryaman Vasishta jem456.vasishta at gmail.com
Wed May 11 11:03:59 CDT 2016


On Wed, May 11, 2016 at 9:13 PM, Henri Verbeet <hverbeet at gmail.com> wrote:

> On 11 May 2016 at 16:43, Aaryaman Vasishta <jem456.vasishta at gmail.com>
> wrote:
> > @@ -46,10 +46,27 @@ static inline struct d3drm_texture
> *impl_from_IDirect3DRMTexture3(IDirect3DRMTex
> >
> >  void d3drm_texture_destroy(struct d3drm_texture *texture)
> >  {
> > +    if (texture->image)
> > +        IDirect3DRM_Release(texture->d3drm);
> >
> d3drm_object_cleanup((IDirect3DRMObject*)&texture->IDirect3DRMTexture3_iface,
> &texture->obj);
> It's somewhat hypothetical, but it seems safer to release the
> IDirect3DRM interface after the d3drm_object_cleanup() call, in case
> there are callbacks that (implicitly) depend on the Direct3DRM object
> still existing. (E.g., is it possible to call
> IDirect3DRMObject2::GetDirect3DRM() on textures?)
>
Right, it makes sense once you take in future pathces in mind.
A quick test reveals that you it's possible to call
IDirect3DRMObject2::GetDirect3DRM() on textures (and probably any object
that inherits IDirect3DRMObject2) so this change does make sense for when
this interface is implemented.


I'll resent this patch as well.


Cheers,
Aaryaman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20160511/c65080b6/attachment.html>


More information about the wine-devel mailing list