mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 14:50:48 +00:00
d2d1: Derive bitmap options from surface description in CreateSharedBitmap().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
parent
08be8fd5ab
commit
a3273a585a
3 changed files with 5 additions and 2 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue