winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
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
List overview
wine-commits
May 2022
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
907 discussions
Start a n
N
ew thread
Nikolay Sivov : kerberos: Use 64-bit integer for credential handles.
by Alexandre Julliard
30 May '22
30 May '22
Module: wine Branch: master Commit: 5c56d719197bcc80e158f2a4c5fd23c746152a97 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5c56d719197bcc80e158f2a4…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat May 28 00:51:48 2022 +0300 kerberos: Use 64-bit integer for credential handles. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/kerberos/krb5_ap.c | 59 +++++++++++++++++++++++++++++++++++++++++++------ dlls/kerberos/unixlib.c | 11 ++++----- dlls/kerberos/unixlib.h | 11 ++++++--- 3 files changed, 66 insertions(+), 15 deletions(-) diff --git a/dlls/kerberos/krb5_ap.c b/dlls/kerberos/krb5_ap.c index efd425dc0ee..9fea8c85d89 100644 --- a/dlls/kerberos/krb5_ap.c +++ b/dlls/kerberos/krb5_ap.c @@ -77,6 +77,11 @@ static const SecPkgInfoW infoW = static ULONG kerberos_package_id; static LSA_DISPATCH_TABLE lsa_dispatch; +struct cred_handle +{ + UINT64 handle; +}; + static const char *debugstr_us( const UNICODE_STRING *us ) { if (!us) return "<null>"; @@ -285,6 +290,7 @@ static NTSTATUS NTAPI kerberos_SpAcquireCredentialsHandle( char *principal = NULL, *username = NULL, *password = NULL; SEC_WINNT_AUTH_IDENTITY_W *id = auth_data; NTSTATUS status = SEC_E_INSUFFICIENT_MEMORY; + struct cred_handle *cred_handle; ULONG exptime; TRACE( "%s, %#lx, %p, %p, %p, %p, %p, %p\n", debugstr_us(principal_us), credential_use, @@ -303,10 +309,19 @@ static NTSTATUS NTAPI kerberos_SpAcquireCredentialsHandle( if (!(password = get_password_unixcp( id->Password, id->PasswordLength ))) goto done; } + if (!(cred_handle = calloc( 1, sizeof(*cred_handle) ))) + { + status = SEC_E_INSUFFICIENT_MEMORY; + goto done; + } + { struct acquire_credentials_handle_params params = { principal, credential_use, username, password, - credential, &exptime }; - status = KRB5_CALL( acquire_credentials_handle, ¶ms ); + &cred_handle->handle, &exptime }; + if (!(status = KRB5_CALL( acquire_credentials_handle, ¶ms ))) + *credential = (LSA_SEC_HANDLE)cred_handle; + else + free( cred_handle ); expiry_to_timestamp( exptime, expiry ); } @@ -319,9 +334,18 @@ done: static NTSTATUS NTAPI kerberos_SpFreeCredentialsHandle( LSA_SEC_HANDLE credential ) { + struct cred_handle *cred_handle = (void *)credential; + struct free_credentials_handle_params params; + NTSTATUS status; + TRACE( "%Ix\n", credential ); - if (!credential) return SEC_E_INVALID_HANDLE; - return KRB5_CALL( free_credentials_handle, (void *)credential ); + + if (!cred_handle) return SEC_E_INVALID_HANDLE; + + params.credential = cred_handle->handle; + status = KRB5_CALL( free_credentials_handle, ¶ms ); + free(cred_handle); + return status; } static NTSTATUS NTAPI kerberos_SpInitLsaModeContext( LSA_SEC_HANDLE credential, LSA_SEC_HANDLE context, @@ -345,8 +369,19 @@ static NTSTATUS NTAPI kerberos_SpInitLsaModeContext( LSA_SEC_HANDLE credential, if (target_name && !(target = get_str_unixcp( target_name ))) return SEC_E_INSUFFICIENT_MEMORY; else { - struct initialize_context_params params = { credential, context, target, context_req, input, - new_context, output, context_attr, &exptime }; + struct cred_handle *cred_handle = (struct cred_handle *)credential; + struct initialize_context_params params; + + params.credential = cred_handle ? cred_handle->handle : 0; + params.context = context; + params.target_name = target; + params.context_req = context_req; + params.input = input; + params.new_context = new_context; + params.output = output; + params.context_attr = context_attr; + params.expiry = &exptime; + status = KRB5_CALL( initialize_context, ¶ms ); if (!status) { @@ -372,7 +407,17 @@ static NTSTATUS NTAPI kerberos_SpAcceptLsaModeContext( LSA_SEC_HANDLE credential if (context || input || credential) { - struct accept_context_params params = { credential, context, input, new_context, output, context_attr, &exptime }; + struct cred_handle *cred_handle = (struct cred_handle *)credential; + struct accept_context_params params; + + params.credential = cred_handle ? cred_handle->handle : 0; + params.context = context; + params.input = input; + params.new_context = new_context; + params.output = output; + params.context_attr = context_attr; + params.expiry = &exptime; + status = KRB5_CALL( accept_context, ¶ms ); if (!status) { diff --git a/dlls/kerberos/unixlib.c b/dlls/kerberos/unixlib.c index 10d2628b794..66d151488b3 100644 --- a/dlls/kerberos/unixlib.c +++ b/dlls/kerberos/unixlib.c @@ -491,9 +491,9 @@ static inline gss_ctx_id_t ctxhandle_sspi_to_gss( LSA_SEC_HANDLE handle ) return (gss_ctx_id_t)handle; } -static inline gss_cred_id_t credhandle_sspi_to_gss( LSA_SEC_HANDLE handle ) +static inline gss_cred_id_t credhandle_sspi_to_gss( UINT64 handle ) { - return (gss_cred_id_t)handle; + return (gss_cred_id_t)(ULONG_PTR)handle; } static inline void ctxhandle_gss_to_sspi( gss_ctx_id_t handle, LSA_SEC_HANDLE *ctx ) @@ -501,9 +501,9 @@ static inline void ctxhandle_gss_to_sspi( gss_ctx_id_t handle, LSA_SEC_HANDLE *c *ctx = (LSA_SEC_HANDLE)handle; } -static inline void credhandle_gss_to_sspi( gss_cred_id_t handle, LSA_SEC_HANDLE *cred ) +static inline void credhandle_gss_to_sspi( gss_cred_id_t handle, UINT64 *cred ) { - *cred = (LSA_SEC_HANDLE)handle; + *cred = (ULONG_PTR)handle; } static ULONG flags_gss_to_asc_ret( ULONG flags ) @@ -665,8 +665,9 @@ static NTSTATUS delete_context( void *args ) static NTSTATUS free_credentials_handle( void *args ) { + const struct free_credentials_handle_params *params = args; OM_uint32 ret, minor_status; - gss_cred_id_t cred = credhandle_sspi_to_gss( (LSA_SEC_HANDLE)args ); + gss_cred_id_t cred = credhandle_sspi_to_gss( params->credential ); ret = pgss_release_cred( &minor_status, &cred ); TRACE( "gss_release_cred returned %#x minor status %#x\n", ret, minor_status ); diff --git a/dlls/kerberos/unixlib.h b/dlls/kerberos/unixlib.h index 4a31712bfe8..7c3f97f436d 100644 --- a/dlls/kerberos/unixlib.h +++ b/dlls/kerberos/unixlib.h @@ -25,7 +25,7 @@ struct accept_context_params { - LSA_SEC_HANDLE credential; + UINT64 credential; LSA_SEC_HANDLE context; SecBufferDesc *input; LSA_SEC_HANDLE *new_context; @@ -40,13 +40,18 @@ struct acquire_credentials_handle_params ULONG credential_use; const char *username; const char *password; - LSA_SEC_HANDLE *credential; + UINT64 *credential; ULONG *expiry; }; +struct free_credentials_handle_params +{ + UINT64 credential; +}; + struct initialize_context_params { - LSA_SEC_HANDLE credential; + UINT64 credential; LSA_SEC_HANDLE context; const char *target_name; ULONG context_req;
1
0
0
0
Hans Leidekker : mscms: Use CRT memory allocation functions.
by Alexandre Julliard
30 May '22
30 May '22
Module: wine Branch: master Commit: 948e2f6554ef8a5481f8a552739ee627d524e3fb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=948e2f6554ef8a5481f8a552…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Mon May 30 15:55:45 2022 +0200 mscms: Use CRT memory allocation functions. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mscms/handle.c | 17 +++--- dlls/mscms/profile.c | 166 +++++++++++++++++++-------------------------------- 2 files changed, 73 insertions(+), 110 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=948e2f6554ef8a5481f8…
1
0
0
0
Hans Leidekker : mscms: Get rid of an unused structure.
by Alexandre Julliard
30 May '22
30 May '22
Module: wine Branch: master Commit: 4a4f73d7f6102a0baa1aaf1a2e8ced83527c8d45 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4a4f73d7f6102a0baa1aaf1a…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Mon May 30 15:55:44 2022 +0200 mscms: Get rid of an unused structure. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mscms/mscms_priv.h | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/dlls/mscms/mscms_priv.h b/dlls/mscms/mscms_priv.h index 7a4a35ebc24..29895fb8ae8 100644 --- a/dlls/mscms/mscms_priv.h +++ b/dlls/mscms/mscms_priv.h @@ -65,19 +65,4 @@ extern BOOL set_tag_data( const struct profile *, TAGTYPE, DWORD, const void *, extern void get_profile_header( const struct profile *, PROFILEHEADER * ) DECLSPEC_HIDDEN; extern void set_profile_header( const struct profile *, const PROFILEHEADER * ) DECLSPEC_HIDDEN; -struct lcms_funcs -{ - void * (CDECL *open_profile)( void *data, DWORD size ); - void (CDECL *close_profile)( void *profile ); - void * (CDECL *create_transform)( void *output, void *target, DWORD intent ); - void * (CDECL *create_multi_transform)( void *profiles, DWORD count, DWORD intent ); - BOOL (CDECL *translate_bits)( void *transform, void *srcbits, BMFORMAT input, - void *dstbits, BMFORMAT output, DWORD size ); - BOOL (CDECL *translate_colors)( void *transform, COLOR *in, DWORD count, COLORTYPE input_type, - COLOR *out, COLORTYPE output_type ); - void (CDECL *close_transform)( void *transform ); -}; - -extern const struct lcms_funcs *lcms_funcs; - extern const char *dbgstr_tag(DWORD) DECLSPEC_HIDDEN;
1
0
0
0
Hans Leidekker : mscms/tests: Get rid of workarounds for old Windows versions.
by Alexandre Julliard
30 May '22
30 May '22
Module: wine Branch: master Commit: 58afdcfec4413b72e863f085ac650563419458a2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=58afdcfec4413b72e863f085…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Mon May 30 15:55:43 2022 +0200 mscms/tests: Get rid of workarounds for old Windows versions. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mscms/tests/Makefile.in | 2 +- dlls/mscms/tests/profile.c | 546 +++++++++++++++---------------------------- 2 files changed, 195 insertions(+), 353 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=58afdcfec4413b72e863…
1
0
0
0
Zhao Yi : mscms: Return the correct value for bmformat.
by Alexandre Julliard
30 May '22
30 May '22
Module: wine Branch: master Commit: 148c708bdaebaba50ab7c115f5fbe711a61ea8ec URL:
https://source.winehq.org/git/wine.git/?a=commit;h=148c708bdaebaba50ab7c115…
Author: Zhao Yi <zhaoyi(a)uniontech.com> Date: Mon May 30 15:55:42 2022 +0200 mscms: Return the correct value for bmformat. Signed-off-by: Zhao Yi <zhaoyi(a)uniontech.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mscms/tests/profile.c | 8 ++++---- dlls/mscms/transform.c | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dlls/mscms/tests/profile.c b/dlls/mscms/tests/profile.c index 025b1531796..e5f924fb2da 100644 --- a/dlls/mscms/tests/profile.c +++ b/dlls/mscms/tests/profile.c @@ -1396,22 +1396,22 @@ static void test_TranslateBitmapBits( char *standardprofile, char *testprofile ) memset( destbits, 0, sizeof(destbits) ); ret = pTranslateBitmapBits( transform, srcbits, BM_RGBTRIPLETS, 1, 1, 3, destbits, BM_xBGRQUADS, 4, NULL, 0 ); ok( ret, "got %lu\n", GetLastError() ); - todo_wine ok( !memcmp(expect_destbits, destbits, sizeof(expect_destbits)), "unexpected destbits\n" ); + ok( !memcmp(expect_destbits, destbits, sizeof(expect_destbits)), "unexpected destbits\n" ); memset( destbits, 0, sizeof(destbits) ); ret = pTranslateBitmapBits( transform, srcbits, BM_RGBTRIPLETS, 1, 1, 3, destbits, BM_xRGBQUADS, 4, NULL, 0 ); ok( ret, "got %lu\n", GetLastError() ); - todo_wine ok( !memcmp(expect_destbits2, destbits, sizeof(expect_destbits2)), "unexpected destbits\n" ); + ok( !memcmp(expect_destbits2, destbits, sizeof(expect_destbits2)), "unexpected destbits\n" ); memset( destbits, 0, sizeof(destbits) ); ret = pTranslateBitmapBits( transform, srcbits2, BM_xRGBQUADS, 1, 1, 4, destbits, BM_RGBTRIPLETS, 3, NULL, 0 ); ok( ret, "got %lu\n", GetLastError() ); - todo_wine ok( !memcmp(expect_destbits3, destbits, sizeof(expect_destbits3)), "unexpected destbits\n" ); + ok( !memcmp(expect_destbits3, destbits, sizeof(expect_destbits3)), "unexpected destbits\n" ); memset( destbits, 0, sizeof(destbits) ); ret = pTranslateBitmapBits( transform, srcbits2, BM_xRGBQUADS, 1, 1, 4, destbits, BM_BGRTRIPLETS, 3, NULL, 0 ); ok( ret, "got %lu\n", GetLastError() ); - todo_wine ok( !memcmp(expect_destbits4, destbits, sizeof(expect_destbits4)), "unexpected destbits\n" ); + ok( !memcmp(expect_destbits4, destbits, sizeof(expect_destbits4)), "unexpected destbits\n" ); pDeleteColorTransform( transform ); pCloseColorProfile( handle[0] ); diff --git a/dlls/mscms/transform.c b/dlls/mscms/transform.c index 0d48e217d66..22901ad721c 100644 --- a/dlls/mscms/transform.c +++ b/dlls/mscms/transform.c @@ -39,12 +39,12 @@ static DWORD from_bmformat( BMFORMAT format ) switch (format) { - case BM_RGBTRIPLETS: ret = TYPE_RGB_8; break; - case BM_BGRTRIPLETS: ret = TYPE_BGR_8; break; + case BM_RGBTRIPLETS: ret = TYPE_BGR_8; break; + case BM_BGRTRIPLETS: ret = TYPE_RGB_8; break; case BM_GRAY: ret = TYPE_GRAY_8; break; - case BM_xRGBQUADS: ret = TYPE_ARGB_8; break; - case BM_xBGRQUADS: ret = TYPE_ABGR_8; break; - case BM_KYMCQUADS: ret = TYPE_KYMC_8; break; + case BM_xRGBQUADS: ret = TYPE_BGRA_8; break; + case BM_xBGRQUADS: ret = TYPE_RGBA_8; break; + case BM_KYMCQUADS: ret = TYPE_CMYK_8; break; default: if (!quietfixme) {
1
0
0
0
Hans Leidekker : mscms/tests: Add TranslateBitmapBits tests.
by Alexandre Julliard
30 May '22
30 May '22
Module: wine Branch: master Commit: bb6e2ee6b11d1374e47403626ab401842ba93d3a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bb6e2ee6b11d1374e4740362…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Mon May 30 15:55:41 2022 +0200 mscms/tests: Add TranslateBitmapBits tests. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mscms/tests/profile.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/dlls/mscms/tests/profile.c b/dlls/mscms/tests/profile.c index e0bfbd70e10..025b1531796 100644 --- a/dlls/mscms/tests/profile.c +++ b/dlls/mscms/tests/profile.c @@ -58,6 +58,7 @@ static BOOL (WINAPI *pSetColorProfileElement)(HPROFILE,TAGTYPE,DWORD,PDWORD, static BOOL (WINAPI *pSetColorProfileHeader)(HPROFILE,PPROFILEHEADER); static BOOL (WINAPI *pSetStandardColorSpaceProfileA)(PCSTR,DWORD,PSTR); static BOOL (WINAPI *pSetStandardColorSpaceProfileW)(PCWSTR,DWORD,PWSTR); +static BOOL (WINAPI *pTranslateBitmapBits)(HTRANSFORM,PVOID,BMFORMAT,DWORD,DWORD,DWORD,PVOID,BMFORMAT,DWORD,PBMCALLBACKFN,ULONG); static BOOL (WINAPI *pUninstallColorProfileA)(PCSTR,PCSTR,BOOL); static BOOL (WINAPI *pUninstallColorProfileW)(PCWSTR,PCWSTR,BOOL); @@ -95,6 +96,7 @@ static BOOL init_function_ptrs( void ) GETFUNCPTR( SetStandardColorSpaceProfileW ) GETFUNCPTR( UninstallColorProfileA ) GETFUNCPTR( UninstallColorProfileW ) + GETFUNCPTR( TranslateBitmapBits ) pEnumDisplayDevicesA = (void *)GetProcAddress( huser32, "EnumDisplayDevicesA" ); @@ -1359,6 +1361,63 @@ static void test_CreateMultiProfileTransform( char *standardprofile, char *testp } } +static void test_TranslateBitmapBits( char *standardprofile, char *testprofile ) +{ + PROFILE profile; + HPROFILE handle[2]; + HTRANSFORM transform; + DWORD intent = INTENT_PERCEPTUAL; + BYTE srcbits[] = {0x00, 0x00, 0xff}, srcbits2[] = {0xcc, 0x00, 0x00, 0xff}, destbits[4]; + const BYTE expect_destbits[] = {0xff, 0x00, 0x00, 0x00}; + const BYTE expect_destbits2[] = {0x00, 0x00, 0xff, 0x00}; + const BYTE expect_destbits3[] = {0xcc, 0x00, 0x00}; + const BYTE expect_destbits4[] = {0x00, 0x00, 0xcc}; + BOOL ret; + + if (!standardprofile) return; + + profile.dwType = PROFILE_FILENAME; + profile.pProfileData = standardprofile; + profile.cbDataSize = strlen(standardprofile); + + handle[0] = pOpenColorProfileA( &profile, PROFILE_READ, 1, OPEN_EXISTING ); + ok( handle[0] != NULL, "got %lu\n", GetLastError() ); + + profile.dwType = PROFILE_FILENAME; + profile.pProfileData = testprofile; + profile.cbDataSize = strlen(testprofile); + + handle[1] = pOpenColorProfileA( &profile, PROFILE_READ, 1, OPEN_EXISTING ); + ok( handle[1] != NULL, "got %lu\n", GetLastError() ); + + transform = pCreateMultiProfileTransform( handle, 2, &intent, 1, 0, 0 ); + ok( transform != NULL, "got %lu\n", GetLastError() ); + + memset( destbits, 0, sizeof(destbits) ); + ret = pTranslateBitmapBits( transform, srcbits, BM_RGBTRIPLETS, 1, 1, 3, destbits, BM_xBGRQUADS, 4, NULL, 0 ); + ok( ret, "got %lu\n", GetLastError() ); + todo_wine ok( !memcmp(expect_destbits, destbits, sizeof(expect_destbits)), "unexpected destbits\n" ); + + memset( destbits, 0, sizeof(destbits) ); + ret = pTranslateBitmapBits( transform, srcbits, BM_RGBTRIPLETS, 1, 1, 3, destbits, BM_xRGBQUADS, 4, NULL, 0 ); + ok( ret, "got %lu\n", GetLastError() ); + todo_wine ok( !memcmp(expect_destbits2, destbits, sizeof(expect_destbits2)), "unexpected destbits\n" ); + + memset( destbits, 0, sizeof(destbits) ); + ret = pTranslateBitmapBits( transform, srcbits2, BM_xRGBQUADS, 1, 1, 4, destbits, BM_RGBTRIPLETS, 3, NULL, 0 ); + ok( ret, "got %lu\n", GetLastError() ); + todo_wine ok( !memcmp(expect_destbits3, destbits, sizeof(expect_destbits3)), "unexpected destbits\n" ); + + memset( destbits, 0, sizeof(destbits) ); + ret = pTranslateBitmapBits( transform, srcbits2, BM_xRGBQUADS, 1, 1, 4, destbits, BM_BGRTRIPLETS, 3, NULL, 0 ); + ok( ret, "got %lu\n", GetLastError() ); + todo_wine ok( !memcmp(expect_destbits4, destbits, sizeof(expect_destbits4)), "unexpected destbits\n" ); + + pDeleteColorTransform( transform ); + pCloseColorProfile( handle[0] ); + pCloseColorProfile( handle[1] ); +} + START_TEST(profile) { UINT len; @@ -1469,6 +1528,7 @@ START_TEST(profile) test_AssociateColorProfileWithDeviceA( testprofile ); test_CreateMultiProfileTransform( standardprofile, testprofile ); + test_TranslateBitmapBits( standardprofile, testprofile ); if (testprofile) DeleteFileA( testprofile ); FreeLibrary( huser32 );
1
0
0
0
Alistair Leslie-Hughes : d3drm: Implement IDirect3DRMTexture3::{Get,Set}DecalSize().
by Alexandre Julliard
30 May '22
30 May '22
Module: wine Branch: master Commit: a8a126c4a32b41be80022f02b37579bf4fbcc596 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a8a126c4a32b41be80022f02…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Fri May 27 09:10:30 2022 +0000 d3drm: Implement IDirect3DRMTexture3::{Get,Set}DecalSize(). --- dlls/d3drm/d3drm_private.h | 2 ++ dlls/d3drm/tests/d3drm.c | 17 +++++++++++++++++ dlls/d3drm/texture.c | 20 ++++++++++++++++---- 3 files changed, 35 insertions(+), 4 deletions(-) diff --git a/dlls/d3drm/d3drm_private.h b/dlls/d3drm/d3drm_private.h index c5df376a72e..2fb6bafe951 100644 --- a/dlls/d3drm/d3drm_private.h +++ b/dlls/d3drm/d3drm_private.h @@ -69,6 +69,8 @@ struct d3drm_texture DWORD max_colors; DWORD max_shades; BOOL transparency; + D3DVALUE decal_width; + D3DVALUE decal_height; }; struct d3drm_frame diff --git a/dlls/d3drm/tests/d3drm.c b/dlls/d3drm/tests/d3drm.c index c9cfe932ca4..5745fea4b09 100644 --- a/dlls/d3drm/tests/d3drm.c +++ b/dlls/d3drm/tests/d3drm.c @@ -2713,6 +2713,7 @@ static void test_Texture(void) LONG decalx, decaly; DWORD colors, shades; BOOL transparency; + D3DVALUE width, height; D3DRMIMAGE initimg = { @@ -2920,6 +2921,22 @@ static void test_Texture(void) hr = IDirect3DRMTexture_SetShades(texture1, 8); ok(hr == S_OK, "got %#lx.\n", hr); + hr = IDirect3DRMTexture_GetDecalSize(texture1, &width, &height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(width == 1.0f, "Got %.8e.\n", width); + ok(height == 1.0f, "Got %.8e.\n", height); + + hr = IDirect3DRMTexture_SetDecalSize(texture1, 8.0f, 7.0f); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + hr = IDirect3DRMTexture_GetDecalSize(texture1, &width, &height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(width == 8.0f, "Got %.8e.\n", width); + ok(height == 7.0f, "Got %.8e.\n", height); + + hr = IDirect3DRMTexture_SetDecalSize(texture1, 1.0f, 1.0f); + ok(hr == S_OK, "got %#lx.\n", hr); + transparency = IDirect3DRMTexture_GetDecalTransparency(texture1); ok(transparency == FALSE, "Got %d.\n", transparency); diff --git a/dlls/d3drm/texture.c b/dlls/d3drm/texture.c index a14e47efc1e..a60317b48bc 100644 --- a/dlls/d3drm/texture.c +++ b/dlls/d3drm/texture.c @@ -1193,9 +1193,14 @@ static HRESULT WINAPI d3drm_texture3_SetShades(IDirect3DRMTexture3 *iface, DWORD static HRESULT WINAPI d3drm_texture3_SetDecalSize(IDirect3DRMTexture3 *iface, D3DVALUE width, D3DVALUE height) { - FIXME("iface %p, width %.8e, height %.8e stub!\n", iface, width, height); + struct d3drm_texture *texture = impl_from_IDirect3DRMTexture3(iface); - return E_NOTIMPL; + TRACE("iface %p, width %.8e, height %.8e.\n", iface, width, height); + + texture->decal_width = width; + texture->decal_height = height; + + return S_OK; } static HRESULT WINAPI d3drm_texture3_SetDecalOrigin(IDirect3DRMTexture3 *iface, LONG x, LONG y) @@ -1237,9 +1242,14 @@ static HRESULT WINAPI d3drm_texture3_SetDecalTransparentColor(IDirect3DRMTexture static HRESULT WINAPI d3drm_texture3_GetDecalSize(IDirect3DRMTexture3 *iface, D3DVALUE *width, D3DVALUE *height) { - FIXME("iface %p, width %p, height %p stub!\n", iface, width, height); + struct d3drm_texture *texture = impl_from_IDirect3DRMTexture3(iface); - return E_NOTIMPL; + TRACE("iface %p, width %p, height %p.\n", iface, width, height); + + *width = texture->decal_width; + *height = texture->decal_height; + + return S_OK; } static HRESULT WINAPI d3drm_texture3_GetDecalOrigin(IDirect3DRMTexture3 *iface, LONG *x, LONG *y) @@ -1448,6 +1458,8 @@ HRESULT d3drm_texture_create(struct d3drm_texture **texture, IDirect3DRM *d3drm) object->max_colors = 8; object->max_shades = 16; object->transparency = FALSE; + object->decal_width = 1.0f; + object->decal_height = 1.0f; d3drm_object_init(&object->obj, classname);
1
0
0
0
Alistair Leslie-Hughes : d3drm: Implement IDirect3DRMTexture3::{Get,Set}DecalTransparency().
by Alexandre Julliard
30 May '22
30 May '22
Module: wine Branch: master Commit: 66c8cb3ee961ef259071f90c86d32018e1e9b1ac URL:
https://source.winehq.org/git/wine.git/?a=commit;h=66c8cb3ee961ef259071f90c…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Fri May 27 09:10:29 2022 +0000 d3drm: Implement IDirect3DRMTexture3::{Get,Set}DecalTransparency(). Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- dlls/d3drm/d3drm_private.h | 1 + dlls/d3drm/tests/d3drm.c | 13 +++++++++++++ dlls/d3drm/texture.c | 15 +++++++++++---- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/dlls/d3drm/d3drm_private.h b/dlls/d3drm/d3drm_private.h index 44bf41fdabf..c5df376a72e 100644 --- a/dlls/d3drm/d3drm_private.h +++ b/dlls/d3drm/d3drm_private.h @@ -68,6 +68,7 @@ struct d3drm_texture LONG decal_y; DWORD max_colors; DWORD max_shades; + BOOL transparency; }; struct d3drm_frame diff --git a/dlls/d3drm/tests/d3drm.c b/dlls/d3drm/tests/d3drm.c index 72c71ebae09..c9cfe932ca4 100644 --- a/dlls/d3drm/tests/d3drm.c +++ b/dlls/d3drm/tests/d3drm.c @@ -2712,6 +2712,7 @@ static void test_Texture(void) IDirectDrawSurface *surface; LONG decalx, decaly; DWORD colors, shades; + BOOL transparency; D3DRMIMAGE initimg = { @@ -2919,6 +2920,18 @@ static void test_Texture(void) hr = IDirect3DRMTexture_SetShades(texture1, 8); ok(hr == S_OK, "got %#lx.\n", hr); + transparency = IDirect3DRMTexture_GetDecalTransparency(texture1); + ok(transparency == FALSE, "Got %d.\n", transparency); + + hr = IDirect3DRMTexture_SetDecalTransparency(texture1, TRUE); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + transparency = IDirect3DRMTexture_GetDecalTransparency(texture1); + ok(transparency == TRUE, "Got %d.\n", transparency); + + hr = IDirect3DRMTexture_SetDecalTransparency(texture1, FALSE); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + d3drm_img = IDirect3DRMTexture_GetImage(texture1); ok(!!d3drm_img, "Failed to get image.\n"); ok(d3drm_img == &initimg, "Expected image returned == %p, got %p.\n", &initimg, d3drm_img); diff --git a/dlls/d3drm/texture.c b/dlls/d3drm/texture.c index 76f82671811..a14e47efc1e 100644 --- a/dlls/d3drm/texture.c +++ b/dlls/d3drm/texture.c @@ -1219,9 +1219,13 @@ static HRESULT WINAPI d3drm_texture3_SetDecalScale(IDirect3DRMTexture3 *iface, D static HRESULT WINAPI d3drm_texture3_SetDecalTransparency(IDirect3DRMTexture3 *iface, BOOL transparency) { - FIXME("iface %p, transparency %#x stub!\n", iface, transparency); + struct d3drm_texture *texture = impl_from_IDirect3DRMTexture3(iface); - return E_NOTIMPL; + TRACE("iface %p, transparency %#x.\n", iface, transparency); + + texture->transparency = transparency; + + return S_OK; } static HRESULT WINAPI d3drm_texture3_SetDecalTransparentColor(IDirect3DRMTexture3 *iface, D3DCOLOR color) @@ -1282,9 +1286,11 @@ static DWORD WINAPI d3drm_texture3_GetDecalScale(IDirect3DRMTexture3 *iface) static BOOL WINAPI d3drm_texture3_GetDecalTransparency(IDirect3DRMTexture3 *iface) { - FIXME("iface %p stub!\n", iface); + struct d3drm_texture *texture = impl_from_IDirect3DRMTexture3(iface); + + TRACE("iface %p.\n", iface); - return FALSE; + return texture->transparency; } static D3DCOLOR WINAPI d3drm_texture3_GetDecalTransparentColor(IDirect3DRMTexture3 *iface) @@ -1441,6 +1447,7 @@ HRESULT d3drm_texture_create(struct d3drm_texture **texture, IDirect3DRM *d3drm) object->d3drm = d3drm; object->max_colors = 8; object->max_shades = 16; + object->transparency = FALSE; d3drm_object_init(&object->obj, classname);
1
0
0
0
Paul Gofman : wininet: Return INTERNET_RAS_INSTALLED flag from InternetGetConnectedStateExW().
by Alexandre Julliard
30 May '22
30 May '22
Module: wine Branch: master Commit: 49845c512d731c1bd614077f000f39e1fd00b6d6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=49845c512d731c1bd614077f…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Fri May 27 17:22:37 2022 -0500 wininet: Return INTERNET_RAS_INSTALLED flag from InternetGetConnectedStateExW(). Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> --- dlls/wininet/internet.c | 4 ++-- dlls/wininet/tests/internet.c | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index 4d512e4ef39..120cc9af4cc 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -1213,8 +1213,8 @@ BOOL WINAPI InternetGetConnectedStateExW(LPDWORD lpdwStatus, LPWSTR lpszConnecti return FALSE; if (lpdwStatus) { - WARN("always returning LAN connection.\n"); - *lpdwStatus = INTERNET_CONNECTION_LAN; + WARN("always returning LAN connection and RAS installed.\n"); + *lpdwStatus = INTERNET_CONNECTION_LAN | INTERNET_RAS_INSTALLED; } /* When the buffer size is zero LoadStringW fills the buffer with a pointer to diff --git a/dlls/wininet/tests/internet.c b/dlls/wininet/tests/internet.c index 5083596f9df..97bd36f9427 100644 --- a/dlls/wininet/tests/internet.c +++ b/dlls/wininet/tests/internet.c @@ -1632,7 +1632,6 @@ static void test_InternetGetConnectedStateExA(void) buffer[0] = 0; res = pInternetGetConnectedStateExA(&flags, buffer, sizeof(buffer), 0); trace("Internet Connection: Flags 0x%02lx - Name '%s'\n", flags, buffer); - todo_wine ok (flags & INTERNET_RAS_INSTALLED, "Missing RAS flag\n"); if(!res) { win_skip("InternetGetConnectedStateExA tests require a valid connection\n"); @@ -1734,7 +1733,6 @@ static void test_InternetGetConnectedStateExW(void) buffer[0] = 0; res = pInternetGetConnectedStateExW(&flags, buffer, ARRAY_SIZE(buffer), 0); trace("Internet Connection: Flags 0x%02lx - Name '%s'\n", flags, wine_dbgstr_w(buffer)); - todo_wine ok (flags & INTERNET_RAS_INSTALLED, "Missing RAS flag\n"); if(!res) { win_skip("InternetGetConnectedStateExW tests require a valid connection\n");
1
0
0
0
Nikolay Sivov : d2d1: Implement bitmap mapping.
by Alexandre Julliard
30 May '22
30 May '22
Module: wine Branch: master Commit: 5e25a4546c812eb174d142a41c28cf83ef2b567e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5e25a4546c812eb174d142a4…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun May 29 15:18:53 2022 +0300 d2d1: Implement bitmap mapping. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/d2d1/bitmap.c | 72 +++++++++++++++++++++++++++++++++++++++++++++--- dlls/d2d1/d2d1_private.h | 1 + dlls/d2d1/tests/d2d1.c | 21 +------------- 3 files changed, 70 insertions(+), 24 deletions(-) diff --git a/dlls/d2d1/bitmap.c b/dlls/d2d1/bitmap.c index 904d44cc075..6a02279b91b 100644 --- a/dlls/d2d1/bitmap.c +++ b/dlls/d2d1/bitmap.c @@ -26,6 +26,25 @@ static inline struct d2d_bitmap *impl_from_ID2D1Bitmap1(ID2D1Bitmap1 *iface) return CONTAINING_RECORD(iface, struct d2d_bitmap, ID2D1Bitmap1_iface); } +static HRESULT d2d_bitmap_unmap(struct d2d_bitmap *bitmap) +{ + ID3D11DeviceContext *context; + ID3D11Device *device; + + if (!bitmap->mapped_resource.pData) + return D2DERR_WRONG_STATE; + + ID3D11Resource_GetDevice(bitmap->resource, &device); + ID3D11Device_GetImmediateContext(device, &context); + ID3D11DeviceContext_Unmap(context, bitmap->resource, 0); + ID3D11DeviceContext_Release(context); + ID3D11Device_Release(device); + + memset(&bitmap->mapped_resource, 0, sizeof(bitmap->mapped_resource)); + + return S_OK; +} + static HRESULT STDMETHODCALLTYPE d2d_bitmap_QueryInterface(ID2D1Bitmap1 *iface, REFIID iid, void **out) { TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out); @@ -229,16 +248,61 @@ static HRESULT STDMETHODCALLTYPE d2d_bitmap_GetSurface(ID2D1Bitmap1 *iface, IDXG static HRESULT STDMETHODCALLTYPE d2d_bitmap_Map(ID2D1Bitmap1 *iface, D2D1_MAP_OPTIONS options, D2D1_MAPPED_RECT *mapped_rect) { - FIXME("iface %p, options %#x, mapped_rect %p stub!\n", iface, options, mapped_rect); + struct d2d_bitmap *bitmap = impl_from_ID2D1Bitmap1(iface); + D3D11_MAPPED_SUBRESOURCE mapped_resource; + ID3D11DeviceContext *context; + ID3D11Device *device; + D3D11_MAP map_type; + HRESULT hr; - return E_NOTIMPL; + TRACE("iface %p, options %#x, mapped_rect %p.\n", iface, options, mapped_rect); + + if (bitmap->mapped_resource.pData) + return D2DERR_WRONG_STATE; + + if (options == D2D1_MAP_OPTIONS_READ) + map_type = D3D11_MAP_READ; + else if (options == D2D1_MAP_OPTIONS_WRITE) + map_type = D3D11_MAP_WRITE; + else if (options == (D2D1_MAP_OPTIONS_READ | D2D1_MAP_OPTIONS_WRITE)) + map_type = D3D11_MAP_READ_WRITE; + else if (options == (D2D1_MAP_OPTIONS_WRITE | D2D1_MAP_OPTIONS_DISCARD)) + map_type = D3D11_MAP_WRITE_DISCARD; + else + { + WARN("Invalid mapping options %#x.\n", options); + return E_INVALIDARG; + } + + ID3D11Resource_GetDevice(bitmap->resource, &device); + ID3D11Device_GetImmediateContext(device, &context); + if (SUCCEEDED(hr = ID3D11DeviceContext_Map(context, bitmap->resource, 0, map_type, + 0, &mapped_resource))) + { + bitmap->mapped_resource = mapped_resource; + } + ID3D11DeviceContext_Release(context); + ID3D11Device_Release(device); + + if (FAILED(hr)) + { + WARN("Failed to map resource, hr %#lx.\n", hr); + return E_INVALIDARG; + } + + mapped_rect->pitch = bitmap->mapped_resource.RowPitch; + mapped_rect->bits = bitmap->mapped_resource.pData; + + return S_OK; } static HRESULT STDMETHODCALLTYPE d2d_bitmap_Unmap(ID2D1Bitmap1 *iface) { - FIXME("iface %p stub!\n", iface); + struct d2d_bitmap *bitmap = impl_from_ID2D1Bitmap1(iface); - return E_NOTIMPL; + TRACE("iface %p.\n", iface); + + return d2d_bitmap_unmap(bitmap); } static const struct ID2D1Bitmap1Vtbl d2d_bitmap_vtbl = diff --git a/dlls/d2d1/d2d1_private.h b/dlls/d2d1/d2d1_private.h index 8edfa030ee1..48649f6a916 100644 --- a/dlls/d2d1/d2d1_private.h +++ b/dlls/d2d1/d2d1_private.h @@ -395,6 +395,7 @@ struct d2d_bitmap ID3D11RenderTargetView *rtv; IDXGISurface *surface; ID3D11Resource *resource; + D3D11_MAPPED_SUBRESOURCE mapped_resource; D2D1_SIZE_U pixel_size; D2D1_PIXEL_FORMAT format; float dpi_x; diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index ac96c1a0d50..807a7be5ae6 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -11634,13 +11634,10 @@ static void test_bitmap_map(BOOL d3d11) ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = ID2D1Bitmap1_Map(bitmap, D2D1_MAP_OPTIONS_NONE, &mapped_rect); - todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); hr = ID2D1Bitmap1_Map(bitmap, D2D1_MAP_OPTIONS_READ, &mapped_rect); - todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); hr = ID2D1Bitmap1_Map(bitmap, D2D1_MAP_OPTIONS_WRITE, &mapped_rect); - todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); hr = ID2D1Bitmap1_GetSurface(bitmap, &surface); @@ -11672,37 +11669,28 @@ static void test_bitmap_map(BOOL d3d11) ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = ID2D1Bitmap1_Map(bitmap, D2D1_MAP_OPTIONS_NONE, &mapped_rect); - todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); hr = ID2D1Bitmap1_Map(bitmap, D2D1_MAP_OPTIONS_READ, &mapped_rect); - todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = ID2D1Bitmap1_Map(bitmap, D2D1_MAP_OPTIONS_READ, &mapped_rect); - todo_wine ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr); hr = ID2D1Bitmap1_Map(bitmap, D2D1_MAP_OPTIONS_WRITE, &mapped_rect); todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); hr = ID2D1Bitmap1_Unmap(bitmap); - todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = ID2D1Bitmap1_Unmap(bitmap); - todo_wine ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr); hr = ID2D1Bitmap1_Map(bitmap, D2D1_MAP_OPTIONS_WRITE, &mapped_rect); - todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); hr = ID2D1Bitmap1_Map(bitmap, D2D1_MAP_OPTIONS_READ | D2D1_MAP_OPTIONS_DISCARD, &mapped_rect); - todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); hr = ID2D1Bitmap1_Map(bitmap, D2D1_MAP_OPTIONS_WRITE | D2D1_MAP_OPTIONS_DISCARD, &mapped_rect); - todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); hr = ID2D1Bitmap1_Map(bitmap, D2D1_MAP_OPTIONS_READ | D2D1_MAP_OPTIONS_WRITE, &mapped_rect); - todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); hr = ID2D1Bitmap1_GetSurface(bitmap, &surface); @@ -11748,34 +11736,27 @@ static void test_bitmap_map(BOOL d3d11) ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = ID2D1Bitmap1_Map(bitmap, D2D1_MAP_OPTIONS_READ | D2D1_MAP_OPTIONS_DISCARD, &mapped_rect); - todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); hr = ID2D1Bitmap1_Map(bitmap, D2D1_MAP_OPTIONS_READ, &mapped_rect); - todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = ID2D1Bitmap1_Unmap(bitmap); - todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = ID2D1Bitmap1_Map(bitmap, D2D1_MAP_OPTIONS_WRITE, &mapped_rect); - todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = ID2D1Bitmap1_Unmap(bitmap); - todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = ID2D1Bitmap1_Map(bitmap, D2D1_MAP_OPTIONS_WRITE | D2D1_MAP_OPTIONS_READ, &mapped_rect); - todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = ID2D1Bitmap1_Unmap(bitmap); - todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = ID2D1Bitmap1_Map(bitmap, D2D1_MAP_OPTIONS_WRITE | D2D1_MAP_OPTIONS_DISCARD, &mapped_rect); todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); + if (SUCCEEDED(hr)) ID2D1Bitmap1_Unmap(bitmap); hr = ID2D1Bitmap1_Map(bitmap, D2D1_MAP_OPTIONS_WRITE | D2D1_MAP_OPTIONS_READ | D2D1_MAP_OPTIONS_DISCARD, &mapped_rect); - todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); ID2D1Bitmap1_Release(bitmap);
1
0
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
91
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
Results per page:
10
25
50
100
200