mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
d2d1-ID2D1Factory1: Remove patch.
This contains no functional change.
This commit is contained in:
parent
fc87fb74db
commit
964b6c1ab5
@ -1,211 +0,0 @@
|
||||
From 52881b705610614842e0d06a5c1d1e27f6656491 Mon Sep 17 00:00:00 2001
|
||||
From: Lucian Poston <lucian.poston@gmail.com>
|
||||
Date: Thu, 3 May 2018 00:38:06 -0700
|
||||
Subject: [PATCH] d2d1: Use ID2D1Factory2 in d2d_geometry
|
||||
|
||||
https://bugs.winehq.org/show_bug.cgi?id=44052
|
||||
|
||||
Signed-off-by: Lucian Poston <lucian.poston@gmail.com>
|
||||
---
|
||||
dlls/d2d1/d2d1_private.h | 10 +++++-----
|
||||
dlls/d2d1/factory.c | 8 ++++----
|
||||
dlls/d2d1/geometry.c | 38 +++++++++++++++++++++++++++-----------
|
||||
3 files changed, 36 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/dlls/d2d1/d2d1_private.h b/dlls/d2d1/d2d1_private.h
|
||||
index 2e42d6d5503..1cacb6c1a94 100644
|
||||
--- a/dlls/d2d1/d2d1_private.h
|
||||
+++ b/dlls/d2d1/d2d1_private.h
|
||||
@@ -426,7 +426,7 @@ struct d2d_geometry
|
||||
ID2D1Geometry ID2D1Geometry_iface;
|
||||
LONG refcount;
|
||||
|
||||
- ID2D1Factory *factory;
|
||||
+ ID2D1Factory2 *factory;
|
||||
|
||||
D2D_MATRIX_3X2_F transform;
|
||||
|
||||
@@ -496,12 +496,12 @@ struct d2d_geometry
|
||||
} u;
|
||||
};
|
||||
|
||||
-void d2d_path_geometry_init(struct d2d_geometry *geometry, ID2D1Factory *factory) DECLSPEC_HIDDEN;
|
||||
+void d2d_path_geometry_init(struct d2d_geometry *geometry, ID2D1Factory2 *factory) DECLSPEC_HIDDEN;
|
||||
HRESULT d2d_rectangle_geometry_init(struct d2d_geometry *geometry,
|
||||
- ID2D1Factory *factory, const D2D1_RECT_F *rect) DECLSPEC_HIDDEN;
|
||||
-void d2d_transformed_geometry_init(struct d2d_geometry *geometry, ID2D1Factory *factory,
|
||||
+ ID2D1Factory2 *factory, const D2D1_RECT_F *rect) DECLSPEC_HIDDEN;
|
||||
+void d2d_transformed_geometry_init(struct d2d_geometry *geometry, ID2D1Factory2 *factory,
|
||||
ID2D1Geometry *src_geometry, const D2D_MATRIX_3X2_F *transform) DECLSPEC_HIDDEN;
|
||||
-HRESULT d2d_geometry_group_init(struct d2d_geometry *geometry, ID2D1Factory *factory,
|
||||
+HRESULT d2d_geometry_group_init(struct d2d_geometry *geometry, ID2D1Factory2 *factory,
|
||||
D2D1_FILL_MODE fill_mode, ID2D1Geometry **src_geometries, unsigned int geometry_count) DECLSPEC_HIDDEN;
|
||||
struct d2d_geometry *unsafe_impl_from_ID2D1Geometry(ID2D1Geometry *iface) DECLSPEC_HIDDEN;
|
||||
|
||||
diff --git a/dlls/d2d1/factory.c b/dlls/d2d1/factory.c
|
||||
index 48a2efb96b8..a1bc6dd296c 100644
|
||||
--- a/dlls/d2d1/factory.c
|
||||
+++ b/dlls/d2d1/factory.c
|
||||
@@ -138,7 +138,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateRectangleGeometry(ID2D1Factor
|
||||
if (!(object = heap_alloc_zero(sizeof(*object))))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
- if (FAILED(hr = d2d_rectangle_geometry_init(object, (ID2D1Factory *)iface, rect)))
|
||||
+ if (FAILED(hr = d2d_rectangle_geometry_init(object, iface, rect)))
|
||||
{
|
||||
WARN("Failed to initialize rectangle geometry, hr %#x.\n", hr);
|
||||
heap_free(object);
|
||||
@@ -179,7 +179,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateGeometryGroup(ID2D1Factory2 *
|
||||
if (!(object = heap_alloc_zero(sizeof(*object))))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
- if (FAILED(hr = d2d_geometry_group_init(object, (ID2D1Factory *)iface, fill_mode, geometries, geometry_count)))
|
||||
+ if (FAILED(hr = d2d_geometry_group_init(object, iface, fill_mode, geometries, geometry_count)))
|
||||
{
|
||||
WARN("Failed to initialize geometry group, hr %#x.\n", hr);
|
||||
heap_free(object);
|
||||
@@ -204,7 +204,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateTransformedGeometry(ID2D1Fact
|
||||
if (!(object = heap_alloc_zero(sizeof(*object))))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
- d2d_transformed_geometry_init(object, (ID2D1Factory *)iface, src_geometry, transform);
|
||||
+ d2d_transformed_geometry_init(object, iface, src_geometry, transform);
|
||||
|
||||
TRACE("Created transformed geometry %p.\n", object);
|
||||
*transformed_geometry = (ID2D1TransformedGeometry *)&object->ID2D1Geometry_iface;
|
||||
@@ -221,7 +221,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreatePathGeometry(ID2D1Factory2 *i
|
||||
if (!(object = heap_alloc_zero(sizeof(*object))))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
- d2d_path_geometry_init(object, (ID2D1Factory *)iface);
|
||||
+ d2d_path_geometry_init(object, iface);
|
||||
|
||||
TRACE("Created path geometry %p.\n", object);
|
||||
*geometry = (ID2D1PathGeometry *)&object->ID2D1Geometry_iface;
|
||||
diff --git a/dlls/d2d1/geometry.c b/dlls/d2d1/geometry.c
|
||||
index 8bd612cdae4..f54d7840b74 100644
|
||||
--- a/dlls/d2d1/geometry.c
|
||||
+++ b/dlls/d2d1/geometry.c
|
||||
@@ -2338,15 +2338,15 @@ static void d2d_geometry_cleanup(struct d2d_geometry *geometry)
|
||||
heap_free(geometry->fill.bezier_vertices);
|
||||
heap_free(geometry->fill.faces);
|
||||
heap_free(geometry->fill.vertices);
|
||||
- ID2D1Factory_Release(geometry->factory);
|
||||
+ ID2D1Factory2_Release(geometry->factory);
|
||||
}
|
||||
|
||||
-static void d2d_geometry_init(struct d2d_geometry *geometry, ID2D1Factory *factory,
|
||||
+static void d2d_geometry_init(struct d2d_geometry *geometry, ID2D1Factory2 *factory,
|
||||
const D2D1_MATRIX_3X2_F *transform, const struct ID2D1GeometryVtbl *vtbl)
|
||||
{
|
||||
geometry->ID2D1Geometry_iface.lpVtbl = vtbl;
|
||||
geometry->refcount = 1;
|
||||
- ID2D1Factory_AddRef(geometry->factory = factory);
|
||||
+ ID2D1Factory2_AddRef(geometry->factory = factory);
|
||||
geometry->transform = *transform;
|
||||
}
|
||||
|
||||
@@ -3035,10 +3035,14 @@ static ULONG STDMETHODCALLTYPE d2d_path_geometry_Release(ID2D1PathGeometry *ifac
|
||||
static void STDMETHODCALLTYPE d2d_path_geometry_GetFactory(ID2D1PathGeometry *iface, ID2D1Factory **factory)
|
||||
{
|
||||
struct d2d_geometry *geometry = impl_from_ID2D1PathGeometry(iface);
|
||||
+ HRESULT hr;
|
||||
|
||||
TRACE("iface %p, factory %p.\n", iface, factory);
|
||||
|
||||
- ID2D1Factory_AddRef(*factory = geometry->factory);
|
||||
+ if (FAILED(hr = ID2D1Factory2_QueryInterface(geometry->factory, &IID_ID2D1Factory, (void **)factory)))
|
||||
+ {
|
||||
+ WARN("Unable to query ID2D1Factory interface %#x", hr);
|
||||
+ }
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_path_geometry_GetBounds(ID2D1PathGeometry *iface,
|
||||
@@ -3486,7 +3490,7 @@ static const struct ID2D1PathGeometryVtbl d2d_path_geometry_vtbl =
|
||||
d2d_path_geometry_GetFigureCount,
|
||||
};
|
||||
|
||||
-void d2d_path_geometry_init(struct d2d_geometry *geometry, ID2D1Factory *factory)
|
||||
+void d2d_path_geometry_init(struct d2d_geometry *geometry, ID2D1Factory2 *factory)
|
||||
{
|
||||
d2d_geometry_init(geometry, factory, &identity, (ID2D1GeometryVtbl *)&d2d_path_geometry_vtbl);
|
||||
geometry->u.path.ID2D1GeometrySink_iface.lpVtbl = &d2d_geometry_sink_vtbl;
|
||||
@@ -3551,10 +3555,14 @@ static ULONG STDMETHODCALLTYPE d2d_rectangle_geometry_Release(ID2D1RectangleGeom
|
||||
static void STDMETHODCALLTYPE d2d_rectangle_geometry_GetFactory(ID2D1RectangleGeometry *iface, ID2D1Factory **factory)
|
||||
{
|
||||
struct d2d_geometry *geometry = impl_from_ID2D1RectangleGeometry(iface);
|
||||
+ HRESULT hr;
|
||||
|
||||
TRACE("iface %p, factory %p.\n", iface, factory);
|
||||
|
||||
- ID2D1Factory_AddRef(*factory = geometry->factory);
|
||||
+ if (FAILED(hr = ID2D1Factory2_QueryInterface(geometry->factory, &IID_ID2D1Factory, (void **)factory)))
|
||||
+ {
|
||||
+ WARN("Unable to query ID2D1Factory interface %#x", hr);
|
||||
+ }
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_rectangle_geometry_GetBounds(ID2D1RectangleGeometry *iface,
|
||||
@@ -3774,7 +3782,7 @@ static const struct ID2D1RectangleGeometryVtbl d2d_rectangle_geometry_vtbl =
|
||||
d2d_rectangle_geometry_GetRect,
|
||||
};
|
||||
|
||||
-HRESULT d2d_rectangle_geometry_init(struct d2d_geometry *geometry, ID2D1Factory *factory, const D2D1_RECT_F *rect)
|
||||
+HRESULT d2d_rectangle_geometry_init(struct d2d_geometry *geometry, ID2D1Factory2 *factory, const D2D1_RECT_F *rect)
|
||||
{
|
||||
struct d2d_face *f;
|
||||
D2D1_POINT_2F *v, v0p, v0n, v1p, v1n, v2p, v2n, v3p, v3n;
|
||||
@@ -3904,10 +3912,14 @@ static void STDMETHODCALLTYPE d2d_transformed_geometry_GetFactory(ID2D1Transform
|
||||
ID2D1Factory **factory)
|
||||
{
|
||||
struct d2d_geometry *geometry = impl_from_ID2D1TransformedGeometry(iface);
|
||||
+ HRESULT hr;
|
||||
|
||||
TRACE("iface %p, factory %p.\n", iface, factory);
|
||||
|
||||
- ID2D1Factory_AddRef(*factory = geometry->factory);
|
||||
+ if (FAILED(hr = ID2D1Factory2_QueryInterface(geometry->factory, &IID_ID2D1Factory, (void **)factory)))
|
||||
+ {
|
||||
+ WARN("Unable to query ID2D1Factory interface %#x", hr);
|
||||
+ }
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_transformed_geometry_GetBounds(ID2D1TransformedGeometry *iface,
|
||||
@@ -4100,7 +4112,7 @@ static const struct ID2D1TransformedGeometryVtbl d2d_transformed_geometry_vtbl =
|
||||
d2d_transformed_geometry_GetTransform,
|
||||
};
|
||||
|
||||
-void d2d_transformed_geometry_init(struct d2d_geometry *geometry, ID2D1Factory *factory,
|
||||
+void d2d_transformed_geometry_init(struct d2d_geometry *geometry, ID2D1Factory2 *factory,
|
||||
ID2D1Geometry *src_geometry, const D2D_MATRIX_3X2_F *transform)
|
||||
{
|
||||
struct d2d_geometry *src_impl;
|
||||
@@ -4176,11 +4188,15 @@ static ULONG STDMETHODCALLTYPE d2d_geometry_group_Release(ID2D1GeometryGroup *if
|
||||
static void STDMETHODCALLTYPE d2d_geometry_group_GetFactory(ID2D1GeometryGroup *iface,
|
||||
ID2D1Factory **factory)
|
||||
{
|
||||
+ HRESULT hr;
|
||||
struct d2d_geometry *geometry = impl_from_ID2D1GeometryGroup(iface);
|
||||
|
||||
TRACE("iface %p, factory %p.\n", iface, factory);
|
||||
|
||||
- ID2D1Factory_AddRef(*factory = geometry->factory);
|
||||
+ if (FAILED(hr = ID2D1Factory2_QueryInterface(geometry->factory, &IID_ID2D1Factory, (void **)factory)))
|
||||
+ {
|
||||
+ WARN("Unable to query ID2D1Factory interface %#x", hr);
|
||||
+ }
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_geometry_group_GetBounds(ID2D1GeometryGroup *iface,
|
||||
@@ -4356,7 +4372,7 @@ static const struct ID2D1GeometryGroupVtbl d2d_geometry_group_vtbl =
|
||||
d2d_geometry_group_GetSourceGeometries,
|
||||
};
|
||||
|
||||
-HRESULT d2d_geometry_group_init(struct d2d_geometry *geometry, ID2D1Factory *factory,
|
||||
+HRESULT d2d_geometry_group_init(struct d2d_geometry *geometry, ID2D1Factory2 *factory,
|
||||
D2D1_FILL_MODE fill_mode, ID2D1Geometry **geometries, unsigned int geometry_count)
|
||||
{
|
||||
unsigned int i;
|
||||
--
|
||||
2.17.1
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: [44052] - Add ID2D1Bitmap1/ID2D1Factory1 support
|
@ -102,7 +102,6 @@ patch_enable_all ()
|
||||
enable_configure_Absolute_RPATH="$1"
|
||||
enable_crypt32_CMS_Certificates="$1"
|
||||
enable_cryptext_CryptExtOpenCER="$1"
|
||||
enable_d2d1_ID2D1Factory1="$1"
|
||||
enable_d3d11_Deferred_Context="$1"
|
||||
enable_d3d9_Direct3DShaderValidatorCreate9="$1"
|
||||
enable_d3d9_Tests="$1"
|
||||
@ -438,9 +437,6 @@ patch_enable ()
|
||||
cryptext-CryptExtOpenCER)
|
||||
enable_cryptext_CryptExtOpenCER="$2"
|
||||
;;
|
||||
d2d1-ID2D1Factory1)
|
||||
enable_d2d1_ID2D1Factory1="$2"
|
||||
;;
|
||||
d3d11-Deferred_Context)
|
||||
enable_d3d11_Deferred_Context="$2"
|
||||
;;
|
||||
@ -2471,21 +2467,6 @@ if test "$enable_cryptext_CryptExtOpenCER" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset d2d1-ID2D1Factory1
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#44052] - Add ID2D1Bitmap1/ID2D1Factory1 support
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/d2d1/d2d1_private.h, dlls/d2d1/factory.c, dlls/d2d1/geometry.c
|
||||
# |
|
||||
if test "$enable_d2d1_ID2D1Factory1" -eq 1; then
|
||||
patch_apply d2d1-ID2D1Factory1/0001-d2d1-Use-ID2D1Factory2-in-d2d_geometry.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Lucian Poston", "d2d1: Use ID2D1Factory2 in d2d_geometry.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset nvcuda-CUDA_Support
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
@ -3222,6 +3203,11 @@ fi
|
||||
|
||||
# Patchset dsdmo-new-dll
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#35478] - Multiple applications and games need dsdmo.dll (DirectSound Effects)
|
||||
# | * [#10603] - IDirectSoundBufferImpl_SetFX needed for sound effects in several games.
|
||||
# | * [#34708] - Silent Hill 4: The Room crashes after first videoscene when trying to go to the door.
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/dsdmo/Makefile.in, dlls/dsdmo/chorus.c, dlls/dsdmo/compressor.c, dlls/dsdmo/distortion.c,
|
||||
# | dlls/dsdmo/dsdmo_classes.idl, dlls/dsdmo/dsdmo_private.h, dlls/dsdmo/echo.c, dlls/dsdmo/flanger.c, dlls/dsdmo/gargle.c,
|
||||
|
Loading…
Reference in New Issue
Block a user