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
July 2008
----- 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
3 participants
1114 discussions
Start a n
N
ew thread
Piotr Caban : msxml3: Added ISAXAttributes_getValue implementation.
by Alexandre Julliard
31 Jul '08
31 Jul '08
Module: wine Branch: master Commit: 25168401af6b56a7690089dbf96420f70ced1d00 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=25168401af6b56a7690089dbf…
Author: Piotr Caban <piotr.caban(a)gmail.com> Date: Wed Jul 30 20:27:25 2008 +0200 msxml3: Added ISAXAttributes_getValue implementation. --- dlls/msxml3/saxreader.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c index e57bf6c..5a64e2b 100644 --- a/dlls/msxml3/saxreader.c +++ b/dlls/msxml3/saxreader.c @@ -382,9 +382,14 @@ static HRESULT WINAPI isaxattributes_getValue( int *nValue) { saxattributes *This = impl_from_ISAXAttributes( iface ); + TRACE("(%p)->(%d)\n", This, nIndex); - FIXME("(%p)->(%d) stub\n", This, nIndex); - return E_NOTIMPL; + if(nIndex >= This->nb_attributes) return E_INVALIDARG; + + *nValue = SysStringLen(This->szValue[nIndex]); + *pValue = This->szValue[nIndex]; + + return S_OK; } static HRESULT WINAPI isaxattributes_getValueFromName( @@ -544,8 +549,6 @@ static void libxmlStartElementNS( HRESULT hr; saxattributes *attr; - FIXME("Arguments processing not yet implemented.\n"); - update_position(This, (xmlChar*)This->pParserCtxt->input->cur+1); if(This->saxreader->contentHandler)
1
0
0
0
Piotr Caban : msxml3: Added ISAXAttributes_getLocalName implementation.
by Alexandre Julliard
31 Jul '08
31 Jul '08
Module: wine Branch: master Commit: 421a9a61c45322d774152b2d8b4884ceb2dd91d0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=421a9a61c45322d774152b2d8…
Author: Piotr Caban <piotr.caban(a)gmail.com> Date: Wed Jul 30 20:27:07 2008 +0200 msxml3: Added ISAXAttributes_getLocalName implementation. --- dlls/msxml3/saxreader.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c index 7c7e90f..e57bf6c 100644 --- a/dlls/msxml3/saxreader.c +++ b/dlls/msxml3/saxreader.c @@ -269,9 +269,14 @@ static HRESULT WINAPI isaxattributes_getLocalName( int *pLocalNameLength) { saxattributes *This = impl_from_ISAXAttributes( iface ); + TRACE("(%p)->(%d)\n", This, nIndex); - FIXME("(%p)->(%d) stub\n", This, nIndex); - return E_NOTIMPL; + if(nIndex >= This->nb_attributes) return E_INVALIDARG; + + *pLocalNameLength = SysStringLen(This->szLocalname[nIndex]); + *pLocalName = This->szLocalname[nIndex]; + + return S_OK; } static HRESULT WINAPI isaxattributes_getQName(
1
0
0
0
Piotr Caban : msxml3: Add ISAXAttribute_getLength implementation.
by Alexandre Julliard
31 Jul '08
31 Jul '08
Module: wine Branch: master Commit: 58b26f3b073a56f5f48b50c1f7c13df5406b741e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=58b26f3b073a56f5f48b50c1f…
Author: Piotr Caban <piotr.caban(a)gmail.com> Date: Wed Jul 30 20:26:50 2008 +0200 msxml3: Add ISAXAttribute_getLength implementation. --- dlls/msxml3/saxreader.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c index 62bfd9b..7c7e90f 100644 --- a/dlls/msxml3/saxreader.c +++ b/dlls/msxml3/saxreader.c @@ -245,8 +245,9 @@ static HRESULT WINAPI isaxattributes_getLength( { saxattributes *This = impl_from_ISAXAttributes( iface ); - FIXME("(%p) stub\n", This); - return E_NOTIMPL; + *length = This->nb_attributes; + TRACE("Length set to %d\n", *length); + return S_OK; } static HRESULT WINAPI isaxattributes_getURI(
1
0
0
0
Piotr Caban : msxml3: Initialize ISAXAttribute structure.
by Alexandre Julliard
31 Jul '08
31 Jul '08
Module: wine Branch: master Commit: 6df49d5707fccbf480be88441fdb83c5af1575ce URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6df49d5707fccbf480be88441…
Author: Piotr Caban <piotr.caban(a)gmail.com> Date: Wed Jul 30 20:24:12 2008 +0200 msxml3: Initialize ISAXAttribute structure. --- dlls/msxml3/saxreader.c | 111 +++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 97 insertions(+), 14 deletions(-) diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c index 8ec1e46..62bfd9b 100644 --- a/dlls/msxml3/saxreader.c +++ b/dlls/msxml3/saxreader.c @@ -73,6 +73,11 @@ typedef struct _saxattributes { const struct ISAXAttributesVtbl *lpSAXAttributesVtbl; LONG ref; + int nb_attributes; + BSTR *szLocalname; + BSTR *szPrefix; + BSTR *szURI; + BSTR *szValue; } saxattributes; static inline saxreader *impl_from_IVBSAXXMLReader( IVBSAXXMLReader *iface ) @@ -96,6 +101,28 @@ static inline saxattributes *impl_from_ISAXAttributes( ISAXAttributes *iface ) } +BSTR bstr_from_xmlCharN(const xmlChar *buf, int len) +{ + DWORD dLen; + LPWSTR str; + BSTR bstr; + + if (!buf) + return NULL; + + dLen = MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)buf, len, NULL, 0); + if(len != -1) dLen++; + str = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, dLen * sizeof (WCHAR)); + if (!str) + return NULL; + MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)buf, len, str, dLen); + if(len != -1) str[dLen-1] = '\0'; + bstr = SysAllocString(str); + HeapFree(GetProcessHeap(), 0, str); + + return bstr; +} + static void format_error_message_from_id(saxlocator *This, HRESULT hr) { xmlStopParser(This->pParserCtxt); @@ -191,6 +218,20 @@ static ULONG WINAPI isaxattributes_Release(ISAXAttributes* iface) ref = InterlockedDecrement(&This->ref); if (ref==0) { + int index; + for(index=0; index<This->nb_attributes; index++) + { + SysFreeString(This->szLocalname[index]); + SysFreeString(This->szPrefix[index]); + SysFreeString(This->szURI[index]); + SysFreeString(This->szValue[index]); + } + + HeapFree(GetProcessHeap(), 0, This->szLocalname); + HeapFree(GetProcessHeap(), 0, This->szPrefix); + HeapFree(GetProcessHeap(), 0, This->szURI); + HeapFree(GetProcessHeap(), 0, This->szValue); + HeapFree(GetProcessHeap(), 0, This); } @@ -389,9 +430,11 @@ static const struct ISAXAttributesVtbl isaxattributes_vtbl = isaxattributes_getValueFromQName }; -static HRESULT SAXAttributes_create(IUnknown *pUnkOuter, LPVOID *ppObj) +static HRESULT SAXAttributes_create(saxattributes **attr, + int nb_attributes, const xmlChar **xmlAttributes) { saxattributes *attributes; + int index; attributes = HeapAlloc(GetProcessHeap(), 0, sizeof(*attributes)); if(!attributes) @@ -400,9 +443,47 @@ static HRESULT SAXAttributes_create(IUnknown *pUnkOuter, LPVOID *ppObj) attributes->lpSAXAttributesVtbl = &isaxattributes_vtbl; attributes->ref = 1; - *ppObj = attributes; + attributes->nb_attributes = nb_attributes; + + attributes->szLocalname = + HeapAlloc(GetProcessHeap(), 0, sizeof(BSTR)*nb_attributes); + attributes->szPrefix = + HeapAlloc(GetProcessHeap(), 0, sizeof(BSTR)*nb_attributes); + attributes->szURI = + HeapAlloc(GetProcessHeap(), 0, sizeof(BSTR)*nb_attributes); + attributes->szValue = + HeapAlloc(GetProcessHeap(), 0, sizeof(BSTR)*nb_attributes); + + if(!attributes->szLocalname || !attributes->szPrefix + || !attributes->szURI || !attributes->szValue) + { + if(attributes->szLocalname) + HeapFree(GetProcessHeap(), 0, attributes->szLocalname); + if(attributes->szPrefix) + HeapFree(GetProcessHeap(), 0, attributes->szPrefix); + if(attributes->szURI) + HeapFree(GetProcessHeap(), 0, attributes->szURI); + if(attributes->szValue) + HeapFree(GetProcessHeap(), 0, attributes->szValue); + return E_FAIL; + } + + for(index=0; index<nb_attributes; index++) + { + attributes->szLocalname[index] = + bstr_from_xmlChar(xmlAttributes[index*5]); + attributes->szPrefix[index] = + bstr_from_xmlChar(xmlAttributes[index*5+1]); + attributes->szURI[index] = + bstr_from_xmlChar(xmlAttributes[index*5+2]); + attributes->szValue[index] = + bstr_from_xmlCharN(xmlAttributes[index*5+3], + xmlAttributes[index*5+4]-xmlAttributes[index*5+3]); + } + + *attr = attributes; - TRACE("returning %p\n", *ppObj); + TRACE("returning %p\n", *attr); return S_OK; } @@ -455,7 +536,7 @@ static void libxmlStartElementNS( BSTR NamespaceUri, LocalName, QName; saxlocator *This = ctx; HRESULT hr; - ISAXAttributes *attr; + saxattributes *attr; FIXME("Arguments processing not yet implemented.\n"); @@ -467,21 +548,23 @@ static void libxmlStartElementNS( LocalName = bstr_from_xmlChar(localname); QName = bstr_from_xmlChar(localname); - SAXAttributes_create(NULL, (void*)&attr); - - hr = ISAXContentHandler_startElement( - This->saxreader->contentHandler, - NamespaceUri, SysStringLen(NamespaceUri), - LocalName, SysStringLen(LocalName), - QName, SysStringLen(QName), - attr); + hr = SAXAttributes_create(&attr, nb_attributes, attributes); + if(hr == S_OK) + { + hr = ISAXContentHandler_startElement( + This->saxreader->contentHandler, + NamespaceUri, SysStringLen(NamespaceUri), + LocalName, SysStringLen(LocalName), + QName, SysStringLen(QName), + (ISAXAttributes*)&attr->lpSAXAttributesVtbl); + + ISAXAttributes_Release((ISAXAttributes*)&attr->lpSAXAttributesVtbl); + } SysFreeString(NamespaceUri); SysFreeString(LocalName); SysFreeString(QName); - ISAXAttributes_Release(attr); - if(hr != S_OK) format_error_message_from_id(This, hr); }
1
0
0
0
Paul Vriens : crypt32/tests: Don't crash on some win9x boxes.
by Alexandre Julliard
31 Jul '08
31 Jul '08
Module: wine Branch: master Commit: 6d33798265e40a0bc1581205701100f7bd16be8b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6d33798265e40a0bc15812057…
Author: Paul Vriens <paul.vriens.wine(a)gmail.com> Date: Wed Jul 30 22:06:34 2008 +0200 crypt32/tests: Don't crash on some win9x boxes. --- dlls/crypt32/tests/cert.c | 50 +++++++++++++++++++++++++++----------------- 1 files changed, 31 insertions(+), 19 deletions(-) diff --git a/dlls/crypt32/tests/cert.c b/dlls/crypt32/tests/cert.c index 37cea10..36f7ea1 100644 --- a/dlls/crypt32/tests/cert.c +++ b/dlls/crypt32/tests/cert.c @@ -157,19 +157,23 @@ static void testAddCert(void) return; /* Weird--bad add disposition leads to an access violation in Windows. + * Both tests crash on some win9x boxes. */ - ret = CertAddEncodedCertificateToStore(0, X509_ASN_ENCODING, bigCert, - sizeof(bigCert), 0, NULL); - ok(!ret && (GetLastError() == STATUS_ACCESS_VIOLATION || - GetLastError() == E_INVALIDARG), - "Expected STATUS_ACCESS_VIOLATION or E_INVALIDARG, got %08x\n", - GetLastError()); - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - bigCert, sizeof(bigCert), 0, NULL); - ok(!ret && (GetLastError() == STATUS_ACCESS_VIOLATION || - GetLastError() == E_INVALIDARG), - "Expected STATUS_ACCESS_VIOLATION or E_INVALIDARG, got %08x\n", - GetLastError()); + if (0) + { + ret = CertAddEncodedCertificateToStore(0, X509_ASN_ENCODING, bigCert, + sizeof(bigCert), 0, NULL); + ok(!ret && (GetLastError() == STATUS_ACCESS_VIOLATION || + GetLastError() == E_INVALIDARG), + "Expected STATUS_ACCESS_VIOLATION or E_INVALIDARG, got %08x\n", + GetLastError()); + ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, + bigCert, sizeof(bigCert), 0, NULL); + ok(!ret && (GetLastError() == STATUS_ACCESS_VIOLATION || + GetLastError() == E_INVALIDARG), + "Expected STATUS_ACCESS_VIOLATION or E_INVALIDARG, got %08x\n", + GetLastError()); + } /* Weird--can add a cert to the NULL store (does this have special * meaning?) @@ -1746,10 +1750,14 @@ static void testSignAndEncodeCert(void) &algID, NULL, NULL, &size); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); - ret = CryptSignAndEncodeCertificate(0, 0, X509_ASN_ENCODING, - X509_CERT_TO_BE_SIGNED, NULL, &algID, NULL, NULL, &size); - ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); + /* Crashes on some win9x boxes */ + if (0) + { + ret = CryptSignAndEncodeCertificate(0, 0, X509_ASN_ENCODING, + X509_CERT_TO_BE_SIGNED, NULL, &algID, NULL, NULL, &size); + ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, + "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); + } /* Crashes ret = CryptSignAndEncodeCertificate(0, 0, X509_ASN_ENCODING, X509_CERT_TO_BE_SIGNED, &info, NULL, NULL, NULL, &size); @@ -2522,9 +2530,13 @@ static void testHashPublicKeyInfo(void) ret = CryptHashPublicKeyInfo(0, 0, 0, 0, NULL, NULL, &len); ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); - ret = CryptHashPublicKeyInfo(0, 0, 0, X509_ASN_ENCODING, NULL, NULL, &len); - ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); + /* Crashes on some win9x boxes */ + if (0) + { + ret = CryptHashPublicKeyInfo(0, 0, 0, X509_ASN_ENCODING, NULL, NULL, &len); + ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, + "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); + } ret = CryptHashPublicKeyInfo(0, 0, 0, X509_ASN_ENCODING, &info, NULL, &len); ok(ret, "CryptHashPublicKeyInfo failed: %08x\n", GetLastError()); ok(len == 16, "Expected hash size 16, got %d\n", len);
1
0
0
0
Stefan Dösinger : wined3d: GL_ARB_fragment_program ffp implementation.
by Alexandre Julliard
31 Jul '08
31 Jul '08
Module: wine Branch: master Commit: 14b24058d69d73ebf6b70bc36c8aa62993351079 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=14b24058d69d73ebf6b70bc36…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Mon Jul 28 11:41:02 2008 -0500 wined3d: GL_ARB_fragment_program ffp implementation. --- dlls/wined3d/arb_program_shader.c | 983 +++++++++++++++++++++++++++++++++---- dlls/wined3d/device.c | 6 +- dlls/wined3d/directx.c | 19 +- dlls/wined3d/wined3d_private.h | 3 + 4 files changed, 907 insertions(+), 104 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=14b24058d69d73ebf6b70…
1
0
0
0
Stefan Dösinger : wined3d: Use a hashmap to store the ffp shaders.
by Alexandre Julliard
31 Jul '08
31 Jul '08
Module: wine Branch: master Commit: bc4435e4063c70d0ef2fcc2ab7bb6df3efcfc0e7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bc4435e4063c70d0ef2fcc2ab…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Tue Jul 29 10:51:52 2008 -0500 wined3d: Use a hashmap to store the ffp shaders. --- dlls/wined3d/ati_fragment_shader.c | 32 +++++++++-------- dlls/wined3d/glsl_shader.c | 2 +- dlls/wined3d/utils.c | 64 ++++++++++++++++++++++++++---------- dlls/wined3d/wined3d_private.h | 9 +++-- 4 files changed, 69 insertions(+), 38 deletions(-) diff --git a/dlls/wined3d/ati_fragment_shader.c b/dlls/wined3d/ati_fragment_shader.c index 6dc0193..54b05b1 100644 --- a/dlls/wined3d/ati_fragment_shader.c +++ b/dlls/wined3d/ati_fragment_shader.c @@ -50,7 +50,7 @@ struct atifs_ffp_desc struct atifs_private_data { - struct list fragment_shaders; /* A linked list to track fragment pipeline replacement shaders */ + hash_table_t *fragment_shaders; /* A hashtable to track fragment pipeline replacement shaders */ }; @@ -786,7 +786,7 @@ static void set_tex_op_atifs(DWORD state, IWineD3DStateBlockImpl *stateblock, Wi unsigned int i; gen_ffp_op(stateblock, &settings, TRUE); - desc = (struct atifs_ffp_desc *) find_ffp_shader(&priv->fragment_shaders, &settings); + desc = (struct atifs_ffp_desc *) find_ffp_shader(priv->fragment_shaders, &settings); if(!desc) { desc = HeapAlloc(GetProcessHeap(), 0, sizeof(*desc)); if(!desc) { @@ -801,7 +801,7 @@ static void set_tex_op_atifs(DWORD state, IWineD3DStateBlockImpl *stateblock, Wi memcpy(&desc->parent.settings, &settings, sizeof(settings)); desc->shader = gen_ati_shader(settings.op, &GLINFO_LOCATION); - add_ffp_shader(&priv->fragment_shaders, &desc->parent); + add_ffp_shader(priv->fragment_shaders, &desc->parent); TRACE("Allocated fixed function replacement shader descriptor %p\n", desc); } @@ -1036,26 +1036,28 @@ static HRESULT atifs_alloc(IWineD3DDevice *iface) { return E_OUTOFMEMORY; } priv = (struct atifs_private_data *) This->fragment_priv; - list_init(&priv->fragment_shaders); + priv->fragment_shaders = hash_table_create(ffp_program_key_hash, ffp_program_key_compare); return WINED3D_OK; } #define GLINFO_LOCATION This->adapter->gl_info +static void atifs_free_ffpshader(void *value, void *device) { + IWineD3DDeviceImpl *This = device; + struct atifs_ffp_desc *entry_ati = value; + + ENTER_GL(); + GL_EXTCALL(glDeleteFragmentShaderATI(entry_ati->shader)); + checkGLcall("glDeleteFragmentShaderATI(entry->shader)"); + HeapFree(GetProcessHeap(), 0, entry_ati); + LEAVE_GL(); +} + static void atifs_free(IWineD3DDevice *iface) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface; struct atifs_private_data *priv = (struct atifs_private_data *) This->fragment_priv; - struct ffp_desc *entry, *entry2; - struct atifs_ffp_desc *entry_ati; - ENTER_GL(); - LIST_FOR_EACH_ENTRY_SAFE(entry, entry2, &priv->fragment_shaders, struct ffp_desc, entry) { - entry_ati = (struct atifs_ffp_desc *) entry; - GL_EXTCALL(glDeleteFragmentShaderATI(entry_ati->shader)); - checkGLcall("glDeleteFragmentShaderATI(entry->shader)"); - list_remove(&entry->entry); - HeapFree(GetProcessHeap(), 0, entry); - } - LEAVE_GL(); + hash_table_destroy(priv->fragment_shaders, atifs_free_ffpshader, This); + HeapFree(GetProcessHeap(), 0, priv); This->fragment_priv = NULL; } diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index ce84ea7..80c4411 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -3527,7 +3527,7 @@ static void shader_glsl_free(IWineD3DDevice *iface) { GL_EXTCALL(glDeleteObjectARB(priv->depth_blt_glsl_program_id)); } - hash_table_destroy(priv->glsl_program_lookup); + hash_table_destroy(priv->glsl_program_lookup, NULL, NULL); HeapFree(GetProcessHeap(), 0, This->shader_priv); This->shader_priv = NULL; diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 4398724..a9fc780 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -1576,12 +1576,15 @@ hash_table_t *hash_table_create(hash_function_t *hash_function, compare_function return table; } -void hash_table_destroy(hash_table_t *table) +void hash_table_destroy(hash_table_t *table, void (*free_value)(void *value, void *cb), void *cb) { unsigned int i = 0; for (i = 0; i < table->entry_count; ++i) { + if(free_value) { + free_value(table->entries[i].value, cb); + } HeapFree(GetProcessHeap(), 0, table->entries[i].key); } @@ -1953,26 +1956,18 @@ void gen_ffp_op(IWineD3DStateBlockImpl *stateblock, struct ffp_settings *setting } #undef GLINFO_LOCATION -struct ffp_desc *find_ffp_shader(struct list *shaders, struct ffp_settings *settings) +struct ffp_desc *find_ffp_shader(hash_table_t *fragment_shaders, struct ffp_settings *settings) { - struct ffp_desc *entry; + return (struct ffp_desc *)hash_table_get(fragment_shaders, settings);} - /* TODO: Optimize this. Finding the shader can be optimized by e.g. sorting the list, - * or maybe consider using hashtables +void add_ffp_shader(hash_table_t *shaders, struct ffp_desc *desc) { + struct ffp_settings *key = HeapAlloc(GetProcessHeap(), 0, sizeof(*key)); + /* Note that the key is the implementation independent part of the ffp_desc structure, + * whereas desc points to an extended structure with implementation specific parts. + * Make a copy of the key because hash_table_put takes ownership of it */ - LIST_FOR_EACH_ENTRY(entry, shaders, struct ffp_desc, entry) { - if(memcmp(settings, &entry->settings, sizeof(*settings)) == 0) { - TRACE("Found shader entry %p\n", entry); - return entry; - } - } - - TRACE("Shader not found\n"); - return NULL; -} - -void add_ffp_shader(struct list *shaders, struct ffp_desc *desc) { - list_add_head(shaders, &desc->entry); + *key = desc->settings; + hash_table_put(shaders, key, desc); } /* Activates the texture dimension according to the bound D3D texture. @@ -2069,3 +2064,36 @@ void sampler_texdim(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCont texture_activate_dimensions(sampler, stateblock, context); } #undef GLINFO_LOCATION + +unsigned int ffp_program_key_hash(void *key) { + struct ffp_settings *k = (struct ffp_settings *)key; + unsigned int hash = 0, i; + DWORD *blob; + + /* This takes the texture op settings of stage 0 and 1 into account. + * how exactly depends on the memory laybout of the compiler, but it + * should not matter too much. Stages > 1 are used rarely, so there's + * no need to process them. Even if they're used it is likely that + * the ffp setup has distinct stage 0 and 1 settings. + */ + for(i = 0; i < 2; i++) { + blob = (DWORD *) &k->op[i]; + hash ^= blob[0] ^ blob[1]; + } + + hash += ~(hash << 15); + hash ^= (hash >> 10); + hash += (hash << 3); + hash ^= (hash >> 6); + hash += ~(hash << 11); + hash ^= (hash >> 16); + + return hash; +} + +BOOL ffp_program_key_compare(void *keya, void *keyb) { + struct ffp_settings *ka = (struct ffp_settings *)keya; + struct ffp_settings *kb = (struct ffp_settings *)keyb; + + return memcmp(ka, kb, sizeof(*ka)) == 0; +} diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 66e5a32..5b19acc 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -68,7 +68,7 @@ typedef struct { } hash_table_t; hash_table_t *hash_table_create(hash_function_t *hash_function, compare_function_t *compare_function); -void hash_table_destroy(hash_table_t *table); +void hash_table_destroy(hash_table_t *table, void (*free_value)(void *value, void *cb), void *cb); void *hash_table_get(hash_table_t *table, void *key); void hash_table_put(hash_table_t *table, void *key, void *value); void hash_table_remove(hash_table_t *table, void *key); @@ -761,12 +761,13 @@ struct ffp_settings { struct ffp_desc { struct ffp_settings settings; - struct list entry; }; void gen_ffp_op(IWineD3DStateBlockImpl *stateblock, struct ffp_settings *settings, BOOL ignore_textype); -struct ffp_desc *find_ffp_shader(struct list *shaders, struct ffp_settings *settings); -void add_ffp_shader(struct list *shaders, struct ffp_desc *desc); +struct ffp_desc *find_ffp_shader(hash_table_t *fragment_shaders, struct ffp_settings *settings); +void add_ffp_shader(hash_table_t *shaders, struct ffp_desc *desc); +BOOL ffp_program_key_compare(void *keya, void *keyb); +unsigned int ffp_program_key_hash(void *key); /***************************************************************************** * IWineD3D implementation structure
1
0
0
0
Stefan Dösinger : wined3d: Use C bitfields to compact the ffp description.
by Alexandre Julliard
31 Jul '08
31 Jul '08
Module: wine Branch: master Commit: d4d133f032389f54a45e6c8397a932f0ac47b432 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d4d133f032389f54a45e6c839…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Wed Jul 30 10:57:32 2008 -0500 wined3d: Use C bitfields to compact the ffp description. --- dlls/wined3d/ati_fragment_shader.c | 4 +- dlls/wined3d/utils.c | 117 +++++++++++++++++++++++------------- dlls/wined3d/wined3d_private.h | 33 +++++++--- 3 files changed, 101 insertions(+), 53 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=d4d133f032389f54a45e6…
1
0
0
0
Dylan Smith : richedit: Added OleInitialize for clipboard operations.
by Alexandre Julliard
31 Jul '08
31 Jul '08
Module: wine Branch: master Commit: edb63043798019d8632b46af540cb435122e5d52 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=edb63043798019d8632b46af5…
Author: Dylan Smith <dylan.ah.smith(a)gmail.com> Date: Wed Jul 30 10:09:14 2008 -0400 richedit: Added OleInitialize for clipboard operations. --- dlls/riched20/editor.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index c747c31..db9728c 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -1814,6 +1814,8 @@ ME_TextEditor *ME_MakeEditor(HWND hWnd) { ed->vert_si.nPage = 0; ed->vert_si.nPos = 0; + OleInitialize(NULL); + return ed; } @@ -1882,6 +1884,7 @@ void ME_DestroyEditor(ME_TextEditor *editor) DeleteObject(editor->hbrBackground); if(editor->lpOleCallback) IUnknown_Release(editor->lpOleCallback); + OleUninitialize(); FREE_OBJ(editor->pBuffer); FREE_OBJ(editor->pCursors);
1
0
0
0
Alexandre Julliard : winex11: Send WM_SYSCOMMAND instead of calling ShowWindow directly to minimize/ restore a window.
by Alexandre Julliard
31 Jul '08
31 Jul '08
Module: wine Branch: master Commit: 8d77c375b27adc490d24d7593769f4e149d4102c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8d77c375b27adc490d24d7593…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jul 31 12:08:38 2008 +0200 winex11: Send WM_SYSCOMMAND instead of calling ShowWindow directly to minimize/restore a window. --- dlls/winex11.drv/event.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index d54b5bb..6250486 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -885,13 +885,13 @@ static void handle_wm_state_notify( struct x11drv_win_data *data, XPropertyEvent { TRACE( "restoring win %p/%lx\n", data->hwnd, data->whole_window ); data->iconic = FALSE; - ShowWindow( data->hwnd, SW_RESTORE ); + SendMessageW( data->hwnd, WM_SYSCOMMAND, SC_RESTORE, 0 ); } else if (!data->iconic && data->wm_state == IconicState) { TRACE( "minimizing win %p/%lx\n", data->hwnd, data->whole_window ); data->iconic = TRUE; - ShowWindow( data->hwnd, SW_MINIMIZE ); + SendMessageW( data->hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0 ); } }
1
0
0
0
← Newer
1
2
3
4
5
6
...
112
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
Results per page:
10
25
50
100
200