Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
September 2018
- 70 participants
- 1549 messages
Re: [PATCH] dsound: Dont trace current thread ID
by Andrew Eikum
Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com>
On Thu, Sep 13, 2018 at 03:29:42AM +0000, Alistair Leslie-Hughes wrote:
> TID is always displayed in output now.
>
> Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
> ---
> dlls/dsound/buffer.c | 2 +-
> dlls/dsound/capture.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c
> index 1cdc388..cb7ff78 100644
> --- a/dlls/dsound/buffer.c
> +++ b/dlls/dsound/buffer.c
> @@ -415,7 +415,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_GetStatus(IDirectSoundBuffer8 *ifac
> {
> IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface);
>
> - TRACE("(%p,%p), thread is %04x\n",This,status,GetCurrentThreadId());
> + TRACE("(%p,%p)\n",This,status);
>
> if (status == NULL) {
> WARN("invalid parameter: status = NULL\n");
> diff --git a/dlls/dsound/capture.c b/dlls/dsound/capture.c
> index fcc363d..c849624 100644
> --- a/dlls/dsound/capture.c
> +++ b/dlls/dsound/capture.c
> @@ -386,7 +386,7 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_GetStatus(IDirectSoundCaptur
> {
> IDirectSoundCaptureBufferImpl *This = impl_from_IDirectSoundCaptureBuffer8(iface);
>
> - TRACE( "(%p, %p), thread is %04x\n", This, lpdwStatus, GetCurrentThreadId() );
> + TRACE( "(%p, %p)\n", This, lpdwStatus );
>
> if (This->device == NULL) {
> WARN("invalid parameter: This->device == NULL\n");
> --
> 1.9.1
>
>
>
Sept. 18, 2018
Re: [PATCH] user32/tests: Mark newer Win10 behaviour as broken
by André Hentschel
On 17.09.2018 18:33, Alexandre Julliard wrote:
> André Hentschel <nerv(a)dawncrow.de> writes:
>
>> Signed-off-by: André Hentschel <nerv(a)dawncrow.de>
>> ---
>> dlls/user32/tests/monitor.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/dlls/user32/tests/monitor.c b/dlls/user32/tests/monitor.c
>> index f4c1a4b17c..8ba6cc267b 100644
>> --- a/dlls/user32/tests/monitor.c
>> +++ b/dlls/user32/tests/monitor.c
>> @@ -585,7 +585,7 @@ static void test_display_config(void)
>> paths = modes = 100;
>> ret = pGetDisplayConfigBufferSizes(0, &paths, &modes);
>> ok(ret == ERROR_INVALID_PARAMETER || ret == ERROR_NOT_SUPPORTED, "got %d\n", ret);
>> - ok(modes == 0 && paths == 0, "got %u, %u\n", modes, paths);
>> + ok((modes == 0 || broken(modes == 100)) && paths == 0, "got %u, %u\n", modes, paths);
>
> This looks like a reasonable result at least for the
> ERROR_INVALID_PARAMETER case, I'm not sure why you'd consider it broken.
>
Good point, I'll send an update later
Sept. 18, 2018
Re: [PATCH] wininet/tests: Don't check certificate when secure flag is not set
by André Hentschel
On 17.09.2018 16:55, Jacek Caban wrote:
> Hi André,
>
> On 09/15/2018 02:47 PM, André Hentschel wrote:
>> Signed-off-by: André Hentschel <nerv(a)dawncrow.de>
>> ---
>> dlls/wininet/tests/http.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
>> index ace8512399..8bc06b9166 100644
>> --- a/dlls/wininet/tests/http.c
>> +++ b/dlls/wininet/tests/http.c
>> @@ -6025,7 +6025,8 @@ static void test_secure_connection(void)
>> ok(ret, "InternetQueryOption failed: %d\n", GetLastError());
>> ok(flags & SECURITY_FLAG_SECURE, "expected secure flag to be set\n");
>>
>> - test_cert_struct(req, &test_winehq_org_cert);
>> + if (flags & SECURITY_FLAG_SECURE)
>> + test_cert_struct(req, &test_winehq_org_cert);
>
> What do you want to achieve with this patch? Note that we test the flag
> just before test_cert_struct call, so tests will fail with your patch
> anyway.
>
> Jacek
>
Hi Jacek,
I should have mentioned that it's supposed to fix the crash in newer
win10 versions:
https://test.winehq.org/data/8a985174ebc1b041d9a4f1abbdc184fe692d25bf/index…
Sept. 18, 2018
Re: [PATCH v6 2/6] shell32/autocomplete: Redesign the window proc to trigger on key presses instead of key release
by Gabriel Ivăncescu
On Tue, Sep 18, 2018 at 12:17 PM, Huw Davies <huw(a)codeweavers.com> wrote:
>
> On Windows 7 auto-append behaves the same whether paste is driven by a
> WM_PASTE or a ^V. So you will at least need to handle WM_PASTE, which
> makes the ^V exclusion dubious.
>
Yes, I will handle WM_PASTE in the next patch series, I wanted to get
these committed first. They're separate fixes, anyway. At least the
wParam >= ' ' would have to remain.
>
> Ok, this part does seem to be necessary and if it turns out you do
> need to keep the ^V exception after handling WM_PASTE, then it'll have
> to move to a small helper function.
>
> Huw.
I don't think there's a need for a helper function, since the WM_PASTE
handler will be very small and basically just a "forward it to the
edit control then call autocomplete_text". I've already have it
written but I didn't send it because I wanted to have these committed
first before I bring new patches in, and besides the previous code did
not handle WM_PASTE anyway so it's an extra functionality, not a
regression. The reason there's no need for helper function is because
this is what it is:
+ case WM_PASTE:
+ ret = CallWindowProcW(This->wpOrigEditProc, hwnd, uMsg,
wParam, lParam);
+ autocomplete_text(This, hwnd, autoappend_flag_yes);
+ return ret;
in a later patch.
I guess I can remove the ^V if you really want to and keep the wParam
>= ' ', would that be acceptable? I don't know what Windows does if it
hijacks WM_PASTE but not ^V, but honestly it doesn't really matter
anymore.
I know I already sent the v7 patch with the ^V split off from patch 2,
but you can review or sign-off on the rest of the patches, as they
don't depend on it, so I don't have to resend them again. Then I can
just resend patch 3 and have it only check for ' ', if you really want
to, and get rid of the ^V hack. (WM_PASTE will come later, it's not
like it's a big deal to not auto-append on a paste yet!)
Sept. 18, 2018
[PATCH] opcservices/tests: Fix copy-pasted copyright line.
by Nikolay Sivov
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/opcservices/tests/opcservices.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/opcservices/tests/opcservices.c b/dlls/opcservices/tests/opcservices.c
index bed59405d6..779d17f6c5 100644
--- a/dlls/opcservices/tests/opcservices.c
+++ b/dlls/opcservices/tests/opcservices.c
@@ -1,8 +1,7 @@
/*
- * Font related tests
+ * OPC Services tests
*
- * Copyright 2012, 2014-2017 Nikolay Sivov for CodeWeavers
- * Copyright 2014 Aric Stewart for CodeWeavers
+ * Copyright 2018 Nikolay Sivov for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
--
2.18.0
Sept. 18, 2018
Re: [PATCH] winex11.drv: Add missing biCompression initialization (Valgrind)
by Alexandre Julliard
Sven Baars <sven.wine(a)gmail.com> writes:
> This was previously used uninitialized in bitmapinfoheader_from_user_bitmapinfo
In theory GetDIBits() should be fixed, but there's no actual problem so
it's probably not worth the trouble. We definitely don't want to change
the caller to hide the bug.
--
Alexandre Julliard
julliard(a)winehq.org
Sept. 18, 2018
Re: [PATCH 1/6] quartz/tests: Add some tests for IFilterGraph_EnumFilters().
by Nikolay Sivov
On 09/18/2018 08:24 AM, Zebediah Figura wrote:
> + ref = IFilterGraph2_Release(graph);
> + ok(!ref, "Got outstanding refcount %d.\n", hr);
Wrong argument here.
Sept. 18, 2018
[PATCH 3/3] include: Add ID2D1Effect definition.
by Nikolay Sivov
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
include/d2d1_1.idl | 104 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 104 insertions(+)
diff --git a/include/d2d1_1.idl b/include/d2d1_1.idl
index 284bd60ece..c6cd9c7398 100644
--- a/include/d2d1_1.idl
+++ b/include/d2d1_1.idl
@@ -164,6 +164,30 @@ typedef enum D2D1_LAYER_OPTIONS1
typedef struct D2D1_PROPERTY_BINDING D2D1_PROPERTY_BINDING;
typedef D2D_MATRIX_4X4_F D2D1_MATRIX_4X4_F;
+typedef enum D2D1_PROPERTY_TYPE
+{
+ D2D1_PROPERTY_TYPE_UNKNOWN = 0x0,
+ D2D1_PROPERTY_TYPE_STRING = 0x1,
+ D2D1_PROPERTY_TYPE_BOOL = 0x2,
+ D2D1_PROPERTY_TYPE_UINT32 = 0x3,
+ D2D1_PROPERTY_TYPE_INT32 = 0x4,
+ D2D1_PROPERTY_TYPE_FLOAT = 0x5,
+ D2D1_PROPERTY_TYPE_VECTOR2 = 0x6,
+ D2D1_PROPERTY_TYPE_VECTOR3 = 0x7,
+ D2D1_PROPERTY_TYPE_VECTOR4 = 0x8,
+ D2D1_PROPERTY_TYPE_BLOB = 0x9,
+ D2D1_PROPERTY_TYPE_IUNKNOWN = 0xa,
+ D2D1_PROPERTY_TYPE_ENUM = 0xb,
+ D2D1_PROPERTY_TYPE_ARRAY = 0xc,
+ D2D1_PROPERTY_TYPE_CLSID = 0xd,
+ D2D1_PROPERTY_TYPE_MATRIX_3X2 = 0xe,
+ D2D1_PROPERTY_TYPE_MATRIX_4X3 = 0xf,
+ D2D1_PROPERTY_TYPE_MATRIX_4X4 = 0x10,
+ D2D1_PROPERTY_TYPE_MATRIX_5X4 = 0x11,
+ D2D1_PROPERTY_TYPE_COLOR_CONTEXT = 0x12,
+ D2D1_PROPERTY_TYPE_FORCE_DWORD = 0xffffffff,
+} D2D1_PROPERTY_TYPE;
+
typedef struct D2D1_STROKE_STYLE_PROPERTIES1
{
D2D1_CAP_STYLE startCap;
@@ -250,6 +274,86 @@ typedef struct D2D1_EFFECT_INPUT_DESCRIPTION
typedef HRESULT (__stdcall *PD2D1_EFFECT_FACTORY)(IUnknown **effect);
+[
+ object,
+ uuid(483473d7-cd46-4f9d-9d3a-3112aa80159d),
+ local,
+]
+interface ID2D1Properties : IUnknown
+{
+ UINT32 GetPropertyCount();
+ HRESULT GetPropertyName(
+ [in] UINT32 index,
+ [out] WCHAR *name,
+ [in] UINT32 name_count
+ );
+ UINT32 GetPropertyNameLength(
+ [in] UINT32 index
+ );
+ D2D1_PROPERTY_TYPE GetType(
+ [in] UINT32 index
+ );
+ UINT32 GetPropertyIndex(
+ [in] const WCHAR *name
+ );
+ HRESULT SetValueByName(
+ [in] const WCHAR *name,
+ [in] D2D1_PROPERTY_TYPE type,
+ [in] const BYTE *value,
+ [in] UINT32 value_size
+ );
+ HRESULT SetValue(
+ [in] UINT32 index,
+ [in] D2D1_PROPERTY_TYPE type,
+ [in] const BYTE *value,
+ [in] UINT32 value_size
+ );
+ HRESULT GetValueByName(
+ [in] const WCHAR *name,
+ [in] D2D1_PROPERTY_TYPE type,
+ [out] BYTE *value,
+ [in] UINT32 value_size
+ );
+ HRESULT GetValue(
+ [in] UINT32 index,
+ [in] D2D1_PROPERTY_TYPE type,
+ [out] BYTE *value,
+ [in] UINT32 value_size
+ );
+ UINT32 GetValueSize(
+ [in] UINT32 index
+ );
+ HRESULT GetSubProperties(
+ [in] UINT32 index,
+ [out] ID2D1Properties **props
+ );
+}
+
+[
+ object,
+ uuid(28211a43-7d89-476f-8181-2d6159b220ad),
+ local,
+]
+interface ID2D1Effect : ID2D1Properties
+{
+ void SetInput(
+ [in] UINT32 index,
+ [in] ID2D1Image *input,
+ [in] BOOL invalidate
+ );
+ HRESULT SetInputCount(
+ [in] UINT32 count
+ );
+ void GetInput(
+ [in] UINT32 index,
+ [out] ID2D1Image **input
+ );
+ UINT32 GetInputCount();
+ void GetOutput(
+ [out] ID2D1Image **output
+ );
+}
+
[
object,
uuid(689f1f85-c72e-4e33-8f19-85754efd5ace),
--
2.18.0
Sept. 18, 2018
[PATCH 2/3] d2d1: Implement newer CreateBitmapBrush() variant.
by Nikolay Sivov
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/d2d1/brush.c | 5 +++--
dlls/d2d1/d2d1_private.h | 2 +-
dlls/d2d1/device.c | 20 ++++++++++++++------
3 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/dlls/d2d1/brush.c b/dlls/d2d1/brush.c
index fa4488ef18..b03af89211 100644
--- a/dlls/d2d1/brush.c
+++ b/dlls/d2d1/brush.c
@@ -1092,8 +1092,9 @@ static const struct ID2D1BitmapBrush1Vtbl d2d_bitmap_brush_vtbl =
d2d_bitmap_brush_GetInterpolationMode1,
};
-HRESULT d2d_bitmap_brush_create(ID2D1Factory *factory, ID2D1Bitmap *bitmap, const D2D1_BITMAP_BRUSH_PROPERTIES *bitmap_brush_desc,
- const D2D1_BRUSH_PROPERTIES *brush_desc, struct d2d_brush **brush)
+HRESULT d2d_bitmap_brush_create(ID2D1Factory *factory, ID2D1Bitmap *bitmap,
+ const D2D1_BITMAP_BRUSH_PROPERTIES1 *bitmap_brush_desc, const D2D1_BRUSH_PROPERTIES *brush_desc,
+ struct d2d_brush **brush)
{
if (!(*brush = heap_alloc_zero(sizeof(**brush))))
return E_OUTOFMEMORY;
diff --git a/dlls/d2d1/d2d1_private.h b/dlls/d2d1/d2d1_private.h
index c8515eaa12..d7989f93a2 100644
--- a/dlls/d2d1/d2d1_private.h
+++ b/dlls/d2d1/d2d1_private.h
@@ -295,7 +295,7 @@ HRESULT d2d_radial_gradient_brush_create(ID2D1Factory *factory,
const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES *gradient_desc, const D2D1_BRUSH_PROPERTIES *brush_desc,
ID2D1GradientStopCollection *gradient, struct d2d_brush **brush) DECLSPEC_HIDDEN;
HRESULT d2d_bitmap_brush_create(ID2D1Factory *factory, ID2D1Bitmap *bitmap,
- const D2D1_BITMAP_BRUSH_PROPERTIES *bitmap_brush_desc, const D2D1_BRUSH_PROPERTIES *brush_desc,
+ const D2D1_BITMAP_BRUSH_PROPERTIES1 *bitmap_brush_desc, const D2D1_BRUSH_PROPERTIES *brush_desc,
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,
diff --git a/dlls/d2d1/device.c b/dlls/d2d1/device.c
index 041cb33c90..d779fb0a97 100644
--- a/dlls/d2d1/device.c
+++ b/dlls/d2d1/device.c
@@ -401,14 +401,15 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateBitmapBrush(ID2D1Devic
ID2D1Bitmap *bitmap, const D2D1_BITMAP_BRUSH_PROPERTIES *bitmap_brush_desc,
const D2D1_BRUSH_PROPERTIES *brush_desc, ID2D1BitmapBrush **brush)
{
- struct d2d_device_context *render_target = impl_from_ID2D1DeviceContext(iface);
+ struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface);
struct d2d_brush *object;
HRESULT hr;
TRACE("iface %p, bitmap %p, bitmap_brush_desc %p, brush_desc %p, brush %p.\n",
iface, bitmap, bitmap_brush_desc, brush_desc, brush);
- if (SUCCEEDED(hr = d2d_bitmap_brush_create(render_target->factory, bitmap, bitmap_brush_desc, brush_desc, &object)))
+ if (SUCCEEDED(hr = d2d_bitmap_brush_create(context->factory, bitmap, (const D2D1_BITMAP_BRUSH_PROPERTIES1 *)bitmap_brush_desc,
+ brush_desc, &object)))
*brush = (ID2D1BitmapBrush *)&object->ID2D1Brush_iface;
return hr;
@@ -1863,12 +1864,19 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateImageBrush(ID2D1Device
static HRESULT STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_CreateBitmapBrush(ID2D1DeviceContext *iface,
ID2D1Bitmap *bitmap, const D2D1_BITMAP_BRUSH_PROPERTIES1 *bitmap_brush_desc,
- const D2D1_BRUSH_PROPERTIES *brush_desc, ID2D1BitmapBrush1 **bitmap_brush)
+ const D2D1_BRUSH_PROPERTIES *brush_desc, ID2D1BitmapBrush1 **brush)
{
- FIXME("iface %p, bitmap %p, bitmap_brush_desc %p, brush_desc %p, bitmap_brush %p stub!\n", iface, bitmap,
- bitmap_brush_desc, brush_desc, bitmap_brush);
+ struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface);
+ struct d2d_brush *object;
+ HRESULT hr;
- return E_NOTIMPL;
+ TRACE("iface %p, bitmap %p, bitmap_brush_desc %p, brush_desc %p, brush %p.\n", iface, bitmap, bitmap_brush_desc,
+ brush_desc, brush);
+
+ if (SUCCEEDED(hr = d2d_bitmap_brush_create(context->factory, bitmap, bitmap_brush_desc, brush_desc, &object)))
+ *brush = (ID2D1BitmapBrush1 *)&object->ID2D1Brush_iface;
+
+ return hr;
}
static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateCommandList(ID2D1DeviceContext *iface,
--
2.18.0
Sept. 18, 2018
[v2 PATCH 1/3] d2d1: Update to ID2D1BitmapBrush1.
by Nikolay Sivov
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/d2d1/brush.c | 134 ++++++++++++++++++++++++++++-----------
dlls/d2d1/d2d1_private.h | 2 +-
dlls/d2d1/tests/d2d1.c | 44 +++++++++++++
3 files changed, 142 insertions(+), 38 deletions(-)
diff --git a/dlls/d2d1/brush.c b/dlls/d2d1/brush.c
index 450507cef6..fa4488ef18 100644
--- a/dlls/d2d1/brush.c
+++ b/dlls/d2d1/brush.c
@@ -816,22 +816,23 @@ HRESULT d2d_radial_gradient_brush_create(ID2D1Factory *factory,
return S_OK;
}
-static inline struct d2d_brush *impl_from_ID2D1BitmapBrush(ID2D1BitmapBrush *iface)
+static inline struct d2d_brush *impl_from_ID2D1BitmapBrush1(ID2D1BitmapBrush1 *iface)
{
return CONTAINING_RECORD(iface, struct d2d_brush, ID2D1Brush_iface);
}
-static HRESULT STDMETHODCALLTYPE d2d_bitmap_brush_QueryInterface(ID2D1BitmapBrush *iface,
+static HRESULT STDMETHODCALLTYPE d2d_bitmap_brush_QueryInterface(ID2D1BitmapBrush1 *iface,
REFIID iid, void **out)
{
TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
- if (IsEqualGUID(iid, &IID_ID2D1BitmapBrush)
+ if (IsEqualGUID(iid, &IID_ID2D1BitmapBrush1)
+ || IsEqualGUID(iid, &IID_ID2D1BitmapBrush)
|| IsEqualGUID(iid, &IID_ID2D1Brush)
|| IsEqualGUID(iid, &IID_ID2D1Resource)
|| IsEqualGUID(iid, &IID_IUnknown))
{
- ID2D1BitmapBrush_AddRef(iface);
+ ID2D1BitmapBrush1_AddRef(iface);
*out = iface;
return S_OK;
}
@@ -842,9 +843,9 @@ static HRESULT STDMETHODCALLTYPE d2d_bitmap_brush_QueryInterface(ID2D1BitmapBrus
return E_NOINTERFACE;
}
-static ULONG STDMETHODCALLTYPE d2d_bitmap_brush_AddRef(ID2D1BitmapBrush *iface)
+static ULONG STDMETHODCALLTYPE d2d_bitmap_brush_AddRef(ID2D1BitmapBrush1 *iface)
{
- struct d2d_brush *brush = impl_from_ID2D1BitmapBrush(iface);
+ struct d2d_brush *brush = impl_from_ID2D1BitmapBrush1(iface);
ULONG refcount = InterlockedIncrement(&brush->refcount);
TRACE("%p increasing refcount to %u.\n", iface, refcount);
@@ -852,9 +853,9 @@ static ULONG STDMETHODCALLTYPE d2d_bitmap_brush_AddRef(ID2D1BitmapBrush *iface)
return refcount;
}
-static ULONG STDMETHODCALLTYPE d2d_bitmap_brush_Release(ID2D1BitmapBrush *iface)
+static ULONG STDMETHODCALLTYPE d2d_bitmap_brush_Release(ID2D1BitmapBrush1 *iface)
{
- struct d2d_brush *brush = impl_from_ID2D1BitmapBrush(iface);
+ struct d2d_brush *brush = impl_from_ID2D1BitmapBrush1(iface);
ULONG refcount = InterlockedDecrement(&brush->refcount);
TRACE("%p decreasing refcount to %u.\n", iface, refcount);
@@ -871,57 +872,57 @@ static ULONG STDMETHODCALLTYPE d2d_bitmap_brush_Release(ID2D1BitmapBrush *iface)
return refcount;
}
-static void STDMETHODCALLTYPE d2d_bitmap_brush_GetFactory(ID2D1BitmapBrush *iface,
+static void STDMETHODCALLTYPE d2d_bitmap_brush_GetFactory(ID2D1BitmapBrush1 *iface,
ID2D1Factory **factory)
{
- struct d2d_brush *brush = impl_from_ID2D1BitmapBrush(iface);
+ struct d2d_brush *brush = impl_from_ID2D1BitmapBrush1(iface);
TRACE("iface %p, factory %p.\n", iface, factory);
ID2D1Factory_AddRef(*factory = brush->factory);
}
-static void STDMETHODCALLTYPE d2d_bitmap_brush_SetOpacity(ID2D1BitmapBrush *iface, float opacity)
+static void STDMETHODCALLTYPE d2d_bitmap_brush_SetOpacity(ID2D1BitmapBrush1 *iface, float opacity)
{
- struct d2d_brush *brush = impl_from_ID2D1BitmapBrush(iface);
+ struct d2d_brush *brush = impl_from_ID2D1BitmapBrush1(iface);
TRACE("iface %p, opacity %.8e.\n", iface, opacity);
brush->opacity = opacity;
}
-static void STDMETHODCALLTYPE d2d_bitmap_brush_SetTransform(ID2D1BitmapBrush *iface,
+static void STDMETHODCALLTYPE d2d_bitmap_brush_SetTransform(ID2D1BitmapBrush1 *iface,
const D2D1_MATRIX_3X2_F *transform)
{
- struct d2d_brush *brush = impl_from_ID2D1BitmapBrush(iface);
+ struct d2d_brush *brush = impl_from_ID2D1BitmapBrush1(iface);
TRACE("iface %p, transform %p.\n", iface, transform);
brush->transform = *transform;
}
-static float STDMETHODCALLTYPE d2d_bitmap_brush_GetOpacity(ID2D1BitmapBrush *iface)
+static float STDMETHODCALLTYPE d2d_bitmap_brush_GetOpacity(ID2D1BitmapBrush1 *iface)
{
- struct d2d_brush *brush = impl_from_ID2D1BitmapBrush(iface);
+ struct d2d_brush *brush = impl_from_ID2D1BitmapBrush1(iface);
TRACE("iface %p.\n", iface);
return brush->opacity;
}
-static void STDMETHODCALLTYPE d2d_bitmap_brush_GetTransform(ID2D1BitmapBrush *iface,
+static void STDMETHODCALLTYPE d2d_bitmap_brush_GetTransform(ID2D1BitmapBrush1 *iface,
D2D1_MATRIX_3X2_F *transform)
{
- struct d2d_brush *brush = impl_from_ID2D1BitmapBrush(iface);
+ struct d2d_brush *brush = impl_from_ID2D1BitmapBrush1(iface);
TRACE("iface %p, transform %p.\n", iface, transform);
*transform = brush->transform;
}
-static void STDMETHODCALLTYPE d2d_bitmap_brush_SetExtendModeX(ID2D1BitmapBrush *iface, D2D1_EXTEND_MODE mode)
+static void STDMETHODCALLTYPE d2d_bitmap_brush_SetExtendModeX(ID2D1BitmapBrush1 *iface, D2D1_EXTEND_MODE mode)
{
- struct d2d_brush *brush = impl_from_ID2D1BitmapBrush(iface);
+ struct d2d_brush *brush = impl_from_ID2D1BitmapBrush1(iface);
TRACE("iface %p, mode %#x.\n", iface, mode);
@@ -933,9 +934,9 @@ static void STDMETHODCALLTYPE d2d_bitmap_brush_SetExtendModeX(ID2D1BitmapBrush *
}
}
-static void STDMETHODCALLTYPE d2d_bitmap_brush_SetExtendModeY(ID2D1BitmapBrush *iface, D2D1_EXTEND_MODE mode)
+static void STDMETHODCALLTYPE d2d_bitmap_brush_SetExtendModeY(ID2D1BitmapBrush1 *iface, D2D1_EXTEND_MODE mode)
{
- struct d2d_brush *brush = impl_from_ID2D1BitmapBrush(iface);
+ struct d2d_brush *brush = impl_from_ID2D1BitmapBrush1(iface);
TRACE("iface %p, mode %#x.\n", iface, mode);
@@ -947,13 +948,23 @@ static void STDMETHODCALLTYPE d2d_bitmap_brush_SetExtendModeY(ID2D1BitmapBrush *
}
}
-static void STDMETHODCALLTYPE d2d_bitmap_brush_SetInterpolationMode(ID2D1BitmapBrush *iface,
+static void STDMETHODCALLTYPE d2d_bitmap_brush_SetInterpolationMode(ID2D1BitmapBrush1 *iface,
D2D1_BITMAP_INTERPOLATION_MODE mode)
{
- struct d2d_brush *brush = impl_from_ID2D1BitmapBrush(iface);
+ struct d2d_brush *brush = impl_from_ID2D1BitmapBrush1(iface);
TRACE("iface %p, mode %#x.\n", iface, mode);
+ switch (mode)
+ {
+ case D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR:
+ case D2D1_BITMAP_INTERPOLATION_MODE_LINEAR:
+ break;
+ default:
+ WARN("Unknown interpolation mode %#x.\n", mode);
+ return;
+ }
+
brush->u.bitmap.interpolation_mode = mode;
if (brush->u.bitmap.sampler_state)
{
@@ -962,9 +973,9 @@ static void STDMETHODCALLTYPE d2d_bitmap_brush_SetInterpolationMode(ID2D1BitmapB
}
}
-static void STDMETHODCALLTYPE d2d_bitmap_brush_SetBitmap(ID2D1BitmapBrush *iface, ID2D1Bitmap *bitmap)
+static void STDMETHODCALLTYPE d2d_bitmap_brush_SetBitmap(ID2D1BitmapBrush1 *iface, ID2D1Bitmap *bitmap)
{
- struct d2d_brush *brush = impl_from_ID2D1BitmapBrush(iface);
+ struct d2d_brush *brush = impl_from_ID2D1BitmapBrush1(iface);
TRACE("iface %p, bitmap %p.\n", iface, bitmap);
@@ -975,36 +986,43 @@ static void STDMETHODCALLTYPE d2d_bitmap_brush_SetBitmap(ID2D1BitmapBrush *iface
brush->u.bitmap.bitmap = unsafe_impl_from_ID2D1Bitmap(bitmap);
}
-static D2D1_EXTEND_MODE STDMETHODCALLTYPE d2d_bitmap_brush_GetExtendModeX(ID2D1BitmapBrush *iface)
+static D2D1_EXTEND_MODE STDMETHODCALLTYPE d2d_bitmap_brush_GetExtendModeX(ID2D1BitmapBrush1 *iface)
{
- struct d2d_brush *brush = impl_from_ID2D1BitmapBrush(iface);
+ struct d2d_brush *brush = impl_from_ID2D1BitmapBrush1(iface);
TRACE("iface %p.\n", iface);
return brush->u.bitmap.extend_mode_x;
}
-static D2D1_EXTEND_MODE STDMETHODCALLTYPE d2d_bitmap_brush_GetExtendModeY(ID2D1BitmapBrush *iface)
+static D2D1_EXTEND_MODE STDMETHODCALLTYPE d2d_bitmap_brush_GetExtendModeY(ID2D1BitmapBrush1 *iface)
{
- struct d2d_brush *brush = impl_from_ID2D1BitmapBrush(iface);
+ struct d2d_brush *brush = impl_from_ID2D1BitmapBrush1(iface);
TRACE("iface %p.\n", iface);
return brush->u.bitmap.extend_mode_y;
}
-static D2D1_BITMAP_INTERPOLATION_MODE STDMETHODCALLTYPE d2d_bitmap_brush_GetInterpolationMode(ID2D1BitmapBrush *iface)
+static D2D1_BITMAP_INTERPOLATION_MODE STDMETHODCALLTYPE d2d_bitmap_brush_GetInterpolationMode(ID2D1BitmapBrush1 *iface)
{
- struct d2d_brush *brush = impl_from_ID2D1BitmapBrush(iface);
+ struct d2d_brush *brush = impl_from_ID2D1BitmapBrush1(iface);
TRACE("iface %p.\n", iface);
- return brush->u.bitmap.interpolation_mode;
+ switch (brush->u.bitmap.interpolation_mode)
+ {
+ case D2D1_INTERPOLATION_MODE_NEAREST_NEIGHBOR:
+ case D2D1_INTERPOLATION_MODE_LINEAR:
+ return brush->u.bitmap.interpolation_mode;
+ default:
+ return D2D1_BITMAP_INTERPOLATION_MODE_LINEAR;
+ }
}
-static void STDMETHODCALLTYPE d2d_bitmap_brush_GetBitmap(ID2D1BitmapBrush *iface, ID2D1Bitmap **bitmap)
+static void STDMETHODCALLTYPE d2d_bitmap_brush_GetBitmap(ID2D1BitmapBrush1 *iface, ID2D1Bitmap **bitmap)
{
- struct d2d_brush *brush = impl_from_ID2D1BitmapBrush(iface);
+ struct d2d_brush *brush = impl_from_ID2D1BitmapBrush1(iface);
TRACE("iface %p, bitmap %p.\n", iface, bitmap);
@@ -1012,7 +1030,47 @@ static void STDMETHODCALLTYPE d2d_bitmap_brush_GetBitmap(ID2D1BitmapBrush *iface
ID2D1Bitmap_AddRef(*bitmap);
}
-static const struct ID2D1BitmapBrushVtbl d2d_bitmap_brush_vtbl =
+static void STDMETHODCALLTYPE d2d_bitmap_brush_SetInterpolationMode1(ID2D1BitmapBrush1 *iface,
+ D2D1_INTERPOLATION_MODE mode)
+{
+ struct d2d_brush *brush = impl_from_ID2D1BitmapBrush1(iface);
+
+ TRACE("iface %p, mode %#x.\n", iface, mode);
+
+ switch (mode)
+ {
+ case D2D1_INTERPOLATION_MODE_NEAREST_NEIGHBOR:
+ case D2D1_INTERPOLATION_MODE_LINEAR:
+ break;
+ case D2D1_INTERPOLATION_MODE_CUBIC:
+ case D2D1_INTERPOLATION_MODE_MULTI_SAMPLE_LINEAR:
+ case D2D1_INTERPOLATION_MODE_ANISOTROPIC:
+ case D2D1_INTERPOLATION_MODE_HIGH_QUALITY_CUBIC:
+ FIXME("Unhandled interpolation mode %#x.\n", mode);
+ break;
+ default:
+ WARN("Unknown interpolation mode %#x.\n", mode);
+ return;
+ }
+
+ brush->u.bitmap.interpolation_mode = mode;
+ if (brush->u.bitmap.sampler_state)
+ {
+ ID3D10SamplerState_Release(brush->u.bitmap.sampler_state);
+ brush->u.bitmap.sampler_state = NULL;
+ }
+}
+
+static D2D1_INTERPOLATION_MODE STDMETHODCALLTYPE d2d_bitmap_brush_GetInterpolationMode1(ID2D1BitmapBrush1 *iface)
+{
+ struct d2d_brush *brush = impl_from_ID2D1BitmapBrush1(iface);
+
+ TRACE("iface %p.\n", iface);
+
+ return brush->u.bitmap.interpolation_mode;
+}
+
+static const struct ID2D1BitmapBrush1Vtbl d2d_bitmap_brush_vtbl =
{
d2d_bitmap_brush_QueryInterface,
d2d_bitmap_brush_AddRef,
@@ -1030,6 +1088,8 @@ static const struct ID2D1BitmapBrushVtbl d2d_bitmap_brush_vtbl =
d2d_bitmap_brush_GetExtendModeY,
d2d_bitmap_brush_GetInterpolationMode,
d2d_bitmap_brush_GetBitmap,
+ d2d_bitmap_brush_SetInterpolationMode1,
+ d2d_bitmap_brush_GetInterpolationMode1,
};
HRESULT d2d_bitmap_brush_create(ID2D1Factory *factory, ID2D1Bitmap *bitmap, const D2D1_BITMAP_BRUSH_PROPERTIES *bitmap_brush_desc,
@@ -1242,7 +1302,7 @@ static void d2d_brush_bind_bitmap(struct d2d_brush *brush, ID3D10Device *device,
{
D3D10_SAMPLER_DESC sampler_desc;
- if (brush->u.bitmap.interpolation_mode == D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR)
+ if (brush->u.bitmap.interpolation_mode == D2D1_INTERPOLATION_MODE_NEAREST_NEIGHBOR)
sampler_desc.Filter = D3D10_FILTER_MIN_MAG_MIP_POINT;
else
sampler_desc.Filter = D3D10_FILTER_MIN_MAG_MIP_LINEAR;
diff --git a/dlls/d2d1/d2d1_private.h b/dlls/d2d1/d2d1_private.h
index 3fed59fa72..c8515eaa12 100644
--- a/dlls/d2d1/d2d1_private.h
+++ b/dlls/d2d1/d2d1_private.h
@@ -280,7 +280,7 @@ struct d2d_brush
struct d2d_bitmap *bitmap;
D2D1_EXTEND_MODE extend_mode_x;
D2D1_EXTEND_MODE extend_mode_y;
- D2D1_BITMAP_INTERPOLATION_MODE interpolation_mode;
+ D2D1_INTERPOLATION_MODE interpolation_mode;
ID3D10SamplerState *sampler_state;
} bitmap;
} u;
diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c
index 6419df23d8..4136b69885 100644
--- a/dlls/d2d1/tests/d2d1.c
+++ b/dlls/d2d1/tests/d2d1.c
@@ -1656,6 +1656,7 @@ static void test_bitmap_brush(void)
D2D1_RECT_F src_rect, dst_rect;
D2D1_EXTEND_MODE extend_mode;
IDXGISwapChain *swapchain;
+ ID2D1BitmapBrush1 *brush1;
ID2D1BitmapBrush *brush;
ID2D1RenderTarget *rt;
ID3D10Device1 *device;
@@ -1877,6 +1878,49 @@ static void test_bitmap_brush(void)
match = compare_surface(surface, "cf7b90ba7b139fdfbe9347e1907d635cfb4ed197");
ok(match, "Surface does not match.\n");
+ if (SUCCEEDED(ID2D1BitmapBrush_QueryInterface(brush, &IID_ID2D1BitmapBrush1, (void **)&brush1)))
+ {
+ D2D1_INTERPOLATION_MODE interpolation_mode1;
+
+ interpolation_mode = ID2D1BitmapBrush1_GetInterpolationMode(brush1);
+ ok(interpolation_mode == D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR,
+ "Unexpected interpolation mode %#x.\n", interpolation_mode);
+
+ interpolation_mode1 = ID2D1BitmapBrush1_GetInterpolationMode1(brush1);
+ ok(interpolation_mode1 == D2D1_INTERPOLATION_MODE_NEAREST_NEIGHBOR,
+ "Unexpected interpolation mode %#x.\n", interpolation_mode1);
+
+ ID2D1BitmapBrush1_SetInterpolationMode1(brush1, D2D1_INTERPOLATION_MODE_CUBIC);
+ interpolation_mode = ID2D1BitmapBrush1_GetInterpolationMode(brush1);
+ ok(interpolation_mode == D2D1_BITMAP_INTERPOLATION_MODE_LINEAR,
+ "Unexpected interpolation mode %#x.\n", interpolation_mode);
+
+ interpolation_mode1 = ID2D1BitmapBrush1_GetInterpolationMode1(brush1);
+ ok(interpolation_mode1 == D2D1_INTERPOLATION_MODE_CUBIC,
+ "Unexpected interpolation mode %#x.\n", interpolation_mode1);
+
+ ID2D1BitmapBrush1_SetInterpolationMode1(brush1, 100);
+ interpolation_mode1 = ID2D1BitmapBrush1_GetInterpolationMode1(brush1);
+ ok(interpolation_mode1 == D2D1_INTERPOLATION_MODE_CUBIC,
+ "Unexpected interpolation mode %#x.\n", interpolation_mode1);
+
+ ID2D1BitmapBrush1_SetInterpolationMode(brush1, 100);
+ interpolation_mode1 = ID2D1BitmapBrush1_GetInterpolationMode1(brush1);
+ ok(interpolation_mode1 == D2D1_INTERPOLATION_MODE_CUBIC,
+ "Unexpected interpolation mode %#x.\n", interpolation_mode1);
+
+ ID2D1BitmapBrush1_SetInterpolationMode(brush1, D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR);
+ interpolation_mode = ID2D1BitmapBrush1_GetInterpolationMode(brush1);
+ ok(interpolation_mode == D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR,
+ "Unexpected interpolation mode %#x.\n", interpolation_mode);
+
+ interpolation_mode1 = ID2D1BitmapBrush1_GetInterpolationMode1(brush1);
+ ok(interpolation_mode1 == D2D1_INTERPOLATION_MODE_NEAREST_NEIGHBOR,
+ "Unexpected interpolation mode %#x.\n", interpolation_mode1);
+
+ ID2D1BitmapBrush1_Release(brush1);
+ }
+
ID2D1BitmapBrush_Release(brush);
refcount = ID2D1Bitmap_Release(bitmap);
ok(!refcount, "Bitmap has %u references left.\n", refcount);
--
2.18.0
Sept. 18, 2018