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
July
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
March 2015
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 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
775 discussions
Start a n
N
ew thread
Francois Gouget : printui: Remove an unneeded NONAMELESSUNION directive.
by Alexandre Julliard
18 Mar '15
18 Mar '15
Module: wine Branch: master Commit: a186ded57f7dce7137ed72e4ee6dff6beea42ab9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a186ded57f7dce7137ed72e4e…
Author: Francois Gouget <fgouget(a)free.fr> Date: Wed Mar 18 08:19:02 2015 +0100 printui: Remove an unneeded NONAMELESSUNION directive. --- dlls/printui/printui.c | 1 - 1 file changed, 1 deletion(-) diff --git a/dlls/printui/printui.c b/dlls/printui/printui.c index c6e610d..32e7b52 100644 --- a/dlls/printui/printui.c +++ b/dlls/printui/printui.c @@ -21,7 +21,6 @@ #include <stdarg.h> #define COBJMACROS -#define NONAMELESSUNION #include "windef.h" #include "winbase.h"
1
0
0
0
Francois Gouget : oledlg: Remove an unneeded NONAMELESSSTRUCT directive.
by Alexandre Julliard
18 Mar '15
18 Mar '15
Module: wine Branch: master Commit: b8521dbccd1f9afcee7c8b9e18c99ffb231311a9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b8521dbccd1f9afcee7c8b9e1…
Author: Francois Gouget <fgouget(a)free.fr> Date: Wed Mar 18 08:19:10 2015 +0100 oledlg: Remove an unneeded NONAMELESSSTRUCT directive. --- dlls/oledlg/pastespl.c | 1 - 1 file changed, 1 deletion(-) diff --git a/dlls/oledlg/pastespl.c b/dlls/oledlg/pastespl.c index 4d31488..530c4ed 100644 --- a/dlls/oledlg/pastespl.c +++ b/dlls/oledlg/pastespl.c @@ -19,7 +19,6 @@ */ #define COBJMACROS -#define NONAMELESSSTRUCT #define NONAMELESSUNION #include <stdarg.h>
1
0
0
0
Vincent Povirk : gdiplus: Access bitmaps by row in alpha_blend_bmp_pixels.
by Alexandre Julliard
18 Mar '15
18 Mar '15
Module: wine Branch: master Commit: 0bec10bc3dc9576a42929de7d016a9be45022810 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0bec10bc3dc9576a42929de7d…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Tue Mar 17 16:11:14 2015 -0500 gdiplus: Access bitmaps by row in alpha_blend_bmp_pixels. --- dlls/gdiplus/graphics.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 4ed25c9..6d86e3a 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -360,9 +360,9 @@ static GpStatus alpha_blend_bmp_pixels(GpGraphics *graphics, INT dst_x, INT dst_ GpBitmap *dst_bitmap = (GpBitmap*)graphics->image; INT x, y; - for (x=0; x<src_width; x++) + for (y=0; y<src_height; y++) { - for (y=0; y<src_height; y++) + for (x=0; x<src_width; x++) { ARGB dst_color, src_color; src_color = ((ARGB*)(src + src_stride * y))[x];
1
0
0
0
Vincent Povirk : gdiplus: Do not access Bitmap bits when drawing transparent pixels.
by Alexandre Julliard
18 Mar '15
18 Mar '15
Module: wine Branch: master Commit: 08c1e6cd96064a2025f62dbc046b888b63b73b62 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=08c1e6cd96064a2025f62dbc0…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Tue Mar 17 16:09:56 2015 -0500 gdiplus: Do not access Bitmap bits when drawing transparent pixels. --- dlls/gdiplus/graphics.c | 6 +++++- dlls/gdiplus/tests/graphics.c | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 68a4ee5..4ed25c9 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -365,8 +365,12 @@ static GpStatus alpha_blend_bmp_pixels(GpGraphics *graphics, INT dst_x, INT dst_ for (y=0; y<src_height; y++) { ARGB dst_color, src_color; - GdipBitmapGetPixel(dst_bitmap, x+dst_x, y+dst_y, &dst_color); src_color = ((ARGB*)(src + src_stride * y))[x]; + + if (!(src_color & 0xff000000)) + continue; + + GdipBitmapGetPixel(dst_bitmap, x+dst_x, y+dst_y, &dst_color); GdipBitmapSetPixel(dst_bitmap, x+dst_x, y+dst_y, color_over(dst_color, src_color)); } } diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c index fd4cf80..e0bd615 100644 --- a/dlls/gdiplus/tests/graphics.c +++ b/dlls/gdiplus/tests/graphics.c @@ -2417,6 +2417,27 @@ static void test_fromMemoryBitmap(void) GdipDeleteGraphics(graphics); GdipDisposeImage((GpImage*)bitmap); + + /* If we don't draw to the HDC, the bits are never accessed */ + status = GdipCreateBitmapFromScan0(4, 4, 12, PixelFormat24bppRGB, (BYTE*)1, &bitmap); + expect(Ok, status); + + status = GdipGetImageGraphicsContext((GpImage*)bitmap, &graphics); + expect(Ok, status); + + status = GdipGetDC(graphics, &hdc); + expect(Ok, status); + ok(hdc != NULL, "got NULL hdc\n"); + + color = GetPixel(hdc, 0, 0); + todo_wine expect(0x0c0b0d, color); + + status = GdipReleaseDC(graphics, hdc); + expect(Ok, status); + + GdipDeleteGraphics(graphics); + + GdipDisposeImage((GpImage*)bitmap); } static void test_GdipIsVisiblePoint(void)
1
0
0
0
Nikolay Sivov : scrrun: Added stub IEnumVARIANT for dictionary.
by Alexandre Julliard
18 Mar '15
18 Mar '15
Module: wine Branch: master Commit: b22102df40fcfff9d71396b4cf3a5676d0a84307 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b22102df40fcfff9d71396b4c…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Mar 17 22:49:17 2015 +0300 scrrun: Added stub IEnumVARIANT for dictionary. --- dlls/scrrun/dictionary.c | 116 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 113 insertions(+), 3 deletions(-) diff --git a/dlls/scrrun/dictionary.c b/dlls/scrrun/dictionary.c index c92ca06..b74f2a7 100644 --- a/dlls/scrrun/dictionary.c +++ b/dlls/scrrun/dictionary.c @@ -73,11 +73,23 @@ typedef struct struct list buckets[BUCKET_COUNT]; } dictionary; +struct dictionary_enum { + IEnumVARIANT IEnumVARIANT_iface; + LONG ref; + + dictionary *dict; +}; + static inline dictionary *impl_from_IDictionary(IDictionary *iface) { return CONTAINING_RECORD(iface, dictionary, IDictionary_iface); } +static inline struct dictionary_enum *impl_from_IEnumVARIANT(IEnumVARIANT *iface) +{ + return CONTAINING_RECORD(iface, struct dictionary_enum, IEnumVARIANT_iface); +} + static inline struct list *get_bucket_head(dictionary *dict, DWORD hash) { return &dict->buckets[hash % BUCKET_COUNT]; @@ -202,6 +214,104 @@ static void free_keyitem_pair(struct keyitem_pair *pair) heap_free(pair); } +static HRESULT WINAPI dict_enum_QueryInterface(IEnumVARIANT *iface, REFIID riid, void **obj) +{ + struct dictionary_enum *This = impl_from_IEnumVARIANT(iface); + + TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), obj); + + if (IsEqualIID(riid, &IID_IEnumVARIANT) || IsEqualIID(riid, &IID_IUnknown)) { + *obj = iface; + IEnumVARIANT_AddRef(iface); + return S_OK; + } + else { + WARN("interface not supported %s\n", debugstr_guid(riid)); + *obj = NULL; + return E_NOINTERFACE; + } +} + +static ULONG WINAPI dict_enum_AddRef(IEnumVARIANT *iface) +{ + struct dictionary_enum *This = impl_from_IEnumVARIANT(iface); + TRACE("(%p)\n", This); + return InterlockedIncrement(&This->ref); +} + +static ULONG WINAPI dict_enum_Release(IEnumVARIANT *iface) +{ + struct dictionary_enum *This = impl_from_IEnumVARIANT(iface); + LONG ref; + + TRACE("(%p)\n", This); + + ref = InterlockedDecrement(&This->ref); + if(ref == 0) { + IDictionary_Release(&This->dict->IDictionary_iface); + heap_free(This); + } + + return ref; +} + +static HRESULT WINAPI dict_enum_Next(IEnumVARIANT *iface, ULONG count, VARIANT *keys, ULONG *fetched) +{ + struct dictionary_enum *This = impl_from_IEnumVARIANT(iface); + FIXME("(%p)->(%u %p %p): stub\n", This, count, keys, fetched); + return E_NOTIMPL; +} + +static HRESULT WINAPI dict_enum_Skip(IEnumVARIANT *iface, ULONG count) +{ + struct dictionary_enum *This = impl_from_IEnumVARIANT(iface); + FIXME("(%p)->(%u): stub\n", This, count); + return E_NOTIMPL; +} + +static HRESULT WINAPI dict_enum_Reset(IEnumVARIANT *iface) +{ + struct dictionary_enum *This = impl_from_IEnumVARIANT(iface); + FIXME("(%p): stub\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI dict_enum_Clone(IEnumVARIANT *iface, IEnumVARIANT **cloned) +{ + struct dictionary_enum *This = impl_from_IEnumVARIANT(iface); + FIXME("(%p)->(%p): stub\n", This, cloned); + return E_NOTIMPL; +} + +static const IEnumVARIANTVtbl dictenumvtbl = { + dict_enum_QueryInterface, + dict_enum_AddRef, + dict_enum_Release, + dict_enum_Next, + dict_enum_Skip, + dict_enum_Reset, + dict_enum_Clone +}; + +static HRESULT create_dict_enum(dictionary *dict, IUnknown **ret) +{ + struct dictionary_enum *This; + + *ret = NULL; + + This = heap_alloc(sizeof(*This)); + if (!This) + return E_OUTOFMEMORY; + + This->IEnumVARIANT_iface.lpVtbl = &dictenumvtbl; + This->ref = 1; + This->dict = dict; + IDictionary_AddRef(&dict->IDictionary_iface); + + *ret = (IUnknown*)&This->IEnumVARIANT_iface; + return S_OK; +} + static HRESULT WINAPI dictionary_QueryInterface(IDictionary *iface, REFIID riid, void **obj) { dictionary *This = impl_from_IDictionary(iface); @@ -557,13 +667,13 @@ static HRESULT WINAPI dictionary_get_CompareMode(IDictionary *iface, CompareMeth return S_OK; } -static HRESULT WINAPI dictionary__NewEnum(IDictionary *iface, IUnknown **ppunk) +static HRESULT WINAPI dictionary__NewEnum(IDictionary *iface, IUnknown **ret) { dictionary *This = impl_from_IDictionary(iface); - FIXME("(%p)->(%p)\n", This, ppunk); + TRACE("(%p)->(%p)\n", This, ret); - return E_NOTIMPL; + return create_dict_enum(This, ret); } static DWORD get_str_hash(const WCHAR *str, CompareMethod method)
1
0
0
0
Nikolay Sivov : scrrun: Preserve pairs order during dictionary lifetime.
by Alexandre Julliard
18 Mar '15
18 Mar '15
Module: wine Branch: master Commit: e0bbfb710cdb7cb36600c4b4e09851df3e609f40 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e0bbfb710cdb7cb36600c4b4e…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Mar 17 22:18:27 2015 +0300 scrrun: Preserve pairs order during dictionary lifetime. --- dlls/scrrun/dictionary.c | 59 ++++++++++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 24 deletions(-) diff --git a/dlls/scrrun/dictionary.c b/dlls/scrrun/dictionary.c index 8d534e7..c92ca06 100644 --- a/dlls/scrrun/dictionary.c +++ b/dlls/scrrun/dictionary.c @@ -39,9 +39,24 @@ WINE_DEFAULT_DEBUG_CHANNEL(scrrun); #define BUCKET_COUNT 509 +/* Implementation details + + Dictionary contains one list that links all pairs, this way + order in which they were added is preserved. Each bucket has + its own list to hold all pairs in this bucket. Initially all + bucket lists are zeroed and we init them once we about to add + first pair. + + When pair is removed it's unlinked from both lists; if it was + a last pair in a bucket list it stays empty in initialized state. + + Preserving pair order is important for enumeration, so far testing + indicates that pairs are not reordered basing on hash value. + */ + struct keyitem_pair { - struct list entry; - DWORD bucket; + struct list entry; + struct list bucket; DWORD hash; VARIANT key; VARIANT item; @@ -55,7 +70,7 @@ typedef struct CompareMethod method; LONG count; struct list pairs; - struct keyitem_pair *buckets[BUCKET_COUNT]; + struct list buckets[BUCKET_COUNT]; } dictionary; static inline dictionary *impl_from_IDictionary(IDictionary *iface) @@ -63,9 +78,9 @@ static inline dictionary *impl_from_IDictionary(IDictionary *iface) return CONTAINING_RECORD(iface, dictionary, IDictionary_iface); } -static inline struct keyitem_pair *get_bucket_head(const dictionary *dict, DWORD hash) +static inline struct list *get_bucket_head(dictionary *dict, DWORD hash) { - return dict->buckets[hash % BUCKET_COUNT]; + return &dict->buckets[hash % BUCKET_COUNT]; } static inline BOOL is_string_key(const VARIANT *key) @@ -115,7 +130,7 @@ static BOOL is_matching_key(const dictionary *dict, const struct keyitem_pair *p static struct keyitem_pair *get_keyitem_pair(dictionary *dict, VARIANT *key) { struct keyitem_pair *pair; - DWORD bucket; + struct list *head, *entry; VARIANT hash; HRESULT hr; @@ -123,24 +138,22 @@ static struct keyitem_pair *get_keyitem_pair(dictionary *dict, VARIANT *key) if (FAILED(hr)) return NULL; - pair = get_bucket_head(dict, V_I4(&hash)); - if (!pair) + entry = head = get_bucket_head(dict, V_I4(&hash)); + if (!head->next || list_empty(head)) return NULL; - bucket = pair->bucket; - do { + pair = LIST_ENTRY(entry, struct keyitem_pair, bucket); if (is_matching_key(dict, pair, key, V_I4(&hash))) return pair; - pair = LIST_ENTRY(list_next(&dict->pairs, &pair->entry), struct keyitem_pair, entry); - if (pair && pair->bucket != bucket) break; - } while (pair != NULL); + } while ((entry = list_next(head, entry))); return NULL; } static HRESULT add_keyitem_pair(dictionary *dict, VARIANT *key, VARIANT *item) { - struct keyitem_pair *pair, *head; + struct keyitem_pair *pair; + struct list *head; VARIANT hash; HRESULT hr; @@ -153,7 +166,6 @@ static HRESULT add_keyitem_pair(dictionary *dict, VARIANT *key, VARIANT *item) return E_OUTOFMEMORY; pair->hash = V_I4(&hash); - pair->bucket = pair->hash % BUCKET_COUNT; VariantInit(&pair->key); VariantInit(&pair->item); @@ -166,13 +178,13 @@ static HRESULT add_keyitem_pair(dictionary *dict, VARIANT *key, VARIANT *item) goto failed; head = get_bucket_head(dict, pair->hash); - if (head) - list_add_tail(&head->entry, &pair->entry); - else { - dict->buckets[pair->bucket] = pair; - list_add_tail(&dict->pairs, &pair->entry); - } + if (!head->next) + /* this only happens once per bucket */ + list_init(head); + /* link to bucket list and to full list */ + list_add_tail(head, &pair->bucket); + list_add_tail(&dict->pairs, &pair->entry); dict->count++; return S_OK; @@ -495,8 +507,7 @@ static HRESULT WINAPI dictionary_Remove(IDictionary *iface, VARIANT *key) return CTL_E_ELEMENT_NOT_FOUND; list_remove(&pair->entry); - if (This->buckets[pair->bucket] == pair) - This->buckets[pair->bucket] = NULL; + list_remove(&pair->bucket); This->count--; free_keyitem_pair(pair); @@ -515,9 +526,9 @@ static HRESULT WINAPI dictionary_RemoveAll(IDictionary *iface) LIST_FOR_EACH_ENTRY_SAFE(pair, pair2, &This->pairs, struct keyitem_pair, entry) { list_remove(&pair->entry); + list_remove(&pair->bucket); free_keyitem_pair(pair); } - memset(This->buckets, 0, sizeof(This->buckets)); This->count = 0; return S_OK;
1
0
0
0
Nikolay Sivov : dwrite/tests: Another test for cluster metrics and inline objects.
by Alexandre Julliard
18 Mar '15
18 Mar '15
Module: wine Branch: master Commit: b58528fa495809c6c24dbef74b366359eff39d4d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b58528fa495809c6c24dbef74…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Mar 16 10:22:21 2015 +0300 dwrite/tests: Another test for cluster metrics and inline objects. --- dlls/dwrite/tests/layout.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c index 5b15c37..bbfc7bc 100644 --- a/dlls/dwrite/tests/layout.c +++ b/dlls/dwrite/tests/layout.c @@ -992,6 +992,8 @@ static void test_typography(void) static void test_GetClusterMetrics(void) { static const WCHAR strW[] = {'a','b','c','d',0}; + DWRITE_INLINE_OBJECT_METRICS inline_metrics; + DWRITE_CLUSTER_METRICS metrics; IDWriteInlineObject *trimm; IDWriteTextFormat *format; IDWriteTextLayout *layout; @@ -1029,6 +1031,20 @@ static void test_GetClusterMetrics(void) todo_wine ok(count == 3, "got %u\n", count); + count = 0; + memset(&metrics, 0, sizeof(metrics)); + hr = IDWriteTextLayout_GetClusterMetrics(layout, &metrics, 1, &count); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08x\n", hr); +todo_wine + ok(count == 3, "got %u\n", count); + ok(metrics.length == 2, "got %u\n", metrics.length); + + hr = IDWriteInlineObject_GetMetrics(trimm, &inline_metrics); +todo_wine { + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(inline_metrics.width == metrics.width, "got %.2f, expected %.2f\n", inline_metrics.width, + metrics.width); +} IDWriteInlineObject_Release(trimm); IDWriteTextLayout_Release(layout); IDWriteTextFormat_Release(format);
1
0
0
0
Nikolay Sivov : dwrite: Remove unused helper.
by Alexandre Julliard
18 Mar '15
18 Mar '15
Module: wine Branch: master Commit: da1d6097ede7118c615cf74a9e7075b0b88ef915 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=da1d6097ede7118c615cf74a9…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun Mar 15 03:53:45 2015 +0300 dwrite: Remove unused helper. --- dlls/dwrite/layout.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index 7326aa3..56026fb 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -206,11 +206,6 @@ static inline struct dwrite_textformat *impl_from_IDWriteTextFormat1(IDWriteText return CONTAINING_RECORD(iface, struct dwrite_textformat, IDWriteTextFormat1_iface); } -static inline struct dwrite_textformat *unsafe_impl_from_IDWriteTextFormat1(IDWriteTextFormat1 *iface) -{ - return iface->lpVtbl == &dwritetextformatvtbl ? impl_from_IDWriteTextFormat1(iface) : NULL; -} - static inline struct dwrite_trimmingsign *impl_from_IDWriteInlineObject(IDWriteInlineObject *iface) { return CONTAINING_RECORD(iface, struct dwrite_trimmingsign, IDWriteInlineObject_iface);
1
0
0
0
Aric Stewart : dsound: Do not wait on mixer thread exit on dsound release.
by Alexandre Julliard
18 Mar '15
18 Mar '15
Module: wine Branch: master Commit: 0aea30e44cad38e63d541df1ef2478dd6534f388 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0aea30e44cad38e63d541df1e…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Tue Mar 17 11:35:47 2015 -0500 dsound: Do not wait on mixer thread exit on dsound release. This fixes a loader deadlock if the dsound object is being released during a dll unload. --- dlls/dsound/dsound.c | 4 +++- dlls/dsound/dsound_private.h | 1 + dlls/dsound/mixer.c | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c index 824f581..065c377 100644 --- a/dlls/dsound/dsound.c +++ b/dlls/dsound/dsound.c @@ -208,8 +208,9 @@ static ULONG DirectSoundDevice_Release(DirectSoundDevice * device) SetEvent(device->sleepev); if (device->thread) { - WaitForSingleObject(device->thread, INFINITE); + WaitForSingleObject(device->thread_finished, INFINITE); CloseHandle(device->thread); + CloseHandle(device->thread_finished); } CloseHandle(device->sleepev); @@ -384,6 +385,7 @@ static HRESULT DirectSoundDevice_Initialize(DirectSoundDevice ** ppDevice, LPCGU hr = DSOUND_PrimaryCreate(device); if (hr == DS_OK) { + device->thread_finished = CreateEventW(0, 0, 0, 0); device->thread = CreateThread(0, 0, DSOUND_mixthread, device, 0, 0); SetThreadPriority(device->thread, THREAD_PRIORITY_TIME_CRITICAL); } else diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h index 9c58679..9c001ed 100644 --- a/dlls/dsound/dsound_private.h +++ b/dlls/dsound/dsound_private.h @@ -108,6 +108,7 @@ struct DirectSoundDevice IAudioRenderClient *render; HANDLE sleepev, thread; + HANDLE thread_finished; struct list entry; }; diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c index 8dbd15a..85ab14a 100644 --- a/dlls/dsound/mixer.c +++ b/dlls/dsound/mixer.c @@ -909,5 +909,6 @@ DWORD CALLBACK DSOUND_mixthread(void *p) DSOUND_PerformMix(dev); RtlReleaseResource(&(dev->buffer_list_lock)); } + SetEvent(dev->thread_finished); return 0; }
1
0
0
0
Akihiro Sagawa : mciqtz32: Fix notify flag behavior.
by Alexandre Julliard
18 Mar '15
18 Mar '15
Module: wine Branch: master Commit: 0221688cdde04f347580bd3376b5b1a2fae6573a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0221688cdde04f347580bd337…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Wed Mar 18 00:04:59 2015 +0900 mciqtz32: Fix notify flag behavior. --- dlls/mciqtz32/mciqtz.c | 116 +++++++++++++++++++++++++++++++++-------- dlls/mciqtz32/mciqtz_private.h | 6 ++- dlls/winmm/tests/mci.c | 6 +-- 3 files changed, 103 insertions(+), 25 deletions(-) diff --git a/dlls/mciqtz32/mciqtz.c b/dlls/mciqtz32/mciqtz.c index a72f1af..a1c3450 100644 --- a/dlls/mciqtz32/mciqtz.c +++ b/dlls/mciqtz32/mciqtz.c @@ -85,6 +85,7 @@ static DWORD MCIQTZ_drvOpen(LPCWSTR str, LPMCI_OPEN_DRIVER_PARMSW modp) if (!wma) return 0; + wma->stop_event = CreateEventW(NULL, FALSE, FALSE, NULL); modp->wType = MCI_DEVTYPE_DIGITAL_VIDEO; wma->wDevID = modp->wDeviceID; modp->wCustomCommandTable = wma->command_table = mciLoadCommandResource(MCIQTZ_hInstance, mciAviWStr, 0); @@ -110,6 +111,7 @@ static DWORD MCIQTZ_drvClose(DWORD dwDevID) mciFreeCommandResource(wma->command_table); mciSetDriverData(dwDevID, 0); + CloseHandle(wma->stop_event); HeapFree(GetProcessHeap(), 0, wma); return 1; } @@ -137,6 +139,20 @@ static DWORD MCIQTZ_drvConfigure(DWORD dwDevID) return 1; } +/************************************************************************** + * MCIQTZ_mciNotify [internal] + * + * Notifications in MCI work like a 1-element queue. + * Each new notification request supersedes the previous one. + */ +static void MCIQTZ_mciNotify(DWORD_PTR hWndCallBack, WINE_MCIQTZ* wma, UINT wStatus) +{ + MCIDEVICEID wDevID = wma->notify_devid; + HANDLE old = InterlockedExchangePointer(&wma->callback, NULL); + if (old) mciDriverNotify(old, wDevID, MCI_NOTIFY_SUPERSEDED); + mciDriverNotify(HWND_32(LOWORD(hWndCallBack)), wDevID, wStatus); +} + /*************************************************************************** * MCIQTZ_mciOpen [internal] */ @@ -307,6 +323,63 @@ static DWORD MCIQTZ_mciClose(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpP } /*************************************************************************** + * MCIQTZ_notifyThread [internal] + */ +static DWORD CALLBACK MCIQTZ_notifyThread(LPVOID parm) +{ + WINE_MCIQTZ* wma = (WINE_MCIQTZ *)parm; + HRESULT hr; + HANDLE handle[2]; + DWORD n = 0, ret = 0; + + handle[n++] = wma->stop_event; + IMediaEvent_GetEventHandle(wma->mevent, (OAEVENT *)&handle[n++]); + + for (;;) { + DWORD r; + HANDLE old; + + r = WaitForMultipleObjects(n, handle, FALSE, INFINITE); + if (r == WAIT_OBJECT_0) { + TRACE("got stop event\n"); + old = InterlockedExchangePointer(&wma->callback, NULL); + if (old) + mciDriverNotify(old, wma->notify_devid, MCI_NOTIFY_ABORTED); + break; + } + else if (r == WAIT_OBJECT_0+1) { + LONG event_code; + LONG_PTR p1, p2; + do { + hr = IMediaEvent_GetEvent(wma->mevent, &event_code, &p1, &p2, 0); + if (SUCCEEDED(hr)) { + TRACE("got event_code = 0x%02x\n", event_code); + IMediaEvent_FreeEventParams(wma->mevent, event_code, p1, p2); + } + } while (hr == S_OK && event_code != EC_COMPLETE); + if (hr == S_OK && event_code == EC_COMPLETE) { + old = InterlockedExchangePointer(&wma->callback, NULL); + if (old) + mciDriverNotify(old, wma->notify_devid, MCI_NOTIFY_SUCCESSFUL); + break; + } + } + else { + TRACE("Unknown error (%d)\n", (int)r); + break; + } + } + + hr = IMediaControl_Stop(wma->pmctrl); + if (FAILED(hr)) { + TRACE("Cannot stop filtergraph (hr = %x)\n", hr); + ret = MCIERR_INTERNAL; + } + + return ret; +} + +/*************************************************************************** * MCIQTZ_mciPlay [internal] */ static DWORD MCIQTZ_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms) @@ -326,6 +399,14 @@ static DWORD MCIQTZ_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms if (!wma) return MCIERR_INVALID_DEVICE_ID; + ResetEvent(wma->stop_event); + if (dwFlags & MCI_NOTIFY) { + HANDLE old; + old = InterlockedExchangePointer(&wma->callback, HWND_32(LOWORD(lpParms->dwCallback))); + if (old) + mciDriverNotify(old, wma->notify_devid, MCI_NOTIFY_ABORTED); + } + IMediaSeeking_GetTimeFormat(wma->seek, &format); if (dwFlags & MCI_FROM) { if (IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME)) @@ -352,8 +433,11 @@ static DWORD MCIQTZ_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms IVideoWindow_put_Visible(wma->vidwin, OATRUE); - if (dwFlags & MCI_NOTIFY) - mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)), wDevID, MCI_NOTIFY_SUCCESSFUL); + wma->thread = CreateThread(NULL, 0, MCIQTZ_notifyThread, wma, 0, NULL); + if (!wma->thread) { + TRACE("Can't create thread\n"); + return MCIERR_INTERNAL; + } return 0; } @@ -397,7 +481,7 @@ static DWORD MCIQTZ_mciSeek(UINT wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms } if (dwFlags & MCI_NOTIFY) - mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)), wDevID, MCI_NOTIFY_SUCCESSFUL); + MCIQTZ_mciNotify(lpParms->dwCallback, wma, MCI_NOTIFY_SUCCESSFUL); return 0; } @@ -408,7 +492,6 @@ static DWORD MCIQTZ_mciSeek(UINT wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms static DWORD MCIQTZ_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms) { WINE_MCIQTZ* wma; - HRESULT hr; TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms); @@ -419,10 +502,11 @@ static DWORD MCIQTZ_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpPa if (!wma->opened) return 0; - hr = IMediaControl_Stop(wma->pmctrl); - if (FAILED(hr)) { - TRACE("Cannot stop filtergraph (hr = %x)\n", hr); - return MCIERR_INTERNAL; + if (wma->thread) { + SetEvent(wma->stop_event); + WaitForSingleObject(wma->thread, INFINITE); + CloseHandle(wma->thread); + wma->thread = NULL; } if (!wma->parent) @@ -676,19 +760,9 @@ static DWORD MCIQTZ_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_DGV_STATUS_PARMS if (state == State_Stopped) lpParms->dwReturn = MAKEMCIRESOURCE(MCI_MODE_STOP, MCI_MODE_STOP); else if (state == State_Running) { - LONG code; - LONG_PTR p1, p2; - lpParms->dwReturn = MAKEMCIRESOURCE(MCI_MODE_PLAY, MCI_MODE_PLAY); - - do { - hr = IMediaEvent_GetEvent(wma->mevent, &code, &p1, &p2, 0); - if (hr == S_OK && code == EC_COMPLETE){ - lpParms->dwReturn = MAKEMCIRESOURCE(MCI_MODE_STOP, MCI_MODE_STOP); - IMediaControl_Stop(wma->pmctrl); - } - } while (hr == S_OK); - + if (!wma->thread || WaitForSingleObject(wma->thread, 0) == WAIT_OBJECT_0) + lpParms->dwReturn = MAKEMCIRESOURCE(MCI_MODE_STOP, MCI_MODE_STOP); } else if (state == State_Paused) lpParms->dwReturn = MAKEMCIRESOURCE(MCI_MODE_PAUSE, MCI_MODE_PAUSE); ret = MCI_RESOURCE_RETURNED; @@ -714,7 +788,7 @@ static DWORD MCIQTZ_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_DGV_STATUS_PARMS } if (dwFlags & MCI_NOTIFY) - mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)), wDevID, MCI_NOTIFY_SUCCESSFUL); + MCIQTZ_mciNotify(lpParms->dwCallback, wma, MCI_NOTIFY_SUCCESSFUL); return ret; } diff --git a/dlls/mciqtz32/mciqtz_private.h b/dlls/mciqtz32/mciqtz_private.h index 7263a26..27939aa 100644 --- a/dlls/mciqtz32/mciqtz_private.h +++ b/dlls/mciqtz32/mciqtz_private.h @@ -38,7 +38,11 @@ typedef struct { IBasicAudio* audio; DWORD time_format; UINT command_table; - HWND parent; + HWND parent; + MCIDEVICEID notify_devid; + HANDLE callback; + HANDLE thread; + HANDLE stop_event; } WINE_MCIQTZ; #endif /* __WINE_PRIVATE_MCIQTZ_H */ diff --git a/dlls/winmm/tests/mci.c b/dlls/winmm/tests/mci.c index 423fceb..7470ed1 100644 --- a/dlls/winmm/tests/mci.c +++ b/dlls/winmm/tests/mci.c @@ -1376,7 +1376,7 @@ static void test_asyncWaveTypeMpegvideo(HWND hwnd) err = mciSendStringA("status mysound mode notify", buf, sizeof(buf), hwnd); ok(!err,"mci status mode returned %s\n", dbg_mcierr(err)); if(!err) ok(!strcmp(buf,"paused"), "mci status mode: %s\n", buf); - todo_wine test_notification(hwnd,"play (superseded)",MCI_NOTIFY_SUPERSEDED); + test_notification(hwnd,"play (superseded)",MCI_NOTIFY_SUPERSEDED); test_notification(hwnd,"status",MCI_NOTIFY_SUCCESSFUL); err = mciSendStringA("seek mysound to start wait", NULL, 0, NULL); @@ -1388,11 +1388,11 @@ static void test_asyncWaveTypeMpegvideo(HWND hwnd) err = mciSendStringA("play mysound to 1500 notify", NULL, 0, hwnd); ok(!err,"mci play returned %s\n", dbg_mcierr(err)); Sleep(200); - todo_wine test_notification(hwnd,"play",0); + test_notification(hwnd,"play",0); err = mciSendStringA("close mysound wait", NULL, 0, NULL); ok(!err,"mci close wait returned %s\n", dbg_mcierr(err)); - todo_wine test_notification(hwnd,"play (aborted by close)",MCI_NOTIFY_ABORTED); + test_notification(hwnd,"play (aborted by close)",MCI_NOTIFY_ABORTED); } START_TEST(mci)
1
0
0
0
← Newer
1
...
31
32
33
34
35
36
37
...
78
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
Results per page:
10
25
50
100
200