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
February 2013
----- 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
459 discussions
Start a n
N
ew thread
Jörg Höhle : ntdll: Use the monotonic time counter also for timer queues.
by Alexandre Julliard
07 Feb '13
07 Feb '13
Module: wine Branch: master Commit: 4f6db78ca0f4f01d8a8734ddc332cc3ea1a8587e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4f6db78ca0f4f01d8a8734ddc…
Author: Jörg Höhle <hoehle(a)users.sourceforge.net> Date: Tue Feb 5 18:01:04 2013 +0100 ntdll: Use the monotonic time counter also for timer queues. --- dlls/ntdll/threadpool.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/ntdll/threadpool.c b/dlls/ntdll/threadpool.c index 81abac3..f246cfb 100644 --- a/dlls/ntdll/threadpool.c +++ b/dlls/ntdll/threadpool.c @@ -605,9 +605,9 @@ static DWORD WINAPI timer_callback_wrapper(LPVOID p) static inline ULONGLONG queue_current_time(void) { - LARGE_INTEGER now; - NtQuerySystemTime(&now); - return now.QuadPart / 10000; + LARGE_INTEGER now, freq; + NtQueryPerformanceCounter(&now, &freq); + return now.QuadPart * 1000 / freq.QuadPart; } static void queue_add_timer(struct queue_timer *t, ULONGLONG time,
1
0
0
0
Akihiro Sagawa : gdi32: Ensure a fixed-pitch full-width character has double advance of a half-width character .
by Alexandre Julliard
07 Feb '13
07 Feb '13
Module: wine Branch: master Commit: 9aa8300f99965d2b66eb7016ff3e44a3d517ba8b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9aa8300f99965d2b66eb7016f…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Thu Feb 7 22:13:04 2013 +0900 gdi32: Ensure a fixed-pitch full-width character has double advance of a half-width character. --- dlls/gdi32/freetype.c | 37 ++++++++++++++++++-- dlls/gdi32/tests/font.c | 88 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 122 insertions(+), 3 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 40cf080..b977b0d 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -5821,6 +5821,7 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format, BOOL needsTransform = FALSE; BOOL tategaki = (font->GSUB_Table != NULL); UINT original_index; + FT_Fixed avgAdvance = 0; TRACE("%p, %04x, %08x, %p, %08x, %p, %p\n", font, glyph, format, lpgm, buflen, buf, lpmat); @@ -5957,10 +5958,26 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format, return GDI_ERROR; } + if(FT_IS_SCALABLE(incoming_font->ft_face)) { + TEXTMETRICW tm; + if (get_text_metrics(incoming_font, &tm) && + !(tm.tmPitchAndFamily & TMPF_FIXED_PITCH)) { + avgAdvance = pFT_MulFix(incoming_font->ntmAvgWidth, + incoming_font->ft_face->size->metrics.x_scale); + if (avgAdvance && (ft_face->glyph->metrics.horiAdvance+63) >> 6 == (avgAdvance*2+63) >> 6) + TRACE("Fixed-pitch full-width character detected\n"); + else + avgAdvance = 0; /* cancel this feature */ + } + } + if(!needsTransform) { left = (INT)(ft_face->glyph->metrics.horiBearingX) & -64; right = (INT)((ft_face->glyph->metrics.horiBearingX + ft_face->glyph->metrics.width) + 63) & -64; - adv = (INT)(ft_face->glyph->metrics.horiAdvance + 63) >> 6; + if (!avgAdvance) + adv = (INT)(ft_face->glyph->metrics.horiAdvance + 63) >> 6; + else + adv = (INT)((avgAdvance + 32) >> 6) * 2; top = (ft_face->glyph->metrics.horiBearingY + 63) & -64; bottom = (ft_face->glyph->metrics.horiBearingY - @@ -6001,13 +6018,27 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format, vec.x = ft_face->glyph->metrics.horiAdvance; vec.y = 0; pFT_Vector_Transform(&vec, &transMat); - lpgm->gmCellIncX = (vec.x+63) >> 6; lpgm->gmCellIncY = -((vec.y+63) >> 6); + if (!avgAdvance || vec.y) + lpgm->gmCellIncX = (vec.x+63) >> 6; + else { + vec.x = avgAdvance; + vec.y = 0; + pFT_Vector_Transform(&vec, &transMat); + lpgm->gmCellIncX = ((vec.x+32) >> 6) * 2; + } vec.x = ft_face->glyph->metrics.horiAdvance; vec.y = 0; pFT_Vector_Transform(&vec, &transMatUnrotated); - adv = (vec.x+63) >> 6; + if (!avgAdvance || vec.y) + adv = (vec.x+63) >> 6; + else { + vec.x = avgAdvance; + vec.y = 0; + pFT_Vector_Transform(&vec, &transMatUnrotated); + adv = ((vec.x+32) >> 6) * 2; + } } lpgm->gmBlackBoxX = (right - left) >> 6; diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index f234b62..943f584 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -3552,6 +3552,38 @@ todo_wine DeleteDC(hdc); } +static int CALLBACK create_fixed_pitch_font_proc(const LOGFONT *lpelfe, + const TEXTMETRIC *lpntme, + DWORD FontType, LPARAM lParam) +{ + const NEWTEXTMETRICEX *lpntmex = (const NEWTEXTMETRICEX *)lpntme; + CHARSETINFO csi; + LOGFONT lf = *lpelfe; + HFONT hfont; + + /* skip bitmap, proportional or vertical font */ + if ((FontType & TRUETYPE_FONTTYPE) == 0 || + (lf.lfPitchAndFamily & 0xf) != FIXED_PITCH || + lf.lfFaceName[0] == '@') + return 1; + + /* skip linked font */ + if (!TranslateCharsetInfo((DWORD*)(INT_PTR)lpelfe->lfCharSet, &csi, TCI_SRCCHARSET) || + (lpntmex->ntmFontSig.fsCsb[0] & csi.fs.fsCsb[0]) == 0) + return 1; + + /* test with an odd height */ + lf.lfHeight = -19; + lf.lfWidth = 0; + hfont = CreateFontIndirect(&lf); + if (hfont) + { + *(HFONT *)lParam = hfont; + return 0; + } + return 1; +} + static void test_GetGlyphOutline(void) { HDC hdc; @@ -3640,6 +3672,8 @@ static void test_GetGlyphOutline(void) for (i = 0; i < sizeof c / sizeof c[0]; ++i) { + static const MAT2 rotate_mat = {{0, 0}, {0, -1}, {0, 1}, {0, 0}}; + lf.lfFaceName[0] = '\0'; lf.lfCharSet = c[i].cs; lf.lfPitchAndFamily = 0; @@ -3670,6 +3704,60 @@ static void test_GetGlyphOutline(void) ret2 = GetGlyphOutlineW(hdc, c[i].w, GGO_BITMAP, &gm2, 0, NULL, &mat); ok(ret == ret2 && memcmp(&gm, &gm2, sizeof gm) == 0, "%d %d\n", ret, ret2); + if (EnumFontFamiliesEx(hdc, &lf, create_fixed_pitch_font_proc, (LPARAM)&hfont, 0)) + { + skip("Fixed-pitch TrueType font for charset %u is not available\n", c[i].cs); + continue; + } + DeleteObject(SelectObject(hdc, hfont)); + if (c[i].a <= 0xff) + { + DeleteObject(SelectObject(hdc, old_hfont)); + continue; + } + + ret = GetObject(hfont, sizeof lf, &lf); + ok(ret > 0, "GetObject error %u\n", GetLastError()); + + ret = GetGlyphOutlineA(hdc, 'A', GGO_METRICS, &gm, 0, NULL, &mat); + ok(ret != GDI_ERROR, "GetGlyphOutlineA error %u\n", GetLastError()); + ret = GetGlyphOutlineA(hdc, c[i].a, GGO_METRICS, &gm2, 0, NULL, &mat); + ok(ret != GDI_ERROR, "GetGlyphOutlineA error %u\n", GetLastError()); + trace("Tests with height=%d,half=%d,full=%d,face=%s,charset=%d\n", + -lf.lfHeight, gm.gmCellIncX, gm2.gmCellIncX, lf.lfFaceName, lf.lfCharSet); + ok(gm2.gmCellIncX == gm.gmCellIncX * 2 || broken(gm2.gmCellIncX == -lf.lfHeight), + "expected %d, got %d (%s:%d)\n", + gm.gmCellIncX * 2, gm2.gmCellIncX, lf.lfFaceName, lf.lfCharSet); + + ret = GetGlyphOutlineA(hdc, c[i].a, GGO_METRICS, &gm2, 0, NULL, &rotate_mat); + ok(ret != GDI_ERROR, "GetGlyphOutlineA error %u\n", GetLastError()); + ok(gm2.gmCellIncY == -lf.lfHeight, + "expected %d, got %d (%s:%d)\n", + -lf.lfHeight, gm2.gmCellIncY, lf.lfFaceName, lf.lfCharSet); + + lf.lfItalic = TRUE; + hfont = CreateFontIndirect(&lf); + ok(hfont != NULL, "CreateFontIndirect error %u\n", GetLastError()); + DeleteObject(SelectObject(hdc, hfont)); + ret = GetGlyphOutlineA(hdc, 'A', GGO_METRICS, &gm, 0, NULL, &mat); + ok(ret != GDI_ERROR, "GetGlyphOutlineA error %u\n", GetLastError()); + ret = GetGlyphOutlineA(hdc, c[i].a, GGO_METRICS, &gm2, 0, NULL, &mat); + ok(ret != GDI_ERROR, "GetGlyphOutlineA error %u\n", GetLastError()); + ok(gm2.gmCellIncX == gm.gmCellIncX * 2 || broken(gm2.gmCellIncX == -lf.lfHeight), + "expected %d, got %d (%s:%d)\n", + gm.gmCellIncX * 2, gm2.gmCellIncX, lf.lfFaceName, lf.lfCharSet); + + lf.lfItalic = FALSE; + lf.lfEscapement = lf.lfOrientation = 2700; + hfont = CreateFontIndirect(&lf); + ok(hfont != NULL, "CreateFontIndirect error %u\n", GetLastError()); + DeleteObject(SelectObject(hdc, hfont)); + ret = GetGlyphOutlineA(hdc, c[i].a, GGO_METRICS, &gm2, 0, NULL, &mat); + ok(ret != GDI_ERROR, "GetGlyphOutlineA error %u\n", GetLastError()); + ok(gm2.gmCellIncY == -lf.lfHeight, + "expected %d, got %d (%s:%d)\n", + -lf.lfHeight, gm2.gmCellIncY, lf.lfFaceName, lf.lfCharSet); + hfont = SelectObject(hdc, old_hfont); DeleteObject(hfont); }
1
0
0
0
Huw Davies : riched20: Move SplitRun to wrap.c and make it static.
by Alexandre Julliard
07 Feb '13
07 Feb '13
Module: wine Branch: master Commit: 68d72f479288fc77436e4d7b4d64aa5f7d7d8218 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=68d72f479288fc77436e4d7b4…
Author: Huw Davies <huw(a)codeweavers.com> Date: Thu Feb 7 14:30:47 2013 +0000 riched20: Move SplitRun to wrap.c and make it static. --- dlls/riched20/editor.h | 1 - dlls/riched20/run.c | 48 ------------------------------------ dlls/riched20/wrap.c | 63 ++++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 56 insertions(+), 56 deletions(-) diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h index 6562b8e..9722f36 100644 --- a/dlls/riched20/editor.h +++ b/dlls/riched20/editor.h @@ -146,7 +146,6 @@ int ME_CharFromPointCursor(ME_TextEditor *editor, int cx, ME_Run *run) DECLSPEC_ int ME_PointFromChar(ME_TextEditor *editor, ME_Run *pRun, int nOffset) DECLSPEC_HIDDEN; int ME_CanJoinRuns(const ME_Run *run1, const ME_Run *run2) DECLSPEC_HIDDEN; void ME_JoinRuns(ME_TextEditor *editor, ME_DisplayItem *p) DECLSPEC_HIDDEN; -ME_DisplayItem *ME_SplitRun(ME_WrapContext *wc, ME_DisplayItem *item, int nChar) DECLSPEC_HIDDEN; ME_DisplayItem *ME_SplitRunSimple(ME_TextEditor *editor, ME_Cursor *cursor) DECLSPEC_HIDDEN; void ME_UpdateRunFlags(ME_TextEditor *editor, ME_Run *run) DECLSPEC_HIDDEN; void ME_CalcRunExtent(ME_Context *c, const ME_Paragraph *para, int startx, ME_Run *run) DECLSPEC_HIDDEN; diff --git a/dlls/riched20/run.c b/dlls/riched20/run.c index 54db370..aaa6300 100644 --- a/dlls/riched20/run.c +++ b/dlls/riched20/run.c @@ -243,54 +243,6 @@ void ME_JoinRuns(ME_TextEditor *editor, ME_DisplayItem *p) } /****************************************************************************** - * ME_SplitRun - * - * Splits a run into two in a given place. It also updates the screen position - * and size (extent) of the newly generated runs. - */ -ME_DisplayItem *ME_SplitRun(ME_WrapContext *wc, ME_DisplayItem *item, int nVChar) -{ - ME_TextEditor *editor = wc->context->editor; - ME_Run *run, *run2; - ME_Paragraph *para = &wc->pPara->member.para; - ME_Cursor cursor = {wc->pPara, item, nVChar}; - - assert(item->member.run.nCharOfs != -1); - if(TRACE_ON(richedit)) - { - TRACE("Before check before split\n"); - ME_CheckCharOffsets(editor); - TRACE("After check before split\n"); - } - - run = &item->member.run; - - TRACE("Before split: %s(%d, %d)\n", debugstr_run( run ), - run->pt.x, run->pt.y); - - ME_SplitRunSimple(editor, &cursor); - - run2 = &cursor.pRun->member.run; - - ME_CalcRunExtent(wc->context, para, wc->nRow ? wc->nLeftMargin : wc->nFirstMargin, run); - - run2->pt.x = run->pt.x+run->nWidth; - run2->pt.y = run->pt.y; - - if(TRACE_ON(richedit)) - { - TRACE("Before check after split\n"); - ME_CheckCharOffsets(editor); - TRACE("After check after split\n"); - TRACE("After split: %s(%d, %d), %s(%d, %d)\n", - debugstr_run( run ), run->pt.x, run->pt.y, - debugstr_run( run2 ), run2->pt.x, run2->pt.y); - } - - return cursor.pRun; -} - -/****************************************************************************** * ME_SplitRunSimple * * Does the most basic job of splitting a run into two - it does not diff --git a/dlls/riched20/wrap.c b/dlls/riched20/wrap.c index b63697b..97598e7 100644 --- a/dlls/riched20/wrap.c +++ b/dlls/riched20/wrap.c @@ -32,6 +32,55 @@ WINE_DEFAULT_DEBUG_CHANNEL(richedit); * - no tabs */ +/****************************************************************************** + * split_run_extents + * + * Splits a run into two in a given place. It also updates the screen position + * and size (extent) of the newly generated runs. + */ +static ME_DisplayItem *split_run_extents(ME_WrapContext *wc, ME_DisplayItem *item, int nVChar) +{ + ME_TextEditor *editor = wc->context->editor; + ME_Run *run, *run2; + ME_Paragraph *para = &wc->pPara->member.para; + ME_Cursor cursor = {wc->pPara, item, nVChar}; + + assert(item->member.run.nCharOfs != -1); + if(TRACE_ON(richedit)) + { + TRACE("Before check before split\n"); + ME_CheckCharOffsets(editor); + TRACE("After check before split\n"); + } + + run = &item->member.run; + + TRACE("Before split: %s(%d, %d)\n", debugstr_run( run ), + run->pt.x, run->pt.y); + + ME_SplitRunSimple(editor, &cursor); + + run2 = &cursor.pRun->member.run; + + ME_CalcRunExtent(wc->context, para, wc->nRow ? wc->nLeftMargin : wc->nFirstMargin, run); + + run2->pt.x = run->pt.x+run->nWidth; + run2->pt.y = run->pt.y; + + if(TRACE_ON(richedit)) + { + TRACE("Before check after split\n"); + ME_CheckCharOffsets(editor); + TRACE("After check after split\n"); + TRACE("After split: %s(%d, %d), %s(%d, %d)\n", + debugstr_run( run ), run->pt.x, run->pt.y, + debugstr_run( run2 ), run2->pt.x, run2->pt.y); + } + + return cursor.pRun; +} + + static ME_DisplayItem *ME_MakeRow(int height, int baseline, int width) { ME_DisplayItem *item = ME_MakeDI(diStartRow); @@ -247,7 +296,7 @@ static ME_DisplayItem *ME_MaximizeSplit(ME_WrapContext *wc, ME_DisplayItem *p, i return NULL; j = reverse_find_non_whitespace( get_text( &p->member.run, 0 ), i); if (j>0) { - pp = ME_SplitRun(wc, piter, j); + pp = split_run_extents(wc, piter, j); wc->pt.x += piter->member.run.nWidth; return pp; } @@ -267,7 +316,7 @@ static ME_DisplayItem *ME_MaximizeSplit(ME_WrapContext *wc, ME_DisplayItem *p, i { i = reverse_find_non_whitespace( get_text( &piter->member.run, 0 ), piter->member.run.len ); - pp = ME_SplitRun(wc, piter, i); + pp = split_run_extents(wc, piter, i); wc->pt = pp->member.run.pt; return pp; } @@ -322,7 +371,7 @@ static ME_DisplayItem *ME_SplitByBacktracking(ME_WrapContext *wc, ME_DisplayItem if (i == len) i = reverse_find_non_whitespace( get_text( run, 0 ), len ); if (i) { - ME_DisplayItem *piter2 = ME_SplitRun(wc, piter, i); + ME_DisplayItem *piter2 = split_run_extents(wc, piter, i); wc->pt = piter2->member.run.pt; return piter2; } @@ -339,7 +388,7 @@ static ME_DisplayItem *ME_SplitByBacktracking(ME_WrapContext *wc, ME_DisplayItem TRACE("Backtracking failed, trying desperate: %s\n", debugstr_run( &p->member.run )); /* OK, no better idea, so assume we MAY split words if we can split at all*/ if (idesp) - return ME_SplitRun(wc, piter, idesp); + return split_run_extents(wc, piter, idesp); else if (wc->pRowStart && piter != wc->pRowStart) { @@ -353,7 +402,7 @@ static ME_DisplayItem *ME_SplitByBacktracking(ME_WrapContext *wc, ME_DisplayItem /* split point inside first character - no choice but split after that char */ if (len != 1) { /* the run is more than 1 char, so we may split */ - return ME_SplitRun(wc, piter, 1); + return split_run_extents(wc, piter, 1); } /* the run is one char, can't split it */ return piter; @@ -393,7 +442,7 @@ static ME_DisplayItem *ME_WrapHandleRun(ME_WrapContext *wc, ME_DisplayItem *p) black = find_non_whitespace( get_text( run, 0 ), run->len, 0 ); if (black) { wc->bOverflown = FALSE; - pp = ME_SplitRun(wc, p, black); + pp = split_run_extents(wc, p, black); ME_CalcRunExtent(wc->context, &wc->pPara->member.para, wc->nRow ? wc->nLeftMargin : wc->nFirstMargin, &pp->member.run); @@ -444,7 +493,7 @@ static ME_DisplayItem *ME_WrapHandleRun(ME_WrapContext *wc, ME_DisplayItem *p) { /* we aren't sure if it's *really* necessary, it's a good start however */ int black = reverse_find_non_whitespace( get_text( run, 0 ), len ); - ME_SplitRun(wc, p, black); + split_run_extents(wc, p, black); /* handle both parts again */ return p; }
1
0
0
0
Michael Stefaniuc : d3dx9_36: Remove ERR() on HeapAlloc failure for small sizes known at compile time.
by Alexandre Julliard
07 Feb '13
07 Feb '13
Module: wine Branch: master Commit: 20f1016bc86db024596ae166e08c8afda4a67c77 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=20f1016bc86db024596ae166e…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Thu Feb 7 12:56:27 2013 +0100 d3dx9_36: Remove ERR() on HeapAlloc failure for small sizes known at compile time. --- dlls/d3dx9_36/core.c | 3 --- dlls/d3dx9_36/effect.c | 25 ------------------------- dlls/d3dx9_36/line.c | 3 --- dlls/d3dx9_36/shader.c | 3 --- 4 files changed, 0 insertions(+), 34 deletions(-) diff --git a/dlls/d3dx9_36/core.c b/dlls/d3dx9_36/core.c index d322091..961f023 100644 --- a/dlls/d3dx9_36/core.c +++ b/dlls/d3dx9_36/core.c @@ -145,10 +145,7 @@ HRESULT WINAPI D3DXCreateBuffer(DWORD size, ID3DXBuffer **buffer) object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate buffer memory\n"); return E_OUTOFMEMORY; - } hr = d3dx9_buffer_init(object, size); if (FAILED(hr)) diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c index 1681ea2..4ef900e 100644 --- a/dlls/d3dx9_36/effect.c +++ b/dlls/d3dx9_36/effect.c @@ -4608,10 +4608,7 @@ static HRESULT d3dx9_parse_value(struct d3dx_parameter *param, void *value, cons sampler = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*sampler)); if (!sampler) - { - ERR("Out of memory\n"); return E_OUTOFMEMORY; - } hr = d3dx9_parse_sampler(sampler, data, ptr, objects); if (hr != D3D_OK) @@ -4913,7 +4910,6 @@ static HRESULT d3dx9_parse_effect_typedef(struct d3dx_parameter *param, const ch member = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*member)); if (!member) { - ERR("Out of memory\n"); hr = E_OUTOFMEMORY; goto err_out; } @@ -4949,7 +4945,6 @@ static HRESULT d3dx9_parse_effect_typedef(struct d3dx_parameter *param, const ch member = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*member)); if (!member) { - ERR("Out of memory\n"); hr = E_OUTOFMEMORY; goto err_out; } @@ -5037,10 +5032,7 @@ static HRESULT d3dx9_parse_state(struct d3dx_state *state, const char *data, con parameter = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*parameter)); if (!parameter) - { - ERR("Out of memory\n"); return E_OUTOFMEMORY; - } state->type = ST_CONSTANT; @@ -5132,7 +5124,6 @@ static HRESULT d3dx9_parse_effect_parameter(struct d3dx_parameter *param, const annotation = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*annotation)); if (!annotation) { - ERR("Out of memory\n"); hr = E_OUTOFMEMORY; goto err_out; } @@ -5207,7 +5198,6 @@ static HRESULT d3dx9_parse_effect_pass(struct d3dx_pass *pass, const char *data, annotation = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*annotation)); if (!annotation) { - ERR("Out of memory\n"); hr = E_OUTOFMEMORY; goto err_out; } @@ -5316,7 +5306,6 @@ static HRESULT d3dx9_parse_effect_technique(struct d3dx_technique *technique, co annotation = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*annotation)); if (!annotation) { - ERR("Out of memory\n"); hr = E_OUTOFMEMORY; goto err_out; } @@ -5349,7 +5338,6 @@ static HRESULT d3dx9_parse_effect_technique(struct d3dx_technique *technique, co pass = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*pass)); if (!pass) { - ERR("Out of memory\n"); hr = E_OUTOFMEMORY; goto err_out; } @@ -5570,7 +5558,6 @@ static HRESULT d3dx9_parse_effect(struct ID3DXBaseEffectImpl *base, const char * parameter = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*parameter)); if (!parameter) { - ERR("Out of memory\n"); hr = E_OUTOFMEMORY; goto err_out; } @@ -5603,7 +5590,6 @@ static HRESULT d3dx9_parse_effect(struct ID3DXBaseEffectImpl *base, const char * technique = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*technique)); if (!technique) { - ERR("Out of memory\n"); hr = E_OUTOFMEMORY; goto err_out; } @@ -5751,7 +5737,6 @@ static HRESULT d3dx9_effect_init(struct ID3DXEffectImpl *effect, struct IDirect3 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) { - ERR("Out of memory\n"); hr = E_OUTOFMEMORY; goto err_out; } @@ -5804,10 +5789,7 @@ HRESULT WINAPI D3DXCreateEffectEx(struct IDirect3DDevice9 *device, const void *s object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Out of memory\n"); return E_OUTOFMEMORY; - } hr = d3dx9_effect_init(object, device, srcdata, srcdatalen, pool); if (FAILED(hr)) @@ -5847,7 +5829,6 @@ static HRESULT d3dx9_effect_compiler_init(struct ID3DXEffectCompilerImpl *compil object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) { - ERR("Out of memory\n"); hr = E_OUTOFMEMORY; goto err_out; } @@ -5888,10 +5869,7 @@ HRESULT WINAPI D3DXCreateEffectCompiler(const char *srcdata, UINT srcdatalen, co object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Out of memory\n"); return E_OUTOFMEMORY; - } hr = d3dx9_effect_compiler_init(object, srcdata, srcdatalen); if (FAILED(hr)) @@ -5980,10 +5958,7 @@ HRESULT WINAPI D3DXCreateEffectPool(ID3DXEffectPool **pool) object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Out of memory\n"); return E_OUTOFMEMORY; - } object->ID3DXEffectPool_iface.lpVtbl = &ID3DXEffectPool_Vtbl; object->ref = 1; diff --git a/dlls/d3dx9_36/line.c b/dlls/d3dx9_36/line.c index e6cd3b0..1ec643a 100644 --- a/dlls/d3dx9_36/line.c +++ b/dlls/d3dx9_36/line.c @@ -339,10 +339,7 @@ HRESULT WINAPI D3DXCreateLine(struct IDirect3DDevice9 *device, struct ID3DXLine object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(ID3DXLineImpl)); if (!object) - { - ERR("Out of memory\n"); return E_OUTOFMEMORY; - } object->ID3DXLine_iface.lpVtbl = &ID3DXLine_Vtbl; object->ref = 1; diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c index a0d36e2..75bc9b5 100644 --- a/dlls/d3dx9_36/shader.c +++ b/dlls/d3dx9_36/shader.c @@ -1669,10 +1669,7 @@ HRESULT WINAPI D3DXGetShaderConstantTableEx(const DWORD *byte_code, DWORD flags, object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Out of memory\n"); return E_OUTOFMEMORY; - } object->ID3DXConstantTable_iface.lpVtbl = &ID3DXConstantTable_Vtbl; object->ref = 1;
1
0
0
0
Michael Stefaniuc : d3d9: Remove ERR() on HeapAlloc failure for small sizes known at compile time.
by Alexandre Julliard
07 Feb '13
07 Feb '13
Module: wine Branch: master Commit: d86ecd4bb4471590231b31e307d573518c8e398a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d86ecd4bb4471590231b31e30…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Thu Feb 7 12:55:34 2013 +0100 d3d9: Remove ERR() on HeapAlloc failure for small sizes known at compile time. --- dlls/d3d9/d3d9_main.c | 6 ------ dlls/d3d9/device.c | 25 ------------------------- dlls/d3d9/directx.c | 6 ------ dlls/d3d9/swapchain.c | 3 --- dlls/d3d9/vertexdeclaration.c | 3 --- 5 files changed, 0 insertions(+), 43 deletions(-) diff --git a/dlls/d3d9/d3d9_main.c b/dlls/d3d9/d3d9_main.c index 065a37e..ad2e330 100644 --- a/dlls/d3d9/d3d9_main.c +++ b/dlls/d3d9/d3d9_main.c @@ -40,10 +40,7 @@ IDirect3D9 * WINAPI DECLSPEC_HOTPATCH Direct3DCreate9(UINT sdk_version) TRACE("sdk_version %#x.\n", sdk_version); if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)))) - { - ERR("Failed to allocate d3d9 object memory.\n"); return NULL; - } if (!d3d9_init(object, FALSE)) { @@ -64,10 +61,7 @@ HRESULT WINAPI DECLSPEC_HOTPATCH Direct3DCreate9Ex(UINT sdk_version, IDirect3D9E TRACE("sdk_version %#x, d3d9ex %p.\n", sdk_version, d3d9ex); if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)))) - { - ERR("Failed to allocate d3d9 object memory.\n"); return E_OUTOFMEMORY; - } if (!d3d9_init(object, TRUE)) { diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 91543b5..7b53790 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -734,10 +734,7 @@ static HRESULT WINAPI d3d9_device_CreateTexture(IDirect3DDevice9Ex *iface, object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate texture memory.\n"); return D3DERR_OUTOFVIDEOMEMORY; - } hr = texture_init(object, device, width, height, levels, usage, format, pool); if (FAILED(hr)) @@ -781,10 +778,7 @@ static HRESULT WINAPI d3d9_device_CreateVolumeTexture(IDirect3DDevice9Ex *iface, object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate volume texture memory.\n"); return D3DERR_OUTOFVIDEOMEMORY; - } hr = volumetexture_init(object, device, width, height, depth, levels, usage, format, pool); if (FAILED(hr)) @@ -816,10 +810,7 @@ static HRESULT WINAPI d3d9_device_CreateCubeTexture(IDirect3DDevice9Ex *iface, object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate cube texture memory.\n"); return D3DERR_OUTOFVIDEOMEMORY; - } hr = cubetexture_init(object, device, edge_length, levels, usage, format, pool); if (FAILED(hr)) @@ -851,10 +842,7 @@ static HRESULT WINAPI d3d9_device_CreateVertexBuffer(IDirect3DDevice9Ex *iface, object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate buffer memory.\n"); return D3DERR_OUTOFVIDEOMEMORY; - } hr = vertexbuffer_init(object, device, size, usage, fvf, pool); if (FAILED(hr)) @@ -886,10 +874,7 @@ static HRESULT WINAPI d3d9_device_CreateIndexBuffer(IDirect3DDevice9Ex *iface, U object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate buffer memory.\n"); return D3DERR_OUTOFVIDEOMEMORY; - } hr = indexbuffer_init(object, device, size, usage, format, pool); if (FAILED(hr)) @@ -1559,10 +1544,7 @@ static HRESULT WINAPI d3d9_device_CreateStateBlock(IDirect3DDevice9Ex *iface, object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate stateblock memory.\n"); return E_OUTOFMEMORY; - } hr = stateblock_init(object, device, type, NULL); if (FAILED(hr)) @@ -1613,7 +1595,6 @@ static HRESULT WINAPI d3d9_device_EndStateBlock(IDirect3DDevice9Ex *iface, IDire object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) { - ERR("Failed to allocate stateblock memory.\n"); wined3d_mutex_lock(); wined3d_stateblock_decref(wined3d_stateblock); wined3d_mutex_unlock(); @@ -2413,10 +2394,7 @@ static HRESULT WINAPI d3d9_device_CreateVertexShader(IDirect3DDevice9Ex *iface, object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate vertex shader memory.\n"); return E_OUTOFMEMORY; - } hr = vertexshader_init(object, device, byte_code); if (FAILED(hr)) @@ -2896,10 +2874,7 @@ static HRESULT WINAPI d3d9_device_CreateQuery(IDirect3DDevice9Ex *iface, D3DQUER object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate query memory.\n"); return E_OUTOFMEMORY; - } hr = query_init(object, device, type); if (FAILED(hr)) diff --git a/dlls/d3d9/directx.c b/dlls/d3d9/directx.c index a97ff57..a335375 100644 --- a/dlls/d3d9/directx.c +++ b/dlls/d3d9/directx.c @@ -456,10 +456,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_CreateDevice(IDirect3D9Ex *iface, U object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate device memory.\n"); return E_OUTOFMEMORY; - } hr = device_init(object, d3d9, d3d9->wined3d, adapter, device_type, focus_window, flags, parameters, NULL); if (FAILED(hr)) @@ -567,10 +564,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_CreateDeviceEx(IDirect3D9Ex *iface, object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate device memory.\n"); return E_OUTOFMEMORY; - } hr = device_init(object, d3d9, d3d9->wined3d, adapter, device_type, focus_window, flags, parameters, mode); if (FAILED(hr)) diff --git a/dlls/d3d9/swapchain.c b/dlls/d3d9/swapchain.c index 3b32346..8177336 100644 --- a/dlls/d3d9/swapchain.c +++ b/dlls/d3d9/swapchain.c @@ -278,10 +278,7 @@ HRESULT d3d9_swapchain_create(struct d3d9_device *device, struct wined3d_swapcha HRESULT hr; if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)))) - { - ERR("Failed to allocate swapchain memory.\n"); return E_OUTOFMEMORY; - } if (FAILED(hr = swapchain_init(object, device, desc))) { diff --git a/dlls/d3d9/vertexdeclaration.c b/dlls/d3d9/vertexdeclaration.c index 4fe1189..502b7d3 100644 --- a/dlls/d3d9/vertexdeclaration.c +++ b/dlls/d3d9/vertexdeclaration.c @@ -419,10 +419,7 @@ HRESULT d3d9_vertex_declaration_create(struct d3d9_device *device, object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate vertex declaration memory.\n"); return E_OUTOFMEMORY; - } hr = vertexdeclaration_init(object, device, elements); if (FAILED(hr))
1
0
0
0
Michael Stefaniuc : d3d8: Remove ERR() on HeapAlloc failure for small sizes known at compile time.
by Alexandre Julliard
07 Feb '13
07 Feb '13
Module: wine Branch: master Commit: 14c3895573f0a7038e52dd810aa1641d2001dc9b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=14c3895573f0a7038e52dd810…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Thu Feb 7 12:52:40 2013 +0100 d3d8: Remove ERR() on HeapAlloc failure for small sizes known at compile time. --- dlls/d3d8/d3d8_main.c | 3 --- dlls/d3d8/device.c | 22 ---------------------- dlls/d3d8/directx.c | 3 --- dlls/d3d8/shader.c | 3 --- dlls/d3d8/swapchain.c | 3 --- 5 files changed, 0 insertions(+), 34 deletions(-) diff --git a/dlls/d3d8/d3d8_main.c b/dlls/d3d8/d3d8_main.c index 3405447..d03bcba 100644 --- a/dlls/d3d8/d3d8_main.c +++ b/dlls/d3d8/d3d8_main.c @@ -42,10 +42,7 @@ IDirect3D8 * WINAPI DECLSPEC_HOTPATCH Direct3DCreate8(UINT sdk_version) TRACE("sdk_version %#x.\n", sdk_version); if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)))) - { - ERR("Failed to allocate d3d8 object memory.\n"); return NULL; - } if (!d3d8_init(object)) { diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index d9c337a..a94d3bd 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -723,10 +723,7 @@ static HRESULT WINAPI d3d8_device_CreateTexture(IDirect3DDevice8 *iface, object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate texture memory.\n"); return D3DERR_OUTOFVIDEOMEMORY; - } hr = texture_init(object, device, width, height, levels, usage, format, pool); if (FAILED(hr)) @@ -755,10 +752,7 @@ static HRESULT WINAPI d3d8_device_CreateVolumeTexture(IDirect3DDevice8 *iface, object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate volume texture memory.\n"); return D3DERR_OUTOFVIDEOMEMORY; - } hr = volumetexture_init(object, device, width, height, depth, levels, usage, format, pool); if (FAILED(hr)) @@ -786,10 +780,7 @@ static HRESULT WINAPI d3d8_device_CreateCubeTexture(IDirect3DDevice8 *iface, UIN object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate cube texture memory.\n"); return D3DERR_OUTOFVIDEOMEMORY; - } hr = cubetexture_init(object, device, edge_length, levels, usage, format, pool); if (FAILED(hr)) @@ -817,10 +808,7 @@ static HRESULT WINAPI d3d8_device_CreateVertexBuffer(IDirect3DDevice8 *iface, UI object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate buffer memory.\n"); return D3DERR_OUTOFVIDEOMEMORY; - } hr = vertexbuffer_init(object, device, size, usage, fvf, pool); if (FAILED(hr)) @@ -848,10 +836,7 @@ static HRESULT WINAPI d3d8_device_CreateIndexBuffer(IDirect3DDevice8 *iface, UIN object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate buffer memory.\n"); return D3DERR_OUTOFVIDEOMEMORY; - } hr = indexbuffer_init(object, device, size, usage, format, pool); if (FAILED(hr)) @@ -2150,7 +2135,6 @@ static HRESULT WINAPI d3d8_device_CreateVertexShader(IDirect3DDevice8 *iface, object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) { - ERR("Failed to allocate vertex shader memory.\n"); *shader = 0; return E_OUTOFMEMORY; } @@ -2216,10 +2200,7 @@ static struct d3d8_vertex_declaration *d3d8_device_get_fvf_declaration(struct d3 TRACE("not found. Creating and inserting at position %d.\n", low); if (!(d3d8_declaration = HeapAlloc(GetProcessHeap(), 0, sizeof(*d3d8_declaration)))) - { - ERR("Memory allocation failed.\n"); return NULL; - } if (FAILED(hr = d3d8_vertex_declaration_init_fvf(d3d8_declaration, device, fvf))) { @@ -2532,10 +2513,7 @@ static HRESULT WINAPI d3d8_device_CreatePixelShader(IDirect3DDevice8 *iface, object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate pixel shader memmory.\n"); return E_OUTOFMEMORY; - } wined3d_mutex_lock(); handle = d3d8_allocate_handle(&device->handle_table, object, D3D8_HANDLE_PS); diff --git a/dlls/d3d8/directx.c b/dlls/d3d8/directx.c index 4070b3e..61d187d 100644 --- a/dlls/d3d8/directx.c +++ b/dlls/d3d8/directx.c @@ -364,10 +364,7 @@ static HRESULT WINAPI d3d8_CreateDevice(IDirect3D8 *iface, UINT adapter, object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate device memory.\n"); return E_OUTOFMEMORY; - } hr = device_init(object, d3d8, d3d8->wined3d, adapter, device_type, focus_window, flags, parameters); if (FAILED(hr)) diff --git a/dlls/d3d8/shader.c b/dlls/d3d8/shader.c index db36120..f7096bb 100644 --- a/dlls/d3d8/shader.c +++ b/dlls/d3d8/shader.c @@ -61,10 +61,7 @@ static HRESULT d3d8_vertexshader_create_vertexdeclaration(struct d3d8_device *de object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Memory allocation failed.\n"); return E_OUTOFMEMORY; - } hr = d3d8_vertex_declaration_init(object, device, declaration, shader_handle); if (FAILED(hr)) diff --git a/dlls/d3d8/swapchain.c b/dlls/d3d8/swapchain.c index 6686c0f..e9f4976 100644 --- a/dlls/d3d8/swapchain.c +++ b/dlls/d3d8/swapchain.c @@ -183,10 +183,7 @@ HRESULT d3d8_swapchain_create(struct d3d8_device *device, struct wined3d_swapcha HRESULT hr; if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)))) - { - ERR("Failed to allocate swapchain memory.\n"); return E_OUTOFMEMORY; - } if (FAILED(hr = swapchain_init(object, device, desc))) {
1
0
0
0
Michael Stefaniuc : d3d10core: Remove ERR() on HeapAlloc failure for small sizes known at compile time.
by Alexandre Julliard
07 Feb '13
07 Feb '13
Module: wine Branch: master Commit: 1eff4669ff70ee74ed9b6d5237c9533ae1e5a54c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1eff4669ff70ee74ed9b6d523…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Thu Feb 7 12:50:28 2013 +0100 d3d10core: Remove ERR() on HeapAlloc failure for small sizes known at compile time. --- dlls/d3d10core/device.c | 45 --------------------------------------------- 1 files changed, 0 insertions(+), 45 deletions(-) diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c index c45ebd8..f7b906d 100644 --- a/dlls/d3d10core/device.c +++ b/dlls/d3d10core/device.c @@ -1068,10 +1068,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateBuffer(ID3D10Device *iface, object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate D3D10 buffer object memory\n"); return E_OUTOFMEMORY; - } hr = d3d10_buffer_init(object, This, desc, data); if (FAILED(hr)) @@ -1108,10 +1105,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateTexture2D(ID3D10Device *ifac object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate D3D10 texture2d object memory\n"); return E_OUTOFMEMORY; - } hr = d3d10_texture2d_init(object, This, desc); if (FAILED(hr)) @@ -1140,10 +1134,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateTexture3D(ID3D10Device *ifac object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate D3D10 texture3d object memory.\n"); return E_OUTOFMEMORY; - } hr = d3d10_texture3d_init(object, device, desc); if (FAILED(hr)) @@ -1169,10 +1160,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateShaderResourceView(ID3D10Dev object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate D3D10 shader resource view object memory.\n"); return E_OUTOFMEMORY; - } if (FAILED(hr = d3d10_shader_resource_view_init(object, resource, desc))) { @@ -1197,10 +1185,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateRenderTargetView(ID3D10Devic object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate D3D10 rendertarget view object memory\n"); return E_OUTOFMEMORY; - } hr = d3d10_rendertarget_view_init(object, resource, desc); if (FAILED(hr)) @@ -1226,10 +1211,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateDepthStencilView(ID3D10Devic object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate D3D10 depthstencil view object memory.\n"); return E_OUTOFMEMORY; - } if (FAILED(hr = d3d10_depthstencil_view_init(object, resource, desc))) { @@ -1260,10 +1242,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateInputLayout(ID3D10Device *if object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate D3D10 input layout object memory\n"); return E_OUTOFMEMORY; - } hr = d3d10_input_layout_init(object, This, element_descs, element_count, shader_byte_code, shader_byte_code_length); @@ -1292,10 +1271,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateVertexShader(ID3D10Device *i object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate D3D10 vertex shader object memory\n"); return E_OUTOFMEMORY; - } hr = d3d10_vertex_shader_init(object, This, byte_code, byte_code_length); if (FAILED(hr)) @@ -1323,10 +1299,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateGeometryShader(ID3D10Device object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate D3D10 geometry shader object memory\n"); return E_OUTOFMEMORY; - } hr = d3d10_geometry_shader_init(object, This, byte_code, byte_code_length); if (FAILED(hr)) @@ -1366,10 +1339,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreatePixelShader(ID3D10Device *if object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate D3D10 pixel shader object memory\n"); return E_OUTOFMEMORY; - } hr = d3d10_pixel_shader_init(object, This, byte_code, byte_code_length); if (FAILED(hr)) @@ -1411,10 +1381,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateBlendState(ID3D10Device *ifa object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate D3D10 blend state object memory.\n"); return E_OUTOFMEMORY; - } if (FAILED(hr = d3d10_blend_state_init(object, device, desc))) { @@ -1455,10 +1422,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateDepthStencilState(ID3D10Devi object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate D3D10 depthstencil state object memory.\n"); return E_OUTOFMEMORY; - } if (FAILED(hr = d3d10_depthstencil_state_init(object, device, desc))) { @@ -1500,10 +1464,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateRasterizerState(ID3D10Device object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate D3D10 rasterizer state object memory.\n"); return E_OUTOFMEMORY; - } if (FAILED(hr = d3d10_rasterizer_state_init(object, device, desc))) { @@ -1544,10 +1505,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateSamplerState(ID3D10Device *i object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate D3D10 sampler state object memory.\n"); return E_OUTOFMEMORY; - } if (FAILED(hr = d3d10_sampler_state_init(object, device, desc))) { @@ -1572,10 +1530,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateQuery(ID3D10Device *iface, object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) - { - ERR("Failed to allocate D3D10 query object memory.\n"); return E_OUTOFMEMORY; - } hr = d3d10_query_init(object); if (FAILED(hr))
1
0
0
0
Ken Thomases : winemac: Process clicks in an inactive window in addition to activating it.
by Alexandre Julliard
07 Feb '13
07 Feb '13
Module: wine Branch: master Commit: 033fe9a7c2bf1722c3cd2596dfcd78510ada12a9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=033fe9a7c2bf1722c3cd2596d…
Author: Ken Thomases <ken(a)codeweavers.com> Date: Wed Feb 6 19:32:30 2013 -0600 winemac: Process clicks in an inactive window in addition to activating it. --- dlls/winemac.drv/cocoa_window.m | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m index c7739a4..bd6f086 100644 --- a/dlls/winemac.drv/cocoa_window.m +++ b/dlls/winemac.drv/cocoa_window.m @@ -216,6 +216,11 @@ static inline void fix_generic_modifiers_by_device(NSUInteger* modifiers) [[self window] rightMouseDown:theEvent]; } + - (BOOL) acceptsFirstMouse:(NSEvent*)theEvent + { + return YES; + } + @end
1
0
0
0
Ken Thomases : winemac: Implement MOUSE_MOVED(_ABSOLUTE) events.
by Alexandre Julliard
07 Feb '13
07 Feb '13
Module: wine Branch: master Commit: 572324bae3eb0a1338444f7128ffe2e899740154 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=572324bae3eb0a1338444f712…
Author: Ken Thomases <ken(a)codeweavers.com> Date: Wed Feb 6 19:32:26 2013 -0600 winemac: Implement MOUSE_MOVED(_ABSOLUTE) events. --- dlls/winemac.drv/cocoa_event.m | 30 +++++++++++++++++- dlls/winemac.drv/cocoa_window.h | 3 ++ dlls/winemac.drv/cocoa_window.m | 64 +++++++++++++++++++++++++++++++++++++++ dlls/winemac.drv/event.c | 12 +++++++ dlls/winemac.drv/macdrv.h | 1 + dlls/winemac.drv/macdrv_cocoa.h | 7 ++++ dlls/winemac.drv/mouse.c | 22 +++++++++++++ 7 files changed, 138 insertions(+), 1 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=572324bae3eb0a1338444…
1
0
0
0
Ken Thomases : winemac: Add WineApplication methods to convert from Cocoa to Win32 coordinate space .
by Alexandre Julliard
07 Feb '13
07 Feb '13
Module: wine Branch: master Commit: 6289a612ae6bbe0fcd07d7a3c8ff802db10fc5c6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6289a612ae6bbe0fcd07d7a3c…
Author: Ken Thomases <ken(a)codeweavers.com> Date: Wed Feb 6 19:32:22 2013 -0600 winemac: Add WineApplication methods to convert from Cocoa to Win32 coordinate space. Cocoa coordinate space has its origin in the lower left of the primary screen and y increases up. --- dlls/winemac.drv/cocoa_app.h | 3 +++ dlls/winemac.drv/cocoa_app.m | 31 +++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 0 deletions(-) diff --git a/dlls/winemac.drv/cocoa_app.h b/dlls/winemac.drv/cocoa_app.h index 2ccaec9..1166087 100644 --- a/dlls/winemac.drv/cocoa_app.h +++ b/dlls/winemac.drv/cocoa_app.h @@ -43,6 +43,9 @@ CGEventSourceKeyboardType keyboardType; NSEvent* lastFlagsChanged; + + CGFloat primaryScreenHeight; + BOOL primaryScreenHeightValid; } @property (nonatomic) CGEventSourceKeyboardType keyboardType; diff --git a/dlls/winemac.drv/cocoa_app.m b/dlls/winemac.drv/cocoa_app.m index 3853ec9..ae2353b 100644 --- a/dlls/winemac.drv/cocoa_app.m +++ b/dlls/winemac.drv/cocoa_app.m @@ -225,6 +225,32 @@ int macdrv_err_on; } } + - (CGFloat) primaryScreenHeight + { + if (!primaryScreenHeightValid) + { + NSArray* screens = [NSScreen screens]; + if ([screens count]) + { + primaryScreenHeight = NSHeight([[screens objectAtIndex:0] frame]); + primaryScreenHeightValid = TRUE; + } + else + return 1280; /* arbitrary value */ + } + + return primaryScreenHeight; + } + + - (NSPoint) flippedMouseLocation:(NSPoint)point + { + /* This relies on the fact that Cocoa's mouse location points are + actually off by one (precisely because they were flipped from + Quartz screen coordinates using this same technique). */ + point.y = [self primaryScreenHeight] - point.y; + return point; + } + /* * ---------- NSApplication method overrides ---------- @@ -241,6 +267,11 @@ int macdrv_err_on; /* * ---------- NSApplicationDelegate methods ---------- */ + - (void)applicationDidChangeScreenParameters:(NSNotification *)notification + { + primaryScreenHeightValid = FALSE; + } + - (void)applicationDidResignActive:(NSNotification *)notification { macdrv_event event;
1
0
0
0
← Newer
1
...
36
37
38
39
40
41
42
...
46
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
Results per page:
10
25
50
100
200