[PATCH 5/7] ddraw/tests: Add test for edge antialiasing blending.
Józef Kucia
joseph.kucia at gmail.com
Wed Aug 10 04:44:08 CDT 2016
On Tue, Aug 9, 2016 at 1:50 PM, Henri Verbeet <hverbeet at gmail.com> wrote:
> 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?
I should have removed this before sending the patch...
>
> Note that ddraw too has a D3DPRASTERCAPS_ANTIALIASEDGES cap. What
> about other versions? I think at least IDirect3DDevice3 also had
> D3DRENDERSTATE_EDGEANTIALIAS.
D3DRENDERSTATE_EDGEANTIALIAS was introduced in DirectX 5. Tests for
other versions are included in the version 2 of the patch.
More information about the wine-devel
mailing list