d2d1: Add ID2D1DeviceContext stub.
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
e7949902c5
commit
31cbe190f7
|
@ -337,7 +337,7 @@ HRESULT d2d_bitmap_create(ID2D1Factory *factory, ID3D10Device *device, D2D1_SIZE
|
|||
return *bitmap ? S_OK : E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
HRESULT d2d_bitmap_create_shared(ID2D1RenderTarget *render_target, ID3D10Device *target_device,
|
||||
HRESULT d2d_bitmap_create_shared(ID2D1DeviceContext *context, ID3D10Device *target_device,
|
||||
REFIID iid, void *data, const D2D1_BITMAP_PROPERTIES *desc, struct d2d_bitmap **bitmap)
|
||||
{
|
||||
D2D1_BITMAP_PROPERTIES d;
|
||||
|
@ -349,7 +349,7 @@ HRESULT d2d_bitmap_create_shared(ID2D1RenderTarget *render_target, ID3D10Device
|
|||
ID3D10Device *device;
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
ID2D1RenderTarget_GetFactory(render_target, &factory);
|
||||
ID2D1DeviceContext_GetFactory(context, &factory);
|
||||
if (src_impl->factory != factory)
|
||||
{
|
||||
hr = D2DERR_WRONG_FACTORY;
|
||||
|
@ -437,7 +437,7 @@ HRESULT d2d_bitmap_create_shared(ID2D1RenderTarget *render_target, ID3D10Device
|
|||
{
|
||||
float dpi_x, dpi_y;
|
||||
|
||||
ID2D1RenderTarget_GetDpi(render_target, &dpi_x, &dpi_y);
|
||||
ID2D1DeviceContext_GetDpi(context, &dpi_x, &dpi_y);
|
||||
if (d.dpiX == 0.0f)
|
||||
d.dpiX = dpi_x;
|
||||
if (d.dpiY == 0.0f)
|
||||
|
@ -454,7 +454,7 @@ HRESULT d2d_bitmap_create_shared(ID2D1RenderTarget *render_target, ID3D10Device
|
|||
pixel_size.width = surface_desc.Width;
|
||||
pixel_size.height = surface_desc.Height;
|
||||
|
||||
ID2D1RenderTarget_GetFactory(render_target, &factory);
|
||||
ID2D1DeviceContext_GetFactory(context, &factory);
|
||||
d2d_bitmap_init(*bitmap, factory, view, pixel_size, &d);
|
||||
ID3D10ShaderResourceView_Release(view);
|
||||
ID2D1Factory_Release(factory);
|
||||
|
|
|
@ -728,7 +728,7 @@ static const struct ID2D1BitmapRenderTargetVtbl d2d_bitmap_render_target_vtbl =
|
|||
};
|
||||
|
||||
HRESULT d2d_bitmap_render_target_init(struct d2d_bitmap_render_target *render_target,
|
||||
const struct d2d_d3d_render_target *parent_target, const D2D1_SIZE_F *size,
|
||||
const struct d2d_device_context *parent_target, const D2D1_SIZE_F *size,
|
||||
const D2D1_SIZE_U *pixel_size, const D2D1_PIXEL_FORMAT *pixel_format,
|
||||
D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS options)
|
||||
{
|
||||
|
|
|
@ -1087,7 +1087,7 @@ static D3D10_TEXTURE_ADDRESS_MODE texture_address_mode_from_extend_mode(D2D1_EXT
|
|||
}
|
||||
|
||||
static BOOL d2d_brush_fill_cb(const struct d2d_brush *brush,
|
||||
const struct d2d_d3d_render_target *render_target, struct d2d_brush_cb *cb)
|
||||
const struct d2d_device_context *render_target, struct d2d_brush_cb *cb)
|
||||
{
|
||||
float theta, sin_theta, cos_theta;
|
||||
float dpi_scale, d, s1, s2, t, u;
|
||||
|
@ -1204,7 +1204,7 @@ static BOOL d2d_brush_fill_cb(const struct d2d_brush *brush,
|
|||
}
|
||||
|
||||
HRESULT d2d_brush_get_ps_cb(struct d2d_brush *brush, struct d2d_brush *opacity_brush,
|
||||
BOOL outline, struct d2d_d3d_render_target *render_target, ID3D10Buffer **ps_cb)
|
||||
BOOL outline, struct d2d_device_context *render_target, ID3D10Buffer **ps_cb)
|
||||
{
|
||||
D3D10_SUBRESOURCE_DATA buffer_data;
|
||||
struct d2d_ps_cb cb_data = {0};
|
||||
|
|
|
@ -117,9 +117,9 @@ struct d2d_ps_cb
|
|||
struct d2d_brush_cb opacity_brush;
|
||||
};
|
||||
|
||||
struct d2d_d3d_render_target
|
||||
struct d2d_device_context
|
||||
{
|
||||
ID2D1RenderTarget ID2D1RenderTarget_iface;
|
||||
ID2D1DeviceContext ID2D1DeviceContext_iface;
|
||||
ID2D1GdiInteropRenderTarget ID2D1GdiInteropRenderTarget_iface;
|
||||
IDWriteTextRenderer IDWriteTextRenderer_iface;
|
||||
LONG refcount;
|
||||
|
@ -210,7 +210,7 @@ struct d2d_bitmap_render_target
|
|||
};
|
||||
|
||||
HRESULT d2d_bitmap_render_target_init(struct d2d_bitmap_render_target *render_target,
|
||||
const struct d2d_d3d_render_target *parent_target, const D2D1_SIZE_F *size,
|
||||
const struct d2d_device_context *parent_target, const D2D1_SIZE_F *size,
|
||||
const D2D1_SIZE_U *pixel_size, const D2D1_PIXEL_FORMAT *format,
|
||||
D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS options) DECLSPEC_HIDDEN;
|
||||
|
||||
|
@ -282,7 +282,7 @@ HRESULT d2d_bitmap_brush_create(ID2D1Factory *factory, ID2D1Bitmap *bitmap,
|
|||
struct d2d_brush **brush) DECLSPEC_HIDDEN;
|
||||
void d2d_brush_bind_resources(struct d2d_brush *brush, ID3D10Device *device, unsigned int brush_idx) DECLSPEC_HIDDEN;
|
||||
HRESULT d2d_brush_get_ps_cb(struct d2d_brush *brush, struct d2d_brush *opacity_brush, BOOL outline,
|
||||
struct d2d_d3d_render_target *render_target, ID3D10Buffer **ps_cb) DECLSPEC_HIDDEN;
|
||||
struct d2d_device_context *render_target, ID3D10Buffer **ps_cb) DECLSPEC_HIDDEN;
|
||||
struct d2d_brush *unsafe_impl_from_ID2D1Brush(ID2D1Brush *iface) DECLSPEC_HIDDEN;
|
||||
|
||||
struct d2d_stroke_style
|
||||
|
@ -335,7 +335,7 @@ struct d2d_bitmap
|
|||
|
||||
HRESULT d2d_bitmap_create(ID2D1Factory *factory, ID3D10Device *device, D2D1_SIZE_U size, const void *src_data,
|
||||
UINT32 pitch, const D2D1_BITMAP_PROPERTIES *desc, struct d2d_bitmap **bitmap) DECLSPEC_HIDDEN;
|
||||
HRESULT d2d_bitmap_create_shared(ID2D1RenderTarget *render_target, ID3D10Device *device, REFIID iid, void *data,
|
||||
HRESULT d2d_bitmap_create_shared(ID2D1DeviceContext *context, ID3D10Device *device, REFIID iid, void *data,
|
||||
const D2D1_BITMAP_PROPERTIES *desc, struct d2d_bitmap **bitmap) DECLSPEC_HIDDEN;
|
||||
HRESULT d2d_bitmap_create_from_wic_bitmap(ID2D1Factory *factory, ID3D10Device *device, IWICBitmapSource *bitmap_source,
|
||||
const D2D1_BITMAP_PROPERTIES *desc, struct d2d_bitmap **bitmap) DECLSPEC_HIDDEN;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue