Commit 53d1bbf0 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d2d1: Implement d2d_factory_CreateDxgiSurfaceRenderTarget().

parent 089832e6
......@@ -3,6 +3,7 @@ IMPORTLIB = d2d1
IMPORTS = uuid
C_SRCS = \
factory.c
factory.c \
render_target.c
RC_SRCS = version.rc
/*
* Copyright 2014 Henri Verbeet for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __WINE_D2D1_PRIVATE_H
#define __WINE_D2D1_PRIVATE_H
#include "wine/debug.h"
#define COBJMACROS
#include "d2d1.h"
struct d2d_d3d_render_target
{
ID2D1RenderTarget ID2D1RenderTarget_iface;
LONG refcount;
};
void d2d_d3d_render_target_init(struct d2d_d3d_render_target *render_target, ID2D1Factory *factory,
IDXGISurface *surface, const D2D1_RENDER_TARGET_PROPERTIES *desc) DECLSPEC_HIDDEN;
#endif /* __WINE_D2D1_PRIVATE_H */
......@@ -18,10 +18,8 @@
#include "config.h"
#include "wine/port.h"
#include "wine/debug.h"
#define COBJMACROS
#include "d2d1.h"
#include "d2d1_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d2d);
......@@ -182,9 +180,19 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateHwndRenderTarget(ID2D1Factory
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDxgiSurfaceRenderTarget(ID2D1Factory *iface,
IDXGISurface *surface, const D2D1_RENDER_TARGET_PROPERTIES *desc, ID2D1RenderTarget **render_target)
{
FIXME("iface %p, surface %p, desc %p, render_target %p stub!\n", iface, surface, desc, render_target);
struct d2d_d3d_render_target *object;
return E_NOTIMPL;
TRACE("iface %p, surface %p, desc %p, render_target %p.\n", iface, surface, desc, render_target);
if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object))))
return E_OUTOFMEMORY;
d2d_d3d_render_target_init(object, iface, surface, desc);
TRACE("Created render target %p.\n", object);
*render_target = &object->ID2D1RenderTarget_iface;
return S_OK;
}
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDCRenderTarget(ID2D1Factory *iface,
......
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