[PATCH 1/3] d3drm/tests: Add test for IDirect3DRM*::CreateDeviceFromClipper (unmodified resend).

Stefan Dösinger stefandoesinger at gmail.com
Sun Jun 28 02:04:36 CDT 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Here's something for future reference. I believe Henri mentioned the
same thing for a different place already. I don't think a resend is
necessary for this, you can fix this when you add this test for d3drm1
and d3drm3.

Am 2015-06-27 um 18:38 schrieb Aaryaman Vasishta:
> +    hr = IDirectDrawSurface_GetClipper(d3drm_primary, &d3drm_clipper);
> +    ok(hr == DD_OK, "Cannot get attached clipper from primary surface (hr = %x).\n", hr);
> +    if (SUCCEEDED(hr))
> +    {
> +        ok(d3drm_clipper == clipper, "Expected clipper returned == %p, got %p.\n", clipper , d3drm_clipper);
> +        IDirectDrawClipper_Release(d3drm_clipper);
> +    }
You don't really need the if (SUCCEEDED(hr)) here. You're
unconditionally expecting GetClipper to return a clipper in the ok()
line above. If it doesn't return one the test already failed, and
there's no need to bother about preventing follow-up failures or
crashes.

(Yeah, we have many instances in the code of things like these, e.g. if
(SUCCEEDED(hr)) after BeginScene / EndScene. They should ideally be fixe
d.)

> +    if (d3drm_primary)
> +        IDirectDrawSurface_Release(d3drm_primary);
Same thing here.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBAgAGBQJVj5yEAAoJEN0/YqbEcdMwi+oP/0uFOap9QRVWMILPN/PrupVO
g3IR6KBx+QNf/mzkOEyP6rQVbZx0UUlHlQ16v0ftziediL73qpQfRKSIxf135THH
ji6+DK0xHUvBNSz6XDSZjDky/cTtnTO0IRdRqZlL4Cd+y46GF04hwoiuIijnx1Fd
+AHurqTvEBgYepc+oEPgQRh2q/OApxUs3kMTPXzK9rPIp2SKZwpcJ8NMkYhaGMRC
FXEOq/lfaanQbgQdcPqavMgHBDCOR9xvhgSsPktUlCtltsrNJ/1INyRHHfbt8F1k
Yg5yfXdxvaThkWy5pNlAeatPZFhYzJIiyECvol7MXymHSP4zMDlF+WoG9V21fHOR
aYCA5lplQY3P7+0r0Nv7rQgtqWoo/mx6ntgm3Etl7MBKV5+ED8RNVPCWCkBV4j/y
EXWJe8RLj+a0pHIA+sTop0Yym+F00/6SPH6sJcHnqqSo1W34FFnpzH5ddV3oNst0
8fVjYNLyQwdo9k2z5DVf1ZJQk87dk3Rg6bzZpofwhOd3NEmNr1f8kMDLCYNbs5GK
jr1QdyLtFCpxoqqDu1iE2174SZgECXkDU6DJQE99BVtNs9QcIx9pqNXmHbLXXDyX
akHSKWeDQrZpMOSZI/XZxlXhhVdxeGRJGdkZmzr4H1Qpu4kHA5OgOaXBGVRIoUNg
ii/ChTzxObM40BdpuaH+
=5Y9W
-----END PGP SIGNATURE-----



More information about the wine-devel mailing list