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
August 2012
----- 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
541 discussions
Start a n
N
ew thread
Michael Stefaniuc : dsound: Cleanup IKsPrivatePropertySetImpl_Create().
by Alexandre Julliard
24 Aug '12
24 Aug '12
Module: wine Branch: master Commit: 1555aebf1e54ada0123e8da9faa206176b5301ac URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1555aebf1e54ada0123e8da9f…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Fri Aug 24 01:47:14 2012 +0200 dsound: Cleanup IKsPrivatePropertySetImpl_Create(). --- dlls/dsound/dsound_main.c | 2 +- dlls/dsound/dsound_private.h | 2 +- dlls/dsound/propset.c | 23 ++++++++++++----------- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/dlls/dsound/dsound_main.c b/dlls/dsound/dsound_main.c index f5199fd..9c550eb 100644 --- a/dlls/dsound/dsound_main.c +++ b/dlls/dsound/dsound_main.c @@ -724,7 +724,7 @@ static IClassFactoryImpl DSOUND_CF[] = { { { &DSCF_Vtbl }, &CLSID_DirectSoundCapture, DSOUND_CaptureCreate }, { { &DSCF_Vtbl }, &CLSID_DirectSoundCapture8, DSOUND_CaptureCreate8 }, { { &DSCF_Vtbl }, &CLSID_DirectSoundFullDuplex, DSOUND_FullDuplexCreate }, - { { &DSCF_Vtbl }, &CLSID_DirectSoundPrivate, (FnCreateInstance)IKsPrivatePropertySetImpl_Create }, + { { &DSCF_Vtbl }, &CLSID_DirectSoundPrivate, IKsPrivatePropertySetImpl_Create }, { { NULL }, NULL, NULL } }; diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h index f8e5ca6..0d2cf75 100644 --- a/dlls/dsound/dsound_private.h +++ b/dlls/dsound/dsound_private.h @@ -254,7 +254,7 @@ struct IDirectSoundCaptureBufferImpl int nrofnotifies; }; -HRESULT IKsPrivatePropertySetImpl_Create(REFIID riid, IKsPropertySet **piks) DECLSPEC_HIDDEN; +HRESULT IKsPrivatePropertySetImpl_Create(REFIID riid, void **ppv) DECLSPEC_HIDDEN; /******************************************************************************* */ diff --git a/dlls/dsound/propset.c b/dlls/dsound/propset.c index 242b237..eb4c195 100644 --- a/dlls/dsound/propset.c +++ b/dlls/dsound/propset.c @@ -619,23 +619,24 @@ static const IKsPropertySetVtbl ikspvt = { IKsPrivatePropertySetImpl_QuerySupport }; -HRESULT IKsPrivatePropertySetImpl_Create( - REFIID riid, - IKsPropertySet **piks) +HRESULT IKsPrivatePropertySetImpl_Create(REFIID riid, void **ppv) { IKsPrivatePropertySetImpl *iks; - TRACE("(%s, %p)\n", debugstr_guid(riid), piks); + HRESULT hr; + + TRACE("(%s, %p)\n", debugstr_guid(riid), ppv); - if (!IsEqualIID(riid, &IID_IUnknown) && - !IsEqualIID(riid, &IID_IKsPropertySet)) { - *piks = 0; - return E_NOINTERFACE; + iks = HeapAlloc(GetProcessHeap(), 0, sizeof(*iks)); + if (!iks) { + WARN("out of memory\n"); + return DSERR_OUTOFMEMORY; } - iks = HeapAlloc(GetProcessHeap(),0,sizeof(*iks)); iks->ref = 1; iks->IKsPropertySet_iface.lpVtbl = &ikspvt; - *piks = &iks->IKsPropertySet_iface; - return S_OK; + hr = IKsPropertySet_QueryInterface(&iks->IKsPropertySet_iface, riid, ppv); + IKsPropertySet_Release(&iks->IKsPropertySet_iface); + + return hr; }
1
0
0
0
André Hentschel : winedbg: Add load word operators to Thumb2 disassembler.
by Alexandre Julliard
24 Aug '12
24 Aug '12
Module: wine Branch: master Commit: 054d930bb74ade91054e52f1765dd41e3bc7f862 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=054d930bb74ade91054e52f17…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Thu Aug 23 23:39:55 2012 +0200 winedbg: Add load word operators to Thumb2 disassembler. --- programs/winedbg/be_arm.c | 54 +++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 52 insertions(+), 2 deletions(-) diff --git a/programs/winedbg/be_arm.c b/programs/winedbg/be_arm.c index 2f1021e..26d4fbb 100644 --- a/programs/winedbg/be_arm.c +++ b/programs/winedbg/be_arm.c @@ -760,6 +760,56 @@ static UINT thumb2_disasm_longmuldiv(UINT inst, ADDRESS64 *addr) return inst; } +static UINT thumb2_disasm_ldrword(UINT inst, ADDRESS64 *addr) +{ + WORD op1 = (inst >> 23) & 0x01; + WORD op2 = (inst >> 6) & 0x3f; + int offset; + + if (get_nibble(inst, 4) == 0x0f) + { + offset = inst & 0x0fff; + + if (!op1) offset *= -1; + offset += 3; + + dbg_printf("\n\tldr\t%s, ", tbl_regs[get_nibble(inst, 3)]); + db_printsym(addr->Offset + offset); + return 0; + } + + if (!op1 && !op2) + { + dbg_printf("\n\tldr\t%s, [%s, %s, LSL #%u]", tbl_regs[get_nibble(inst, 3)], + tbl_regs[get_nibble(inst, 4)], tbl_regs[get_nibble(inst, 0)], (inst >> 4) & 0x3); + return 0; + } + + if (!op1 && (op2 & 0x3c) == 0x38) + { + dbg_printf("\n\tldrt\t%s, [%s, #%u]", tbl_regs[get_nibble(inst, 3)], + tbl_regs[get_nibble(inst, 4)], inst & 0xff); + return 0; + } + + dbg_printf("\n\tldr\t%s, [%s", tbl_regs[get_nibble(inst, 3)], tbl_regs[get_nibble(inst, 4)]); + + if (op1) + { + dbg_printf(", #%u]", inst & 0x0fff); + return 0; + } + + offset = inst & 0xff; + if (!(inst & 0x0200)) offset *= -1; + + if (!(inst & 0x0400) && (inst & 0x0100)) dbg_printf("], #%i", offset); + else if (inst & 0x0400) dbg_printf(", #%i]%s", offset, (inst & 0x0100)?"!":""); + else return inst; + + return 0; +} + static UINT thumb2_disasm_coprocmov1(UINT inst, ADDRESS64 *addr) { WORD opc1 = (inst >> 21) & 0x07; @@ -842,8 +892,8 @@ static const struct inst_arm tbl_thumb32[] = { { 0xff8000c0, 0xfb000000, thumb2_disasm_mul }, { 0xff8000f0, 0xfb800000, thumb2_disasm_longmuldiv }, { 0xff8000f0, 0xfb8000f0, thumb2_disasm_longmuldiv }, - { 0xef100010, 0xee100010, thumb2_disasm_coprocmov1 }, - { 0xef100010, 0xee000010, thumb2_disasm_coprocmov1 }, + { 0xff700000, 0xf8500000, thumb2_disasm_ldrword }, + { 0xef000010, 0xee000010, thumb2_disasm_coprocmov1 }, { 0x00000000, 0x00000000, NULL } };
1
0
0
0
Dmitry Timoshkov : gdiplus: Filter tabs out until they are properly supported using stringformat.
by Alexandre Julliard
23 Aug '12
23 Aug '12
Module: wine Branch: master Commit: 144a692ffa4fb73eb3e526c832f598cf373bc362 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=144a692ffa4fb73eb3e526c83…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu Aug 23 10:24:22 2012 +0900 gdiplus: Filter tabs out until they are properly supported using stringformat. --- dlls/gdiplus/graphics.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 9a9f092..5e76927 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -4755,6 +4755,10 @@ GpStatus gdip_format_string(HDC hdc, if(!isprintW(string[i]) && (string[i] != '\n')) continue; + /* FIXME: tabs should be handled using tabstops from stringformat */ + if (string[i] == '\t') + continue; + if (seen_prefix && hkprefix == HotkeyPrefixShow && string[i] != '&') hotkeyprefix_offsets[hotkeyprefix_count++] = j; else if (!seen_prefix && hkprefix != HotkeyPrefixNone && string[i] == '&')
1
0
0
0
Dmitry Timoshkov : gdiplus: Clarify in the tests where 1/ 3 of extra text height comes from.
by Alexandre Julliard
23 Aug '12
23 Aug '12
Module: wine Branch: master Commit: e6c77a7c7a98e819d81aa91b30a0e66a068653cb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e6c77a7c7a98e819d81aa91b3…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu Aug 23 15:27:35 2012 +0900 gdiplus: Clarify in the tests where 1/3 of extra text height comes from. --- dlls/gdiplus/tests/graphics.c | 39 ++++++++++----------------------------- 1 files changed, 10 insertions(+), 29 deletions(-) diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c index 6765bce..913d895 100644 --- a/dlls/gdiplus/tests/graphics.c +++ b/dlls/gdiplus/tests/graphics.c @@ -3483,24 +3483,15 @@ static void test_GdipMeasureString(void) REAL base_cx = 0, base_cy = 0, height; INT chars, lines; LOGFONTW lf; - HDC display; - UINT i, font_dpi; - REAL font_to_pixel_scale, font_size; + UINT i; + REAL font_size; GpUnit font_unit, unit; - display = CreateCompatibleDC(0); - ok(display != 0, "CreateCompatibleDC failed\n"); - font_dpi = GetDeviceCaps(display, LOGPIXELSY); - DeleteDC(display); - status = GdipCreateStringFormat(0, LANG_NEUTRAL, &format); expect(Ok, status); status = GdipCreateFontFamilyFromName(tahomaW, NULL, &family); expect(Ok, status); - font_to_pixel_scale = units_scale(UnitPoint, UnitPixel, font_dpi); - trace("font to pixel, %u dpi => unit_scale %f\n", font_dpi, font_to_pixel_scale); - /* font size in pixels */ status = GdipCreateFont(family, 100.0, FontStyleRegular, UnitPixel, &font); expect(Ok, status); @@ -3524,7 +3515,7 @@ static void test_GdipMeasureString(void) ok(-lf.lfHeight == (LONG)(height + 0.5), "%u: expected %d (%f), got %d\n", i, (LONG)(height + 0.5), height, lf.lfHeight); - height = font_size * font_to_pixel_scale; + height = font_size + 2.0 * font_size / 6.0; set_rect_empty(&rc); set_rect_empty(&bounds); @@ -3571,7 +3562,8 @@ static void test_GdipMeasureString(void) for (unit = 3; unit <= 6; unit++) { /* create a font which final height is 100.0 pixels with 200 dpi device */ - height = pixels_to_units(100.0 / font_to_pixel_scale, unit, 200.0); + /* height + 2 * (height/6) = 100 => height = 100 * 3 / 4 => 75 */ + height = pixels_to_units(75.0, unit, 200.0); status = GdipCreateFont(family, height, FontStyleRegular, unit, &font); expect(Ok, status); status = GdipGetFontSize(font, &font_size); @@ -3603,7 +3595,7 @@ static void test_GdipMeasureString(void) else unit_scale = units_scale(font_unit, td[i].unit, td[i].res_y); /*trace("%u: %d to %d, %.1f dpi => unit_scale %f\n", i, font_unit, td[i].unit, td[i].res_y, unit_scale);*/ - height = font_size * font_to_pixel_scale * unit_scale; + height = (font_size + 2.0 * font_size / 6.0) * unit_scale; if (td[i].unit != UnitDisplay) height /= td[i].page_scale; /*trace("%u: %.1f font units = %f units with %.1f dpi, page_scale %.1f\n", i, font_size, height, td[i].res_y, td[i].page_scale);*/ @@ -3758,23 +3750,12 @@ static void test_font_height_scaling(void) differs in behaviour */ for (font_unit = 3; font_unit <= 6; font_unit++) { - /* There is a bug somewhere in native gdiplus that leads - * to extra conversion from points to pixels, so in order - * to get a 100 pixel text height it's needed to convert - * 100 pixels to points, and only then convert the result - * to desired units. The scale factor is 1.333333 at 96 dpi! - * Perhaps an implementor took name of GdipTransformPoints - * directly and assumed that it takes value in *points*? - */ - status = GdipSetPageUnit(graphics, UnitPoint); - expect(Ok, status); - ptf.X = 0; - ptf.Y = 100.0; - status = GdipTransformPoints(graphics, CoordinateSpaceWorld, CoordinateSpaceDevice, &ptf, 1); - expect(Ok, status); - /*trace("100.0 pixels, %.1f dpi => %f points\n", dpi, ptf.Y);*/ + /* create a font for the final text height of 100 pixels */ + /* height + 2 * (height/6) = 100 => height = 100 * 3 / 4 => 75 */ status = GdipSetPageUnit(graphics, font_unit); expect(Ok, status); + ptf.X = 0; + ptf.Y = 75.0; status = GdipTransformPoints(graphics, CoordinateSpaceWorld, CoordinateSpaceDevice, &ptf, 1); expect(Ok, status); height = ptf.Y;
1
0
0
0
Alexandre Julliard : opengl32: Generate null driver entry points for all extension functions.
by Alexandre Julliard
23 Aug '12
23 Aug '12
Module: wine Branch: master Commit: 2c54f8c12c8321b68999e2d8b3fb08cd7bc15610 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2c54f8c12c8321b68999e2d8b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Aug 23 21:23:09 2012 +0200 opengl32: Generate null driver entry points for all extension functions. --- dlls/opengl32/make_opengl | 13 +- dlls/opengl32/opengl_norm.c | 4513 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 4518 insertions(+), 8 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=2c54f8c12c8321b68999e…
1
0
0
0
Alexandre Julliard : configure: Only enable -gdwarf-2 if -g was specified.
by Alexandre Julliard
23 Aug '12
23 Aug '12
Module: wine Branch: master Commit: ce48e2c8ab4537fb57e4416d03f6fdd0685262b8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ce48e2c8ab4537fb57e4416d0…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Aug 23 12:28:41 2012 +0200 configure: Only enable -gdwarf-2 if -g was specified. --- configure | 11 ++++++++--- configure.ac | 10 ++++++++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/configure b/configure index d067b54..29b50e8 100755 --- a/configure +++ b/configure @@ -12287,7 +12287,10 @@ $as_echo "$ac_cv_cflags__Wwrite_strings" >&6; } if test $ac_cv_cflags__Wwrite_strings = yes; then : EXTRACFLAGS="$EXTRACFLAGS -Wwrite-strings" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -gdwarf-2" >&5 + + for ac_flag in $CFLAGS; do + case $ac_flag in + -g) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -gdwarf-2" >&5 $as_echo_n "checking whether the compiler supports -gdwarf-2... " >&6; } if ${ac_cv_cflags__gdwarf_2+:} false; then : $as_echo_n "(cached) " >&6 @@ -12312,7 +12315,7 @@ $as_echo "$ac_cv_cflags__gdwarf_2" >&6; } if test $ac_cv_cflags__gdwarf_2 = yes; then : EXTRACFLAGS="$EXTRACFLAGS -gdwarf-2" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -gstrict-dwarf" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -gstrict-dwarf" >&5 $as_echo_n "checking whether the compiler supports -gstrict-dwarf... " >&6; } if ${ac_cv_cflags__gstrict_dwarf+:} false; then : $as_echo_n "(cached) " >&6 @@ -12336,7 +12339,9 @@ fi $as_echo "$ac_cv_cflags__gstrict_dwarf" >&6; } if test $ac_cv_cflags__gstrict_dwarf = yes; then : EXTRACFLAGS="$EXTRACFLAGS -gstrict-dwarf" -fi +fi ;; + esac + done case $host_cpu in *i[3456789]86*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -fno-omit-frame-pointer" >&5 diff --git a/configure.ac b/configure.ac index 15ada86..a6be56f 100644 --- a/configure.ac +++ b/configure.ac @@ -1748,8 +1748,14 @@ then WINE_TRY_CFLAGS([-Wtype-limits]) WINE_TRY_CFLAGS([-Wunused-but-set-parameter]) WINE_TRY_CFLAGS([-Wwrite-strings]) - WINE_TRY_CFLAGS([-gdwarf-2]) - WINE_TRY_CFLAGS([-gstrict-dwarf]) + + dnl Default to dwarf-2 debug info + for ac_flag in $CFLAGS; do + case $ac_flag in + -g) WINE_TRY_CFLAGS([-gdwarf-2]) + WINE_TRY_CFLAGS([-gstrict-dwarf]) ;; + esac + done dnl gcc-4.6+ omits frame pointers by default, breaking some copy protections case $host_cpu in
1
0
0
0
Jérôme Gardou : opengl32/tests: Do not pass NULL attrib list to wglCreatePBufferARB.
by Alexandre Julliard
23 Aug '12
23 Aug '12
Module: wine Branch: master Commit: dbf1c836323fda85888e1bd0280e2bd29c68b986 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dbf1c836323fda85888e1bd02…
Author: Jérôme Gardou <jerome.gardou(a)reactos.org> Date: Wed Aug 22 10:18:14 2012 +0200 opengl32/tests: Do not pass NULL attrib list to wglCreatePBufferARB. --- dlls/opengl32/tests/opengl.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/dlls/opengl32/tests/opengl.c b/dlls/opengl32/tests/opengl.c index 8e3d729..4f799d2 100644 --- a/dlls/opengl32/tests/opengl.c +++ b/dlls/opengl32/tests/opengl.c @@ -197,7 +197,8 @@ static void test_pbuffers(HDC hdc) if(iPixelFormat != 0) { HDC pbuffer_hdc; - HPBUFFERARB pbuffer = pwglCreatePbufferARB(hdc, iPixelFormat, 640 /* width */, 480 /* height */, NULL); + int attrib = 0; + HPBUFFERARB pbuffer = pwglCreatePbufferARB(hdc, iPixelFormat, 640 /* width */, 480 /* height */, &attrib); if(!pbuffer) skip("Pbuffer creation failed!\n");
1
0
0
0
Dmitry Timoshkov : gdiplus: GdipMeasureCharacterRanges should respect device units and transformations .
by Alexandre Julliard
22 Aug '12
22 Aug '12
Module: wine Branch: master Commit: c8055b5b7b749cc4d04345302add72ba0d857a6c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c8055b5b7b749cc4d04345302…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Aug 22 15:35:21 2012 +0900 gdiplus: GdipMeasureCharacterRanges should respect device units and transformations. --- dlls/gdiplus/graphics.c | 33 ++++++++++++++++++++++++++------- dlls/gdiplus/tests/graphics.c | 5 ----- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 785c44e..9a9f092 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -4874,6 +4874,7 @@ GpStatus gdip_format_string(HDC hdc, struct measure_ranges_args { GpRegion **regions; + REAL rel_width, rel_height; }; static GpStatus measure_ranges_callback(HDC hdc, @@ -4895,16 +4896,16 @@ static GpStatus measure_ranges_callback(HDC hdc, GpRectF range_rect; SIZE range_size; - range_rect.Y = bounds->Y; - range_rect.Height = bounds->Height; + range_rect.Y = bounds->Y / args->rel_height; + range_rect.Height = bounds->Height / args->rel_height; GetTextExtentExPointW(hdc, string + index, range_start - index, INT_MAX, NULL, NULL, &range_size); - range_rect.X = bounds->X + range_size.cx; + range_rect.X = (bounds->X + range_size.cx) / args->rel_width; GetTextExtentExPointW(hdc, string + index, range_end - index, INT_MAX, NULL, NULL, &range_size); - range_rect.Width = (bounds->X + range_size.cx) - range_rect.X; + range_rect.Width = (bounds->X + range_size.cx - range_rect.X) / args->rel_width; stat = GdipCombineRegionRect(args->regions[i], &range_rect, CombineModeUnion); if (stat != Ok) @@ -4926,6 +4927,8 @@ GpStatus WINGDIPAPI GdipMeasureCharacterRanges(GpGraphics* graphics, HFONT oldfont; struct measure_ranges_args args; HDC hdc, temp_hdc=NULL; + GpPointF pt[3]; + RectF scaled_rect; TRACE("(%p %s %d %p %s %p %d %p)\n", graphics, debugstr_w(string), length, font, debugstr_rectf(layoutRect), stringFormat, regionCount, regions); @@ -4936,8 +4939,6 @@ GpStatus WINGDIPAPI GdipMeasureCharacterRanges(GpGraphics* graphics, if (regionCount < stringFormat->range_count) return InvalidParameter; - get_log_fontW(font, graphics, &lfw); - if(!graphics->hdc) { hdc = temp_hdc = CreateCompatibleDC(0); @@ -4949,6 +4950,24 @@ GpStatus WINGDIPAPI GdipMeasureCharacterRanges(GpGraphics* graphics, if (stringFormat->attr) TRACE("may be ignoring some format flags: attr %x\n", stringFormat->attr); + pt[0].X = 0.0; + pt[0].Y = 0.0; + pt[1].X = 1.0; + pt[1].Y = 0.0; + pt[2].X = 0.0; + pt[2].Y = 1.0; + GdipTransformPoints(graphics, CoordinateSpaceDevice, CoordinateSpaceWorld, pt, 3); + args.rel_width = sqrt((pt[1].Y-pt[0].Y)*(pt[1].Y-pt[0].Y)+ + (pt[1].X-pt[0].X)*(pt[1].X-pt[0].X)); + args.rel_height = sqrt((pt[2].Y-pt[0].Y)*(pt[2].Y-pt[0].Y)+ + (pt[2].X-pt[0].X)*(pt[2].X-pt[0].X)); + + scaled_rect.X = layoutRect->X * args.rel_width; + scaled_rect.Y = layoutRect->Y * args.rel_height; + scaled_rect.Width = layoutRect->Width * args.rel_width; + scaled_rect.Height = layoutRect->Height * args.rel_height; + + get_log_fontW(font, graphics, &lfw); oldfont = SelectObject(hdc, CreateFontIndirectW(&lfw)); for (i=0; i<stringFormat->range_count; i++) @@ -4960,7 +4979,7 @@ GpStatus WINGDIPAPI GdipMeasureCharacterRanges(GpGraphics* graphics, args.regions = regions; - stat = gdip_format_string(hdc, string, length, font, layoutRect, stringFormat, + stat = gdip_format_string(hdc, string, length, font, &scaled_rect, stringFormat, measure_ranges_callback, &args); DeleteObject(SelectObject(hdc, oldfont)); diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c index b3509a2..6765bce 100644 --- a/dlls/gdiplus/tests/graphics.c +++ b/dlls/gdiplus/tests/graphics.c @@ -3847,11 +3847,6 @@ static void test_font_height_scaling(void) win_skip("GdipMeasureCharacterRanges ignores units before Win7\n"); continue; } - /* FIXME: remove once Wine is fixed */ - if (gfx_unit == UnitPixel) - expectf_(height, rect.Height, height / 15.0); - else -todo_wine expectf_(height, rect.Height, height / 15.0); todo_wine expectf_(bounds.Width, rect.Width + margin * 2.0, bounds.Width / 25.0);
1
0
0
0
Dmitry Timoshkov : gdiplus: GdipMeasureCharacterRanges shouldn' t treat empty layout rectangle as infinite bounds.
by Alexandre Julliard
22 Aug '12
22 Aug '12
Module: wine Branch: master Commit: 1418cd796cf00636db3e75df25645e235a1a845d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1418cd796cf00636db3e75df2…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Aug 22 15:34:38 2012 +0900 gdiplus: GdipMeasureCharacterRanges shouldn't treat empty layout rectangle as infinite bounds. --- dlls/gdiplus/graphics.c | 9 ++++++--- dlls/gdiplus/tests/graphics.c | 3 --- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 28fc570..785c44e 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -4731,9 +4731,6 @@ GpStatus gdip_format_string(HDC hdc, nwidth = rect->Width; nheight = rect->Height; - if (rect->Width >= INT_MAX || rect->Width < 0.5) nwidth = INT_MAX; - if (rect->Height >= INT_MAX || rect->Height < 0.5) nheight = INT_MAX; - if (format) hkprefix = format->hkprefix; else @@ -5064,6 +5061,9 @@ GpStatus WINGDIPAPI GdipMeasureString(GpGraphics *graphics, scaled_rect.Width = rect->Width * args.rel_width; scaled_rect.Height = rect->Height * args.rel_height; + if (scaled_rect.Width >= INT_MAX || scaled_rect.Width < 0.5) scaled_rect.Width = (REAL)(1 << 23); + if (scaled_rect.Height >= INT_MAX || scaled_rect.Height < 0.5) scaled_rect.Height = (REAL)(1 << 23); + bounds->X = rect->X; bounds->Y = rect->Y; bounds->Width = 0.0; @@ -5214,6 +5214,9 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string scaled_rect.Width = rel_width * rect->Width; scaled_rect.Height = rel_height * rect->Height; + if (scaled_rect.Width >= INT_MAX || scaled_rect.Width < 0.5) scaled_rect.Width = (REAL)(1 << 23); + if (scaled_rect.Height >= INT_MAX || scaled_rect.Height < 0.5) scaled_rect.Height = (REAL)(1 << 23); + if (gdip_round(scaled_rect.Width) != 0 && gdip_round(scaled_rect.Height) != 0) { /* FIXME: If only the width or only the height is 0, we should probably still clip */ diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c index c95bf11..b3509a2 100644 --- a/dlls/gdiplus/tests/graphics.c +++ b/dlls/gdiplus/tests/graphics.c @@ -3140,11 +3140,8 @@ static void test_string_functions(void) expect(Ok, status); } -todo_wine ok(region_isempty[0], "region should be empty\n"); -todo_wine ok(region_isempty[1], "region should be empty\n"); -todo_wine ok(region_isempty[2], "region should be empty\n"); ok(region_isempty[3], "region should be empty\n");
1
0
0
0
Dmitry Timoshkov : gdiplus: Add a bunch of tests for GdipMeasureCharacterRanges.
by Alexandre Julliard
22 Aug '12
22 Aug '12
Module: wine Branch: master Commit: 32d37c832def54c9880c99812f42fe913e47f643 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=32d37c832def54c9880c99812…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Aug 22 15:33:48 2012 +0900 gdiplus: Add a bunch of tests for GdipMeasureCharacterRanges. --- dlls/gdiplus/tests/graphics.c | 106 ++++++++++++++++++++++++++++++++++++++-- 1 files changed, 100 insertions(+), 6 deletions(-) diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c index b007ddf..c95bf11 100644 --- a/dlls/gdiplus/tests/graphics.c +++ b/dlls/gdiplus/tests/graphics.c @@ -2945,7 +2945,7 @@ static void test_string_functions(void) INT codepointsfitted, linesfilled; GpStringFormat *format; CharacterRange ranges[3] = {{0, 1}, {1, 3}, {5, 1}}; - GpRegion *regions[4] = {0}; + GpRegion *regions[4]; BOOL region_isempty[4]; int i; PointF position; @@ -3078,15 +3078,32 @@ static void test_string_functions(void) expect(6, codepointsfitted); todo_wine expect(4, linesfilled); + for (i = 0; i < 4; i++) + regions[i] = (GpRegion *)0xdeadbeef; + + status = GdipMeasureCharacterRanges(graphics, teststring, 6, font, &rc, format, 0, regions); + expect(Ok, status); + + for (i = 0; i < 4; i++) + ok(regions[i] == (GpRegion *)0xdeadbeef, "expected 0xdeadbeef, got %p\n", regions[i]); + + status = GdipMeasureCharacterRanges(graphics, teststring, 6, font, &rc, format, 3, regions); + expect(Ok, status); + + for (i = 0; i < 4; i++) + ok(regions[i] == (GpRegion *)0xdeadbeef, "expected 0xdeadbeef, got %p\n", regions[i]); + status = GdipSetStringFormatMeasurableCharacterRanges(format, 3, ranges); expect(Ok, status); - rc.Width = 100.0; + set_rect_empty(&rc); for (i=0; i<4; i++) { status = GdipCreateRegion(®ions[i]); expect(Ok, status); + status = GdipSetEmpty(regions[i]); + expect(Ok, status); } status = GdipMeasureCharacterRanges(NULL, teststring, 6, font, &rc, format, 3, regions); @@ -3114,6 +3131,26 @@ static void test_string_functions(void) status = GdipMeasureCharacterRanges(graphics, teststring, 6, font, &rc, format, 2, regions); expect(InvalidParameter, status); + status = GdipMeasureCharacterRanges(graphics, teststring, 6, font, &rc, format, 3, regions); + expect(Ok, status); + + for (i = 0; i < 4; i++) + { + status = GdipIsEmptyRegion(regions[i], graphics, ®ion_isempty[i]); + expect(Ok, status); + } + +todo_wine + ok(region_isempty[0], "region should be empty\n"); +todo_wine + ok(region_isempty[1], "region should be empty\n"); +todo_wine + ok(region_isempty[2], "region should be empty\n"); + ok(region_isempty[3], "region should be empty\n"); + + rc.Width = 100.0; + rc.Height = 100.0; + status = GdipMeasureCharacterRanges(graphics, teststring, 6, font, &rc, format, 4, regions); expect(Ok, status); @@ -3126,7 +3163,7 @@ static void test_string_functions(void) ok(!region_isempty[0], "region shouldn't be empty\n"); ok(!region_isempty[1], "region shouldn't be empty\n"); ok(!region_isempty[2], "region shouldn't be empty\n"); - ok(!region_isempty[3], "region shouldn't be empty\n"); + ok(region_isempty[3], "region should be empty\n"); /* Cut off everything after the first space, and the second line. */ rc.Width = char_bounds.Width + char_width * 2.1; @@ -3144,7 +3181,7 @@ static void test_string_functions(void) ok(!region_isempty[0], "region shouldn't be empty\n"); ok(!region_isempty[1], "region shouldn't be empty\n"); ok(region_isempty[2], "region should be empty\n"); - ok(!region_isempty[3], "region shouldn't be empty\n"); + ok(region_isempty[3], "region should be empty\n"); for (i=0; i<4; i++) GdipDeleteRegion(regions[i]); @@ -3692,6 +3729,8 @@ static void test_font_height_scaling(void) static const WCHAR string[] = { '1','2','3','4','5','6','7',0 }; HDC hdc; GpStringFormat *format; + CharacterRange range = { 0, 7 }; + GpRegion *region; GpGraphics *graphics; GpFontFamily *family; GpFont *font; @@ -3703,6 +3742,11 @@ static void test_font_height_scaling(void) status = GdipCreateStringFormat(0, LANG_NEUTRAL, &format); expect(Ok, status); + status = GdipSetStringFormatMeasurableCharacterRanges(format, 1, &range); + expect(Ok, status); + status = GdipCreateRegion(®ion); + expect(Ok, status); + status = GdipCreateFontFamilyFromName(tahomaW, NULL, &family); expect(Ok, status); @@ -3731,19 +3775,22 @@ static void test_font_height_scaling(void) ptf.Y = 100.0; status = GdipTransformPoints(graphics, CoordinateSpaceWorld, CoordinateSpaceDevice, &ptf, 1); expect(Ok, status); - trace("100.0 pixels, %.1f dpi => %f points\n", dpi, ptf.Y); + /*trace("100.0 pixels, %.1f dpi => %f points\n", dpi, ptf.Y);*/ status = GdipSetPageUnit(graphics, font_unit); expect(Ok, status); status = GdipTransformPoints(graphics, CoordinateSpaceWorld, CoordinateSpaceDevice, &ptf, 1); expect(Ok, status); height = ptf.Y; - trace("height %f units\n", height); + /*trace("height %f units\n", height);*/ status = GdipCreateFont(family, height, FontStyleRegular, font_unit, &font); expect(Ok, status); /* UnitPixel = 2, UnitPoint = 3, UnitInch = 4, UnitDocument = 5, UnitMillimeter = 6 */ for (gfx_unit = 2; gfx_unit <= 6; gfx_unit++) { + static const WCHAR doubleW[2] = { 'W','W' }; + RectF bounds_1, bounds_2; + REAL margin; int match; status = GdipSetPageUnit(graphics, gfx_unit); @@ -3753,6 +3800,7 @@ static void test_font_height_scaling(void) set_rect_empty(&bounds); status = GdipMeasureString(graphics, string, -1, font, &rect, format, &bounds, NULL, NULL); expect(Ok, status); + /*trace("bounds: %f,%f,%f,%f\n", bounds.X, bounds.Y, bounds.Width, bounds.Height);*/ ptf.X = 0; ptf.Y = bounds.Height; @@ -3765,6 +3813,51 @@ static void test_font_height_scaling(void) ptf.Y = units_to_pixels(bounds.Height, gfx_unit, dpi); match = fabs(100.0 - ptf.Y) <= 1.1; ok(match || broken(!match) /* before win7 */, "Expected 100.0, got %f\n", ptf.Y); + + /* bounds.width of 1 glyph: [margin]+[width]+[margin] */ + set_rect_empty(&rect); + set_rect_empty(&bounds_1); + status = GdipMeasureString(graphics, doubleW, 1, font, &rect, format, &bounds_1, NULL, NULL); + expect(Ok, status); + /* bounds.width of 2 identical glyphs: [margin]+[width]+[width]+[margin] */ + set_rect_empty(&rect); + set_rect_empty(&bounds_2); + status = GdipMeasureString(graphics, doubleW, 2, font, &rect, format, &bounds_2, NULL, NULL); + expect(Ok, status); + + /* margin = [bounds.width of 1] - [bounds.width of 2] / 2*/ + margin = bounds_1.Width - bounds_2.Width / 2.0; + /*trace("margin %f\n", margin);*/ + + status = GdipGetFontHeight(font, graphics, &height); + expect(Ok, status); + + set_rect_empty(&rect); + rect.Width = 32000.0; + rect.Height = 32000.0; + status = GdipMeasureCharacterRanges(graphics, string, -1, font, &rect, format, 1, ®ion); + expect(Ok, status); + set_rect_empty(&rect); + status = GdipGetRegionBounds(region, graphics, &rect); + expect(Ok, status); + /*trace("region: %f,%f,%f,%f\n", rect.X, rect.Y, rect.Width, rect.Height);*/ + expectf(0.0, rect.Y); + /* before Win7 GdipMeasureCharacterRanges behaviour is completely broken */ + match = fabs(margin - rect.X) <= margin / 25.0; + ok(match || broken(!match) /* before win7 */, "Expected %f, got %f\n", margin, rect.X); + if (!match) + { + win_skip("GdipMeasureCharacterRanges ignores units before Win7\n"); + continue; + } + /* FIXME: remove once Wine is fixed */ + if (gfx_unit == UnitPixel) + expectf_(height, rect.Height, height / 15.0); + else +todo_wine + expectf_(height, rect.Height, height / 15.0); +todo_wine + expectf_(bounds.Width, rect.Width + margin * 2.0, bounds.Width / 25.0); } } @@ -3773,6 +3866,7 @@ static void test_font_height_scaling(void) DeleteDC(hdc); GdipDeleteFontFamily(family); + GdipDeleteRegion(region); GdipDeleteStringFormat(format); }
1
0
0
0
← Newer
1
...
12
13
14
15
16
17
18
...
55
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
Results per page:
10
25
50
100
200