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
January 2019
----- 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
499 discussions
Start a n
N
ew thread
Zebediah Figura : msi: Set table values directly in msi_select_update().
by Alexandre Julliard
28 Jan '19
28 Jan '19
Module: wine Branch: master Commit: f45a7b04a6caca4eed1d08f4e69884b119f3aa17 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f45a7b04a6caca4eed1d08f4…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sat Jan 26 16:58:58 2019 -0600 msi: Set table values directly in msi_select_update(). In order to avoid the need to create a temporary record and copy values back and forth. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msi/alter.c | 2 ++ dlls/msi/create.c | 2 ++ dlls/msi/delete.c | 2 ++ dlls/msi/distinct.c | 2 ++ dlls/msi/drop.c | 2 ++ dlls/msi/insert.c | 2 ++ dlls/msi/msipriv.h | 14 +++++++++++ dlls/msi/select.c | 26 +++++++------------- dlls/msi/storages.c | 8 ++++++ dlls/msi/streams.c | 8 ++++++ dlls/msi/table.c | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++-- dlls/msi/update.c | 2 ++ dlls/msi/where.c | 42 +++++++++++++++++++++++++++++++ 13 files changed, 164 insertions(+), 19 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=f45a7b04a6caca4eed1d…
1
0
0
0
Zebediah Figura : msi: Factor out int_to_table_storage().
by Alexandre Julliard
28 Jan '19
28 Jan '19
Module: wine Branch: master Commit: 99425f272f7807aea068629ef3e5fda6640b2845 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=99425f272f7807aea068629e…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sat Jan 26 16:58:57 2019 -0600 msi: Factor out int_to_table_storage(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msi/table.c | 53 ++++++++++++++++++++++++++--------------------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/dlls/msi/table.c b/dlls/msi/table.c index b507268..e4f6b56 100644 --- a/dlls/msi/table.c +++ b/dlls/msi/table.c @@ -1201,6 +1201,26 @@ static UINT TABLE_set_int( MSITABLEVIEW *tv, UINT row, UINT col, UINT val ) return ERROR_SUCCESS; } +static UINT int_to_table_storage( const MSITABLEVIEW *tv, UINT col, int val, UINT *ret ) +{ + if ((tv->columns[col-1].type & MSI_DATASIZEMASK) == 2) + { + if (val == MSI_NULL_INTEGER) + *ret = 0; + else if ((val + 0x8000) & 0xffff0000) + { + ERR("value %d out of range\n", val); + return ERROR_FUNCTION_FAILED; + } + else + *ret = val + 0x8000; + } + else + *ret = val ^ 0x80000000; + + return ERROR_SUCCESS; +} + static UINT TABLE_get_row( struct tagMSIVIEW *view, UINT row, MSIRECORD **rec ) { MSITABLEVIEW *tv = (MSITABLEVIEW *)view; @@ -1276,7 +1296,6 @@ static UINT get_table_value_from_record( MSITABLEVIEW *tv, MSIRECORD *rec, UINT { MSICOLUMNINFO columninfo; UINT r; - int ival; if (!iField || iField > tv->num_cols || MSI_RecordIsNull( rec, iField )) return ERROR_FUNCTION_FAILED; @@ -1299,25 +1318,8 @@ static UINT get_table_value_from_record( MSITABLEVIEW *tv, MSIRECORD *rec, UINT } else *pvalue = 0; } - else if ( bytes_per_column( tv->db, &columninfo, LONG_STR_BYTES ) == 2 ) - { - ival = MSI_RecordGetInteger( rec, iField ); - if (ival == 0x80000000) *pvalue = 0x8000; - else - { - *pvalue = 0x8000 + MSI_RecordGetInteger( rec, iField ); - if (*pvalue & 0xffff0000) - { - ERR("field %u value %d out of range\n", iField, *pvalue - 0x8000); - return ERROR_FUNCTION_FAILED; - } - } - } else - { - ival = MSI_RecordGetInteger( rec, iField ); - *pvalue = ival ^ 0x80000000; - } + return int_to_table_storage( tv, iField, MSI_RecordGetInteger( rec, iField ), pvalue ); return ERROR_SUCCESS; } @@ -2370,14 +2372,11 @@ static UINT* msi_record_to_row( const MSITABLEVIEW *tv, MSIRECORD *rec ) } else { - data[i] = MSI_RecordGetInteger( rec, i+1 ); - - if (data[i] == MSI_NULL_INTEGER) - data[i] = 0; - else if ((tv->columns[i].type&0xff) == 2) - data[i] += 0x8000; - else - data[i] += 0x80000000; + if (int_to_table_storage( tv, i + 1, MSI_RecordGetInteger( rec, i + 1 ), &data[i] )) + { + msi_free( data ); + return NULL; + } } } return data;
1
0
0
0
Orhan Kavrakoğlu : crypt32: Add CryptImportPublicKeyInfoEx2 stub.
by Alexandre Julliard
28 Jan '19
28 Jan '19
Module: wine Branch: master Commit: 7ab111aabbc24454d54691651667b9583fe2d377 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7ab111aabbc24454d5469165…
Author: Orhan Kavrakoğlu <aibok42(a)gmail.com> Date: Fri Jan 25 21:13:54 2019 +0300 crypt32: Add CryptImportPublicKeyInfoEx2 stub. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=46516
Signed-off-by: Orhan Kavrakoğlu <aibok42(a)gmail.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/crypt32/crypt32.spec | 1 + dlls/crypt32/encode.c | 10 ++++++++++ include/wincrypt.h | 3 +++ 3 files changed, 14 insertions(+) diff --git a/dlls/crypt32/crypt32.spec b/dlls/crypt32/crypt32.spec index fc32570..1815a1d 100644 --- a/dlls/crypt32/crypt32.spec +++ b/dlls/crypt32/crypt32.spec @@ -142,6 +142,7 @@ @ stub CryptImportPKCS8 @ stdcall CryptImportPublicKeyInfo(long long ptr ptr) @ stdcall CryptImportPublicKeyInfoEx(long long ptr long long ptr ptr) +@ stdcall CryptImportPublicKeyInfoEx2(long ptr long ptr ptr) @ stdcall CryptInitOIDFunctionSet(str long) @ stdcall CryptInstallOIDFunctionAddress(ptr long str long ptr long) @ stub CryptLoadSip diff --git a/dlls/crypt32/encode.c b/dlls/crypt32/encode.c index 9d052b6..16a50dc 100644 --- a/dlls/crypt32/encode.c +++ b/dlls/crypt32/encode.c @@ -5065,3 +5065,13 @@ BOOL WINAPI CryptImportPublicKeyInfoEx(HCRYPTPROV hCryptProv, CryptFreeOIDFunctionAddress(hFunc, 0); return ret; } + +BOOL WINAPI CryptImportPublicKeyInfoEx2(DWORD dwCertEncodingType, + PCERT_PUBLIC_KEY_INFO pInfo, DWORD dwFlags, void *pvAuxInfo, + BCRYPT_KEY_HANDLE *phKey) +{ + FIXME_(crypt)("(%d, %p, %08x, %p, %p): stub\n", dwCertEncodingType, pInfo, + dwFlags, pvAuxInfo, phKey); + SetLastError(ERROR_FILE_NOT_FOUND); + return FALSE; +} diff --git a/include/wincrypt.h b/include/wincrypt.h index a1b1305..d68c955 100644 --- a/include/wincrypt.h +++ b/include/wincrypt.h @@ -4461,6 +4461,9 @@ BOOL WINAPI CryptImportPublicKeyInfo(HCRYPTPROV hCryptProv, BOOL WINAPI CryptImportPublicKeyInfoEx(HCRYPTPROV hCryptProv, DWORD dwCertEncodingType, PCERT_PUBLIC_KEY_INFO pInfo, ALG_ID aiKeyAlg, DWORD dwFlags, void *pvAuxInfo, HCRYPTKEY *phKey); +BOOL WINAPI CryptImportPublicKeyInfoEx2(DWORD dwCertEncodingType, + PCERT_PUBLIC_KEY_INFO pInfo, DWORD dwFlags, void *pvAuxInfo, + BCRYPT_KEY_HANDLE *phKey); BOOL WINAPI CryptAcquireCertificatePrivateKey(PCCERT_CONTEXT pCert, DWORD dwFlags, void *pvReserved, HCRYPTPROV_OR_NCRYPT_KEY_HANDLE *phCryptProv, DWORD *pdwKeySpec,
1
0
0
0
Zhiyi Zhang : msacm32: Reference count local drivers.
by Alexandre Julliard
28 Jan '19
28 Jan '19
Module: wine Branch: master Commit: bbdf6d5e21cfe1ef5e317d01978310bac614e6a0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bbdf6d5e21cfe1ef5e317d01…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Sat Jan 26 16:20:10 2019 +0800 msacm32: Reference count local drivers. One local driver can be assigned to multiple driver ids. When releasing the driver id, check if the reference count of a local driver is one before actually releasing the local driver. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=46520
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msacm32/internal.c | 12 +++++++++++- dlls/msacm32/wineacm.h | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/dlls/msacm32/internal.c b/dlls/msacm32/internal.c index aad071e..7d324a8 100644 --- a/dlls/msacm32/internal.c +++ b/dlls/msacm32/internal.c @@ -737,12 +737,17 @@ static PWINE_ACMLOCALDRIVER MSACM_pLastACMLocalDriver; static PWINE_ACMLOCALDRIVER MSACM_UnregisterLocalDriver(PWINE_ACMLOCALDRIVER paldrv) { PWINE_ACMLOCALDRIVER pNextACMLocalDriver; + LONG ref; if (paldrv->pACMInstList) { ERR("local driver instances still present after closing all drivers - memory leak\n"); return NULL; } + ref = InterlockedDecrement(&paldrv->ref); + if (ref) + return paldrv; + if (paldrv == MSACM_pFirstACMLocalDriver) MSACM_pFirstACMLocalDriver = paldrv->pNextACMLocalDrv; if (paldrv == MSACM_pLastACMLocalDriver) @@ -883,7 +888,11 @@ PWINE_ACMLOCALDRIVER MSACM_RegisterLocalDriver(HMODULE hModule, DRIVERPROC lpDri /* look up previous instance of local driver module */ for (paldrv = MSACM_pFirstACMLocalDriver; paldrv; paldrv = paldrv->pNextACMLocalDrv) { - if (paldrv->hModule == hModule && paldrv->lpDrvProc == lpDriverProc) return paldrv; + if (paldrv->hModule == hModule && paldrv->lpDrvProc == lpDriverProc) + { + InterlockedIncrement(&paldrv->ref); + return paldrv; + } } paldrv = HeapAlloc(MSACM_hHeap, 0, sizeof(WINE_ACMLOCALDRIVER)); @@ -892,6 +901,7 @@ PWINE_ACMLOCALDRIVER MSACM_RegisterLocalDriver(HMODULE hModule, DRIVERPROC lpDri paldrv->hModule = hModule; paldrv->lpDrvProc = lpDriverProc; paldrv->pACMInstList = NULL; + paldrv->ref = 1; paldrv->pNextACMLocalDrv = NULL; paldrv->pPrevACMLocalDrv = MSACM_pLastACMLocalDriver; diff --git a/dlls/msacm32/wineacm.h b/dlls/msacm32/wineacm.h index 406e01b..98d1ab5 100644 --- a/dlls/msacm32/wineacm.h +++ b/dlls/msacm32/wineacm.h @@ -52,6 +52,7 @@ typedef struct _WINE_ACMLOCALDRIVER PWINE_ACMLOCALDRIVERINST pACMInstList; PWINE_ACMLOCALDRIVER pNextACMLocalDrv; PWINE_ACMLOCALDRIVER pPrevACMLocalDrv; + LONG ref; } WINE_ACMLOCALDRIVER; typedef struct _WINE_ACMLOCALDRIVERINST
1
0
0
0
Matteo Bruni : d3dx9/tests: Avoid some 64-bit test failures.
by Alexandre Julliard
25 Jan '19
25 Jan '19
Module: wine Branch: master Commit: 699eb8cdba8fe236f038550e2bd68a4cd2cab055 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=699eb8cdba8fe236f038550e…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Fri Jan 25 18:15:02 2019 +0100 d3dx9/tests: Avoid some 64-bit test failures. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dx9_36/tests/math.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/d3dx9_36/tests/math.c b/dlls/d3dx9_36/tests/math.c index e433b1f..1bca945 100644 --- a/dlls/d3dx9_36/tests/math.c +++ b/dlls/d3dx9_36/tests/math.c @@ -1093,16 +1093,16 @@ static void D3DXQuaternionTest(void) expectedquat.x = 7.121285f; expectedquat.y = 2.159964f; expectedquat.z = -3.855094f; expectedquat.w = 5.362844f; expect_quaternion(&expectedquat, &gotquat, 2); expectedquat.x = -1113.492920f; expectedquat.y = 82.679260f; expectedquat.z = -6.696645f; expectedquat.w = -4.090050f; - expect_quaternion(&expectedquat, &Nq, 2); + expect_quaternion(&expectedquat, &Nq, 4); expectedquat.x = -1111.0f; expectedquat.y = 111.0f; expectedquat.z = -11.0f; expectedquat.w = 1.0f; expect_quaternion(&expectedquat, &Nq1, 0); gotquat = s; D3DXQuaternionSquadSetup(&gotquat, &Nq, &Nq1, &r, &gotquat, &t, &u); expectedquat.x = -1113.492920f; expectedquat.y = 82.679260f; expectedquat.z = -6.696645f; expectedquat.w = -4.090050f; - expect_quaternion(&expectedquat, &Nq, 2); + expect_quaternion(&expectedquat, &Nq, 4); Nq1 = u; D3DXQuaternionSquadSetup(&gotquat, &Nq, &Nq1, &r, &s, &t, &Nq1); - expect_quaternion(&expectedquat, &Nq, 2); + expect_quaternion(&expectedquat, &Nq, 4); r.x = 0.2f; r.y = 0.3f; r.z = 1.3f; r.w = -0.6f; s.x = -3.0f; s.y =-2.0f; s.z = 4.0f; s.w = 0.2f; t.x = 0.4f; t.y = 8.3f; t.z = -3.1f; t.w = -2.7f;
1
0
0
0
Matteo Bruni : d3dx9: Improve D3DXMatrixTransformation2D().
by Alexandre Julliard
25 Jan '19
25 Jan '19
Module: wine Branch: master Commit: dba1304bdde9639b01fa7b1e93cce1a298999b72 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=dba1304bdde9639b01fa7b1e…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Fri Jan 25 18:15:01 2019 +0100 d3dx9: Improve D3DXMatrixTransformation2D(). Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dx9_36/math.c | 98 +++++++++++++++++++--------------------------------- 1 file changed, 36 insertions(+), 62 deletions(-) diff --git a/dlls/d3dx9_36/math.c b/dlls/d3dx9_36/math.c index 02e917d..08e51b7 100644 --- a/dlls/d3dx9_36/math.c +++ b/dlls/d3dx9_36/math.c @@ -810,79 +810,53 @@ D3DXMATRIX * WINAPI D3DXMatrixTransformation(D3DXMATRIX *out, const D3DXVECTOR3 return out; } -D3DXMATRIX* WINAPI D3DXMatrixTransformation2D(D3DXMATRIX *pout, const D3DXVECTOR2 *pscalingcenter, FLOAT scalingrotation, const D3DXVECTOR2 *pscaling, const D3DXVECTOR2 *protationcenter, FLOAT rotation, const D3DXVECTOR2 *ptranslation) +static void vec3_from_vec2(D3DXVECTOR3 *v3, const D3DXVECTOR2 *v2) { - D3DXQUATERNION rot, sca_rot; - D3DXVECTOR3 rot_center, sca, sca_center, trans; + if (!v2) + return; - TRACE("pout %p, pscalingcenter %p, scalingrotation %f, pscaling %p, protztioncenter %p, rotation %f, ptranslation %p\n", - pout, pscalingcenter, scalingrotation, pscaling, protationcenter, rotation, ptranslation); + v3->x = v2->x; + v3->y = v2->y; + v3->z = 0.0f; +} - if ( pscalingcenter ) - { - sca_center.x=pscalingcenter->x; - sca_center.y=pscalingcenter->y; - sca_center.z=0.0f; - } - else - { - sca_center.x=0.0f; - sca_center.y=0.0f; - sca_center.z=0.0f; - } +D3DXMATRIX * WINAPI D3DXMatrixTransformation2D(D3DXMATRIX *out, const D3DXVECTOR2 *scaling_center, + float scaling_rotation, const D3DXVECTOR2 *scaling, const D3DXVECTOR2 *rotation_center, + float rotation, const D3DXVECTOR2 *translation) +{ + D3DXVECTOR3 r_c, s, s_c, t; + D3DXQUATERNION r, s_r; - if ( pscaling ) - { - sca.x=pscaling->x; - sca.y=pscaling->y; - sca.z=1.0f; - } - else - { - sca.x=1.0f; - sca.y=1.0f; - sca.z=1.0f; - } + TRACE("out %p, scaling_center %p, scaling_rotation %.8e, scaling %p, rotation_center %p, " + "rotation %.8e, translation %p.\n", + out, scaling_center, scaling_rotation, scaling, rotation_center, rotation, translation); - if ( protationcenter ) - { - rot_center.x=protationcenter->x; - rot_center.y=protationcenter->y; - rot_center.z=0.0f; - } - else - { - rot_center.x=0.0f; - rot_center.y=0.0f; - rot_center.z=0.0f; - } + vec3_from_vec2(&s_c, scaling_center); + vec3_from_vec2(&s, scaling); + if (scaling) + s.z = 1.0f; + vec3_from_vec2(&r_c, rotation_center); + vec3_from_vec2(&t, translation); - if ( ptranslation ) + if (rotation) { - trans.x=ptranslation->x; - trans.y=ptranslation->y; - trans.z=0.0f; + r.w = cosf(rotation / 2.0f); + r.x = 0.0f; + r.y = 0.0f; + r.z = sinf(rotation / 2.0f); } - else + + if (scaling_rotation) { - trans.x=0.0f; - trans.y=0.0f; - trans.z=0.0f; + s_r.w = cosf(scaling_rotation / 2.0f); + s_r.x = 0.0f; + s_r.y = 0.0f; + s_r.z = sinf(scaling_rotation / 2.0f); } - rot.w=cosf(rotation/2.0f); - rot.x=0.0f; - rot.y=0.0f; - rot.z=sinf(rotation/2.0f); - - sca_rot.w=cosf(scalingrotation/2.0f); - sca_rot.x=0.0f; - sca_rot.y=0.0f; - sca_rot.z=sinf(scalingrotation/2.0f); - - D3DXMatrixTransformation(pout, &sca_center, &sca_rot, &sca, &rot_center, &rot, &trans); - - return pout; + return D3DXMatrixTransformation(out, scaling_center ? &s_c : NULL, + scaling_rotation ? &s_r : NULL, scaling ? &s : NULL, rotation_center ? &r_c: NULL, + rotation ? &r : NULL, translation ? &t : NULL); } D3DXMATRIX* WINAPI D3DXMatrixTranslation(D3DXMATRIX *pout, FLOAT x, FLOAT y, FLOAT z)
1
0
0
0
Matteo Bruni : d3dx9: Improve D3DXMatrixTransformation() implementation.
by Alexandre Julliard
25 Jan '19
25 Jan '19
Module: wine Branch: master Commit: f54260a789387ab40de3d80291ad9000176dabe1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f54260a789387ab40de3d802…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Fri Jan 25 18:15:00 2019 +0100 d3dx9: Improve D3DXMatrixTransformation() implementation. Inspired by a patch from David Adam. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=33456
Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dx9_36/math.c | 104 +++++++++++++++++++++++---------------------------- 1 file changed, 46 insertions(+), 58 deletions(-) diff --git a/dlls/d3dx9_36/math.c b/dlls/d3dx9_36/math.c index 8909c3c..02e917d 100644 --- a/dlls/d3dx9_36/math.c +++ b/dlls/d3dx9_36/math.c @@ -744,82 +744,70 @@ D3DXMATRIX* WINAPI D3DXMatrixShadow(D3DXMATRIX *pout, const D3DXVECTOR4 *plight, return pout; } -D3DXMATRIX* WINAPI D3DXMatrixTransformation(D3DXMATRIX *pout, const D3DXVECTOR3 *pscalingcenter, const D3DXQUATERNION *pscalingrotation, const D3DXVECTOR3 *pscaling, const D3DXVECTOR3 *protationcenter, const D3DXQUATERNION *protation, const D3DXVECTOR3 *ptranslation) +D3DXMATRIX * WINAPI D3DXMatrixTransformation(D3DXMATRIX *out, const D3DXVECTOR3 *scaling_center, + const D3DXQUATERNION *scaling_rotation, const D3DXVECTOR3 *scaling, + const D3DXVECTOR3 *rotation_center, const D3DXQUATERNION *rotation, + const D3DXVECTOR3 *translation) { - D3DXMATRIX m1, m2, m3, m4, m5, m6, m7; - D3DXQUATERNION prc; - D3DXVECTOR3 psc, pt; + static const D3DXVECTOR3 zero_vector; + D3DXMATRIX m1, msr1, ms, msr, msc, mrc1, mr, mrc, mt; + D3DXVECTOR3 sc, rc; + D3DXQUATERNION q; - TRACE("pout %p, pscalingcenter %p, pscalingrotation %p, pscaling %p, protationcentr %p, protation %p, ptranslation %p\n", - pout, pscalingcenter, pscalingrotation, pscaling, protationcenter, protation, ptranslation); + TRACE("out %p, scaling_center %p, scaling_rotation %p, scaling %p, rotation_center %p," + " rotation %p, translation %p.\n", + out, scaling_center, scaling_rotation, scaling, rotation_center, rotation, translation); - if ( !pscalingcenter ) + if (scaling) { - psc.x = 0.0f; - psc.y = 0.0f; - psc.z = 0.0f; - } - else - { - psc.x = pscalingcenter->x; - psc.y = pscalingcenter->y; - psc.z = pscalingcenter->z; - } - - if ( !protationcenter ) - { - prc.x = 0.0f; - prc.y = 0.0f; - prc.z = 0.0f; + sc = scaling_center ? *scaling_center : zero_vector; + D3DXMatrixTranslation(&m1, -sc.x, -sc.y, -sc.z); + if (scaling_rotation) + { + q.x = -scaling_rotation->x; + q.y = -scaling_rotation->y; + q.z = -scaling_rotation->z; + q.w = scaling_rotation->w; + D3DXMatrixRotationQuaternion(&msr1, &q); + D3DXMatrixMultiply(&m1, &m1, &msr1); + } + D3DXMatrixScaling(&ms, scaling->x, scaling->y, scaling->z); + D3DXMatrixMultiply(&m1, &m1, &ms); + if (scaling_rotation) + { + D3DXMatrixRotationQuaternion(&msr, scaling_rotation); + D3DXMatrixMultiply(&m1, &m1, &msr); + } + D3DXMatrixTranslation(&msc, sc.x, sc.y, sc.z); + D3DXMatrixMultiply(&m1, &m1, &msc); } else { - prc.x = protationcenter->x; - prc.y = protationcenter->y; - prc.z = protationcenter->z; + D3DXMatrixIdentity(&m1); } - if ( !ptranslation ) - { - pt.x = 0.0f; - pt.y = 0.0f; - pt.z = 0.0f; - } - else + if (rotation) { - pt.x = ptranslation->x; - pt.y = ptranslation->y; - pt.z = ptranslation->z; + rc = rotation_center ? *rotation_center : zero_vector; + D3DXMatrixTranslation(&mrc1, -rc.x, -rc.y, -rc.z); + D3DXMatrixMultiply(&m1, &m1, &mrc1); + D3DXMatrixRotationQuaternion(&mr, rotation); + D3DXMatrixMultiply(&m1, &m1, &mr); + D3DXMatrixTranslation(&mrc, rc.x, rc.y, rc.z); + D3DXMatrixMultiply(&m1, &m1, &mrc); } - D3DXMatrixTranslation(&m1, -psc.x, -psc.y, -psc.z); - - if ( !pscalingrotation ) + if (translation) { - D3DXMatrixIdentity(&m2); - D3DXMatrixIdentity(&m4); + D3DXMatrixTranslation(&mt, translation->x, translation->y, translation->z); + D3DXMatrixMultiply(out, &m1, &mt); } else { - D3DXMatrixRotationQuaternion(&m4, pscalingrotation); - D3DXMatrixInverse(&m2, NULL, &m4); + *out = m1; } - if ( !pscaling ) D3DXMatrixIdentity(&m3); - else D3DXMatrixScaling(&m3, pscaling->x, pscaling->y, pscaling->z); - - if ( !protation ) D3DXMatrixIdentity(&m6); - else D3DXMatrixRotationQuaternion(&m6, protation); - - D3DXMatrixTranslation(&m5, psc.x - prc.x, psc.y - prc.y, psc.z - prc.z); - D3DXMatrixTranslation(&m7, prc.x + pt.x, prc.y + pt.y, prc.z + pt.z); - D3DXMatrixMultiply(&m1, &m1, &m2); - D3DXMatrixMultiply(&m1, &m1, &m3); - D3DXMatrixMultiply(&m1, &m1, &m4); - D3DXMatrixMultiply(&m1, &m1, &m5); - D3DXMatrixMultiply(&m1, &m1, &m6); - D3DXMatrixMultiply(pout, &m1, &m7); - return pout; + return out; } D3DXMATRIX* WINAPI D3DXMatrixTransformation2D(D3DXMATRIX *pout, const D3DXVECTOR2 *pscalingcenter, FLOAT scalingrotation, const D3DXVECTOR2 *pscaling, const D3DXVECTOR2 *protationcenter, FLOAT rotation, const D3DXVECTOR2 *ptranslation)
1
0
0
0
Nikolay Sivov : dwrite: Use a helper for design advances.
by Alexandre Julliard
25 Jan '19
25 Jan '19
Module: wine Branch: master Commit: ddd7c8c51f64b8f7d9ff2ee03ce7803430d71100 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ddd7c8c51f64b8f7d9ff2ee0…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Jan 25 14:56:41 2019 +0300 dwrite: Use a helper for design advances. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/font.c | 229 +++++++++++++++++++++++++++-------------------------- 1 file changed, 116 insertions(+), 113 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=ddd7c8c51f64b8f7d9ff…
1
0
0
0
Nikolay Sivov : dwrite/layout: Improve overhangs metrics computation.
by Alexandre Julliard
25 Jan '19
25 Jan '19
Module: wine Branch: master Commit: d933afc4a495add700c17678f23d0615ed9a79de URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d933afc4a495add700c17678…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Jan 25 14:56:40 2019 +0300 dwrite/layout: Improve overhangs metrics computation. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/dwrite_private.h | 9 ++++---- dlls/dwrite/font.c | 4 ++-- dlls/dwrite/freetype.c | 4 ++-- dlls/dwrite/layout.c | 51 ++++++++++++++++++++++++++------------------ 4 files changed, 39 insertions(+), 29 deletions(-) diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index b8fb250..6ee59cf 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -252,13 +252,14 @@ extern HRESULT bidi_computelevels(const WCHAR*,UINT32,UINT8,UINT8*,UINT8*) DECLS extern WCHAR bidi_get_mirrored_char(WCHAR) DECLSPEC_HIDDEN; /* FreeType integration */ -struct dwrite_glyphbitmap { +struct dwrite_glyphbitmap +{ IDWriteFontFace4 *fontface; DWORD simulations; - FLOAT emsize; + float emsize; BOOL nohint; BOOL aliased; - UINT16 index; + UINT16 glyph; INT pitch; RECT bbox; BYTE *buf; @@ -276,7 +277,7 @@ extern UINT16 freetype_get_glyphcount(IDWriteFontFace4*) DECLSPEC_HIDDEN; extern void freetype_get_glyphs(IDWriteFontFace4*,INT,UINT32 const*,UINT32,UINT16*) DECLSPEC_HIDDEN; extern BOOL freetype_has_kerning_pairs(IDWriteFontFace4*) DECLSPEC_HIDDEN; extern INT32 freetype_get_kerning_pair_adjustment(IDWriteFontFace4*,UINT16,UINT16) DECLSPEC_HIDDEN; -extern void freetype_get_glyph_bbox(struct dwrite_glyphbitmap*) DECLSPEC_HIDDEN; +extern void freetype_get_glyph_bbox(struct dwrite_glyphbitmap *bitmap_desc) DECLSPEC_HIDDEN; extern BOOL freetype_get_glyph_bitmap(struct dwrite_glyphbitmap*) DECLSPEC_HIDDEN; extern INT freetype_get_charmap_index(IDWriteFontFace4*,BOOL*) DECLSPEC_HIDDEN; extern INT32 freetype_get_glyph_advance(IDWriteFontFace4*,FLOAT,UINT16,DWRITE_MEASURING_MODE,BOOL*) DECLSPEC_HIDDEN; diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index c657eeb..b10096d 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -5060,7 +5060,7 @@ static void glyphrunanalysis_get_texturebounds(struct dwrite_glyphrunanalysis *a RECT *bbox = &glyph_bitmap.bbox; UINT32 bitmap_size; - glyph_bitmap.index = analysis->run.glyphIndices[i]; + glyph_bitmap.glyph = analysis->run.glyphIndices[i]; freetype_get_glyph_bbox(&glyph_bitmap); bitmap_size = get_glyph_bitmap_pitch(analysis->rendering_mode, bbox->right - bbox->left) * @@ -5161,7 +5161,7 @@ static HRESULT glyphrunanalysis_render(struct dwrite_glyphrunanalysis *analysis) int x, y, width, height; BOOL is_1bpp; - glyph_bitmap.index = analysis->run.glyphIndices[i]; + glyph_bitmap.glyph = analysis->run.glyphIndices[i]; freetype_get_glyph_bbox(&glyph_bitmap); if (IsRectEmpty(bbox)) diff --git a/dlls/dwrite/freetype.c b/dlls/dwrite/freetype.c index ffdd8a8..d303653 100644 --- a/dlls/dwrite/freetype.c +++ b/dlls/dwrite/freetype.c @@ -686,7 +686,7 @@ void freetype_get_glyph_bbox(struct dwrite_glyphbitmap *bitmap) imagetype.height = bitmap->emsize; imagetype.flags = needs_transform ? FT_LOAD_NO_BITMAP : FT_LOAD_DEFAULT; - if (pFTC_ImageCache_Lookup(image_cache, &imagetype, bitmap->index, &glyph, NULL) == 0) { + if (pFTC_ImageCache_Lookup(image_cache, &imagetype, bitmap->glyph, &glyph, NULL) == 0) { if (needs_transform) { FT_Glyph glyph_copy; @@ -844,7 +844,7 @@ BOOL freetype_get_glyph_bitmap(struct dwrite_glyphbitmap *bitmap) imagetype.height = bitmap->emsize; imagetype.flags = needs_transform ? FT_LOAD_NO_BITMAP : FT_LOAD_DEFAULT; - if (pFTC_ImageCache_Lookup(image_cache, &imagetype, bitmap->index, &glyph, NULL) == 0) { + if (pFTC_ImageCache_Lookup(image_cache, &imagetype, bitmap->glyph, &glyph, NULL) == 0) { FT_Glyph glyph_copy; if (needs_transform) { diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index a562927..f27fe9f 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -3604,16 +3604,6 @@ static HRESULT WINAPI dwritetextlayout_GetMetrics(IDWriteTextLayout3 *iface, DWR return hr; } -static void scale_glyph_bbox(RECT *bbox, FLOAT emSize, UINT16 units_per_em, D2D1_RECT_F *ret) -{ -#define SCALE(x) ((FLOAT)x * emSize / (FLOAT)units_per_em) - ret->left = SCALE(bbox->left); - ret->right = SCALE(bbox->right); - ret->top = SCALE(bbox->top); - ret->bottom = SCALE(bbox->bottom); -#undef SCALE -} - static void d2d_rect_offset(D2D1_RECT_F *rect, FLOAT x, FLOAT y) { rect->left += x; @@ -3652,27 +3642,46 @@ static void layout_get_erun_bbox(struct dwrite_textlayout *layout, struct layout const struct regular_layout_run *regular = &run->run->u.regular; UINT32 start_glyph = regular->clustermap[run->start]; const DWRITE_GLYPH_RUN *glyph_run = ®ular->run; - DWRITE_FONT_METRICS font_metrics; D2D1_POINT_2F origin = { 0 }; + float rtl_factor; UINT32 i; - if (run->bbox.top == run->bbox.bottom) { - IDWriteFontFace_GetMetrics(glyph_run->fontFace, &font_metrics); + if (run->bbox.top == run->bbox.bottom) + { + struct dwrite_glyphbitmap glyph_bitmap; + RECT *bbox; + + memset(&glyph_bitmap, 0, sizeof(glyph_bitmap)); + glyph_bitmap.fontface = (IDWriteFontFace4 *)glyph_run->fontFace; + glyph_bitmap.simulations = IDWriteFontFace_GetSimulations(glyph_run->fontFace); + glyph_bitmap.emsize = glyph_run->fontEmSize; + glyph_bitmap.nohint = layout->measuringmode == DWRITE_MEASURING_MODE_NATURAL; + + bbox = &glyph_bitmap.bbox; + rtl_factor = glyph_run->bidiLevel & 1 ? -1.0f : 1.0f; for (i = 0; i < run->glyphcount; i++) { D2D1_RECT_F glyph_bbox; - RECT design_bbox; - freetype_get_design_glyph_bbox((IDWriteFontFace4 *)glyph_run->fontFace, font_metrics.designUnitsPerEm, - glyph_run->glyphIndices[i + start_glyph], &design_bbox); + /* FIXME: take care of vertical/rtl */ + if (glyph_run->bidiLevel & 1) + origin.x -= glyph_run->glyphAdvances[i + start_glyph]; + + glyph_bitmap.glyph = glyph_run->glyphIndices[i + start_glyph]; + freetype_get_glyph_bbox(&glyph_bitmap); + + glyph_bbox.left = bbox->left; + glyph_bbox.top = bbox->top; + glyph_bbox.right = bbox->right; + glyph_bbox.bottom = bbox->bottom; + + d2d_rect_offset(&glyph_bbox, origin.x + rtl_factor * glyph_run->glyphOffsets[i + start_glyph].advanceOffset, + origin.y - glyph_run->glyphOffsets[i + start_glyph].ascenderOffset); - scale_glyph_bbox(&design_bbox, glyph_run->fontEmSize, font_metrics.designUnitsPerEm, &glyph_bbox); - d2d_rect_offset(&glyph_bbox, origin.x + glyph_run->glyphOffsets[i + start_glyph].advanceOffset, - origin.y + glyph_run->glyphOffsets[i + start_glyph].ascenderOffset); d2d_rect_union(&run->bbox, &glyph_bbox); - /* FIXME: take care of vertical/rtl */ - origin.x += glyph_run->glyphAdvances[i + start_glyph]; + if (!(glyph_run->bidiLevel & 1)) + origin.x += glyph_run->glyphAdvances[i + start_glyph]; } }
1
0
0
0
Nikolay Sivov : dwrite: Remove special case for vertical variants.
by Alexandre Julliard
25 Jan '19
25 Jan '19
Module: wine Branch: master Commit: 27aef423d834b5f93c16a821e03db6d4a0973008 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=27aef423d834b5f93c16a821…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Jan 25 14:56:39 2019 +0300 dwrite: Remove special case for vertical variants. This should be implemented as a part of shaping pass. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/analyzer.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/dlls/dwrite/analyzer.c b/dlls/dwrite/analyzer.c index 69e6b11..a1d9f25 100644 --- a/dlls/dwrite/analyzer.c +++ b/dlls/dwrite/analyzer.c @@ -1161,9 +1161,8 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphs(IDWriteTextAnalyzer2 *iface, DWRITE_NUMBER_SUBSTITUTION_METHOD method; struct scriptshaping_context context; struct scriptshaping_cache *cache = NULL; - BOOL update_cluster, need_vertical; WCHAR digits[NATIVE_DIGITS_LEN]; - IDWriteFontFace1 *fontface1; + BOOL update_cluster; WCHAR *string; UINT32 i, g; HRESULT hr = S_OK; @@ -1225,12 +1224,6 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphs(IDWriteTextAnalyzer2 *iface, glyph_props[i].reserved = 0; } - hr = IDWriteFontFace_QueryInterface(fontface, &IID_IDWriteFontFace1, (void**)&fontface1); - if (FAILED(hr)) - WARN("failed to get IDWriteFontFace1\n"); - - need_vertical = is_sideways && fontface1 && IDWriteFontFace1_HasVerticalGlyphVariants(fontface1); - for (i = 0, g = 0, update_cluster = FALSE; i < length; i++) { UINT32 codepoint; @@ -1245,14 +1238,6 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphs(IDWriteTextAnalyzer2 *iface, if (FAILED(hr)) goto done; - if (need_vertical) { - UINT16 vertical; - - hr = IDWriteFontFace1_GetVerticalGlyphVariants(fontface1, 1, &glyph_indices[g], &vertical); - if (hr == S_OK) - glyph_indices[g] = vertical; - } - g++; } else { @@ -1294,8 +1279,6 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphs(IDWriteTextAnalyzer2 *iface, hr = default_shaping_ops.set_text_glyphs_props(&context, clustermap, glyph_indices, *actual_glyph_count, text_props, glyph_props); done: - if (fontface1) - IDWriteFontFace1_Release(fontface1); release_scriptshaping_cache(cache); heap_free(string);
1
0
0
0
← Newer
1
...
13
14
15
16
17
18
19
...
50
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
Results per page:
10
25
50
100
200