[PATCH] d2d1/tests: Add tests for 2D affine effect.
Henri Verbeet
hverbeet at gmail.com
Thu Sep 9 10:35:15 CDT 2021
On Fri, 3 Sept 2021 at 05:33, Ziqing Hui <zhui at codeweavers.com> wrote:
> + const DWORD image_4x4[] =
> + {
> + 0xfdcba987, 0xffff0000, 0x98765432, 0xffffffff,
> + 0x4b4b4b4b, 0x89abcdef, 0xdeadbeef, 0xabcdef01,
> + 0x7f000011, 0x40ffffff, 0x12345678, 0xaabbccdd,
> + 0x44444444, 0xff7f7f7f, 0x1221abba, 0x00000000
> + };
I think that can be static const.
> + ID2D1DeviceContext_BeginDraw(context);
> + ID2D1DeviceContext_Clear(context, 0);
> + ID2D1DeviceContext_DrawImage(context, output, NULL, NULL, 0, 0);
> + hr = ID2D1DeviceContext_EndDraw(context, NULL, NULL);
> + ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
> + get_surface_readback(&ctx, &rb);
> + colour = get_readback_colour(&rb, 0, 0);
> + todo_wine
> + ok(compare_colour(colour, test->origin_colour, 1),
> + "Got unexpected colour %#x, expected %#x.\n", colour, test->origin_colour);
> +
"rb" is never released.
I'm not sure how helpful checking only a single pixel of the result
really is. This seems like something where we'd want to use
compare_figure(), or perhaps compare_surface()/compare_sha1() if we're
careful about the transformation matrices we use. (Compare
test_bitmap_brush().)
More information about the wine-devel
mailing list