On 11 May 2016 at 16:43, Aaryaman Vasishta jem456.vasishta@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)
d3drm_object_cleanup((IDirect3DRMObject*)&texture->IDirect3DRMTexture3_iface, &texture->obj);IDirect3DRM_Release(texture->d3drm);
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?)
HeapFree(GetProcessHeap(), 0, texture);
}
+BOOL d3drm_validate_image(D3DRMIMAGE *image) +{
- if (!image
|| !image->red_mask
|| !image->green_mask
|| !image->blue_mask
|| !image->buffer1
|| !(image->rgb || (image->palette && image->palette_size)))
- {
return FALSE;
- }
- return TRUE;
+}
Like d3drm_texture_destroy(), you're not using this outside texture.c.