Commit a3273a58 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

d2d1: Derive bitmap options from surface description in CreateSharedBitmap().

parent 08be8fd5
......@@ -616,6 +616,7 @@ HRESULT d2d_bitmap_create_shared(struct d2d_device_context *context, REFIID iid,
{
memset(&d, 0, sizeof(d));
d.pixelFormat.format = surface_desc.Format;
d.bitmapOptions = d2d_get_bitmap_options_for_surface(surface);
}
else
{
......
......@@ -405,7 +405,10 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateSharedBitmap(ID2D1Devi
if (desc)
{
memcpy(&bitmap_desc, desc, sizeof(*desc));
bitmap_desc.bitmapOptions = D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW;
if (IsEqualIID(iid, &IID_IDXGISurface) || IsEqualIID(iid, &IID_IDXGISurface1))
bitmap_desc.bitmapOptions = d2d_get_bitmap_options_for_surface(data);
else
bitmap_desc.bitmapOptions = D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW;
bitmap_desc.colorContext = NULL;
}
......
......@@ -11772,7 +11772,6 @@ static void test_bitmap_map(BOOL d3d11)
hr = ID2D1Bitmap_QueryInterface(bitmap2, &IID_ID2D1Bitmap1, (void **)&bitmap);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
options = ID2D1Bitmap1_GetOptions(bitmap);
todo_wine
ok(options == (D2D1_BITMAP_OPTIONS_CANNOT_DRAW | D2D1_BITMAP_OPTIONS_CPU_READ),
"Unexpected options %#x.\n", options);
......
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