[PATCH 5/7] ddraw/tests: Add test for edge antialiasing blending.

Henri Verbeet hverbeet at gmail.com
Tue Aug 9 06:50:07 CDT 2016


On 8 August 2016 at 16:52, Józef Kucia <jkucia at codeweavers.com> wrote:
> +static D3DCOLOR get_surface_color_rb(IDirectDraw7 *ddraw, IDirectDrawSurface7 *surface,
> +        unsigned int x, unsigned int y)
> +{
> +    IDirectDrawSurface7 *readback_surface;
> +    DDSURFACEDESC2 surface_desc;
> +    D3DCOLOR color;
> +    HRESULT hr;
> +
> +    memset(&surface_desc, 0, sizeof(surface_desc));
> +    surface_desc.dwSize = sizeof(surface_desc);
> +    hr = IDirectDrawSurface7_GetSurfaceDesc(surface, &surface_desc);
> +    ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
> +    surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY;
> +    hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &readback_surface, NULL);
> +    ok(SUCCEEDED(hr), "IDirectDraw7_CreateSurface failed, hr %#x.\n", hr);
> +    hr = IDirectDrawSurface_BltFast(readback_surface, 0, 0, surface, NULL, 0);
> +    ok(SUCCEEDED(hr), "IDirectDrawSurface7_BltFast failed, hr %#x.\n", hr);
> +
> +    color = get_surface_color(readback_surface, x, y);
> +
> +    IDirectDrawSurface7_Release(readback_surface);
> +
> +    return color;
> +}
What is this for?

Note that ddraw too has a D3DPRASTERCAPS_ANTIALIASEDGES cap. What
about other versions? I think at least IDirect3DDevice3 also had
D3DRENDERSTATE_EDGEANTIALIAS.



More information about the wine-devel mailing list