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
March 2021
----- 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
1163 discussions
Start a n
N
ew thread
Huw Davies : riched20: Add support for ENM_SCROLLEVENTS.
by Alexandre Julliard
30 Mar '21
30 Mar '21
Module: wine Branch: master Commit: de1398ef3817a8d3424c7834a27519f034939725 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=de1398ef3817a8d3424c7834…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Mar 30 12:36:49 2021 +0100 riched20: Add support for ENM_SCROLLEVENTS. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=35650
Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/txthost.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/riched20/txthost.c b/dlls/riched20/txthost.c index a7b91716dab..6d2221e4d69 100644 --- a/dlls/riched20/txthost.c +++ b/dlls/riched20/txthost.c @@ -1097,7 +1097,8 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam, } if ((((host->event_mask & ENM_KEYEVENTS) && msg >= WM_KEYFIRST && msg <= WM_KEYLAST) || - ((host->event_mask & ENM_MOUSEEVENTS) && msg >= WM_MOUSEFIRST && msg <= WM_MOUSELAST)) && + ((host->event_mask & ENM_MOUSEEVENTS) && msg >= WM_MOUSEFIRST && msg <= WM_MOUSELAST) || + ((host->event_mask & ENM_SCROLLEVENTS) && msg >= WM_HSCROLL && msg <= WM_VSCROLL)) && send_msg_filter( host, msg, &wparam, &lparam )) { TRACE( "exit (filtered) hwnd %p msg %04x (%s) %lx %lx -> %lu\n",
1
0
0
0
Huw Davies : riched20: Remove SendOldNotify() helper.
by Alexandre Julliard
30 Mar '21
30 Mar '21
Module: wine Branch: master Commit: 03c2fca74ac7519f5cca8c78bd9febb459e7a101 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=03c2fca74ac7519f5cca8c78…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Mar 30 12:36:48 2021 +0100 riched20: Remove SendOldNotify() helper. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/editor.c | 9 ++------- dlls/riched20/editor.h | 1 - dlls/riched20/paint.c | 4 ++-- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index dccc431f041..fe05d1e7444 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -3939,7 +3939,7 @@ LRESULT editor_handle_message( ME_TextEditor *editor, UINT msg, WPARAM wParam, editor->bHaveFocus = TRUE; create_caret(editor); update_caret(editor); - ME_SendOldNotify(editor, EN_SETFOCUS); + ITextHost_TxNotify( editor->texthost, EN_SETFOCUS, NULL ); if (!editor->bHideSelection && (editor->props & TXTBIT_HIDESELECTION)) ME_InvalidateSelection( editor ); return 0; @@ -3949,7 +3949,7 @@ LRESULT editor_handle_message( ME_TextEditor *editor, UINT msg, WPARAM wParam, editor->wheel_remain = 0; hide_caret(editor); DestroyCaret(); - ME_SendOldNotify(editor, EN_KILLFOCUS); + ITextHost_TxNotify( editor->texthost, EN_KILLFOCUS, NULL ); if (!editor->bHideSelection && (editor->props & TXTBIT_HIDESELECTION)) ME_InvalidateSelection( editor ); return 0; @@ -4244,11 +4244,6 @@ LRESULT editor_handle_message( ME_TextEditor *editor, UINT msg, WPARAM wParam, return 0L; } -void ME_SendOldNotify(ME_TextEditor *editor, int nCode) -{ - ITextHost_TxNotify(editor->texthost, nCode, NULL); -} - /* Fill buffer with srcChars unicode characters from the start cursor. * * buffer: destination buffer diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h index fa1e22f9b48..d0274de409d 100644 --- a/dlls/riched20/editor.h +++ b/dlls/riched20/editor.h @@ -274,7 +274,6 @@ ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10) DECLSP void ME_DestroyEditor(ME_TextEditor *editor) DECLSPEC_HIDDEN; LRESULT editor_handle_message( ME_TextEditor *editor, UINT msg, WPARAM wParam, LPARAM lParam, HRESULT* phresult ) DECLSPEC_HIDDEN; -void ME_SendOldNotify(ME_TextEditor *editor, int nCode) DECLSPEC_HIDDEN; int ME_GetTextW(ME_TextEditor *editor, WCHAR *buffer, int buflen, const ME_Cursor *start, int srcChars, BOOL bCRLF, BOOL bEOP) DECLSPEC_HIDDEN; void ME_RTFCharAttrHook(struct _RTF_Info *info) DECLSPEC_HIDDEN; diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c index 550c3c97045..f991b2bebcf 100644 --- a/dlls/riched20/paint.c +++ b/dlls/riched20/paint.c @@ -141,7 +141,7 @@ void ME_UpdateRepaint(ME_TextEditor *editor, BOOL update_now) update_caret( editor ); if (!editor->bEmulateVersion10 || (editor->nEventMask & ENM_UPDATE)) - ME_SendOldNotify( editor, EN_UPDATE ); + ITextHost_TxNotify( editor->texthost, EN_UPDATE, NULL ); ITextHost_TxViewChange(editor->texthost, update_now); @@ -150,7 +150,7 @@ void ME_UpdateRepaint(ME_TextEditor *editor, BOOL update_now) if(editor->nEventMask & ENM_CHANGE) { editor->nEventMask &= ~ENM_CHANGE; - ME_SendOldNotify(editor, EN_CHANGE); + ITextHost_TxNotify( editor->texthost, EN_CHANGE, NULL ); editor->nEventMask |= ENM_CHANGE; } }
1
0
0
0
Huw Davies : riched20: Add support for EN_[HV]SCROLL notifications.
by Alexandre Julliard
30 Mar '21
30 Mar '21
Module: wine Branch: master Commit: 08c4de06a1acb6109e665ab40218d88b2680c0d7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=08c4de06a1acb6109e665ab4…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Mar 30 12:36:47 2021 +0100 riched20: Add support for EN_[HV]SCROLL notifications. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/editor.c | 20 +++++++------- dlls/riched20/editor.h | 6 ++--- dlls/riched20/paint.c | 47 +++++++++++++++++--------------- dlls/riched20/richole.c | 2 +- dlls/riched20/tests/txtsrv.c | 64 +++++++++++++++++++++++++++++++++++++++++--- 5 files changed, 99 insertions(+), 40 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=08c4de06a1acb6109e66…
1
0
0
0
Nikolay Sivov : dwrite: Build with msvcrt.
by Alexandre Julliard
30 Mar '21
30 Mar '21
Module: wine Branch: master Commit: db516804cca24fc7feedbc58ad7d2ccd4055687a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=db516804cca24fc7feedbc58…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Mar 30 14:06:18 2021 +0300 dwrite: Build with msvcrt. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/Makefile.in | 2 + dlls/dwrite/analyzer.c | 9 +-- dlls/dwrite/bidi.c | 2 +- dlls/dwrite/dwrite_private.h | 5 +- dlls/dwrite/font.c | 140 +++++++++++++++++++++++-------------------- dlls/dwrite/freetype.c | 6 +- dlls/dwrite/layout.c | 51 ++++++++-------- dlls/dwrite/main.c | 40 ++++++------- dlls/dwrite/opentype.c | 47 ++++++++------- dlls/dwrite/shape.c | 4 +- 10 files changed, 163 insertions(+), 143 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=db516804cca24fc7feed…
1
0
0
0
Nikolay Sivov : dwrite/layout: Reuse glyph origins calculation helper to get run boxes.
by Alexandre Julliard
30 Mar '21
30 Mar '21
Module: wine Branch: master Commit: f4d84acf26d9e1de0a7ea59f7200fca536fc58ee URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f4d84acf26d9e1de0a7ea59f…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Mar 30 14:06:17 2021 +0300 dwrite/layout: Reuse glyph origins calculation helper to get run boxes. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/layout.c | 49 +++++++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index 06ebcb8057c..eb6280d7fc1 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -3925,33 +3925,45 @@ static void layout_get_erun_bbox(struct dwrite_textlayout *layout, struct layout { const struct regular_layout_run *regular = &run->run->u.regular; UINT32 start_glyph = regular->clustermap[run->start]; - const DWRITE_GLYPH_RUN *glyph_run = ®ular->run; - D2D1_POINT_2F origin = { 0 }; - float rtl_factor; - UINT32 i; + D2D1_POINT_2F baseline_origin = { 0 }, *origins; + DWRITE_GLYPH_RUN glyph_run; + unsigned int i; + HRESULT hr; if (run->bbox.top == run->bbox.bottom) { struct dwrite_glyphbitmap glyph_bitmap; RECT *bbox; + glyph_run = regular->run; + glyph_run.glyphCount = run->glyphcount; + glyph_run.glyphIndices = ®ular->run.glyphIndices[start_glyph]; + glyph_run.glyphAdvances = ®ular->run.glyphAdvances[start_glyph]; + glyph_run.glyphOffsets = ®ular->run.glyphOffsets[start_glyph]; + memset(&glyph_bitmap, 0, sizeof(glyph_bitmap)); - glyph_bitmap.key = glyph_run->fontFace; - glyph_bitmap.simulations = IDWriteFontFace_GetSimulations(glyph_run->fontFace); - glyph_bitmap.emsize = glyph_run->fontEmSize; + glyph_bitmap.key = glyph_run.fontFace; + glyph_bitmap.simulations = IDWriteFontFace_GetSimulations(glyph_run.fontFace); + glyph_bitmap.emsize = glyph_run.fontEmSize; glyph_bitmap.nohint = layout->measuringmode == DWRITE_MEASURING_MODE_NATURAL; bbox = &glyph_bitmap.bbox; - rtl_factor = glyph_run->bidiLevel & 1 ? -1.0f : 1.0f; - for (i = 0; i < run->glyphcount; i++) { - D2D1_RECT_F glyph_bbox; + if (!(origins = heap_calloc(glyph_run.glyphCount, sizeof(*origins)))) + return; - /* FIXME: take care of vertical/rtl */ - if (glyph_run->bidiLevel & 1) - origin.x -= glyph_run->glyphAdvances[i + start_glyph]; + if (FAILED(hr = compute_glyph_origins(&glyph_run, layout->measuringmode, baseline_origin, &layout->transform, origins))) + { + WARN("Failed to compute glyph origins, hr %#x.\n", hr); + heap_free(origins); + return; + } - glyph_bitmap.glyph = glyph_run->glyphIndices[i + start_glyph]; + for (i = 0; i < glyph_run.glyphCount; ++i) + { + D2D1_RECT_F glyph_bbox; + + glyph_bitmap.glyph = glyph_run.glyphIndices[i]; dwrite_fontface_get_glyph_bbox(&glyph_bitmap); glyph_bbox.left = bbox->left; @@ -3959,14 +3971,11 @@ static void layout_get_erun_bbox(struct dwrite_textlayout *layout, struct layout glyph_bbox.right = bbox->right; glyph_bbox.bottom = bbox->bottom; - d2d_rect_offset(&glyph_bbox, origin.x + rtl_factor * glyph_run->glyphOffsets[i + start_glyph].advanceOffset, - origin.y - glyph_run->glyphOffsets[i + start_glyph].ascenderOffset); - + d2d_rect_offset(&glyph_bbox, origins[i].x, origins[i].y); d2d_rect_union(&run->bbox, &glyph_bbox); + } - if (!(glyph_run->bidiLevel & 1)) - origin.x += glyph_run->glyphAdvances[i + start_glyph]; - } + heap_free(origins); } *bbox = run->bbox;
1
0
0
0
Nikolay Sivov : dwrite: Explicitly cast to signed type for abs().
by Alexandre Julliard
30 Mar '21
30 Mar '21
Module: wine Branch: master Commit: 69cfb81b2916210ba3c7fc4a8f49613af29ab1f8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=69cfb81b2916210ba3c7fc4a…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Mar 30 14:06:16 2021 +0300 dwrite: Explicitly cast to signed type for abs(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/font.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 2fd6ad90f1f..68d3b1256ea 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -3910,16 +3910,17 @@ static BOOL font_apply_differentiation_rules(struct dwrite_font_data *font, WCHA weight = font_extract_weight(&tokens, font->weight, &weight_name); /* resolve weight */ - if (weight != font->weight) { + if (weight != font->weight) + { if (!(weight < DWRITE_FONT_WEIGHT_NORMAL && font->weight < DWRITE_FONT_WEIGHT_NORMAL) && !(weight > DWRITE_FONT_WEIGHT_MEDIUM && font->weight > DWRITE_FONT_WEIGHT_MEDIUM) && !((weight == DWRITE_FONT_WEIGHT_NORMAL && font->weight == DWRITE_FONT_WEIGHT_MEDIUM) || (weight == DWRITE_FONT_WEIGHT_MEDIUM && font->weight == DWRITE_FONT_WEIGHT_NORMAL)) && - !(abs(weight - font->weight) <= 150 && + !(abs((int)weight - (int)font->weight) <= 150 && font->weight != DWRITE_FONT_WEIGHT_NORMAL && font->weight != DWRITE_FONT_WEIGHT_MEDIUM && - font->weight != DWRITE_FONT_WEIGHT_BOLD)) { - + font->weight != DWRITE_FONT_WEIGHT_BOLD)) + { font->weight = weight; } }
1
0
0
0
Nikolay Sivov : dwrite: Move outline dumping helpers.
by Alexandre Julliard
30 Mar '21
30 Mar '21
Module: wine Branch: master Commit: 8bcdac04a83c9e28e63bfd2dd03c5b9a1a84a46d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8bcdac04a83c9e28e63bfd2d…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Mar 30 14:06:15 2021 +0300 dwrite: Move outline dumping helpers. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/dwrite_private.h | 10 +++++----- dlls/dwrite/font.c | 27 --------------------------- dlls/dwrite/freetype.c | 27 +++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 32 deletions(-) diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index 8536e3c6a36..2408251717b 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -97,7 +97,11 @@ static inline BOOL dwrite_array_reserve(void **elements, size_t *capacity, size_ if (new_capacity < count) new_capacity = max_capacity; - if (!(new_elements = heap_realloc(*elements, new_capacity * size))) + if (!*elements) + new_elements = RtlAllocateHeap(GetProcessHeap(), 0, new_capacity * size); + else + new_elements = RtlReAllocateHeap(GetProcessHeap(), 0, *elements, new_capacity * size); + if (!new_elements) return FALSE; *elements = new_elements; @@ -481,10 +485,6 @@ struct dwrite_outline } points; }; -extern int dwrite_outline_push_tag(struct dwrite_outline *outline, unsigned char tag) DECLSPEC_HIDDEN; -extern int dwrite_outline_push_points(struct dwrite_outline *outline, const D2D1_POINT_2F *points, - unsigned int count) DECLSPEC_HIDDEN; - /* Glyph shaping */ enum SCRIPT_JUSTIFY { diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 57c64e4622d..2fd6ad90f1f 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -832,33 +832,6 @@ static void WINAPI dwritefontface_ReleaseFontTable(IDWriteFontFace5 *iface, void IDWriteFontFileStream_ReleaseFileFragment(fontface->stream, table_context); } -int dwrite_outline_push_tag(struct dwrite_outline *outline, unsigned char tag) -{ - if (!dwrite_array_reserve((void **)&outline->tags.values, &outline->tags.size, outline->tags.count + 1, - sizeof(*outline->tags.values))) - { - return 1; - } - - outline->tags.values[outline->tags.count++] = tag; - - return 0; -} - -int dwrite_outline_push_points(struct dwrite_outline *outline, const D2D1_POINT_2F *points, unsigned int count) -{ - if (!dwrite_array_reserve((void **)&outline->points.values, &outline->points.size, outline->points.count + count, - sizeof(*outline->points.values))) - { - return 1; - } - - memcpy(&outline->points.values[outline->points.count], points, sizeof(*points) * count); - outline->points.count += count; - - return 0; -} - static void apply_outline_point_offset(const D2D1_POINT_2F *src, const D2D1_POINT_2F *offset, D2D1_POINT_2F *dst) { diff --git a/dlls/dwrite/freetype.c b/dlls/dwrite/freetype.c index efa0f24d96c..128388c9c86 100644 --- a/dlls/dwrite/freetype.c +++ b/dlls/dwrite/freetype.c @@ -267,6 +267,33 @@ static inline void ft_vector_to_d2d_point(const FT_Vector *v, D2D1_POINT_2F *p) p->y = v->y / 64.0f; } +static int dwrite_outline_push_tag(struct dwrite_outline *outline, unsigned char tag) +{ + if (!dwrite_array_reserve((void **)&outline->tags.values, &outline->tags.size, outline->tags.count + 1, + sizeof(*outline->tags.values))) + { + return 1; + } + + outline->tags.values[outline->tags.count++] = tag; + + return 0; +} + +static int dwrite_outline_push_points(struct dwrite_outline *outline, const D2D1_POINT_2F *points, unsigned int count) +{ + if (!dwrite_array_reserve((void **)&outline->points.values, &outline->points.size, outline->points.count + count, + sizeof(*outline->points.values))) + { + return 1; + } + + memcpy(&outline->points.values[outline->points.count], points, sizeof(*points) * count); + outline->points.count += count; + + return 0; +} + static int decompose_beginfigure(struct decompose_context *ctxt) { D2D1_POINT_2F point;
1
0
0
0
Alexandre Julliard : include: Add more SYSTEM_INFORMATION_CLASS definitions.
by Alexandre Julliard
30 Mar '21
30 Mar '21
Module: wine Branch: master Commit: afaf35b9e1a14ea5aeec2221cc96cd5ccdebc716 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=afaf35b9e1a14ea5aeec2221…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Mar 30 13:23:13 2021 +0200 include: Add more SYSTEM_INFORMATION_CLASS definitions. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/info.c | 10 +-- dlls/ntdll/tests/time.c | 2 +- dlls/ntdll/time.c | 2 +- dlls/ntdll/unix/system.c | 4 +- include/winternl.h | 198 +++++++++++++++++++++++++++++++++++++------- programs/taskmgr/perfdata.c | 2 +- 6 files changed, 179 insertions(+), 39 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=afaf35b9e1a14ea5aeec…
1
0
0
0
Paul Gofman : kernel32: Implement GetSystemCpuSetInformation().
by Alexandre Julliard
30 Mar '21
30 Mar '21
Module: wine Branch: master Commit: f2ac82b866a76648e0ee4bb46c35f00f8583c5e3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f2ac82b866a76648e0ee4bb4…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Tue Mar 30 13:37:40 2021 +0300 kernel32: Implement GetSystemCpuSetInformation(). Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- .../api-ms-win-core-processthreads-l1-1-3.spec | 2 +- dlls/kernel32/kernel32.spec | 1 + dlls/kernel32/tests/process.c | 66 ++++++++++++++++++++++ dlls/kernelbase/kernelbase.spec | 2 +- dlls/kernelbase/memory.c | 16 ++++++ include/winbase.h | 1 + 6 files changed, 86 insertions(+), 2 deletions(-) diff --git a/dlls/api-ms-win-core-processthreads-l1-1-3/api-ms-win-core-processthreads-l1-1-3.spec b/dlls/api-ms-win-core-processthreads-l1-1-3/api-ms-win-core-processthreads-l1-1-3.spec index 9cc853d2884..8f2daaefe74 100644 --- a/dlls/api-ms-win-core-processthreads-l1-1-3/api-ms-win-core-processthreads-l1-1-3.spec +++ b/dlls/api-ms-win-core-processthreads-l1-1-3/api-ms-win-core-processthreads-l1-1-3.spec @@ -1,6 +1,6 @@ @ stub GetProcessDefaultCpuSets @ stub GetProcessInformation -@ stub GetSystemCpuSetInformation +@ stdcall GetSystemCpuSetInformation(ptr long ptr ptr long) kernel32.GetSystemCpuSetInformation @ stdcall GetThreadDescription(long ptr) kernel32.GetThreadDescription @ stub GetThreadSelectedCpuSets @ stub SetProcessDefaultCpuSets diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index d14bf010383..0312e044a86 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -822,6 +822,7 @@ @ stdcall GetStringTypeExA(long long str long ptr) @ stdcall -import GetStringTypeExW(long long wstr long ptr) @ stdcall -import GetStringTypeW(long wstr long ptr) +@ stdcall -import GetSystemCpuSetInformation(ptr long ptr ptr long) @ stdcall -import GetSystemFileCacheSize(ptr ptr ptr) @ stdcall -import GetSystemDefaultLCID() @ stdcall -import GetSystemDefaultLangID() diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c index 373212cd2da..433c12ff1fb 100644 --- a/dlls/kernel32/tests/process.c +++ b/dlls/kernel32/tests/process.c @@ -79,6 +79,7 @@ static BOOL (WINAPI *pSetInformationJobObject)(HANDLE job, JOBOBJECTINFOCLASS static HANDLE (WINAPI *pCreateIoCompletionPort)(HANDLE file, HANDLE existing_port, ULONG_PTR key, DWORD threads); static BOOL (WINAPI *pGetNumaProcessorNode)(UCHAR, PUCHAR); static NTSTATUS (WINAPI *pNtQueryInformationProcess)(HANDLE, PROCESSINFOCLASS, PVOID, ULONG, PULONG); +static NTSTATUS (WINAPI *pNtQuerySystemInformationEx)(SYSTEM_INFORMATION_CLASS, void*, ULONG, void*, ULONG, ULONG*); static DWORD (WINAPI *pWTSGetActiveConsoleSessionId)(void); static HANDLE (WINAPI *pCreateToolhelp32Snapshot)(DWORD, DWORD); static BOOL (WINAPI *pProcess32First)(HANDLE, PROCESSENTRY32*); @@ -87,6 +88,7 @@ static BOOL (WINAPI *pThread32First)(HANDLE, THREADENTRY32*); static BOOL (WINAPI *pThread32Next)(HANDLE, THREADENTRY32*); static BOOL (WINAPI *pGetLogicalProcessorInformationEx)(LOGICAL_PROCESSOR_RELATIONSHIP,SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX*,DWORD*); static SIZE_T (WINAPI *pGetLargePageMinimum)(void); +static BOOL (WINAPI *pGetSystemCpuSetInformation)(SYSTEM_CPU_SET_INFORMATION*,ULONG,ULONG*,HANDLE,ULONG); static BOOL (WINAPI *pInitializeProcThreadAttributeList)(struct _PROC_THREAD_ATTRIBUTE_LIST*, DWORD, DWORD, SIZE_T*); static BOOL (WINAPI *pUpdateProcThreadAttribute)(struct _PROC_THREAD_ATTRIBUTE_LIST*, DWORD, DWORD_PTR, void *,SIZE_T,void*,SIZE_T*); static void (WINAPI *pDeleteProcThreadAttributeList)(struct _PROC_THREAD_ATTRIBUTE_LIST*); @@ -245,6 +247,7 @@ static BOOL init(void) hntdll = GetModuleHandleA("ntdll.dll"); pNtQueryInformationProcess = (void *)GetProcAddress(hntdll, "NtQueryInformationProcess"); + pNtQuerySystemInformationEx = (void *)GetProcAddress(hntdll, "NtQuerySystemInformationEx"); pGetNativeSystemInfo = (void *) GetProcAddress(hkernel32, "GetNativeSystemInfo"); pGetSystemRegistryQuota = (void *) GetProcAddress(hkernel32, "GetSystemRegistryQuota"); @@ -269,6 +272,7 @@ static BOOL init(void) pThread32Next = (void *)GetProcAddress(hkernel32, "Thread32Next"); pGetLogicalProcessorInformationEx = (void *)GetProcAddress(hkernel32, "GetLogicalProcessorInformationEx"); pGetLargePageMinimum = (void *)GetProcAddress(hkernel32, "GetLargePageMinimum"); + pGetSystemCpuSetInformation = (void *)GetProcAddress(hkernel32, "GetSystemCpuSetInformation"); pInitializeProcThreadAttributeList = (void *)GetProcAddress(hkernel32, "InitializeProcThreadAttributeList"); pUpdateProcThreadAttribute = (void *)GetProcAddress(hkernel32, "UpdateProcThreadAttribute"); pDeleteProcThreadAttributeList = (void *)GetProcAddress(hkernel32, "DeleteProcThreadAttributeList"); @@ -3786,6 +3790,67 @@ static void test_GetLogicalProcessorInformationEx(void) HeapFree(GetProcessHeap(), 0, info); } +static void test_GetSystemCpuSetInformation(void) +{ + SYSTEM_CPU_SET_INFORMATION *info, *info_nt; + HANDLE process = GetCurrentProcess(); + ULONG size, expected_size; + NTSTATUS status; + SYSTEM_INFO si; + BOOL ret; + + if (!pGetSystemCpuSetInformation) + { + win_skip("GetSystemCpuSetInformation() is not supported.\n"); + return; + } + + GetSystemInfo(&si); + + expected_size = sizeof(*info) * si.dwNumberOfProcessors; + + if (0) + { + /* Crashes on Windows with NULL return length. */ + pGetSystemCpuSetInformation(NULL, 0, NULL, process, 0); + } + + size = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = pGetSystemCpuSetInformation(NULL, size, &size, process, 0); + ok(!ret && GetLastError() == ERROR_NOACCESS, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(!size, "Got unexpected size %u.\n", size); + + size = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = pGetSystemCpuSetInformation(NULL, 0, &size, (HANDLE)0xdeadbeef, 0); + ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(!size, "Got unexpected size %u.\n", size); + + size = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = pGetSystemCpuSetInformation(NULL, 0, &size, process, 0); + ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(size == expected_size, "Got unexpected size %u.\n", size); + + info = heap_alloc(size); + info_nt = heap_alloc(size); + + status = pNtQuerySystemInformationEx(SystemCpuSetInformation, &process, sizeof(process), info_nt, expected_size, NULL); + ok(!status, "Got unexpected status %#x.\n", status); + + size = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = pGetSystemCpuSetInformation(info, expected_size, &size, process, 0); + ok(ret && GetLastError() == 0xdeadbeef, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(size == expected_size, "Got unexpected size %u.\n", size); + + ok(!memcmp(info, info_nt, expected_size), "Info does not match NtQuerySystemInformationEx()."); + + heap_free(info_nt); + heap_free(info); +} + static void test_largepages(void) { SIZE_T size; @@ -4348,6 +4413,7 @@ START_TEST(process) test_GetNumaProcessorNode(); test_session_info(); test_GetLogicalProcessorInformationEx(); + test_GetSystemCpuSetInformation(); test_largepages(); test_ProcThreadAttributeList(); test_SuspendProcessState(); diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec index 08a2f726817..8cb15fff084 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -681,7 +681,7 @@ @ stdcall GetStringTypeW(long wstr long ptr) # @ stub GetSystemAppDataFolder # @ stub GetSystemAppDataKey -# @ stub GetSystemCpuSetInformation +@ stdcall GetSystemCpuSetInformation(ptr long ptr ptr long) @ stdcall GetSystemDefaultLCID() @ stdcall GetSystemDefaultLangID() @ stdcall GetSystemDefaultLocaleName(ptr long) diff --git a/dlls/kernelbase/memory.c b/dlls/kernelbase/memory.c index 2bfd3893e8e..60333db242f 100644 --- a/dlls/kernelbase/memory.c +++ b/dlls/kernelbase/memory.c @@ -1130,6 +1130,22 @@ BOOL WINAPI DECLSPEC_HOTPATCH GetLogicalProcessorInformationEx( LOGICAL_PROCESSO } +/*********************************************************************** + * GetSystemCpuSetInformation (kernelbase.@) + */ +BOOL WINAPI GetSystemCpuSetInformation(SYSTEM_CPU_SET_INFORMATION *info, ULONG buffer_length, ULONG *return_length, + HANDLE process, ULONG flags) +{ + if (flags) + FIXME("Unsupported flags %#x.\n", flags); + + *return_length = 0; + + return set_ntstatus( NtQuerySystemInformationEx( SystemCpuSetInformation, &process, sizeof(process), info, + buffer_length, return_length )); +} + + /********************************************************************** * GetNumaHighestNodeNumber (kernelbase.@) */ diff --git a/include/winbase.h b/include/winbase.h index 651da6d6906..beb91371bb6 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -2274,6 +2274,7 @@ WINBASEAPI VOID WINAPI GetStartupInfoA(LPSTARTUPINFOA); WINBASEAPI VOID WINAPI GetStartupInfoW(LPSTARTUPINFOW); #define GetStartupInfo WINELIB_NAME_AW(GetStartupInfo) WINBASEAPI HANDLE WINAPI GetStdHandle(DWORD); +WINBASEAPI BOOL WINAPI GetSystemCpuSetInformation(SYSTEM_CPU_SET_INFORMATION*,ULONG,ULONG*,HANDLE,ULONG); WINBASEAPI UINT WINAPI GetSystemDirectoryA(LPSTR,UINT); WINBASEAPI UINT WINAPI GetSystemDirectoryW(LPWSTR,UINT); #define GetSystemDirectory WINELIB_NAME_AW(GetSystemDirectory)
1
0
0
0
Paul Gofman : ntdll: Implement NtQuerySystemInformationEx(SystemCpuSetInformation).
by Alexandre Julliard
30 Mar '21
30 Mar '21
Module: wine Branch: master Commit: 084519a82b7b78e0c2839f3fed8c6c75bd63d07b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=084519a82b7b78e0c2839f3f…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Tue Mar 30 13:37:39 2021 +0300 ntdll: Implement NtQuerySystemInformationEx(SystemCpuSetInformation). Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/info.c | 84 +++++++++++++++++++++++++++++++++ dlls/ntdll/unix/system.c | 120 +++++++++++++++++++++++++++++++++++++++++++++++ include/winnt.h | 41 ++++++++++++++++ include/winternl.h | 1 + 4 files changed, 246 insertions(+) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=084519a82b7b78e0c283…
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
...
117
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
Results per page:
10
25
50
100
200