mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 10:43:38 +00:00
d2d1: Create GDI-compatible target bitmap for GDI-compatible target usage.
This commit is contained in:
parent
612020f952
commit
981db8313f
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue