<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, May 8, 2016 at 9:27 PM, Stefan Dösinger <span dir="ltr"><<a href="mailto:stefandoesinger@gmail.com" target="_blank">stefandoesinger@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA256<br>
<span class=""><br>
Am 2016-05-08 um 11:31 schrieb Aaryaman Vasishta:<br>
> +    if (!d3drm_validate_image(image))<br>
> +        return D3DRMERR_BADVALUE;<br>
</span>Is this necessary? InitFromImage does it anyway I think.<br></blockquote><div>CreateTexture doesn't leak a reference to d3drm1 if the image is invalid. Although InitFromImage does. I could probably release d3drm1 on failure of InitFromImage instead of validating the image again like this.<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="">><br>
>      if (FAILED(hr = d3drm_texture_create(&object)))<br>
>          return hr;<br>
</span>You could call the public CreateObject method here, but I don't have a strong opinion on this.<br></blockquote><div>I just felt that it'd be better than going through multiple calls just to get to d3drm_texture_create. Though the difference in performance does seem neglibile. I'll use CreateObject if you want. <br><br><br></div><div>Cheers,<br></div><div>Aaryaman<br></div></div><br></div></div>