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
December 2012
----- 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
549 discussions
Start a n
N
ew thread
Huw Davies : usp10: Move the application of pair values to a helper function.
by Alexandre Julliard
20 Dec '12
20 Dec '12
Module: wine Branch: master Commit: 08fcdd5f6f2a31704ac964137d5f55b0fe86c504 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=08fcdd5f6f2a31704ac964137…
Author: Huw Davies <huw(a)codeweavers.com> Date: Thu Dec 20 12:55:33 2012 +0000 usp10: Move the application of pair values to a helper function. --- dlls/usp10/opentype.c | 48 +++++++++++++++++++++++++++--------------------- 1 files changed, 27 insertions(+), 21 deletions(-) diff --git a/dlls/usp10/opentype.c b/dlls/usp10/opentype.c index edaf917..45d28ef 100644 --- a/dlls/usp10/opentype.c +++ b/dlls/usp10/opentype.c @@ -1186,6 +1186,30 @@ static VOID GPOS_apply_SingleAdjustment(const OT_LookupTable *look, const WORD * } } +static void apply_pair_value( const void *pos_table, WORD val_fmt1, WORD val_fmt2, const WORD *pair, + INT ppem, POINT *adjust, POINT *advance ) +{ + GPOS_ValueRecord val_rec1 = {0,0,0,0,0,0,0,0}; + GPOS_ValueRecord val_rec2 = {0,0,0,0,0,0,0,0}; + INT size; + + size = GPOS_get_value_record( val_fmt1, pair, &val_rec1 ); + GPOS_get_value_record( val_fmt2, pair + size, &val_rec2 ); + + if (val_fmt1) + { + GPOS_get_value_record_offsets( pos_table, &val_rec1, val_fmt1, ppem, adjust, advance ); + TRACE( "Glyph 1 resulting cumulative offset is %i,%i design units\n", adjust[0].x, adjust[0].y ); + TRACE( "Glyph 1 resulting cumulative advance is %i,%i design units\n", advance[0].x, advance[0].y ); + } + if (val_fmt2) + { + GPOS_get_value_record_offsets( pos_table, &val_rec2, val_fmt2, ppem, adjust + 1, advance + 1 ); + TRACE( "Glyph 2 resulting cumulative offset is %i,%i design units\n", adjust[1].x, adjust[1].y ); + TRACE( "Glyph 2 resulting cumulative advance is %i,%i design units\n", advance[1].x, advance[1].y ); + } +} + static INT GPOS_apply_PairAdjustment(const OT_LookupTable *look, const WORD *glyphs, INT glyph_index, INT write_dir, INT glyph_count, INT ppem, LPPOINT ptAdjust, LPPOINT ptAdvance) { int j; @@ -1222,28 +1246,10 @@ static INT GPOS_apply_PairAdjustment(const OT_LookupTable *look, const WORD *gly if (glyphs[glyph_index+write_dir] == second_glyph) { int next = 1; - GPOS_ValueRecord ValueRecord1 = {0,0,0,0,0,0,0,0}; - GPOS_ValueRecord ValueRecord2 = {0,0,0,0,0,0,0,0}; - TRACE("Format 1: Found Pair %x,%x\n",glyphs[glyph_index],glyphs[glyph_index+write_dir]); - - GPOS_get_value_record(ValueFormat1, pair_val_rec->Value1, &ValueRecord1); - GPOS_get_value_record(ValueFormat2, pair_val_rec->Value1 + val_fmt1_size, &ValueRecord2); - if (ValueFormat1) - { - GPOS_get_value_record_offsets((const BYTE*)ppf1, &ValueRecord1, ValueFormat1, ppem, &ptAdjust[0], &ptAdvance[0]); - TRACE("Glyph 1 resulting cumulative offset is %i,%i design units\n",ptAdjust[0].x,ptAdjust[0].y); - TRACE("Glyph 1 resulting cumulative advance is %i,%i design units\n",ptAdvance[0].x,ptAdvance[0].y); - } - if (ValueFormat2) - { - GPOS_get_value_record_offsets((const BYTE*)ppf1, &ValueRecord2, ValueFormat2, ppem, &ptAdjust[1], &ptAdvance[1]); - TRACE("Glyph 2 resulting cumulative offset is %i,%i design units\n",ptAdjust[1].x,ptAdjust[1].y); - TRACE("Glyph 2 resulting cumulative advance is %i,%i design units\n",ptAdvance[1].x,ptAdvance[1].y); - next++; - } - if (next) - return glyph_index + next; + apply_pair_value( ppf1, ValueFormat1, ValueFormat2, pair_val_rec->Value1, ppem, ptAdjust, ptAdvance ); + if (ValueFormat2) next++; + return glyph_index + next; } pair_val_rec = (const GPOS_PairValueRecord *)(pair_val_rec->Value1 + val_fmt1_size + val_fmt2_size); }
1
0
0
0
Huw Davies : usp10: Glyph class tables are just generic class tables.
by Alexandre Julliard
20 Dec '12
20 Dec '12
Module: wine Branch: master Commit: 79cbcf96123991496d064391c346223971d08e46 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=79cbcf96123991496d064391c…
Author: Huw Davies <huw(a)codeweavers.com> Date: Thu Dec 20 12:55:32 2012 +0000 usp10: Glyph class tables are just generic class tables. --- dlls/usp10/opentype.c | 34 ++++++++++++++++++---------------- 1 files changed, 18 insertions(+), 16 deletions(-) diff --git a/dlls/usp10/opentype.c b/dlls/usp10/opentype.c index 81135b8..edaf917 100644 --- a/dlls/usp10/opentype.c +++ b/dlls/usp10/opentype.c @@ -93,19 +93,19 @@ typedef struct { WORD StartGlyph; WORD GlyphCount; WORD ClassValueArray[1]; -} GDEF_ClassDefFormat1; +} OT_ClassDefFormat1; typedef struct { WORD Start; WORD End; WORD Class; -} GDEF_ClassRangeRecord; +} OT_ClassRangeRecord; typedef struct { WORD ClassFormat; WORD ClassRangeCount; - GDEF_ClassRangeRecord ClassRangeRecord[1]; -} GDEF_ClassDefFormat2; + OT_ClassRangeRecord ClassRangeRecord[1]; +} OT_ClassDefFormat2; /* These are all structures needed for the GSUB table */ @@ -525,20 +525,13 @@ DWORD OpenType_CMAP_GetGlyphIndex(HDC hdc, ScriptCache *psc, DWORD utf32c, LPWOR * GDEF **********/ -static WORD GDEF_get_glyph_class(const GDEF_Header *header, WORD glyph) +static WORD OT_get_glyph_class(const void *table, WORD glyph) { - int offset; WORD class = 0; - const GDEF_ClassDefFormat1 *cf1; - - if (!header) - return 0; + const OT_ClassDefFormat1 *cf1 = table; - offset = GET_BE_WORD(header->GlyphClassDef); - if (!offset) - return 0; + if (!table) return 0; - cf1 = (GDEF_ClassDefFormat1*)(((BYTE*)header)+offset); if (GET_BE_WORD(cf1->ClassFormat) == 1) { if (glyph >= GET_BE_WORD(cf1->StartGlyph)) @@ -550,7 +543,7 @@ static WORD GDEF_get_glyph_class(const GDEF_Header *header, WORD glyph) } else if (GET_BE_WORD(cf1->ClassFormat) == 2) { - const GDEF_ClassDefFormat2 *cf2 = (GDEF_ClassDefFormat2*)cf1; + const OT_ClassDefFormat2 *cf2 = table; int i, top; top = GET_BE_WORD(cf2->ClassRangeCount); for (i = 0; i < top; i++) @@ -585,10 +578,19 @@ static VOID *load_gdef_table(HDC hdc) void OpenType_GDEF_UpdateGlyphProps(HDC hdc, ScriptCache *psc, const WORD *pwGlyphs, const WORD cGlyphs, WORD* pwLogClust, const WORD cChars, SCRIPT_GLYPHPROP *pGlyphProp) { int i; + void *glyph_class_table = NULL; if (!psc->GDEF_Table) psc->GDEF_Table = load_gdef_table(hdc); + if (psc->GDEF_Table) + { + const GDEF_Header *header = psc->GDEF_Table; + WORD offset = GET_BE_WORD( header->GlyphClassDef ); + if (offset) + glyph_class_table = (BYTE *)psc->GDEF_Table + offset; + } + for (i = 0; i < cGlyphs; i++) { WORD class; @@ -602,7 +604,7 @@ void OpenType_GDEF_UpdateGlyphProps(HDC hdc, ScriptCache *psc, const WORD *pwGly char_count++; } - class = GDEF_get_glyph_class(psc->GDEF_Table, pwGlyphs[i]); + class = OT_get_glyph_class( glyph_class_table, pwGlyphs[i] ); switch (class) {
1
0
0
0
Dmitry Timoshkov : wineps.drv: Slightly simplify a PPD parser code snippet.
by Alexandre Julliard
20 Dec '12
20 Dec '12
Module: wine Branch: master Commit: eb272cbd31380a115f9665e7bd2a2aaab5a3b000 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eb272cbd31380a115f9665e7b…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu Dec 20 16:24:35 2012 +0800 wineps.drv: Slightly simplify a PPD parser code snippet. --- dlls/wineps.drv/ppd.c | 16 +++++----------- 1 files changed, 5 insertions(+), 11 deletions(-) diff --git a/dlls/wineps.drv/ppd.c b/dlls/wineps.drv/ppd.c index 9d529b4..db1e580 100644 --- a/dlls/wineps.drv/ppd.c +++ b/dlls/wineps.drv/ppd.c @@ -385,17 +385,11 @@ static BOOL PSDRV_PPDGetNextTuple(FILE *fp, PPDTuple *tuple) ; endkey = cp; - if(*cp == ':') { /* <key>: */ + while (isspace(*cp)) cp++; + if (*cp == ':') /* <key>: */ gotoption = FALSE; - } else { - while(isspace(*cp)) - cp++; - if(*cp == ':') { /* <key> : */ - gotoption = FALSE; - } else { /* <key> <option> */ - opt = cp; - } - } + else /* <key> <option> */ + opt = cp; tuple->key = HeapAlloc( PSDRV_Heap, 0, endkey - line + 1 ); if(!tuple->key) return FALSE; @@ -434,7 +428,7 @@ static BOOL PSDRV_PPDGetNextTuple(FILE *fp, PPDTuple *tuple) } /* cp should point to a ':', so we increment past it */ - cp++; + cp++; while(isspace(*cp)) cp++;
1
0
0
0
Dmitry Timoshkov : wineps.drv: Ignore requested resolutions not supported by device.
by Alexandre Julliard
20 Dec '12
20 Dec '12
Module: wine Branch: master Commit: d170f05ece150db8ae298e504753ec25b9d77350 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d170f05ece150db8ae298e504…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu Dec 20 16:24:06 2012 +0800 wineps.drv: Ignore requested resolutions not supported by device. --- dlls/wineps.drv/init.c | 35 +++++++++++++++++++++++++++++------ 1 files changed, 29 insertions(+), 6 deletions(-) diff --git a/dlls/wineps.drv/init.c b/dlls/wineps.drv/init.c index 98768a4..2085a47 100644 --- a/dlls/wineps.drv/init.c +++ b/dlls/wineps.drv/init.c @@ -151,20 +151,43 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) static void PSDRV_UpdateDevCaps( PSDRV_PDEVICE *physDev ) { PAGESIZE *page; - INT width = 0, height = 0; + RESOLUTION *res; + INT width = 0, height = 0, resx = 0, resy = 0; - if (physDev->Devmode->dmPublic.dmFields & DM_PRINTQUALITY) + if (physDev->Devmode->dmPublic.dmFields & (DM_PRINTQUALITY | DM_YRESOLUTION | DM_LOGPIXELS)) { - physDev->logPixelsX = physDev->Devmode->dmPublic.u1.s1.dmPrintQuality; - physDev->logPixelsY = physDev->logPixelsX; + if (physDev->Devmode->dmPublic.dmFields & DM_PRINTQUALITY) + resx = resy = physDev->Devmode->dmPublic.u1.s1.dmPrintQuality; + + if (physDev->Devmode->dmPublic.dmFields & DM_YRESOLUTION) + resy = physDev->Devmode->dmPublic.dmYResolution; + + if (physDev->Devmode->dmPublic.dmFields & DM_LOGPIXELS) + resx = resy = physDev->Devmode->dmPublic.dmLogPixels; + + LIST_FOR_EACH_ENTRY(res, &physDev->pi->ppd->Resolutions, RESOLUTION, entry) + { + if (res->resx == resx && res->resy == resy) + { + physDev->logPixelsX = resx; + physDev->logPixelsY = resy; + break; + } + } + + if (&res->entry == &physDev->pi->ppd->Resolutions) + { + WARN("Requested resolution %dx%d is not supported by device\n", resx, resy); + physDev->logPixelsX = physDev->pi->ppd->DefaultResolution; + physDev->logPixelsY = physDev->logPixelsX; + } } else { + WARN("Using default device resolution %d\n", physDev->pi->ppd->DefaultResolution); physDev->logPixelsX = physDev->pi->ppd->DefaultResolution; physDev->logPixelsY = physDev->logPixelsX; } - if (physDev->Devmode->dmPublic.dmFields & DM_YRESOLUTION) - physDev->logPixelsY = physDev->Devmode->dmPublic.dmYResolution; if(physDev->Devmode->dmPublic.dmFields & DM_PAPERSIZE) { LIST_FOR_EACH_ENTRY(page, &physDev->pi->ppd->PageSizes, PAGESIZE, entry) {
1
0
0
0
Dmitry Timoshkov : wineps.drv: Keep track of all supported device resolutions.
by Alexandre Julliard
20 Dec '12
20 Dec '12
Module: wine Branch: master Commit: d5f27e194a70047f4040ebbb374ef163860d10ad URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d5f27e194a70047f4040ebbb3…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Dec 19 12:43:46 2012 +0800 wineps.drv: Keep track of all supported device resolutions. --- dlls/wineps.drv/driver.c | 22 +++++++++++++++------- dlls/wineps.drv/ppd.c | 21 +++++++++++++++++++++ dlls/wineps.drv/psdrv.h | 8 ++++++++ 3 files changed, 44 insertions(+), 7 deletions(-) diff --git a/dlls/wineps.drv/driver.c b/dlls/wineps.drv/driver.c index 70ee2b0..18be8e0 100644 --- a/dlls/wineps.drv/driver.c +++ b/dlls/wineps.drv/driver.c @@ -638,14 +638,22 @@ DWORD PSDRV_DeviceCapabilities(LPSTR lpszDriver, LPCSTR lpszDevice, LPCSTR lpszP case DC_ENUMRESOLUTIONS: { - LONG *lp = (LONG*)lpszOutput; + RESOLUTION *res; + LONG *lp = (LONG *)lpszOutput; + int i = 0; - if(lpszOutput != NULL) { - lp[0] = pi->ppd->DefaultResolution; - lp[1] = pi->ppd->DefaultResolution; - } - ret = 1; - break; + LIST_FOR_EACH_ENTRY(res, &pi->ppd->Resolutions, RESOLUTION, entry) + { + i++; + if (lpszOutput != NULL) + { + lp[0] = res->resx; + lp[1] = res->resy; + lp += 2; + } + } + ret = i; + break; } /* Windows returns 9999 too */ diff --git a/dlls/wineps.drv/ppd.c b/dlls/wineps.drv/ppd.c index 1cba1b8..9d529b4 100644 --- a/dlls/wineps.drv/ppd.c +++ b/dlls/wineps.drv/ppd.c @@ -659,6 +659,7 @@ PPD *PSDRV_ParsePPD( char *fname, HANDLE printer ) ppd->ColorDevice = CD_NotSpecified; + list_init( &ppd->Resolutions ); list_init( &ppd->InstalledFonts ); list_init( &ppd->PageSizes ); list_init( &ppd->Constraints ); @@ -713,6 +714,26 @@ PPD *PSDRV_ParsePPD( char *fname, HANDLE printer ) WARN("failed to parse DefaultResolution %s\n", debugstr_a(tuple.value)); } + else if(!strcmp("*Resolution", tuple.key)) + { + SIZE sz; + if (parse_resolution(tuple.option, &sz)) + { + RESOLUTION *res; + + TRACE("Resolution %dx%d, invocation %s\n", sz.cx, sz.cy, tuple.value); + + res = HeapAlloc( GetProcessHeap(), 0, sizeof(*res) ); + res->resx = sz.cx; + res->resy = sz.cy; + res->InvocationString = tuple.value; + tuple.value = NULL; + list_add_tail( &ppd->Resolutions, &res->entry ); + } + else + WARN("failed to parse Resolution %s\n", debugstr_a(tuple.option)); + } + else if(!strcmp("*Font", tuple.key)) { FONTNAME *fn = HeapAlloc( PSDRV_Heap, 0, sizeof(*fn) ); diff --git a/dlls/wineps.drv/psdrv.h b/dlls/wineps.drv/psdrv.h index 428f7ba..12ce526 100644 --- a/dlls/wineps.drv/psdrv.h +++ b/dlls/wineps.drv/psdrv.h @@ -183,6 +183,13 @@ typedef struct WORD WinDuplex; /* eg DMDUP_SIMPLEX */ } DUPLEX; +typedef struct +{ + struct list entry; + int resx, resy; + char *InvocationString; +} RESOLUTION; + /* Many Mac OS X based ppd files don't include a *ColorDevice line, so we use a tristate here rather than a boolean. Code that cares is expected to treat these as if they were colour. */ @@ -196,6 +203,7 @@ typedef struct { char *NickName; int LanguageLevel; COLORDEVICE ColorDevice; + struct list Resolutions; int DefaultResolution; signed int LandscapeOrientation; char *JCLBegin;
1
0
0
0
Alexandre Julliard : gdi32: Avoid duplicate computation of text extents in ExtTextOut.
by Alexandre Julliard
20 Dec '12
20 Dec '12
Module: wine Branch: master Commit: 57f84bc7bb108c7ef3e0d533db7141c7ce18e297 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=57f84bc7bb108c7ef3e0d533d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Dec 20 15:08:23 2012 +0100 gdi32: Avoid duplicate computation of text extents in ExtTextOut. --- dlls/gdi32/font.c | 43 +++++++++---------------------------------- 1 files changed, 9 insertions(+), 34 deletions(-) diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index 51a6c23..fe32167 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -2097,7 +2097,6 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags, INT char_extra; SIZE sz; RECT rc; - BOOL done_extents = FALSE; POINT *deltas = NULL, width = {0, 0}; DWORD type; DC * dc = get_dc_ptr( hdc ); @@ -2125,9 +2124,6 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags, return ret; } - if (!lprect) - flags &= ~ETO_CLIPPED; - if (flags & ETO_RTLREADING) align |= TA_RTLREADING; if (layout & LAYOUT_RTL) { @@ -2189,32 +2185,15 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags, sinEsc = 0; } - if(flags & (ETO_CLIPPED | ETO_OPAQUE)) + if (lprect) { - if(!lprect) - { - if(flags & ETO_GLYPH_INDEX) - GetTextExtentPointI(hdc, glyphs, count, &sz); - else - GetTextExtentPointW(hdc, reordered_str, count, &sz); - - done_extents = TRUE; - rc.left = x; - rc.top = y; - rc.right = x + sz.cx; - rc.bottom = y + sz.cy; - } - else - { - rc = *lprect; - } - + rc = *lprect; LPtoDP(hdc, (POINT*)&rc, 2); order_rect( &rc ); + if (flags & ETO_OPAQUE) + physdev->funcs->pExtTextOut( physdev, 0, 0, ETO_OPAQUE, &rc, NULL, 0, NULL ); } - - if (lprect && (flags & ETO_OPAQUE)) - physdev->funcs->pExtTextOut( physdev, 0, 0, ETO_OPAQUE, &rc, NULL, 0, NULL ); + else flags &= ~ETO_CLIPPED; if(count == 0) { @@ -2306,14 +2285,10 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags, { POINT desired[2]; - if(!done_extents) - { - if(flags & ETO_GLYPH_INDEX) - GetTextExtentPointI(hdc, glyphs, count, &sz); - else - GetTextExtentPointW(hdc, reordered_str, count, &sz); - done_extents = TRUE; - } + if(flags & ETO_GLYPH_INDEX) + GetTextExtentPointI(hdc, glyphs, count, &sz); + else + GetTextExtentPointW(hdc, reordered_str, count, &sz); desired[0].x = desired[0].y = 0; desired[1].x = sz.cx; desired[1].y = 0;
1
0
0
0
Alexandre Julliard : gdi32: Compute the extents of the whole string at once in ExtTextOut.
by Alexandre Julliard
20 Dec '12
20 Dec '12
Module: wine Branch: master Commit: 0da8c0d92ec095d806ffdd525cf03979283d5af3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0da8c0d92ec095d806ffdd525…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Dec 20 14:32:58 2012 +0100 gdi32: Compute the extents of the whole string at once in ExtTextOut. --- dlls/gdi32/font.c | 47 +++++++++++++++++++++++++---------------------- 1 files changed, 25 insertions(+), 22 deletions(-) diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index 3f79dff..51a6c23 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -2232,46 +2232,49 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags, if(char_extra || dc->breakExtra || breakRem || lpDx || lf.lfEscapement != 0) { UINT i; - SIZE tmpsz; POINT total = {0, 0}, desired[2]; deltas = HeapAlloc(GetProcessHeap(), 0, count * sizeof(*deltas)); - for(i = 0; i < count; i++) + if (lpDx) { - if(lpDx) + if (flags & ETO_PDY) { - if(flags & ETO_PDY) + for (i = 0; i < count; i++) { deltas[i].x = lpDx[i * 2] + char_extra; deltas[i].y = -lpDx[i * 2 + 1]; } - else + } + else + { + for (i = 0; i < count; i++) { deltas[i].x = lpDx[i] + char_extra; deltas[i].y = 0; } - } + } + else + { + INT *dx = HeapAlloc( GetProcessHeap(), 0, count * sizeof(*dx) ); + + if (flags & ETO_GLYPH_INDEX) + GetTextExtentExPointI( hdc, glyphs, count, -1, NULL, dx, &sz ); else - { - if(flags & ETO_GLYPH_INDEX) - GetTextExtentPointI(hdc, glyphs + i, 1, &tmpsz); - else - GetTextExtentPointW(hdc, reordered_str + i, 1, &tmpsz); + GetTextExtentExPointW( hdc, reordered_str, count, -1, NULL, dx, &sz ); - deltas[i].x = tmpsz.cx; - deltas[i].y = 0; - } - - if (!(flags & ETO_GLYPH_INDEX) && (dc->breakExtra || breakRem) && reordered_str[i] == tm.tmBreakChar) + deltas[0].x = dx[0]; + deltas[0].y = 0; + for (i = 1; i < count; i++) { - deltas[i].x = deltas[i].x + dc->breakExtra; - if (breakRem > 0) - { - breakRem--; - deltas[i].x++; - } + deltas[i].x = dx[i] - dx[i - 1]; + deltas[i].y = 0; } + HeapFree( GetProcessHeap(), 0, dx ); + } + + for(i = 0; i < count; i++) + { total.x += deltas[i].x; total.y += deltas[i].y;
1
0
0
0
Alexandre Julliard : oleaut32: Cleanup some relay traces.
by Alexandre Julliard
20 Dec '12
20 Dec '12
Module: wine Branch: master Commit: 718e2f256ed39f6f7e1598687fd58614551caab7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=718e2f256ed39f6f7e1598687…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Dec 20 12:55:37 2012 +0100 oleaut32: Cleanup some relay traces. --- dlls/oleaut32/tmarshal.c | 29 ++++++++++++++--------------- 1 files changed, 14 insertions(+), 15 deletions(-) diff --git a/dlls/oleaut32/tmarshal.c b/dlls/oleaut32/tmarshal.c index dd19fa1..8b47eed 100644 --- a/dlls/oleaut32/tmarshal.c +++ b/dlls/oleaut32/tmarshal.c @@ -1336,7 +1336,7 @@ static DWORD WINAPI xCall(int method, void **args) DWORD *xargs; const FUNCDESC *fdesc; HRESULT hres; - int i, relaydeb = TRACE_ON(olerelay); + int i; marshal_state buf; RPCOLEMESSAGE msg; ULONG status; @@ -1368,7 +1368,7 @@ static DWORD WINAPI xCall(int method, void **args) LeaveCriticalSection(&tpinfo->crit); - if (relaydeb) { + if (TRACE_ON(olerelay)) { TRACE_(olerelay)("->"); if (iname) TRACE_(olerelay)("%s:",relaystr(iname)); @@ -1396,7 +1396,7 @@ static DWORD WINAPI xCall(int method, void **args) xargs = (DWORD *)(args + 1); for (i=0;i<fdesc->cParams;i++) { ELEMDESC *elem = fdesc->lprgelemdescParam+i; - if (relaydeb) { + if (TRACE_ON(olerelay)) { if (i) TRACE_(olerelay)(","); if (i+1<nrofnames && names[i+1]) TRACE_(olerelay)("%s=",relaystr(names[i+1])); @@ -1407,7 +1407,7 @@ static DWORD WINAPI xCall(int method, void **args) if (elem->tdesc.vt != VT_PTR) { xargs+=_argsize(&elem->tdesc, tinfo); - if (relaydeb) TRACE_(olerelay)("[out]"); + TRACE_(olerelay)("[out]"); continue; } else @@ -1419,7 +1419,7 @@ static DWORD WINAPI xCall(int method, void **args) hres = serialize_param( tinfo, is_in_elem(elem), - relaydeb, + TRACE_ON(olerelay), FALSE, &elem->tdesc, xargs, @@ -1432,7 +1432,7 @@ static DWORD WINAPI xCall(int method, void **args) } xargs+=_argsize(&elem->tdesc, tinfo); } - if (relaydeb) TRACE_(olerelay)(")"); + TRACE_(olerelay)(")"); memset(&msg,0,sizeof(msg)); msg.cbBuffer = buf.curoff; @@ -1443,14 +1443,14 @@ static DWORD WINAPI xCall(int method, void **args) goto exit; } memcpy(msg.Buffer,buf.base,buf.curoff); - if (relaydeb) TRACE_(olerelay)("\n"); + TRACE_(olerelay)("\n"); hres = IRpcChannelBuffer_SendReceive(chanbuf,&msg,&status); if (hres) { ERR("RpcChannelBuffer SendReceive failed, %x\n",hres); goto exit; } - if (relaydeb) TRACE_(olerelay)(" status = %08x (",status); + TRACE_(olerelay)(" status = %08x (",status); if (buf.base) buf.base = HeapReAlloc(GetProcessHeap(),0,buf.base,msg.cbBuffer); else @@ -1465,20 +1465,19 @@ static DWORD WINAPI xCall(int method, void **args) for (i=0;i<fdesc->cParams;i++) { ELEMDESC *elem = fdesc->lprgelemdescParam+i; - if (relaydeb) { - if (i) TRACE_(olerelay)(","); - if (i+1<nrofnames && names[i+1]) TRACE_(olerelay)("%s=",relaystr(names[i+1])); - } + if (i) TRACE_(olerelay)(","); + if (i+1<nrofnames && names[i+1]) TRACE_(olerelay)("%s=",relaystr(names[i+1])); + /* No need to marshal other data than FOUT and any VT_PTR */ if (!is_out_elem(elem) && (elem->tdesc.vt != VT_PTR)) { xargs += _argsize(&elem->tdesc, tinfo); - if (relaydeb) TRACE_(olerelay)("[in]"); + TRACE_(olerelay)("[in]"); continue; } hres = deserialize_param( tinfo, is_out_elem(elem), - relaydeb, + TRACE_ON(olerelay), FALSE, &(elem->tdesc), xargs, @@ -1495,7 +1494,7 @@ static DWORD WINAPI xCall(int method, void **args) hres = xbuf_get(&buf, (LPBYTE)&remoteresult, sizeof(DWORD)); if (hres != S_OK) goto exit; - if (relaydeb) TRACE_(olerelay)(") = %08x\n", remoteresult); + TRACE_(olerelay)(") = %08x\n", remoteresult); hres = remoteresult;
1
0
0
0
Alexandre Julliard : oleaut32: Use a saner calling convention for the marshaller asm thunks.
by Alexandre Julliard
20 Dec '12
20 Dec '12
Module: wine Branch: master Commit: 2915e47979e31a8911a4f95d2d90264e6d6a0f40 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2915e47979e31a8911a4f95d2…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Dec 20 12:48:27 2012 +0100 oleaut32: Use a saner calling convention for the marshaller asm thunks. --- dlls/oleaut32/tmarshal.c | 70 +++++++++++++++------------------------------- 1 files changed, 23 insertions(+), 47 deletions(-) diff --git a/dlls/oleaut32/tmarshal.c b/dlls/oleaut32/tmarshal.c index a6108ad..dd19fa1 100644 --- a/dlls/oleaut32/tmarshal.c +++ b/dlls/oleaut32/tmarshal.c @@ -409,15 +409,15 @@ static HRESULT num_of_funcs(ITypeInfo *tinfo, unsigned int *num, #include "pshpack1.h" typedef struct _TMAsmProxy { - BYTE popleax; + DWORD lealeax; + BYTE pushleax; BYTE pushlval; DWORD nr; - BYTE pushleax; BYTE lcall; DWORD xcall; BYTE lret; WORD bytestopop; - BYTE nop; + WORD nop; } TMAsmProxy; #include "poppack.h" @@ -1330,10 +1330,10 @@ static inline BOOL is_out_elem(const ELEMDESC *elem) return (elem->u.paramdesc.wParamFlags & PARAMFLAG_FOUT || !elem->u.paramdesc.wParamFlags); } -static DWORD -xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */) +static DWORD WINAPI xCall(int method, void **args) { - DWORD *args = ((DWORD*)&tpinfo)+1, *xargs; + TMProxyImpl *tpinfo = args[0]; + DWORD *xargs; const FUNCDESC *fdesc; HRESULT hres; int i, relaydeb = TRACE_ON(olerelay); @@ -1393,7 +1393,7 @@ xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */) if (nrofnames > sizeof(names)/sizeof(names[0])) ERR("Need more names!\n"); - xargs = args; + xargs = (DWORD *)(args + 1); for (i=0;i<fdesc->cParams;i++) { ELEMDESC *elem = fdesc->lprgelemdescParam+i; if (relaydeb) { @@ -1460,7 +1460,7 @@ xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */) buf.curoff = 0; /* generic deserializer using typelib description */ - xargs = args; + xargs = (DWORD *)(args + 1); status = S_OK; for (i=0;i<fdesc->cParams;i++) { ELEMDESC *elem = fdesc->lprgelemdescParam+i; @@ -1719,8 +1719,8 @@ static inline HRESULT get_facbuf_for_iid(REFIID riid, IPSFactoryBuffer **facbuf) static HRESULT init_proxy_entry_point(TMProxyImpl *proxy, unsigned int num) { int j; - /* nrofargs without This */ - int nrofargs; + /* nrofargs including This */ + int nrofargs = 1; ITypeInfo *tinfo2; TMAsmProxy *xasm = proxy->asmstubs + num; HRESULT hres; @@ -1733,7 +1733,6 @@ static HRESULT init_proxy_entry_point(TMProxyImpl *proxy, unsigned int num) } ITypeInfo_Release(tinfo2); /* some args take more than 4 byte on the stack */ - nrofargs = 0; for (j=0;j<fdesc->cParams;j++) nrofargs += _argsize(&fdesc->lprgelemdescParam[j].tdesc, proxy->tinfo); @@ -1742,25 +1741,21 @@ static HRESULT init_proxy_entry_point(TMProxyImpl *proxy, unsigned int num) ERR("calling convention is not stdcall????\n"); return E_FAIL; } -/* popl %eax - return ptr - * pushl <nr> +/* leal 4(%esp),%eax * pushl %eax + * pushl <nr> * call xCall - * lret <nr> (+4) - * - * - * arg3 arg2 arg1 <method> <returnptr> + * lret <nr> */ - xasm->popleax = 0x58; + xasm->lealeax = 0x0424448d; + xasm->pushleax = 0x50; xasm->pushlval = 0x68; xasm->nr = num; - xasm->pushleax = 0x50; - xasm->lcall = 0xe8; /* relative jump */ - xasm->xcall = (DWORD)xCall; - xasm->xcall -= (DWORD)&(xasm->lret); + xasm->lcall = 0xe8; + xasm->xcall = (char *)xCall - (char *)&xasm->lret; xasm->lret = 0xc2; - xasm->bytestopop = (nrofargs+2)*4; /* pop args, This, iMethod */ - xasm->nop = 0x90; + xasm->bytestopop = nrofargs * 4; + xasm->nop = 0x9090; proxy->lpvtbl[fdesc->oVft / sizeof(void *)] = xasm; #else FIXME("not implemented on non i386\n"); @@ -1800,8 +1795,6 @@ PSFacBuf_CreateProxy( proxy = CoTaskMemAlloc(sizeof(TMProxyImpl)); if (!proxy) return E_OUTOFMEMORY; - assert(sizeof(TMAsmProxy) == 16); - proxy->dispatch = NULL; proxy->dispatch_proxy = NULL; proxy->outerunknown = pUnkOuter; @@ -1863,40 +1856,23 @@ PSFacBuf_CreateProxy( proxy->lpvtbl[i] = ProxyIUnknown_Release; break; case 3: - if(!defer_to_dispatch) - { - hres = init_proxy_entry_point(proxy, i); - if(FAILED(hres)) return hres; - } + if(!defer_to_dispatch) hres = init_proxy_entry_point(proxy, i); else proxy->lpvtbl[3] = ProxyIDispatch_GetTypeInfoCount; break; case 4: - if(!defer_to_dispatch) - { - hres = init_proxy_entry_point(proxy, i); - if(FAILED(hres)) return hres; - } + if(!defer_to_dispatch) hres = init_proxy_entry_point(proxy, i); else proxy->lpvtbl[4] = ProxyIDispatch_GetTypeInfo; break; case 5: - if(!defer_to_dispatch) - { - hres = init_proxy_entry_point(proxy, i); - if(FAILED(hres)) return hres; - } + if(!defer_to_dispatch) hres = init_proxy_entry_point(proxy, i); else proxy->lpvtbl[5] = ProxyIDispatch_GetIDsOfNames; break; case 6: - if(!defer_to_dispatch) - { - hres = init_proxy_entry_point(proxy, i); - if(FAILED(hres)) return hres; - } + if(!defer_to_dispatch) hres = init_proxy_entry_point(proxy, i); else proxy->lpvtbl[6] = ProxyIDispatch_Invoke; break; default: hres = init_proxy_entry_point(proxy, i); - if(FAILED(hres)) return hres; } }
1
0
0
0
Piotr Caban : msvcrt: Don' t call local_unwind2 when Cookie equals MSVCRT_JMP_MAGIC in longjmp.
by Alexandre Julliard
20 Dec '12
20 Dec '12
Module: wine Branch: master Commit: 76969a8651f525cb87095a80ba4c220888ef6226 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=76969a8651f525cb87095a80b…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Dec 20 11:13:45 2012 +0100 msvcrt: Don't call local_unwind2 when Cookie equals MSVCRT_JMP_MAGIC in longjmp. --- dlls/msvcrt/except_i386.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dlls/msvcrt/except_i386.c b/dlls/msvcrt/except_i386.c index 7c3265c..8639579 100644 --- a/dlls/msvcrt/except_i386.c +++ b/dlls/msvcrt/except_i386.c @@ -1014,17 +1014,18 @@ void CDECL MSVCRT_longjmp(struct MSVCRT___JUMP_BUFFER *jmp, int retval) if (jmp->Registration) { - if (!IsBadReadPtr(&jmp->Cookie, sizeof(long)) && - jmp->Cookie == MSVCRT_JMP_MAGIC && jmp->UnwindFunc) + if (IsBadReadPtr(&jmp->Cookie, sizeof(long)) || jmp->Cookie != MSVCRT_JMP_MAGIC) + { + msvcrt_local_unwind2((MSVCRT_EXCEPTION_FRAME*)jmp->Registration, + jmp->TryLevel, (void *)jmp->Ebp); + } + else if(jmp->UnwindFunc) { MSVCRT_unwind_function unwind_func; unwind_func=(MSVCRT_unwind_function)jmp->UnwindFunc; unwind_func(jmp); } - else - msvcrt_local_unwind2((MSVCRT_EXCEPTION_FRAME*)jmp->Registration, - jmp->TryLevel, (void *)jmp->Ebp); } if (!retval)
1
0
0
0
← Newer
1
...
9
10
11
12
13
14
15
...
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