Commit 4e610f05 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

d2d1: Respond to ID2D1Image query.

parent 90c7e551
......@@ -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);
......
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