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
Nikolay Sivov : gdiplus: Add a helper to initialize RectF.
by Alexandre Julliard
23 Mar '21
23 Mar '21
Module: wine Branch: master Commit: beefe76c6f1b9e7f2c0a6fda0b613cb46058d158 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=beefe76c6f1b9e7f2c0a6fda…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Mar 23 19:08:14 2021 +0300 gdiplus: Add a helper to initialize RectF. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Esme Povirk <esme(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdiplus/brush.c | 6 +--- dlls/gdiplus/gdiplus_private.h | 8 +++++ dlls/gdiplus/graphics.c | 74 +++++++++--------------------------------- dlls/gdiplus/graphicspath.c | 29 +++++++---------- dlls/gdiplus/matrix.c | 5 +-- dlls/gdiplus/metafile.c | 10 ++---- dlls/gdiplus/region.c | 12 ++----- 7 files changed, 40 insertions(+), 104 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=beefe76c6f1b9e7f2c0a…
1
0
0
0
Nikolay Sivov : gdiplus: Forward GdipDrawRectangle() to GdipDrawRectangles().
by Alexandre Julliard
23 Mar '21
23 Mar '21
Module: wine Branch: master Commit: 41651d2e1665f3ec42f7afea4b4cbd919abb2885 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=41651d2e1665f3ec42f7afea…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Mar 23 19:08:13 2021 +0300 gdiplus: Forward GdipDrawRectangle() to GdipDrawRectangles(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Esme Povirk <esme(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdiplus/graphics.c | 23 +++++------------ dlls/gdiplus/tests/metafile.c | 58 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 17 deletions(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 922c6591c87..4ee0430051f 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -4088,26 +4088,15 @@ GpStatus WINGDIPAPI GdipDrawPieI(GpGraphics *graphics, GpPen *pen, INT x, GpStatus WINGDIPAPI GdipDrawRectangle(GpGraphics *graphics, GpPen *pen, REAL x, REAL y, REAL width, REAL height) { - GpStatus status; - GpPath *path; + GpRectF rect; TRACE("(%p, %p, %.2f, %.2f, %.2f, %.2f)\n", graphics, pen, x, y, width, height); - if(!pen || !graphics) - return InvalidParameter; - - if(graphics->busy) - return ObjectBusy; - - status = GdipCreatePath(FillModeAlternate, &path); - if (status != Ok) return status; - - status = GdipAddPathRectangle(path, x, y, width, height); - if (status == Ok) - status = GdipDrawPath(graphics, pen, path); - - GdipDeletePath(path); - return status; + rect.X = x; + rect.Y = y, + rect.Width = width; + rect.Height = height; + return GdipDrawRectangles(graphics, pen, &rect, 1); } GpStatus WINGDIPAPI GdipDrawRectangleI(GpGraphics *graphics, GpPen *pen, INT x, diff --git a/dlls/gdiplus/tests/metafile.c b/dlls/gdiplus/tests/metafile.c index 410e9a6ab8c..92c738f5116 100644 --- a/dlls/gdiplus/tests/metafile.c +++ b/dlls/gdiplus/tests/metafile.c @@ -3650,6 +3650,63 @@ static void test_fillellipse(void) expect(Ok, stat); } +static const emfplus_record draw_rectangle_records[] = +{ + { EMR_HEADER }, + { EmfPlusRecordTypeHeader }, + { EmfPlusRecordTypeObject, ObjectTypePen << 8 }, + { EmfPlusRecordTypeDrawRects, 0x4000 }, + { EMR_SAVEDC, 0, 1 }, + { EMR_SETICMMODE, 0, 1 }, + { EMR_BITBLT, 0, 1 }, + { EMR_RESTOREDC, 0, 1 }, + { EmfPlusRecordTypeEndOfFile }, + { EMR_EOF }, + { 0 } +}; + +static void test_drawrectangle(void) +{ + static const GpRectF frame = { 0.0f, 0.0f, 100.0f, 100.0f }; + + GpMetafile *metafile; + GpGraphics *graphics; + HENHMETAFILE hemf; + GpStatus stat; + GpPen *pen; + HDC hdc; + + hdc = CreateCompatibleDC(0); + stat = GdipRecordMetafile(hdc, EmfTypeEmfPlusOnly, &frame, MetafileFrameUnitPixel, description, &metafile); + expect(Ok, stat); + DeleteDC(hdc); + + stat = GdipGetImageGraphicsContext((GpImage *)metafile, &graphics); + expect(Ok, stat); + + stat = GdipCreatePen1((ARGB)0xffff00ff, 10.0f, UnitPixel, &pen); + expect(Ok, stat); + + stat = GdipDrawRectangle(graphics, pen, 1.0f, 1.0f, 16.0f, 32.0f); + expect(Ok, stat); + + stat = GdipDeletePen(pen); + expect(Ok, stat); + + stat = GdipDeleteGraphics(graphics); + expect(Ok, stat); + sync_metafile(&metafile, "draw_rectangle.emf"); + + stat = GdipGetHemfFromMetafile(metafile, &hemf); + expect(Ok, stat); + + check_emfplus(hemf, draw_rectangle_records, "draw rectangle"); + DeleteEnhMetaFile(hemf); + + stat = GdipDisposeImage((GpImage*)metafile); + expect(Ok, stat); +} + START_TEST(metafile) { struct GdiplusStartupInput gdiplusStartupInput; @@ -3706,6 +3763,7 @@ START_TEST(metafile) test_printer_dc(); test_drawellipse(); test_fillellipse(); + test_drawrectangle(); GdiplusShutdown(gdiplusToken); }
1
0
0
0
Nikolay Sivov : gdiplus/metafile: Implement FillPie() recording.
by Alexandre Julliard
23 Mar '21
23 Mar '21
Module: wine Branch: master Commit: 9b04f1c660806d2b5babc19d3c0ec017f1c8b40f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9b04f1c660806d2b5babc19d…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Mar 23 19:08:12 2021 +0300 gdiplus/metafile: Implement FillPie() recording. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Esme Povirk <esme(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdiplus/gdiplus_private.h | 2 ++ dlls/gdiplus/graphics.c | 10 ++++++++ dlls/gdiplus/metafile.c | 53 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+) diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h index a617ca4803e..b0e4d967894 100644 --- a/dlls/gdiplus/gdiplus_private.h +++ b/dlls/gdiplus/gdiplus_private.h @@ -113,6 +113,8 @@ extern void METAFILE_Free(GpMetafile *metafile) DECLSPEC_HIDDEN; extern GpStatus METAFILE_DrawEllipse(GpMetafile *metafile, GpPen *pen, GpRectF *rect) DECLSPEC_HIDDEN; extern GpStatus METAFILE_FillEllipse(GpMetafile *metafile, GpBrush *brush, GpRectF *rect) DECLSPEC_HIDDEN; extern GpStatus METAFILE_DrawRectangles(GpMetafile *metafile, GpPen *pen, const GpRectF *rects, INT count) DECLSPEC_HIDDEN; +extern GpStatus METAFILE_FillPie(GpMetafile *metafile, GpBrush *brush, const GpRectF *rect, + REAL startAngle, REAL sweepAngle) DECLSPEC_HIDDEN; extern void calc_curve_bezier(const GpPointF *pts, REAL tension, REAL *x1, REAL *y1, REAL *x2, REAL *y2) DECLSPEC_HIDDEN; diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 2c18ced3e92..922c6591c87 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -4402,6 +4402,7 @@ GpStatus WINGDIPAPI GdipFillPie(GpGraphics *graphics, GpBrush *brush, REAL x, { GpStatus stat; GpPath *path; + GpRectF rect; TRACE("(%p, %p, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f)\n", graphics, brush, x, y, width, height, startAngle, sweepAngle); @@ -4412,6 +4413,15 @@ GpStatus WINGDIPAPI GdipFillPie(GpGraphics *graphics, GpBrush *brush, REAL x, if(graphics->busy) return ObjectBusy; + if (is_metafile_graphics(graphics)) + { + rect.X = x; + rect.Y = y; + rect.Width = width; + rect.Height = height; + return METAFILE_FillPie((GpMetafile *)graphics->image, brush, &rect, startAngle, sweepAngle); + } + stat = GdipCreatePath(FillModeAlternate, &path); if (stat == Ok) diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c index eafcdaee963..a483b3a5e6d 100644 --- a/dlls/gdiplus/metafile.c +++ b/dlls/gdiplus/metafile.c @@ -4896,6 +4896,59 @@ GpStatus METAFILE_FillEllipse(GpMetafile *metafile, GpBrush *brush, GpRectF *rec return Ok; } +GpStatus METAFILE_FillPie(GpMetafile *metafile, GpBrush *brush, const GpRectF *rect, + REAL startAngle, REAL sweepAngle) +{ + BOOL is_int_rect, inline_color; + EmfPlusFillPie *record; + DWORD brush_id = -1; + GpStatus stat; + + if (metafile->metafile_type == MetafileTypeEmf) + { + FIXME("stub!\n"); + return NotImplemented; + } + + inline_color = brush->bt == BrushTypeSolidColor; + if (!inline_color) + { + stat = METAFILE_AddBrushObject(metafile, brush, &brush_id); + if (stat != Ok) return stat; + } + + is_int_rect = is_integer_rect(rect); + + stat = METAFILE_AllocateRecord(metafile, FIELD_OFFSET(EmfPlusFillPie, RectData) + + is_int_rect ? sizeof(EmfPlusRect) : sizeof(EmfPlusRectF), (void **)&record); + if (stat != Ok) return stat; + record->Header.Type = EmfPlusRecordTypeFillPie; + if (inline_color) + { + record->Header.Flags = 0x8000; + record->BrushId = ((GpSolidFill *)brush)->color; + } + else + record->BrushId = brush_id; + + record->StartAngle = startAngle; + record->SweepAngle = sweepAngle; + + if (is_int_rect) + { + record->Header.Flags |= 0x4000; + record->RectData.rect.X = (SHORT)rect->X; + record->RectData.rect.Y = (SHORT)rect->Y; + record->RectData.rect.Width = (SHORT)rect->Width; + record->RectData.rect.Height = (SHORT)rect->Height; + } + else + memcpy(&record->RectData.rectF, rect, sizeof(*rect)); + + METAFILE_WriteRecords(metafile); + return Ok; +} + static GpStatus METAFILE_AddFontObject(GpMetafile *metafile, GDIPCONST GpFont *font, DWORD *id) { EmfPlusObject *object_record;
1
0
0
0
Rémi Bernon : widl: Generate typedefs for namespaced struct / enum types.
by Alexandre Julliard
23 Mar '21
23 Mar '21
Module: wine Branch: master Commit: 2a7940c97d4e6cd2adace1acb0ca163f12a0da09 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2a7940c97d4e6cd2adace1ac…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Tue Mar 23 18:20:47 2021 +0100 widl: Generate typedefs for namespaced struct / enum types. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/widl/header.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/tools/widl/header.c b/tools/widl/header.c index a5e5d6c6fb3..1a69b298e7d 100644 --- a/tools/widl/header.c +++ b/tools/widl/header.c @@ -872,11 +872,25 @@ static void write_generic_handle_routines(FILE *header) static void write_typedef(FILE *header, type_t *type, int declonly) { - type_t *t = type_alias_get_aliasee_type(type); - if (winrt_mode && t->namespace && !is_global_namespace(t->namespace)) return; - fprintf(header, "typedef "); - write_type_v(header, type_alias_get_aliasee(type), FALSE, declonly, type->name, NAME_DEFAULT); - fprintf(header, ";\n"); + type_t *t = type_alias_get_aliasee_type(type); + if (winrt_mode && t->namespace && !is_global_namespace(t->namespace)) + { + fprintf(header, "#ifdef __cplusplus\n"); + write_namespace_start(header, t->namespace); + indent(header, 0); + } + fprintf(header, "typedef "); + write_type_v(header, type_alias_get_aliasee(type), FALSE, declonly, type->name, NAME_DEFAULT); + fprintf(header, ";\n"); + if (winrt_mode && t->namespace && !is_global_namespace(t->namespace)) + { + write_namespace_end(header, t->namespace); + fprintf(header, "#else /* __cplusplus */\n"); + fprintf(header, "typedef "); + write_type_v(header, type_alias_get_aliasee(type), FALSE, declonly, type->c_name, NAME_C); + fprintf(header, ";\n"); + fprintf(header, "#endif /* __cplusplus */\n\n"); + } } int is_const_decl(const var_t *var)
1
0
0
0
Nikolay Sivov : mfplat: Remove duplicated GUID entry from attribute tracing.
by Alexandre Julliard
23 Mar '21
23 Mar '21
Module: wine Branch: master Commit: 80b6555ed4b0315046f84ad2ab339e0131989f92 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=80b6555ed4b0315046f84ad2…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Mar 23 19:07:51 2021 +0300 mfplat: Remove duplicated GUID entry from attribute tracing. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mfplat/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c index f8d965522fd..6fb8661dba4 100644 --- a/dlls/mfplat/main.c +++ b/dlls/mfplat/main.c @@ -1511,6 +1511,7 @@ const char *debugstr_attr(const GUID *guid) static const struct guid_def guid_defs[] = { #define X(g) { &(g), #g } +#define MF_READER_WRITER_D3D_MANAGER MF_SOURCE_READER_D3D_MANAGER X(MF_READWRITE_MMCSS_CLASS), X(MF_TOPONODE_MARKIN_HERE), X(MF_MT_H264_SUPPORTED_SYNC_FRAME_TYPES), @@ -1728,8 +1729,7 @@ const char *debugstr_attr(const GUID *guid) X(MF_SA_D3D11_ALLOW_DYNAMIC_YUV_TEXTURE), X(MF_MT_VIDEO_3D_FORMAT), X(MF_EVENT_STREAM_METADATA_KEYDATA), - X(MF_SINK_WRITER_D3D_MANAGER), - X(MF_SOURCE_READER_D3D_MANAGER), + X(MF_READER_WRITER_D3D_MANAGER), X(MFSampleExtension_3DVideo), X(MF_MT_H264_USAGE), X(MF_MEDIA_ENGINE_EME_CALLBACK), @@ -1863,6 +1863,7 @@ const char *debugstr_attr(const GUID *guid) X(MF_AUDIO_RENDERER_ATTRIBUTE_ENDPOINT_ROLE), X(MF_MT_VIDEO_3D_LEFT_IS_BASE), X(MF_TOPONODE_WORKQUEUE_MMCSS_TASKID), +#undef MF_READER_WRITER_D3D_MANAGER #undef X }; struct guid_def *ret = NULL;
1
0
0
0
Nikolay Sivov : dwrite: Use D3DCOLORVALUE equivalent to avoid nameless unions.
by Alexandre Julliard
23 Mar '21
23 Mar '21
Module: wine Branch: master Commit: 183394cd862b47461475fa90dad190f8233dccbe URL:
https://source.winehq.org/git/wine.git/?a=commit;h=183394cd862b47461475fa90…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Mar 23 19:07:12 2021 +0300 dwrite: Use D3DCOLORVALUE equivalent to avoid nameless unions. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/Makefile.in | 1 - dlls/dwrite/opentype.c | 18 +++++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/dlls/dwrite/Makefile.in b/dlls/dwrite/Makefile.in index e975812eae5..8b612989386 100644 --- a/dlls/dwrite/Makefile.in +++ b/dlls/dwrite/Makefile.in @@ -2,7 +2,6 @@ MODULE = dwrite.dll IMPORTLIB = dwrite IMPORTS = user32 gdi32 advapi32 EXTRAINCL = $(FREETYPE_CFLAGS) -EXTRADEFS = -DWINE_NO_NAMELESS_EXTENSION C_SRCS = \ analyzer.c \ diff --git a/dlls/dwrite/opentype.c b/dlls/dwrite/opentype.c index 6e5624c622a..8d6133545a2 100644 --- a/dlls/dwrite/opentype.c +++ b/dlls/dwrite/opentype.c @@ -2858,6 +2858,13 @@ HRESULT opentype_get_cpal_entries(const struct dwrite_fonttable *cpal, unsigned unsigned int num_palettes, num_palette_entries, i; const struct cpal_color_record *records; const struct cpal_header_0 *header; + struct d3d_color + { + float r; + float g; + float b; + float a; + } *colors = (void *)entries; header = table_read_ensure(cpal, 0, sizeof(*header)); @@ -2883,11 +2890,12 @@ HRESULT opentype_get_cpal_entries(const struct dwrite_fonttable *cpal, unsigned first_entry_index += GET_BE_WORD(header->color_record_indices[palette]); - for (i = 0; i < entry_count; i++) { - entries[i].u1.r = records[first_entry_index + i].red / 255.0f; - entries[i].u2.g = records[first_entry_index + i].green / 255.0f; - entries[i].u3.b = records[first_entry_index + i].blue / 255.0f; - entries[i].u4.a = records[first_entry_index + i].alpha / 255.0f; + for (i = 0; i < entry_count; ++i) + { + colors[i].r = records[first_entry_index + i].red / 255.0f; + colors[i].g = records[first_entry_index + i].green / 255.0f; + colors[i].b = records[first_entry_index + i].blue / 255.0f; + colors[i].a = records[first_entry_index + i].alpha / 255.0f; } return S_OK;
1
0
0
0
Nikolay Sivov : mfreadwrite/reader: Enable DXGI device manager path.
by Alexandre Julliard
23 Mar '21
23 Mar '21
Module: wine Branch: master Commit: 016fe6af18403c046c60b5518a9187c79c281dbc URL:
https://source.winehq.org/git/wine.git/?a=commit;h=016fe6af18403c046c60b551…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Mar 23 19:04:48 2021 +0300 mfreadwrite/reader: Enable DXGI device manager path. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mfreadwrite/reader.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/dlls/mfreadwrite/reader.c b/dlls/mfreadwrite/reader.c index 7cb7e1e40eb..2819b800eb9 100644 --- a/dlls/mfreadwrite/reader.c +++ b/dlls/mfreadwrite/reader.c @@ -1643,12 +1643,6 @@ static HRESULT source_reader_setup_sample_allocator(struct source_reader *reader if (!(reader->flags & SOURCE_READER_HAS_DEVICE_MANAGER)) return S_OK; - if (reader->flags & SOURCE_READER_DXGI_DEVICE_MANAGER) - { - FIXME("DXGI device manager is not supported.\n"); - return S_OK; - } - if (!stream->allocator) { if (FAILED(hr = MFCreateVideoSampleAllocatorEx(&IID_IMFVideoSampleAllocatorEx, (void **)&stream->allocator)))
1
0
0
0
Nikolay Sivov : mfreadwrite/reader: Use current stream type to set up sample allocator.
by Alexandre Julliard
23 Mar '21
23 Mar '21
Module: wine Branch: master Commit: 482f977b343e51d220025400b9b0f0f6f1722f88 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=482f977b343e51d220025400…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Mar 23 19:04:47 2021 +0300 mfreadwrite/reader: Use current stream type to set up sample allocator. It's normal to have incomplete type description for SetCurrentMediaType(), with just major/subtype attributes. Allocator will need at least frame size. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mfreadwrite/reader.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/dlls/mfreadwrite/reader.c b/dlls/mfreadwrite/reader.c index f1fbba94e51..7cb7e1e40eb 100644 --- a/dlls/mfreadwrite/reader.c +++ b/dlls/mfreadwrite/reader.c @@ -1629,15 +1629,14 @@ static HRESULT source_reader_set_compatible_media_type(struct source_reader *rea return type_set ? S_OK : S_FALSE; } -static HRESULT source_reader_setup_sample_allocator(struct source_reader *reader, unsigned int index, - IMFMediaType *media_type) +static HRESULT source_reader_setup_sample_allocator(struct source_reader *reader, unsigned int index) { struct media_stream *stream = &reader->streams[index]; IMFVideoSampleAllocatorCallback *callback; GUID major = { 0 }; HRESULT hr; - IMFMediaType_GetMajorType(media_type, &major); + IMFMediaType_GetMajorType(stream->current, &major); if (!IsEqualGUID(&major, &MFMediaType_Video)) return S_OK; @@ -1666,7 +1665,7 @@ static HRESULT source_reader_setup_sample_allocator(struct source_reader *reader return hr; } - if (FAILED(hr = IMFVideoSampleAllocatorEx_InitializeSampleAllocatorEx(stream->allocator, 2, 8, NULL, media_type))) + if (FAILED(hr = IMFVideoSampleAllocatorEx_InitializeSampleAllocatorEx(stream->allocator, 2, 8, NULL, stream->current))) WARN("Failed to initialize sample allocator, hr %#x.\n", hr); if (SUCCEEDED(IMFVideoSampleAllocatorEx_QueryInterface(stream->allocator, &IID_IMFVideoSampleAllocatorCallback, (void **)&callback))) @@ -1837,7 +1836,7 @@ static HRESULT WINAPI src_reader_SetCurrentMediaType(IMFSourceReader *iface, DWO if (hr == S_FALSE) hr = source_reader_create_decoder_for_stream(reader, index, type); if (SUCCEEDED(hr)) - hr = source_reader_setup_sample_allocator(reader, index, type); + hr = source_reader_setup_sample_allocator(reader, index); LeaveCriticalSection(&reader->cs);
1
0
0
0
Roman Pišl : kernelbase: Convert DOS to NT path for FileRenameInfo in SetFileInformationByHandle.
by Alexandre Julliard
23 Mar '21
23 Mar '21
Module: wine Branch: master Commit: 33c6a6cb285800cac60ceab5868122fa8d9cda92 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=33c6a6cb285800cac60ceab5…
Author: Roman Pišl <rpisl(a)seznam.cz> Date: Tue Mar 23 15:16:40 2021 +0100 kernelbase: Convert DOS to NT path for FileRenameInfo in SetFileInformationByHandle. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=50756
Signed-off-by: Roman Pišl <rpisl(a)seznam.cz> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/file.c | 4 ---- dlls/kernelbase/file.c | 23 +++++++++++++++++++++-- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c index f2254d4e988..5deed96abf3 100644 --- a/dlls/kernel32/tests/file.c +++ b/dlls/kernel32/tests/file.c @@ -5322,24 +5322,20 @@ static void test_SetFileRenameInfo(void) fri->FileNameLength = wcslen(tempFileTo1) * sizeof(WCHAR); memcpy(fri->FileName, tempFileTo1, fri->FileNameLength + sizeof(WCHAR)); ret = pSetFileInformationByHandle(file, FileRenameInfo, fri, size); -todo_wine ok(!ret && GetLastError() == ERROR_ALREADY_EXISTS, "FileRenameInfo unexpected result %d\n", GetLastError()); fri->ReplaceIfExists = TRUE; ret = pSetFileInformationByHandle(file, FileRenameInfo, fri, size); -todo_wine ok(ret, "FileRenameInfo failed, error %d\n", GetLastError()); fri->ReplaceIfExists = FALSE; fri->FileNameLength = wcslen(tempFileTo2) * sizeof(WCHAR); memcpy(fri->FileName, tempFileTo2, fri->FileNameLength + sizeof(WCHAR)); ret = pSetFileInformationByHandle(file, FileRenameInfo, fri, size); -todo_wine ok(ret, "FileRenameInfo failed, error %d\n", GetLastError()); CloseHandle(file); file = CreateFileW(tempFileTo2, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, 0, 0); -todo_wine ok(file != INVALID_HANDLE_VALUE, "file not renamed, error %d\n", GetLastError()); fri->FileNameLength = wcslen(tempFileTo1) * sizeof(WCHAR); diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c index 23a36b0a765..e0a75c2ad08 100644 --- a/dlls/kernelbase/file.c +++ b/dlls/kernelbase/file.c @@ -3556,8 +3556,27 @@ BOOL WINAPI DECLSPEC_HOTPATCH SetFileInformationByHandle( HANDLE file, FILE_INFO status = NtSetInformationFile( file, &io, info, size, FileIoPriorityHintInformation ); break; case FileRenameInfo: - status = NtSetInformationFile( file, &io, info, size, FileRenameInformation ); - break; + { + FILE_RENAME_INFORMATION *rename_info; + UNICODE_STRING nt_name; + ULONG size; + + if ((status = RtlDosPathNameToNtPathName_U_WithStatus( ((FILE_RENAME_INFORMATION *)info)->FileName, + &nt_name, NULL, NULL ))) + break; + + size = sizeof(*rename_info) + nt_name.Length; + if ((rename_info = HeapAlloc( GetProcessHeap(), 0, size ))) + { + memcpy( rename_info, info, sizeof(*rename_info) ); + memcpy( rename_info->FileName, nt_name.Buffer, nt_name.Length + sizeof(WCHAR) ); + rename_info->FileNameLength = nt_name.Length; + status = NtSetInformationFile( file, &io, rename_info, size, FileRenameInformation ); + HeapFree( GetProcessHeap(), 0, rename_info ); + } + RtlFreeUnicodeString( &nt_name ); + break; + } case FileStandardInfo: case FileCompressionInfo: case FileAttributeTagInfo:
1
0
0
0
Roman Pišl : kernel32/tests: Add test for FileRenameInfo in SetFileInformationByHandle.
by Alexandre Julliard
23 Mar '21
23 Mar '21
Module: wine Branch: master Commit: 0f84d30753f5fa257f47c76a124f6cb9cd75f1db URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0f84d30753f5fa257f47c76a…
Author: Roman Pišl <rpisl(a)seznam.cz> Date: Tue Mar 23 15:16:39 2021 +0100 kernel32/tests: Add test for FileRenameInfo in SetFileInformationByHandle. Signed-off-by: Roman Pišl <rpisl(a)seznam.cz> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/file.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c index 6ea9dffde5c..f2254d4e988 100644 --- a/dlls/kernel32/tests/file.c +++ b/dlls/kernel32/tests/file.c @@ -5284,6 +5284,77 @@ todo_wine CloseHandle(file); } +static void test_SetFileRenameInfo(void) +{ + WCHAR tempFileFrom[MAX_PATH], tempFileTo1[MAX_PATH], tempFileTo2[MAX_PATH]; + WCHAR tempPath[MAX_PATH]; + FILE_RENAME_INFORMATION *fri; + HANDLE file; + DWORD size; + BOOL ret; + + if (!pSetFileInformationByHandle) + { + win_skip("SetFileInformationByHandle is not supported\n"); + return; + } + + ret = GetTempPathW(MAX_PATH, tempPath); + ok(ret, "GetTempPathW failed, got error %u.\n", GetLastError()); + + ret = GetTempFileNameW(tempPath, L"abc", 0, tempFileFrom); + ok(ret, "GetTempFileNameW failed, got error %u.\n", GetLastError()); + + ret = GetTempFileNameW(tempPath, L"abc", 0, tempFileTo1); + ok(ret, "GetTempFileNameW failed, got error %u.\n", GetLastError()); + + ret = GetTempFileNameW(tempPath, L"abc", 1, tempFileTo2); + ok(ret, "GetTempFileNameW failed, got error %u.\n", GetLastError()); + + file = CreateFileW(tempFileFrom, GENERIC_READ | GENERIC_WRITE | DELETE, 0, 0, OPEN_EXISTING, 0, 0); + ok(file != INVALID_HANDLE_VALUE, "failed to create temp file, error %u.\n", GetLastError()); + + size = sizeof(FILE_RENAME_INFORMATION) + MAX_PATH; + fri = HeapAlloc(GetProcessHeap(), 0, size); + + fri->ReplaceIfExists = FALSE; + fri->RootDirectory = NULL; + fri->FileNameLength = wcslen(tempFileTo1) * sizeof(WCHAR); + memcpy(fri->FileName, tempFileTo1, fri->FileNameLength + sizeof(WCHAR)); + ret = pSetFileInformationByHandle(file, FileRenameInfo, fri, size); +todo_wine + ok(!ret && GetLastError() == ERROR_ALREADY_EXISTS, "FileRenameInfo unexpected result %d\n", GetLastError()); + + fri->ReplaceIfExists = TRUE; + ret = pSetFileInformationByHandle(file, FileRenameInfo, fri, size); +todo_wine + ok(ret, "FileRenameInfo failed, error %d\n", GetLastError()); + + fri->ReplaceIfExists = FALSE; + fri->FileNameLength = wcslen(tempFileTo2) * sizeof(WCHAR); + memcpy(fri->FileName, tempFileTo2, fri->FileNameLength + sizeof(WCHAR)); + ret = pSetFileInformationByHandle(file, FileRenameInfo, fri, size); +todo_wine + ok(ret, "FileRenameInfo failed, error %d\n", GetLastError()); + CloseHandle(file); + + file = CreateFileW(tempFileTo2, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, 0, 0); +todo_wine + ok(file != INVALID_HANDLE_VALUE, "file not renamed, error %d\n", GetLastError()); + + fri->FileNameLength = wcslen(tempFileTo1) * sizeof(WCHAR); + memcpy(fri->FileName, tempFileTo1, fri->FileNameLength + sizeof(WCHAR)); + ret = pSetFileInformationByHandle(file, FileRenameInfo, fri, size); +todo_wine + ok(!ret && GetLastError() == ERROR_ACCESS_DENIED, "FileRenameInfo unexpected result %d\n", GetLastError()); + CloseHandle(file); + + HeapFree(GetProcessHeap(), 0, fri); + DeleteFileW(tempFileFrom); + DeleteFileW(tempFileTo1); + DeleteFileW(tempFileTo2); +} + static void test_GetFileAttributesExW(void) { static const WCHAR path1[] = {'\\','\\','?','\\',0}; @@ -5846,6 +5917,7 @@ START_TEST(file) test_GetFinalPathNameByHandleA(); test_GetFinalPathNameByHandleW(); test_SetFileInformationByHandle(); + test_SetFileRenameInfo(); test_GetFileAttributesExW(); test_post_completion(); test_overlapped_read();
1
0
0
0
← Newer
1
...
27
28
29
30
31
32
33
...
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