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 2016
----- 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
680 discussions
Start a n
N
ew thread
Nikolay Sivov : dwrite: Ignore fonts with dot-prefixed names.
by Alexandre Julliard
15 Jul '16
15 Jul '16
Module: wine Branch: master Commit: 3fa7ff671cc2129d3a895537db81603ad026fa8d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3fa7ff671cc2129d3a895537d…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Jul 15 11:05:37 2016 +0300 dwrite: Ignore fonts with dot-prefixed names. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/font.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index a80861b..d1a04db 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -3593,6 +3593,14 @@ HRESULT create_font_collection(IDWriteFactory3 *factory, IDWriteFontFileEnumerat fontstrings_get_en_string(family_name, familyW, sizeof(familyW)/sizeof(WCHAR)); + /* ignore dot named faces */ + if (familyW[0] == '.') { + WARN("Ignoring face %s\n", debugstr_w(familyW)); + IDWriteLocalizedStrings_Release(family_name); + release_font_data(font_data); + continue; + } + index = collection_find_family(collection, familyW); if (index != ~0u) hr = fontfamily_add_font(collection->family_data[index], font_data);
1
0
0
0
Huw Davies : gdi32: Copy 1-bpp pixels one byte at a time.
by Alexandre Julliard
15 Jul '16
15 Jul '16
Module: wine Branch: master Commit: 778faedbaecdab5bba377861ddece0d110eab747 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=778faedbaecdab5bba377861d…
Author: Huw Davies <huw(a)codeweavers.com> Date: Fri Jul 15 08:59:29 2016 +0100 gdi32: Copy 1-bpp pixels one byte at a time. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/dibdrv/primitives.c | 288 +++++++++++++++++++++++++++++++++++++---- dlls/gdi32/tests/dib.c | 42 +++--- 2 files changed, 292 insertions(+), 38 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=778faedbaecdab5bba377…
1
0
0
0
Iván Matellanes : msvcirt: Implement istream::isfx.
by Alexandre Julliard
15 Jul '16
15 Jul '16
Module: wine Branch: master Commit: 3a4dd04b1152de1919831dfd6aaa32bb4c5b3147 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3a4dd04b1152de1919831dfd6…
Author: Iván Matellanes <matellanesivan(a)gmail.com> Date: Fri Jul 15 10:26:56 2016 +0100 msvcirt: Implement istream::isfx. Signed-off-by: Iván Matellanes <matellanes.ivan(a)gmail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcirt/msvcirt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/msvcirt/msvcirt.c b/dlls/msvcirt/msvcirt.c index 32c4698..6c0b9a4 100644 --- a/dlls/msvcirt/msvcirt.c +++ b/dlls/msvcirt/msvcirt.c @@ -3097,7 +3097,12 @@ int __thiscall istream_ipfx(istream *this, int need) DEFINE_THISCALL_WRAPPER(istream_isfx, 4) void __thiscall istream_isfx(istream *this) { - FIXME("(%p) stub\n", this); + ios *base = istream_get_ios(this); + + TRACE("(%p)\n", this); + + ios_unlockbuf(base); + ios_unlock(base); } /* ?get@istream@@IAEAAV1@PADHH@Z */
1
0
0
0
Iván Matellanes : msvcirt: Implement istream::ipfx.
by Alexandre Julliard
15 Jul '16
15 Jul '16
Module: wine Branch: master Commit: eb91e1c677f95a8fc0d65d2204f57adefebf70cc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eb91e1c677f95a8fc0d65d220…
Author: Iván Matellanes <matellanesivan(a)gmail.com> Date: Fri Jul 15 10:26:55 2016 +0100 msvcirt: Implement istream::ipfx. Signed-off-by: Iván Matellanes <matellanes.ivan(a)gmail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcirt/msvcirt.c | 26 +++++++++- dlls/msvcirt/tests/msvcirt.c | 117 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 140 insertions(+), 3 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=eb91e1c677f95a8fc0d65…
1
0
0
0
Iván Matellanes : msvcirt: Implement istream::gcount.
by Alexandre Julliard
15 Jul '16
15 Jul '16
Module: wine Branch: master Commit: a7d22c2ec50971f94505abdde3f215caa5501407 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a7d22c2ec50971f94505abdde…
Author: Iván Matellanes <matellanesivan(a)gmail.com> Date: Fri Jul 15 10:26:54 2016 +0100 msvcirt: Implement istream::gcount. Signed-off-by: Iván Matellanes <matellanes.ivan(a)gmail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcirt/msvcirt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/msvcirt/msvcirt.c b/dlls/msvcirt/msvcirt.c index cffd0da..f7fcedb 100644 --- a/dlls/msvcirt/msvcirt.c +++ b/dlls/msvcirt/msvcirt.c @@ -3057,8 +3057,8 @@ void __thiscall istream_eatwhite(istream *this) DEFINE_THISCALL_WRAPPER(istream_gcount, 4) int __thiscall istream_gcount(const istream *this) { - FIXME("(%p) stub\n", this); - return 0; + TRACE("(%p)\n", this); + return this->count; } /* ?ipfx@istream@@QAEHH@Z */
1
0
0
0
Iván Matellanes : msvcirt: Implement istream:: eatwhite.
by Alexandre Julliard
15 Jul '16
15 Jul '16
Module: wine Branch: master Commit: 2f698f63926a4fac46995ad045efe4ed74c52820 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2f698f63926a4fac46995ad04…
Author: Iván Matellanes <matellanesivan(a)gmail.com> Date: Fri Jul 15 10:26:53 2016 +0100 msvcirt: Implement istream::eatwhite. Signed-off-by: Iván Matellanes <matellanes.ivan(a)gmail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcirt/msvcirt.c | 11 +++++++- dlls/msvcirt/tests/msvcirt.c | 61 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 1 deletion(-) diff --git a/dlls/msvcirt/msvcirt.c b/dlls/msvcirt/msvcirt.c index 33d1b14..cffd0da 100644 --- a/dlls/msvcirt/msvcirt.c +++ b/dlls/msvcirt/msvcirt.c @@ -3040,7 +3040,16 @@ istream* __thiscall istream_scalar_dtor(ios *base, unsigned int flags) DEFINE_THISCALL_WRAPPER(istream_eatwhite, 4) void __thiscall istream_eatwhite(istream *this) { - FIXME("(%p) stub\n", this); + ios *base = istream_get_ios(this); + int c; + + TRACE("(%p)\n", this); + + ios_lockbuf(base); + for (c = streambuf_sgetc(base->sb); isspace(c); c = streambuf_snextc(base->sb)); + ios_unlockbuf(base); + if (c == EOF) + ios_clear(base, base->state | IOSTATE_eofbit); } /* ?gcount@istream@@QBEHXZ */ diff --git a/dlls/msvcirt/tests/msvcirt.c b/dlls/msvcirt/tests/msvcirt.c index bdbdbf0..fd32099 100644 --- a/dlls/msvcirt/tests/msvcirt.c +++ b/dlls/msvcirt/tests/msvcirt.c @@ -309,6 +309,7 @@ static void (*__thiscall p_istream_dtor)(ios*); static istream* (*__thiscall p_istream_assign_sb)(istream*, streambuf*); static istream* (*__thiscall p_istream_assign)(istream*, const istream*); static void (*__thiscall p_istream_vbase_dtor)(istream*); +static void (*__thiscall p_istream_eatwhite)(istream*); /* Emulate a __thiscall */ #ifdef __i386__ @@ -506,6 +507,7 @@ static BOOL init(void) SET(p_istream_assign_sb, "??4istream@@IEAAAEAV0@PEAVstreambuf@@@Z"); SET(p_istream_assign, "??4istream@@IEAAAEAV0@AEBV0@@Z"); SET(p_istream_vbase_dtor, "??_Distream@@QEAAXXZ"); + SET(p_istream_eatwhite, "?eatwhite@istream@@QEAAXXZ"); } else { p_operator_new = (void*)GetProcAddress(msvcrt, "??2@YAPAXI@Z"); p_operator_delete = (void*)GetProcAddress(msvcrt, "??3@YAXPAX@Z"); @@ -625,6 +627,7 @@ static BOOL init(void) SET(p_istream_assign_sb, "??4istream@@IAEAAV0@PAVstreambuf@@@Z"); SET(p_istream_assign, "??4istream@@IAEAAV0@ABV0@@Z"); SET(p_istream_vbase_dtor, "??_Distream@@QAEXXZ"); + SET(p_istream_eatwhite, "?eatwhite@istream@@QAEXXZ"); } SET(p_ios_static_lock, "?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A"); SET(p_ios_lockc, "?lockc@ios@@KAXXZ"); @@ -3410,6 +3413,7 @@ static void test_istream(void) filebuf fb1, fb2, *pfb; const char filename1[] = "test1"; const char filename2[] = "test2"; + int ret; memset(&is1, 0xab, sizeof(istream)); memset(&is2, 0xab, sizeof(istream)); @@ -3556,6 +3560,63 @@ if (0) /* crashes on native */ ok(is2.base_ios.sb == &fb2.base, "expected %p got %p\n", &fb2.base, is2.base_ios.sb); ok(is2.base_ios.state == IOSTATE_goodbit, "expected %d got %d\n", IOSTATE_goodbit, is2.base_ios.state); + /* eatwhite */ + is1.extract_delim = is1.count = 0; +if (0) /* crashes on native */ + is1.base_ios.sb = NULL; + is1.base_ios.state = IOSTATE_badbit; + is1.base_ios.flags = 0; + call_func1(p_istream_eatwhite, &is1); + ok(is1.base_ios.state == (IOSTATE_badbit|IOSTATE_eofbit), "expected %d got %d\n", + IOSTATE_badbit|IOSTATE_eofbit, is1.base_ios.state); + is1.base_ios.state = IOSTATE_failbit; + call_func1(p_istream_eatwhite, &is1); + ok(is1.base_ios.state == (IOSTATE_failbit|IOSTATE_eofbit), "expected %d got %d\n", + IOSTATE_failbit|IOSTATE_eofbit, is1.base_ios.state); + is1.base_ios.state = IOSTATE_goodbit; + ret = (int) call_func3(p_streambuf_xsputn, &fb1.base, "And if \tyou ask\n\v\f\r me", 23); + ok(ret == 23, "expected 23 got %d\n", ret); + ok(fb1.base.pbase == fb1.base.base, "wrong put base, expected %p got %p\n", fb1.base.base, fb1.base.pbase); + ok(fb1.base.pptr == fb1.base.base + 23, "wrong put pointer, expected %p got %p\n", fb1.base.base + 23, fb1.base.pptr); + call_func1(p_istream_eatwhite, &is1); + ok(is1.base_ios.state == IOSTATE_eofbit, "expected %d got %d\n", IOSTATE_eofbit, is1.base_ios.state); + ok(fb1.base.pbase == NULL, "wrong put base, expected %p got %p\n", NULL, fb1.base.pbase); + ok(fb1.base.pptr == NULL, "wrong put pointer, expected %p got %p\n", NULL, fb1.base.pptr); + ok(fb1.base.epptr == NULL, "wrong put end, expected %p got %p\n", NULL, fb1.base.epptr); + is1.base_ios.state = IOSTATE_goodbit; + ret = (int) call_func4(p_filebuf_seekoff, &fb1, 0, SEEKDIR_beg, 0); + ok(ret == 0, "expected 0 got %d\n", ret); + call_func1(p_istream_eatwhite, &is1); + ok(is1.base_ios.state == IOSTATE_goodbit, "expected %d got %d\n", IOSTATE_goodbit, is1.base_ios.state); + ok(fb1.base.eback == fb1.base.base, "wrong get base, expected %p got %p\n", fb1.base.base, fb1.base.eback); + ok(fb1.base.gptr == fb1.base.base, "wrong get pointer, expected %p got %p\n", fb1.base.base, fb1.base.gptr); + ok(fb1.base.egptr == fb1.base.base + 23, "wrong get end, expected %p got %p\n", fb1.base.base + 23, fb1.base.egptr); + ret = (int) call_func4(p_filebuf_seekoff, &fb1, 3, SEEKDIR_beg, 0); + ok(ret == 3, "expected 3 got %d\n", ret); + call_func1(p_istream_eatwhite, &is1); + ok(is1.base_ios.state == IOSTATE_goodbit, "expected %d got %d\n", IOSTATE_goodbit, is1.base_ios.state); + ok(fb1.base.eback == fb1.base.base, "wrong get base, expected %p got %p\n", fb1.base.base, fb1.base.eback); + ok(fb1.base.gptr == fb1.base.base + 1, "wrong get pointer, expected %p got %p\n", fb1.base.base + 1, fb1.base.gptr); + ok(fb1.base.egptr == fb1.base.base + 20, "wrong get end, expected %p got %p\n", fb1.base.base + 20, fb1.base.egptr); + fb1.base.gptr += 2; + call_func1(p_istream_eatwhite, &is1); + ok(is1.base_ios.state == IOSTATE_goodbit, "expected %d got %d\n", IOSTATE_goodbit, is1.base_ios.state); + ok(fb1.base.eback == fb1.base.base, "wrong get base, expected %p got %p\n", fb1.base.base, fb1.base.eback); + ok(fb1.base.gptr == fb1.base.base + 5, "wrong get pointer, expected %p got %p\n", fb1.base.base + 5, fb1.base.gptr); + ok(fb1.base.egptr == fb1.base.base + 20, "wrong get end, expected %p got %p\n", fb1.base.base + 20, fb1.base.egptr); + fb1.base.gptr += 7; + call_func1(p_istream_eatwhite, &is1); + ok(is1.base_ios.state == IOSTATE_goodbit, "expected %d got %d\n", IOSTATE_goodbit, is1.base_ios.state); + ok(fb1.base.eback == fb1.base.base, "wrong get base, expected %p got %p\n", fb1.base.base, fb1.base.eback); + ok(fb1.base.gptr == fb1.base.base + 18, "wrong get pointer, expected %p got %p\n", fb1.base.base + 18, fb1.base.gptr); + ok(fb1.base.egptr == fb1.base.base + 20, "wrong get end, expected %p got %p\n", fb1.base.base + 20, fb1.base.egptr); + fb1.base.gptr += 9; + call_func1(p_istream_eatwhite, &is1); + ok(is1.base_ios.state == IOSTATE_eofbit, "expected %d got %d\n", IOSTATE_eofbit, is1.base_ios.state); + ok(fb1.base.eback == NULL, "wrong get base, expected %p got %p\n", NULL, fb1.base.eback); + ok(fb1.base.gptr == NULL, "wrong get pointer, expected %p got %p\n", NULL, fb1.base.gptr); + ok(fb1.base.egptr == NULL, "wrong get end, expected %p got %p\n", NULL, fb1.base.egptr); + call_func1(p_istream_vbase_dtor, &is1); call_func1(p_istream_vbase_dtor, &is2); call_func1(p_filebuf_dtor, &fb1);
1
0
0
0
Iván Matellanes : msvcirt: Implement istream constructors/destructors.
by Alexandre Julliard
15 Jul '16
15 Jul '16
Module: wine Branch: master Commit: a035f67cf55d312ab02a96a3e4138af8b16d10bc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a035f67cf55d312ab02a96a3e…
Author: Iván Matellanes <matellanesivan(a)gmail.com> Date: Fri Jul 15 10:26:52 2016 +0100 msvcirt: Implement istream constructors/destructors. Signed-off-by: Iván Matellanes <matellanes.ivan(a)gmail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcirt/msvcirt.c | 63 ++++++++++++-- dlls/msvcirt/tests/msvcirt.c | 194 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 248 insertions(+), 9 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=a035f67cf55d312ab02a9…
1
0
0
0
Iván Matellanes : msvcirt: Add stub for class istream.
by Alexandre Julliard
15 Jul '16
15 Jul '16
Module: wine Branch: master Commit: db90b19a62faa3f0aa43b10618d5f9bafa761d03 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=db90b19a62faa3f0aa43b1061…
Author: Iván Matellanes <matellanesivan(a)gmail.com> Date: Fri Jul 15 10:26:51 2016 +0100 msvcirt: Add stub for class istream. Signed-off-by: Iván Matellanes <matellanes.ivan(a)gmail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcirt/msvcirt.c | 357 ++++++++++++++++++++++++++++++++++++++++++++ dlls/msvcirt/msvcirt.spec | 152 +++++++++---------- dlls/msvcrt20/msvcrt20.spec | 148 +++++++++--------- dlls/msvcrt40/msvcrt40.spec | 152 +++++++++---------- 4 files changed, 583 insertions(+), 226 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=db90b19a62faa3f0aa43b…
1
0
0
0
Huw Davies : gdi32: Reduce the number of memory allocations required for gdi paths.
by Alexandre Julliard
15 Jul '16
15 Jul '16
Module: wine Branch: master Commit: da8834609a8b5e2d9aab1e7d843f5b311c9bc171 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=da8834609a8b5e2d9aab1e7d8…
Author: Huw Davies <huw(a)codeweavers.com> Date: Thu Jul 14 14:28:14 2016 +0100 gdi32: Reduce the number of memory allocations required for gdi paths. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/path.c | 62 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 41 insertions(+), 21 deletions(-) diff --git a/dlls/gdi32/path.c b/dlls/gdi32/path.c index 2ee113e..558bcf7 100644 --- a/dlls/gdi32/path.c +++ b/dlls/gdi32/path.c @@ -89,6 +89,8 @@ struct gdi_path int allocated; BOOL newStroke; POINT pos; /* current cursor position */ + POINT points_buf[NUM_ENTRIES_INITIAL]; + BYTE flags_buf[NUM_ENTRIES_INITIAL]; }; struct path_physdev @@ -104,8 +106,8 @@ static inline struct path_physdev *get_path_physdev( PHYSDEV dev ) void free_gdi_path( struct gdi_path *path ) { - HeapFree( GetProcessHeap(), 0, path->points ); - HeapFree( GetProcessHeap(), 0, path->flags ); + if (path->points != path->points_buf) + HeapFree( GetProcessHeap(), 0, path->points ); HeapFree( GetProcessHeap(), 0, path ); } @@ -119,13 +121,22 @@ static struct gdi_path *alloc_gdi_path( int count ) return NULL; } count = max( NUM_ENTRIES_INITIAL, count ); - path->points = HeapAlloc( GetProcessHeap(), 0, count * sizeof(*path->points) ); - path->flags = HeapAlloc( GetProcessHeap(), 0, count * sizeof(*path->flags) ); - if (!path->points || !path->flags) + if (count > NUM_ENTRIES_INITIAL) { - free_gdi_path( path ); - SetLastError( ERROR_NOT_ENOUGH_MEMORY ); - return NULL; + path->points = HeapAlloc( GetProcessHeap(), 0, + count * (sizeof(path->points[0]) + sizeof(path->flags[0])) ); + if (!path->points) + { + HeapFree( GetProcessHeap(), 0, path ); + SetLastError( ERROR_NOT_ENOUGH_MEMORY ); + return NULL; + } + path->flags = (BYTE *)(path->points + count); + } + else + { + path->points = path->points_buf; + path->flags = path->flags_buf; } path->count = 0; path->allocated = count; @@ -179,30 +190,39 @@ static inline INT int_from_fixed(FIXED f) * been allocated; allocates larger arrays and copies the existing entries * to those arrays, if necessary. Returns TRUE if successful, else FALSE. */ -static BOOL PATH_ReserveEntries(struct gdi_path *pPath, INT count) +static BOOL PATH_ReserveEntries(struct gdi_path *path, INT count) { - POINT *pPointsNew; - BYTE *pFlagsNew; + POINT *pts_new; + int size; assert(count>=0); /* Do we have to allocate more memory? */ - if(count > pPath->allocated) + if (count > path->allocated) { /* Find number of entries to allocate. We let the size of the array * grow exponentially, since that will guarantee linear time * complexity. */ - count = max( pPath->allocated * 2, count ); - - pPointsNew = HeapReAlloc( GetProcessHeap(), 0, pPath->points, count * sizeof(POINT) ); - if (!pPointsNew) return FALSE; - pPath->points = pPointsNew; + count = max( path->allocated * 2, count ); + size = count * (sizeof(path->points[0]) + sizeof(path->flags[0])); - pFlagsNew = HeapReAlloc( GetProcessHeap(), 0, pPath->flags, count * sizeof(BYTE) ); - if (!pFlagsNew) return FALSE; - pPath->flags = pFlagsNew; + if (path->points == path->points_buf) + { + pts_new = HeapAlloc( GetProcessHeap(), 0, size ); + if (!pts_new) return FALSE; + memcpy( pts_new, path->points, path->count * sizeof(path->points[0]) ); + memcpy( pts_new + count, path->flags, path->count * sizeof(path->flags[0]) ); + } + else + { + pts_new = HeapReAlloc( GetProcessHeap(), 0, path->points, size ); + if (!pts_new) return FALSE; + memmove( pts_new + count, pts_new + path->allocated, path->count * sizeof(path->flags[0]) ); + } - pPath->allocated = count; + path->points = pts_new; + path->flags = (BYTE *)(pts_new + count); + path->allocated = count; } return TRUE; }
1
0
0
0
Huw Davies : gdi32: Change get_gdi_flat_path() to return an opaque path pointer.
by Alexandre Julliard
15 Jul '16
15 Jul '16
Module: wine Branch: master Commit: 54ec86021a7d2b8ef3eb7ce6967797709834c260 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=54ec86021a7d2b8ef3eb7ce69…
Author: Huw Davies <huw(a)codeweavers.com> Date: Thu Jul 14 14:28:13 2016 +0100 gdi32: Change get_gdi_flat_path() to return an opaque path pointer. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/dibdrv/graphics.c | 9 ++++----- dlls/gdi32/enhmfdrv/graphics.c | 11 +++++------ dlls/gdi32/gdi_private.h | 3 ++- dlls/gdi32/path.c | 25 ++++++++++++------------- 4 files changed, 23 insertions(+), 25 deletions(-) diff --git a/dlls/gdi32/dibdrv/graphics.c b/dlls/gdi32/dibdrv/graphics.c index bfb3451..64f6d15 100644 --- a/dlls/gdi32/dibdrv/graphics.c +++ b/dlls/gdi32/dibdrv/graphics.c @@ -405,6 +405,7 @@ static BOOL draw_arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom, /* helper for path stroking and filling functions */ static BOOL stroke_and_fill_path( dibdrv_physdev *dev, BOOL stroke, BOOL fill ) { + struct gdi_path *path; POINT *points; BYTE *types; BOOL ret = TRUE; @@ -413,9 +414,8 @@ static BOOL stroke_and_fill_path( dibdrv_physdev *dev, BOOL stroke, BOOL fill ) if (dev->brush.style == BS_NULL) fill = FALSE; - total = get_gdi_flat_path( dev->dev.hdc, &points, &types, fill ? &interior : NULL ); - if (total == -1) return FALSE; - if (!total) goto done; + if (!(path = get_gdi_flat_path( dev->dev.hdc, fill ? &interior : NULL ))) return FALSE; + if (!(total = get_gdi_path_data( path, &points, &types ))) goto done; if (stroke && dev->pen_uses_region) outline = CreateRectRgn( 0, 0, 0, 0 ); @@ -464,8 +464,7 @@ static BOOL stroke_and_fill_path( dibdrv_physdev *dev, BOOL stroke, BOOL fill ) } done: - HeapFree( GetProcessHeap(), 0, points ); - HeapFree( GetProcessHeap(), 0, types ); + free_gdi_path( path ); return ret; } diff --git a/dlls/gdi32/enhmfdrv/graphics.c b/dlls/gdi32/enhmfdrv/graphics.c index 1dd345c..f74e86b 100644 --- a/dlls/gdi32/enhmfdrv/graphics.c +++ b/dlls/gdi32/enhmfdrv/graphics.c @@ -100,24 +100,23 @@ static void get_points_bounds( RECTL *bounds, const POINT *pts, UINT count, HDC static BOOL emfdrv_stroke_and_fill_path( PHYSDEV dev, INT type ) { EMRSTROKEANDFILLPATH emr; - int count; + struct gdi_path *path; POINT *points; BYTE *flags; emr.emr.iType = type; emr.emr.nSize = sizeof(emr); - count = get_gdi_flat_path( dev->hdc, &points, &flags, NULL ); - if (count >= 0) + if ((path = get_gdi_flat_path( dev->hdc, NULL ))) { + int count = get_gdi_path_data( path, &points, &flags ); get_points_bounds( &emr.rclBounds, points, count, 0 ); - HeapFree( GetProcessHeap(), 0, points ); - HeapFree( GetProcessHeap(), 0, flags ); + free_gdi_path( path ); } else emr.rclBounds = empty_bounds; if (!EMFDRV_WriteRecord( dev, &emr.emr )) return FALSE; - if (count < 0) return FALSE; + if (!path) return FALSE; EMFDRV_UpdateBBox( dev, &emr.rclBounds ); return TRUE; } diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index 8bdf9f1..b476864 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -337,7 +337,8 @@ typedef struct /* path.c */ extern void free_gdi_path( struct gdi_path *path ) DECLSPEC_HIDDEN; -extern int get_gdi_flat_path( HDC hdc, POINT **points, BYTE **flags, HRGN *rgn ) DECLSPEC_HIDDEN; +extern struct gdi_path *get_gdi_flat_path( HDC hdc, HRGN *rgn ) DECLSPEC_HIDDEN; +extern int get_gdi_path_data( struct gdi_path *path, POINT **points, BYTE **flags ) DECLSPEC_HIDDEN; extern BOOL PATH_SavePath( DC *dst, DC *src ) DECLSPEC_HIDDEN; extern BOOL PATH_RestorePath( DC *dst, DC *src ) DECLSPEC_HIDDEN; diff --git a/dlls/gdi32/path.c b/dlls/gdi32/path.c index 86c1699..2ee113e 100644 --- a/dlls/gdi32/path.c +++ b/dlls/gdi32/path.c @@ -514,29 +514,22 @@ static BOOL PATH_DoArcPart(struct gdi_path *pPath, FLOAT_POINT corners[], } /* retrieve a flattened path in device coordinates, and optionally its region */ -/* the DC path is deleted; the returned data must be freed by caller */ +/* the DC path is deleted; the returned data must be freed by caller using free_gdi_path() */ /* helper for stroke_and_fill_path in the DIB driver */ -int get_gdi_flat_path( HDC hdc, POINT **points, BYTE **flags, HRGN *rgn ) +struct gdi_path *get_gdi_flat_path( HDC hdc, HRGN *rgn ) { DC *dc = get_dc_ptr( hdc ); - int ret = -1; + struct gdi_path *ret = NULL; - if (!dc) return -1; + if (!dc) return NULL; if (dc->path) { - struct gdi_path *path = PATH_FlattenPath( dc->path ); + ret = PATH_FlattenPath( dc->path ); free_gdi_path( dc->path ); dc->path = NULL; - if (path) - { - ret = path->count; - *points = path->points; - *flags = path->flags; - if (rgn) *rgn = path_to_region( path, GetPolyFillMode( hdc )); - HeapFree( GetProcessHeap(), 0, path ); - } + if (ret && rgn) *rgn = path_to_region( ret, GetPolyFillMode( hdc ) ); } else SetLastError( ERROR_CAN_NOT_COMPLETE ); @@ -544,6 +537,12 @@ int get_gdi_flat_path( HDC hdc, POINT **points, BYTE **flags, HRGN *rgn ) return ret; } +int get_gdi_path_data( struct gdi_path *path, POINT **pts, BYTE **flags ) +{ + *pts = path->points; + *flags = path->flags; + return path->count; +} /*********************************************************************** * BeginPath (GDI32.@)
1
0
0
0
← Newer
1
...
28
29
30
31
32
33
34
...
68
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
Results per page:
10
25
50
100
200