d2d1: Respond to ID2D1Image query.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
90c7e55190
commit
4e610f059d
|
@ -34,6 +34,7 @@ static HRESULT STDMETHODCALLTYPE d2d_bitmap_QueryInterface(ID2D1Bitmap *iface, R
|
|||
TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
|
||||
|
||||
if (IsEqualGUID(iid, &IID_ID2D1Bitmap)
|
||||
|| IsEqualGUID(iid, &IID_ID2D1Image)
|
||||
|| IsEqualGUID(iid, &IID_ID2D1Resource)
|
||||
|| IsEqualGUID(iid, &IID_IUnknown))
|
||||
{
|
||||
|
|
|
@ -1476,6 +1476,7 @@ static void test_bitmap_brush(void)
|
|||
IDXGISurface *surface;
|
||||
ID2D1Factory *factory;
|
||||
D2D1_COLOR_F color;
|
||||
ID2D1Image *image;
|
||||
D2D1_SIZE_U size;
|
||||
unsigned int i;
|
||||
ULONG refcount;
|
||||
|
@ -1535,6 +1536,11 @@ static void test_bitmap_brush(void)
|
|||
hr = ID2D1RenderTarget_CreateBitmap(rt, size, bitmap_data, 4 * sizeof(*bitmap_data), &bitmap_desc, &bitmap);
|
||||
ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
|
||||
|
||||
hr = ID2D1Bitmap_QueryInterface(bitmap, &IID_ID2D1Image, (void **)&image);
|
||||
ok(SUCCEEDED(hr) || broken(hr == E_NOINTERFACE) /* Vista */, "Failed to get ID2D1Image, hr %#x.\n", hr);
|
||||
if (hr == S_OK)
|
||||
ID2D1Image_Release(image);
|
||||
|
||||
/* Creating a brush with a NULL bitmap crashes on Vista, but works fine on
|
||||
* Windows 7+. */
|
||||
hr = ID2D1RenderTarget_CreateBitmapBrush(rt, bitmap, NULL, NULL, &brush);
|
||||
|
|
Loading…
Reference in New Issue