Commit 981db831 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

d2d1: Create GDI-compatible target bitmap for GDI-compatible target usage.

parent 612020f9
......@@ -4456,6 +4456,8 @@ HRESULT d2d_d3d_create_render_target(ID2D1Device *device, IDXGISurface *surface,
{
bitmap_desc.pixelFormat = desc->pixelFormat;
bitmap_desc.bitmapOptions = D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW;
if (desc->usage & D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE)
bitmap_desc.bitmapOptions |= D2D1_BITMAP_OPTIONS_GDI_COMPATIBLE;
bitmap_desc.colorContext = NULL;
if (FAILED(hr = ID2D1DeviceContext1_CreateBitmapFromDxgiSurface(&object->ID2D1DeviceContext1_iface,
......
......@@ -6453,10 +6453,7 @@ static void test_dxgi_surface_target_gdi_interop(BOOL d3d11)
desc.usage = D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE;
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(ctx.factory, surface, &desc, &rt);
todo_wine
ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
if (SUCCEEDED(hr))
ID2D1RenderTarget_Release(rt);
refcount = IDXGISurface_Release(surface);
ok(!refcount, "Unexpected refcount %lu.\n", refcount);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment