Nikolay Sivov (@nsivov) commented about dlls/d2d1/tests/d2d1.c:
- if (!init_test_context(&ctx, d3d11))
return;
- if (!ctx.factory1)
- {
win_skip("ID2D1Factory1 is not supported.\n");
release_test_context(&ctx);
return;
- }
- hr = ID2D1Factory1_CreateDevice(ctx.factory1, ctx.device, &device);
- ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
- hr = ID2D1Device_CreateDeviceContext(device, D2D1_DEVICE_CONTEXT_OPTIONS_NONE, &context);
- ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
I don't think you need most of that. You are not using test context here, so just create a factory, and a device context with it.