Nikolay Sivov (@nsivov) commented about dlls/d2d1/tests/d2d1.c:
- ID2D1Device *device;
- ID2D1Device1 *device1;
- struct d2d1_test_context ctx;
- ID2D1Factory1 *factory1;
- ID2D1Factory2 *factory2;
- HRESULT hr;
- if (!init_test_context(&ctx, d3d11))
return;
- if (FAILED(D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory1, NULL, (void **)&factory1)))
- {
win_skip("ID2D1Factory1 is not supported.\n");
release_test_context(&ctx);
return;
- }
I understand this is copied from some existing test, but all you need here is to check ctx.factory1 and skip, without creating another factory.