mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 09:03:38 +00:00
d2d1: Create GDI-compatible swapchain only for corresponding target usage.
This commit is contained in:
parent
6526de5c5a
commit
df7e680cd2
|
@ -889,7 +889,9 @@ HRESULT d2d_hwnd_render_target_init(struct d2d_hwnd_render_target *render_target
|
|||
swapchain_desc.Windowed = TRUE;
|
||||
swapchain_desc.SwapEffect = hwnd_rt_desc->presentOptions & D2D1_PRESENT_OPTIONS_RETAIN_CONTENTS ?
|
||||
DXGI_SWAP_EFFECT_SEQUENTIAL : DXGI_SWAP_EFFECT_DISCARD;
|
||||
swapchain_desc.Flags = DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE;
|
||||
swapchain_desc.Flags = 0;
|
||||
if (desc->usage & D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE)
|
||||
swapchain_desc.Flags = DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE;
|
||||
|
||||
hr = IDXGIFactory_CreateSwapChain(dxgi_factory, (IUnknown *)d3d_device, &swapchain_desc, &render_target->swapchain);
|
||||
IDXGIFactory_Release(dxgi_factory);
|
||||
|
|
|
@ -13732,10 +13732,7 @@ static void test_hwnd_target_is_supported(BOOL d3d11)
|
|||
desc = template_desc;
|
||||
desc.pixelFormat = pixel_formats[i];
|
||||
hr = ID2D1Factory_CreateHwndRenderTarget(ctx.factory, &desc, &hwnd_rt_desc, &rt);
|
||||
todo_wine_if(i == 3 || i == 4 || i == 5)
|
||||
ok(hr == S_OK, "%u: unexpected hr %#lx.\n", i, hr);
|
||||
if (FAILED(hr))
|
||||
continue;
|
||||
|
||||
/* Resolve to default format. */
|
||||
if (desc.pixelFormat.format == DXGI_FORMAT_UNKNOWN)
|
||||
|
|
Loading…
Reference in a new issue