[PATCH 7/9] d2d1: Partially implement ID2D1Device

Nikolay Sivov bunglehead at gmail.com
Tue Nov 21 04:51:41 CST 2017


On 21.11.2017 11:41, Lucian Poston wrote:
> @@ -65,7 +82,13 @@ static void WINAPI d2d_device_GetFactory(
>          ID2D1Factory **factory)
>  {
>      struct d2d_device *This = impl_from_ID2D1Device(iface);
> -    FIXME("%p stub!\n", This);
> +
> +    TRACE("iface %p, factory %p.\n", iface, factory);
> +    if (factory == NULL)
> +        return;
> +
> +    *factory = (ID2D1Factory *)This->factory;
> +    ID2D1Factory1_AddRef(This->factory);
>  }

It's unlikely that you need this pointer check.

> 
> +void d2d_device_init(struct d2d_device *This, ID2D1Factory1 *iface, IDXGIDevice *dxgiDevice)

Please follow naming convention already used in d2d.

> +    TRACE("This %p, dxgiDevice %p\n", This, dxgiDevice);
> +    if (d2dDevice == NULL)
> +        return E_POINTER;

Same as above. Is it supposed to handle nulls?



More information about the wine-devel mailing list