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
October 2014
----- 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
397 discussions
Start a n
N
ew thread
Nikolay Sivov : dwmapi: Added DwmAttachMilContent() and DwmDetachMilContent() stubs.
by Alexandre Julliard
07 Oct '14
07 Oct '14
Module: wine Branch: master Commit: fb36148f47874d911bd00adc3691a9c447a4a4d3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fb36148f47874d911bd00adc3…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Oct 7 14:57:15 2014 +0400 dwmapi: Added DwmAttachMilContent() and DwmDetachMilContent() stubs. --- dlls/dwmapi/dwmapi.spec | 4 ++-- dlls/dwmapi/dwmapi_main.c | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/dlls/dwmapi/dwmapi.spec b/dlls/dwmapi/dwmapi.spec index 764f04c..e83ee22 100644 --- a/dlls/dwmapi/dwmapi.spec +++ b/dlls/dwmapi/dwmapi.spec @@ -20,9 +20,9 @@ 119 stub @ 120 stub @ -@ stub DwmAttachMilContent +@ stdcall DwmAttachMilContent(long) @ stdcall DwmDefWindowProc(long long long long ptr) -@ stub DwmDetachMilContent +@ stdcall DwmDetachMilContent(long) @ stdcall DwmEnableBlurBehindWindow(ptr ptr) @ stdcall DwmEnableMMCSS(long) @ stdcall DwmExtendFrameIntoClientArea(long ptr) diff --git a/dlls/dwmapi/dwmapi_main.c b/dlls/dwmapi/dwmapi_main.c index 6ee45af..d5fb03f 100644 --- a/dlls/dwmapi/dwmapi_main.c +++ b/dlls/dwmapi/dwmapi_main.c @@ -234,3 +234,21 @@ HRESULT WINAPI DwmGetCompositionTimingInfo(HWND hwnd, DWM_TIMING_INFO *info) return E_NOTIMPL; } + +/********************************************************************** + * DwmAttachMilContent (DWMAPI.@) + */ +HRESULT WINAPI DwmAttachMilContent(HWND hwnd) +{ + FIXME("(%p) stub\n", hwnd); + return E_NOTIMPL; +} + +/********************************************************************** + * DwmDetachMilContent (DWMAPI.@) + */ +HRESULT WINAPI DwmDetachMilContent(HWND hwnd) +{ + FIXME("(%p) stub\n", hwnd); + return E_NOTIMPL; +}
1
0
0
0
Stefan Dösinger : d3d9/tests: Don' t load user32 functions at runtime.
by Alexandre Julliard
07 Oct '14
07 Oct '14
Module: wine Branch: master Commit: 537febf2e86514feb0c75a6f8ba3896e057e7e44 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=537febf2e86514feb0c75a6f8…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Tue Oct 7 15:11:07 2014 +0200 d3d9/tests: Don't load user32 functions at runtime. --- dlls/d3d9/tests/d3d9ex.c | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/dlls/d3d9/tests/d3d9ex.c b/dlls/d3d9/tests/d3d9ex.c index 0309013..582538f 100644 --- a/dlls/d3d9/tests/d3d9ex.c +++ b/dlls/d3d9/tests/d3d9ex.c @@ -23,18 +23,11 @@ #define COBJMACROS #include "wine/test.h" -#include "winuser.h" -#include "wingdi.h" #include <initguid.h> #include <d3d9.h> static HMODULE d3d9_handle = 0; -static BOOL (WINAPI *pEnumDisplaySettingsExA)(const char *device_name, - DWORD mode_idx, DEVMODEA *mode, DWORD flags); -static LONG (WINAPI *pChangeDisplaySettingsExA)(const char *device_name, - DEVMODEA *mode, HWND window, DWORD flags, void *param); - static HRESULT (WINAPI *pDirect3DCreate9Ex)(UINT SDKVersion, IDirect3D9Ex **d3d9ex); static HWND create_window(void) @@ -420,8 +413,7 @@ static void test_get_adapter_displaymode_ex(void) D3DDISPLAYMODE mode; D3DDISPLAYMODEEX mode_ex; D3DDISPLAYROTATION rotation; - HANDLE hdll; - DEVMODEA startmode; + DEVMODEW startmode; LONG retval; hr = pDirect3DCreate9Ex(D3D_SDK_VERSION, &d3d9ex); @@ -447,22 +439,16 @@ static void test_get_adapter_displaymode_ex(void) hr); ok(d3d9 != NULL && d3d9 != (void *) 0xdeadbeef, "QueryInterface returned interface %p, expected != NULL && != 0xdeadbeef\n", d3d9); - /* change displayorientation*/ - hdll = GetModuleHandleA("user32.dll"); - pEnumDisplaySettingsExA = (void*)GetProcAddress(hdll, "EnumDisplaySettingsExA"); - pChangeDisplaySettingsExA = (void*)GetProcAddress(hdll, "ChangeDisplaySettingsExA"); - - if (!pEnumDisplaySettingsExA || !pChangeDisplaySettingsExA) goto out; memset(&startmode, 0, sizeof(startmode)); startmode.dmSize = sizeof(startmode); - retval = pEnumDisplaySettingsExA(NULL, ENUM_CURRENT_SETTINGS, &startmode, 0); + retval = EnumDisplaySettingsExW(NULL, ENUM_CURRENT_SETTINGS, &startmode, 0); ok(retval, "Failed to retrieve current display mode, retval %d.\n", retval); if (!retval) goto out; startmode.dmFields = DM_DISPLAYORIENTATION | DM_PELSWIDTH | DM_PELSHEIGHT; S2(U1(startmode)).dmDisplayOrientation = DMDO_180; - retval = pChangeDisplaySettingsExA(NULL, &startmode, NULL, 0, NULL); + retval = ChangeDisplaySettingsExW(NULL, &startmode, NULL, 0, NULL); if(retval == DISP_CHANGE_BADMODE) { @@ -474,7 +460,7 @@ static void test_get_adapter_displaymode_ex(void) /* try retrieve orientation info with EnumDisplaySettingsEx*/ startmode.dmFields = 0; S2(U1(startmode)).dmDisplayOrientation = 0; - ok(pEnumDisplaySettingsExA(NULL, ENUM_CURRENT_SETTINGS, &startmode, EDS_ROTATEDMODE), "EnumDisplaySettingsEx failed\n"); + ok(EnumDisplaySettingsExW(NULL, ENUM_CURRENT_SETTINGS, &startmode, EDS_ROTATEDMODE), "EnumDisplaySettingsEx failed\n"); /*now that orientation has changed start tests for GetAdapterDisplayModeEx: invalid Size*/ memset(&mode_ex, 0, sizeof(mode_ex)); @@ -528,7 +514,7 @@ static void test_get_adapter_displaymode_ex(void) ok(mode_ex.ScanLineOrdering != 0, "ScanLineOrdering returned 0\n"); /* return to the default mode */ - pChangeDisplaySettingsExA(NULL, NULL, NULL, 0, NULL); + ChangeDisplaySettingsExW(NULL, NULL, NULL, 0, NULL); out: IDirect3D9_Release(d3d9); IDirect3D9Ex_Release(d3d9ex);
1
0
0
0
Henri Verbeet : wined3d: Get rid of surface_prepare_texture_internal().
by Alexandre Julliard
07 Oct '14
07 Oct '14
Module: wine Branch: master Commit: bd1afdb3c33d5e398b1105372a59380a26d65524 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bd1afdb3c33d5e398b1105372…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Oct 7 08:41:16 2014 +0200 wined3d: Get rid of surface_prepare_texture_internal(). --- dlls/wined3d/surface.c | 49 ++++++++++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 27 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 179dd19..ff7759f 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -3217,50 +3217,45 @@ void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb) } /* Context activation is done by the caller. */ -static void surface_prepare_texture_internal(struct wined3d_surface *surface, - struct wined3d_context *context, BOOL srgb) +void surface_prepare_texture(struct wined3d_surface *surface, struct wined3d_context *context, BOOL srgb) { - const struct wined3d_format *format = surface->container->resource.format; + struct wined3d_texture *texture = surface->container; DWORD alloc_flag = srgb ? SFLAG_SRGBALLOCATED : SFLAG_ALLOCATED; + const struct wined3d_format *format = texture->resource.format; + UINT sub_count = texture->level_count * texture->layer_count; const struct wined3d_color_key_conversion *conversion; + BOOL converted = FALSE; + UINT i; - if (surface->flags & alloc_flag) return; + TRACE("surface %p is a subresource of texture %p.\n", surface, texture); if (format->convert) { - surface->flags |= SFLAG_CONVERTED; + converted = TRUE; } - else if ((conversion = d3dfmt_get_conv(surface->container, TRUE))) + else if ((conversion = d3dfmt_get_conv(texture, TRUE))) { - surface->flags |= SFLAG_CONVERTED; + converted = TRUE; format = wined3d_get_format(context->gl_info, conversion->dst_format); } - else - { - surface->flags &= ~SFLAG_CONVERTED; - } - - wined3d_texture_bind_and_dirtify(surface->container, context, srgb); - surface_allocate_surface(surface, context->gl_info, format, srgb); - surface->flags |= alloc_flag; -} -/* Context activation is done by the caller. */ -void surface_prepare_texture(struct wined3d_surface *surface, struct wined3d_context *context, BOOL srgb) -{ - struct wined3d_texture *texture = surface->container; - UINT sub_count = texture->level_count * texture->layer_count; - UINT i; - - TRACE("surface %p is a subresource of texture %p.\n", surface, texture); + wined3d_texture_bind_and_dirtify(texture, context, srgb); for (i = 0; i < sub_count; ++i) { struct wined3d_surface *s = surface_from_resource(texture->sub_resources[i]); - surface_prepare_texture_internal(s, context, srgb); - } - return; + if (s->flags & alloc_flag) + continue; + + if (converted) + s->flags |= SFLAG_CONVERTED; + else + s->flags &= ~SFLAG_CONVERTED; + + surface_allocate_surface(s, context->gl_info, format, srgb); + s->flags |= alloc_flag; + } } void surface_prepare_rb(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info, BOOL multisample)
1
0
0
0
Henri Verbeet : wined3d: Get rid of d3dfmt_convert_surface().
by Alexandre Julliard
07 Oct '14
07 Oct '14
Module: wine Branch: master Commit: 6da1cff518e106fa9ec9763aa64da2d567c352d9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6da1cff518e106fa9ec9763aa…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Oct 7 08:41:15 2014 +0200 wined3d: Get rid of d3dfmt_convert_surface(). --- dlls/wined3d/surface.c | 457 ++++++++++++++++++----------------------- dlls/wined3d/wined3d_private.h | 11 - 2 files changed, 199 insertions(+), 269 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=6da1cff518e106fa9ec97…
1
0
0
0
Henri Verbeet : wined3d: Return the destination format from d3dfmt_get_conv().
by Alexandre Julliard
07 Oct '14
07 Oct '14
Module: wine Branch: master Commit: 71b59afe03dc7cf8ecf40b8c48892528574dcad3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=71b59afe03dc7cf8ecf40b8c4…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Oct 7 08:41:14 2014 +0200 wined3d: Return the destination format from d3dfmt_get_conv(). --- dlls/wined3d/surface.c | 85 ++++++++++++++++++++++++++------------------------ 1 file changed, 45 insertions(+), 40 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index ee51f6b..47d5b52 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -1586,12 +1586,8 @@ static void surface_upload_data(struct wined3d_surface *surface, const struct wi } static void d3dfmt_get_conv(const struct wined3d_texture *texture, BOOL need_alpha_ck, - struct wined3d_format *format, enum wined3d_conversion_type *conversion_type) + enum wined3d_format_id *dst_format_id, enum wined3d_conversion_type *conversion_type) { - const struct wined3d_device *device = texture->resource.device; - const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; - const struct wined3d_format *dst_format; - enum wined3d_format_id dst_format_id; unsigned int i; static const struct @@ -1609,9 +1605,8 @@ static void d3dfmt_get_conv(const struct wined3d_texture *texture, BOOL need_alp {WINED3DFMT_B8G8R8A8_UNORM, WINED3D_CT_CK_B8G8R8A8, WINED3DFMT_B8G8R8A8_UNORM}, }; - *format = *texture->resource.format; *conversion_type = WINED3D_CT_NONE; - dst_format_id = format->id; + *dst_format_id = WINED3DFMT_UNKNOWN; if (need_alpha_ck && (texture->color_key_flags & WINEDDSD_CKSRCBLT)) { @@ -1621,7 +1616,7 @@ static void d3dfmt_get_conv(const struct wined3d_texture *texture, BOOL need_alp continue; *conversion_type = color_key_info[i].conversion_type; - dst_format_id = color_key_info[i].dst_format; + *dst_format_id = color_key_info[i].dst_format; break; } @@ -1631,22 +1626,11 @@ static void d3dfmt_get_conv(const struct wined3d_texture *texture, BOOL need_alp /* FIXME: This should check if the blitter backend can do P8 conversion, * instead of checking for ARB_fragment_program. */ if (texture->resource.format->id == WINED3DFMT_P8_UINT - && !(gl_info->supported[ARB_FRAGMENT_PROGRAM] && texture->swapchain - && texture == texture->swapchain->front_buffer)) + && !(texture->resource.device->adapter->gl_info.supported[ARB_FRAGMENT_PROGRAM] + && texture->swapchain && texture == texture->swapchain->front_buffer)) { *conversion_type = WINED3D_CT_P8; - dst_format_id = WINED3DFMT_B8G8R8A8_UNORM; - } - - if (*conversion_type != WINED3D_CT_NONE) - { - dst_format = wined3d_get_format(gl_info, dst_format_id); - format->glInternal = dst_format->glInternal; - format->glGammaInternal = dst_format->glGammaInternal; - format->rtInternal = dst_format->rtInternal; - format->glFormat = dst_format->glFormat; - format->glType = dst_format->glType; - format->byte_count = dst_format->byte_count; + *dst_format_id = WINED3DFMT_B8G8R8A8_UNORM; } } @@ -1678,9 +1662,9 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P const struct wined3d_format *dst_format; const struct wined3d_gl_info *gl_info; enum wined3d_conversion_type convert; + enum wined3d_format_id format_id; struct wined3d_context *context; struct wined3d_bo_address data; - struct wined3d_format format; UINT update_w, update_h; UINT dst_w, dst_h; RECT r, dst_rect; @@ -1754,8 +1738,8 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P } /* Use wined3d_surface_blt() instead of uploading directly if we need conversion. */ - d3dfmt_get_conv(dst_surface->container, FALSE, &format, &convert); - if (convert != WINED3D_CT_NONE || format.convert) + d3dfmt_get_conv(dst_surface->container, FALSE, &format_id, &convert); + if (dst_format->convert || convert != WINED3D_CT_NONE) return wined3d_surface_blt(dst_surface, &dst_rect, src_surface, src_rect, 0, NULL, WINED3D_TEXF_POINT); context = context_acquire(dst_surface->resource.device, NULL); @@ -3081,19 +3065,34 @@ void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb) static void surface_prepare_texture_internal(struct wined3d_surface *surface, struct wined3d_context *context, BOOL srgb) { + const struct wined3d_format *format = surface->container->resource.format; DWORD alloc_flag = srgb ? SFLAG_SRGBALLOCATED : SFLAG_ALLOCATED; - enum wined3d_conversion_type convert; - struct wined3d_format format; if (surface->flags & alloc_flag) return; - d3dfmt_get_conv(surface->container, TRUE, &format, &convert); - if (convert != WINED3D_CT_NONE || format.convert) + if (format->convert) + { surface->flags |= SFLAG_CONVERTED; - else surface->flags &= ~SFLAG_CONVERTED; + } + else + { + enum wined3d_conversion_type convert; + enum wined3d_format_id format_id; + + d3dfmt_get_conv(surface->container, TRUE, &format_id, &convert); + if (convert != WINED3D_CT_NONE) + { + surface->flags |= SFLAG_CONVERTED; + format = wined3d_get_format(context->gl_info, format_id); + } + else + { + surface->flags &= ~SFLAG_CONVERTED; + } + } wined3d_texture_bind_and_dirtify(surface->container, context, srgb); - surface_allocate_surface(surface, context->gl_info, &format, srgb); + surface_allocate_surface(surface, context->gl_info, format, srgb); surface->flags |= alloc_flag; } @@ -4480,7 +4479,9 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, { RECT src_rect = {0, 0, surface->resource.width, surface->resource.height}; struct wined3d_device *device = surface->resource.device; + struct wined3d_texture *texture = surface->container; enum wined3d_conversion_type convert; + enum wined3d_format_id format_id; struct wined3d_context *context; UINT width, src_pitch, dst_pitch; struct wined3d_bo_address data; @@ -4489,7 +4490,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, BYTE *mem = NULL; if (wined3d_settings.offscreen_rendering_mode != ORM_FBO - && wined3d_resource_is_offscreen(&surface->container->resource) + && wined3d_resource_is_offscreen(&texture->resource) && (surface->locations & WINED3D_LOCATION_DRAWABLE)) { surface_load_fb_texture(surface, srgb); @@ -4532,8 +4533,6 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, /* Upload from system memory */ - d3dfmt_get_conv(surface->container, TRUE /* We need color keying */, &format, &convert); - if (srgb) { if ((surface->locations & (WINED3D_LOCATION_TEXTURE_RGB | surface->resource.map_binding)) @@ -4569,18 +4568,23 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, context = context_acquire(device, NULL); surface_prepare_texture(surface, context, srgb); - wined3d_texture_bind_and_dirtify(surface->container, context, srgb); + wined3d_texture_bind_and_dirtify(texture, context, srgb); - if (surface->container->color_key_flags & WINEDDSD_CKSRCBLT) + if (texture->color_key_flags & WINEDDSD_CKSRCBLT) { surface->flags |= SFLAG_GLCKEY; - surface->gl_color_key = surface->container->src_blt_color_key; + surface->gl_color_key = texture->src_blt_color_key; } else surface->flags &= ~SFLAG_GLCKEY; width = surface->resource.width; src_pitch = wined3d_surface_get_pitch(surface); + format = *texture->resource.format; + d3dfmt_get_conv(texture, TRUE, &format_id, &convert); + if (convert != WINED3D_CT_NONE) + format = *wined3d_get_format(gl_info, format_id); + /* Don't use PBOs for converted surfaces. During PBO conversion we look at * SFLAG_CONVERTED but it isn't set (yet) in all cases it is getting * called. */ @@ -5562,7 +5566,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC RECT src_rect, dst_rect; BOOL scale, convert; enum wined3d_conversion_type dst_convert_type; - struct wined3d_format dst_conv_fmt; + enum wined3d_format_id dst_conv_fmt_id; static const DWORD simple_blit = WINEDDBLT_ASYNC | WINEDDBLT_COLORFILL @@ -5677,8 +5681,9 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC /* We want to avoid invalidating the sysmem location for converted * surfaces, since otherwise we'd have to convert the data back when * locking them. */ - d3dfmt_get_conv(dst_surface->container, TRUE, &dst_conv_fmt, &dst_convert_type); - if (dst_convert_type != WINED3D_CT_NONE || dst_conv_fmt.convert || dst_surface->flags & SFLAG_CONVERTED) + d3dfmt_get_conv(dst_surface->container, TRUE, &dst_conv_fmt_id, &dst_convert_type); + if (dst_surface->flags & SFLAG_CONVERTED || dst_surface->container->resource.format->convert + || dst_convert_type != WINED3D_CT_NONE) { WARN_(d3d_perf)("Converted surface, using CPU blit.\n"); goto cpu;
1
0
0
0
Henri Verbeet : ws2_32: Simplify some address calculations for SIO_ADDRESS_LIST_QUERY.
by Alexandre Julliard
07 Oct '14
07 Oct '14
Module: wine Branch: master Commit: c0e49c5c40c064e4a7a4ddaeaf039ca0813b7d84 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c0e49c5c40c064e4a7a4ddaea…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Oct 7 08:41:13 2014 +0200 ws2_32: Simplify some address calculations for SIO_ADDRESS_LIST_QUERY. --- dlls/ws2_32/socket.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index aba7d3f..8b60fb3 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -3963,9 +3963,7 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID for (p = table, num = 0; p; p = p->Next) if (p->IpAddressList.IpAddress.String[0]) num++; - total = sizeof(SOCKET_ADDRESS_LIST) + sizeof(SOCKET_ADDRESS) * (num - 1); - total += sizeof(SOCKADDR) * num; - + total = FIELD_OFFSET(SOCKET_ADDRESS_LIST, Address[num]) + num * sizeof(*sockaddr); if (total > out_size || !out_buff) { *ret_size = total; @@ -3976,7 +3974,7 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID sa_list = out_buff; sa = sa_list->Address; - sockaddr = (SOCKADDR_IN *)((char *)sa + num * sizeof(SOCKET_ADDRESS)); + sockaddr = (SOCKADDR_IN *)&sa[num]; sa_list->iAddressCount = num; for (p = table, i = 0; p; p = p->Next)
1
0
0
0
Henri Verbeet : ws2_32: Return an error if "out_buff" is NULL for SIO_ADDRESS_LIST_QUERY.
by Alexandre Julliard
07 Oct '14
07 Oct '14
Module: wine Branch: master Commit: 32724def728e54b9023fbec9d43854e8afdbf43c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=32724def728e54b9023fbec9d…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Oct 7 08:41:12 2014 +0200 ws2_32: Return an error if "out_buff" is NULL for SIO_ADDRESS_LIST_QUERY. --- dlls/ws2_32/socket.c | 39 ++++++++++++++++++--------------------- dlls/ws2_32/tests/sock.c | 5 +++++ 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 98ed686..aba7d3f 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -3947,6 +3947,10 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID if (GetAdaptersInfo(NULL, &size) == ERROR_BUFFER_OVERFLOW) { IP_ADAPTER_INFO *p, *table = HeapAlloc(GetProcessHeap(), 0, size); + SOCKET_ADDRESS_LIST *sa_list; + SOCKADDR_IN *sockaddr; + SOCKET_ADDRESS *sa; + unsigned int i; DWORD num; if (!table || GetAdaptersInfo(table, &size)) @@ -3962,7 +3966,7 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID total = sizeof(SOCKET_ADDRESS_LIST) + sizeof(SOCKET_ADDRESS) * (num - 1); total += sizeof(SOCKADDR) * num; - if (total > out_size) + if (total > out_size || !out_buff) { *ret_size = total; HeapFree(GetProcessHeap(), 0, table); @@ -3970,29 +3974,22 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID break; } - if (out_buff) - { - unsigned int i; - SOCKET_ADDRESS *sa; - SOCKET_ADDRESS_LIST *sa_list = out_buff; - SOCKADDR_IN *sockaddr; - - sa = sa_list->Address; - sockaddr = (SOCKADDR_IN *)((char *)sa + num * sizeof(SOCKET_ADDRESS)); - sa_list->iAddressCount = num; + sa_list = out_buff; + sa = sa_list->Address; + sockaddr = (SOCKADDR_IN *)((char *)sa + num * sizeof(SOCKET_ADDRESS)); + sa_list->iAddressCount = num; - for (p = table, i = 0; p; p = p->Next) - { - if (!p->IpAddressList.IpAddress.String[0]) continue; + for (p = table, i = 0; p; p = p->Next) + { + if (!p->IpAddressList.IpAddress.String[0]) continue; - sa[i].lpSockaddr = (SOCKADDR *)&sockaddr[i]; - sa[i].iSockaddrLength = sizeof(SOCKADDR); + sa[i].lpSockaddr = (SOCKADDR *)&sockaddr[i]; + sa[i].iSockaddrLength = sizeof(SOCKADDR); - sockaddr[i].sin_family = AF_INET; - sockaddr[i].sin_port = 0; - sockaddr[i].sin_addr.WS_s_addr = inet_addr(p->IpAddressList.IpAddress.String); - i++; - } + sockaddr[i].sin_family = AF_INET; + sockaddr[i].sin_port = 0; + sockaddr[i].sin_addr.WS_s_addr = inet_addr(p->IpAddressList.IpAddress.String); + i++; } HeapFree(GetProcessHeap(), 0, table); diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 1d61f9a..0ad6e8a 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -7499,6 +7499,11 @@ static void test_address_list_query(void) ok(WSAGetLastError() == WSAEFAULT, "Got unexpected error %d.\n", WSAGetLastError()); bytes_returned = 0xdeadbeef; + ret = WSAIoctl(s, SIO_ADDRESS_LIST_QUERY, NULL, 0, NULL, size, &bytes_returned, NULL, NULL); + ok(ret == SOCKET_ERROR, "Got unexpected ret %d.\n", ret); + ok(WSAGetLastError() == WSAEFAULT, "Got unexpected error %d.\n", WSAGetLastError()); + ok(bytes_returned == size, "Got unexpected bytes_returned %u, expected %u.\n", bytes_returned, size); + ret = WSAIoctl(s, SIO_ADDRESS_LIST_QUERY, NULL, 0, address_list, 1, &bytes_returned, NULL, NULL); ok(ret == SOCKET_ERROR, "Got unexpected ret %d.\n", ret); ok(WSAGetLastError() == WSAEINVAL, "Got unexpected error %d.\n", WSAGetLastError());
1
0
0
0
Nikolay Sivov : dwrite: Use public macro to define OpenType tags.
by Alexandre Julliard
07 Oct '14
07 Oct '14
Module: wine Branch: master Commit: 3b1e8bf824b7506ad718271f2dbbac084b1e2c7f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3b1e8bf824b7506ad718271f2…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Oct 7 09:23:26 2014 +0400 dwrite: Use public macro to define OpenType tags. --- dlls/dwrite/dwrite_private.h | 4 ---- dlls/dwrite/font.c | 12 ++++-------- include/dwrite.idl | 6 ++++++ 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index 5a2b5a3..736292e 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -19,10 +19,6 @@ #include "wine/debug.h" #include "wine/unicode.h" -#define DWRITE_MAKE_OPENTYPE_TAG(ch0, ch1, ch2, ch3) \ - ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \ - ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24)) - static inline void *heap_alloc(size_t len) { return HeapAlloc(GetProcessHeap(), 0, len); diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 923996b..def64ce 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -25,14 +25,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(dwrite); -#define MS_MAKE_TAG(ch0, ch1, ch2, ch3) \ - ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \ - ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24)) - -#define MS_HEAD_TAG MS_MAKE_TAG('h','e','a','d') -#define MS_OS2_TAG MS_MAKE_TAG('O','S','/','2') -#define MS_POST_TAG MS_MAKE_TAG('p','o','s','t') -#define MS_CMAP_TAG MS_MAKE_TAG('c','m','a','p') +#define MS_HEAD_TAG DWRITE_MAKE_OPENTYPE_TAG('h','e','a','d') +#define MS_OS2_TAG DWRITE_MAKE_OPENTYPE_TAG('O','S','/','2') +#define MS_POST_TAG DWRITE_MAKE_OPENTYPE_TAG('p','o','s','t') +#define MS_CMAP_TAG DWRITE_MAKE_OPENTYPE_TAG('c','m','a','p') struct dwrite_fontface_data { LONG ref; diff --git a/include/dwrite.idl b/include/dwrite.idl index bc530fc..1888215 100644 --- a/include/dwrite.idl +++ b/include/dwrite.idl @@ -222,6 +222,12 @@ typedef enum DWRITE_LINE_SPACING_METHOD DWRITE_LINE_SPACING_METHOD_UNIFORM } DWRITE_LINE_SPACING_METHOD; +cpp_quote("#define DWRITE_MAKE_OPENTYPE_TAG(a,b,c,d) ( \\") +cpp_quote(" ((UINT32)(UINT8)(d) << 24) | \\") +cpp_quote(" ((UINT32)(UINT8)(c) << 16) | \\") +cpp_quote(" ((UINT32)(UINT8)(b) << 8) | \\") +cpp_quote(" (UINT32)(UINT8)(a))") + typedef enum DWRITE_FONT_FEATURE_TAG { DWRITE_FONT_FEATURE_TAG_ALTERNATIVE_FRACTIONS = 0x63726661, /* 'afrc' */
1
0
0
0
Nikolay Sivov : dwrite: Move font table related data to a separate structure.
by Alexandre Julliard
07 Oct '14
07 Oct '14
Module: wine Branch: master Commit: 07dc8b66e421392df0199bba1026113f838e5753 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=07dc8b66e421392df0199bba1…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Oct 6 16:26:31 2014 +0400 dwrite: Move font table related data to a separate structure. Eventually we should get rid of separate allocations on every TryGetFontTable(), that's not how local loader works. Instead it maps font file and returns pointers to a mapping, context is always NULL in this case. --- dlls/dwrite/font.c | 63 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 30 deletions(-) diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 25b47ef..923996b 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -97,21 +97,24 @@ struct dwrite_font { #define DWRITE_FONTTABLE_MAGIC 0xededfafa -struct dwrite_fonttable { +struct dwrite_fonttablecontext { UINT32 magic; - LPVOID context; + void *context; UINT32 file_index; }; +struct dwrite_fonttable { + void *data; + void *context; + UINT32 size; +}; + struct dwrite_fontface { IDWriteFontFace IDWriteFontFace_iface; LONG ref; struct dwrite_fontface_data *data; - - LPVOID CMAP_table; - LPVOID CMAP_context; - DWORD CMAP_size; + struct dwrite_fonttable cmap; BOOL is_system; LOGFONTW logfont; @@ -236,8 +239,8 @@ static ULONG WINAPI dwritefontface_Release(IDWriteFontFace *iface) if (!ref) { - if (This->CMAP_context) - IDWriteFontFace_ReleaseFontTable(iface, This->CMAP_context); + if (This->cmap.context) + IDWriteFontFace_ReleaseFontTable(iface, This->cmap.context); _free_fontface_data(This->data); heap_free(This); } @@ -353,10 +356,10 @@ static HRESULT WINAPI dwritefontface_GetGlyphIndices(IDWriteFontFace *iface, UIN { HRESULT hr; TRACE("(%p)->(%p %u %p)\n", This, codepoints, count, glyph_indices); - if (!This->CMAP_table) + if (!This->cmap.data) { BOOL exists = FALSE; - hr = IDWriteFontFace_TryGetFontTable(iface, MS_CMAP_TAG, (const void**)&This->CMAP_table, &This->CMAP_size, &This->CMAP_context, &exists); + hr = IDWriteFontFace_TryGetFontTable(iface, MS_CMAP_TAG, (const void**)&This->cmap.data, &This->cmap.size, &This->cmap.context, &exists); if (FAILED(hr) || !exists) { ERR("Font does not have a CMAP table\n"); @@ -366,7 +369,7 @@ static HRESULT WINAPI dwritefontface_GetGlyphIndices(IDWriteFontFace *iface, UIN for (i = 0; i < count; i++) { - OpenType_CMAP_GetGlyphIndex(This->CMAP_table, codepoints[i], &glyph_indices[i], 0); + OpenType_CMAP_GetGlyphIndex(This->cmap.data, codepoints[i], &glyph_indices[i], 0); } return S_OK; } @@ -385,14 +388,14 @@ static HRESULT WINAPI dwritefontface_TryGetFontTable(IDWriteFontFace *iface, UIN { HRESULT hr = S_OK; int i; - struct dwrite_fonttable *table; + struct dwrite_fonttablecontext *tablecontext; TRACE("(%p)->(%u %p %p %p %p)\n", This, table_tag, table_data, table_size, context, exists); - table = heap_alloc(sizeof(struct dwrite_fonttable)); - if (!table) + tablecontext = heap_alloc(sizeof(struct dwrite_fonttablecontext)); + if (!tablecontext) return E_OUTOFMEMORY; - table->magic = DWRITE_FONTTABLE_MAGIC; + tablecontext->magic = DWRITE_FONTTABLE_MAGIC; *exists = FALSE; for (i = 0; i < This->data->file_count && !(*exists); i++) @@ -401,16 +404,16 @@ static HRESULT WINAPI dwritefontface_TryGetFontTable(IDWriteFontFace *iface, UIN hr = _dwritefontfile_GetFontFileStream(This->data->files[i], &stream); if (FAILED(hr)) continue; - table->file_index = i; + tablecontext->file_index = i; - hr = find_font_table(stream, This->data->index, table_tag, table_data, &table->context, table_size, exists); + hr = find_font_table(stream, This->data->index, table_tag, table_data, &tablecontext->context, table_size, exists); IDWriteFontFileStream_Release(stream); } if (FAILED(hr) && !*exists) - heap_free(table); + heap_free(tablecontext); else - *context = (LPVOID)table; + *context = (void*)tablecontext; return hr; } } @@ -418,23 +421,23 @@ static HRESULT WINAPI dwritefontface_TryGetFontTable(IDWriteFontFace *iface, UIN static void WINAPI dwritefontface_ReleaseFontTable(IDWriteFontFace *iface, void *table_context) { struct dwrite_fontface *This = impl_from_IDWriteFontFace(iface); - struct dwrite_fonttable *table = (struct dwrite_fonttable *)table_context; + struct dwrite_fonttablecontext *tablecontext = (struct dwrite_fonttablecontext*)table_context; IDWriteFontFileStream *stream; HRESULT hr; TRACE("(%p)->(%p)\n", This, table_context); - if (table->magic != DWRITE_FONTTABLE_MAGIC) + if (tablecontext->magic != DWRITE_FONTTABLE_MAGIC) { TRACE("Invalid table magic\n"); return; } - hr = _dwritefontfile_GetFontFileStream(This->data->files[table->file_index], &stream); + hr = _dwritefontfile_GetFontFileStream(This->data->files[tablecontext->file_index], &stream); if (FAILED(hr)) return; - IDWriteFontFileStream_ReleaseFileFragment(stream, table->context); + IDWriteFontFileStream_ReleaseFileFragment(stream, tablecontext->context); IDWriteFontFileStream_Release(stream); - heap_free(table); + heap_free(tablecontext); } static HRESULT WINAPI dwritefontface_GetGlyphRunOutline(IDWriteFontFace *iface, FLOAT emSize, @@ -516,9 +519,9 @@ static HRESULT create_system_fontface(struct dwrite_font *font, IDWriteFontFace This->data->files = NULL; This->data->index = 0; This->data->simulations = DWRITE_FONT_SIMULATIONS_NONE; - This->CMAP_table = NULL; - This->CMAP_context = NULL; - This->CMAP_size = 0; + This->cmap.data = NULL; + This->cmap.context = NULL; + This->cmap.size = 0; This->is_system = TRUE; memset(&This->logfont, 0, sizeof(This->logfont)); @@ -1358,9 +1361,9 @@ HRESULT font_create_fontface(IDWriteFactory *iface, DWRITE_FONT_FACE_TYPE facety This->data->type = facetype; This->data->file_count = files_number; This->data->files = heap_alloc(sizeof(*This->data->files) * files_number); - This->CMAP_table = NULL; - This->CMAP_context = NULL; - This->CMAP_size = 0; + This->cmap.data = NULL; + This->cmap.context = NULL; + This->cmap.size = 0; /* Verify font file streams */ for (i = 0; i < This->data->file_count && SUCCEEDED(hr); i++) {
1
0
0
0
Nikolay Sivov : dwrite: Store OpenType language tag in shaping cache.
by Alexandre Julliard
07 Oct '14
07 Oct '14
Module: wine Branch: master Commit: c9bb307c358c0b9361d4168b9fcea60856cfc157 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c9bb307c358c0b9361d4168b9…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Oct 6 05:01:22 2014 +0400 dwrite: Store OpenType language tag in shaping cache. --- dlls/dwrite/analyzer.c | 2 +- dlls/dwrite/dwrite_private.h | 6 +++++- dlls/dwrite/opentype.c | 4 ---- dlls/dwrite/shape.c | 10 +++++++++- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/dlls/dwrite/analyzer.c b/dlls/dwrite/analyzer.c index e2fac55..5851e90 100644 --- a/dlls/dwrite/analyzer.c +++ b/dlls/dwrite/analyzer.c @@ -926,7 +926,7 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphs(IDWriteTextAnalyzer2 *iface, } *actual_glyph_count = g; - hr = create_scriptshaping_cache(fontface, &cache); + hr = create_scriptshaping_cache(fontface, locale, &cache); if (FAILED(hr)) goto done; diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index 3eb7957..5a2b5a3 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -19,6 +19,10 @@ #include "wine/debug.h" #include "wine/unicode.h" +#define DWRITE_MAKE_OPENTYPE_TAG(ch0, ch1, ch2, ch3) \ + ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \ + ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24)) + static inline void *heap_alloc(size_t len) { return HeapAlloc(GetProcessHeap(), 0, len); @@ -136,7 +140,7 @@ enum SCRIPT_JUSTIFY }; struct scriptshaping_cache; -extern HRESULT create_scriptshaping_cache(IDWriteFontFace*,struct scriptshaping_cache**) DECLSPEC_HIDDEN; +extern HRESULT create_scriptshaping_cache(IDWriteFontFace*,const WCHAR*,struct scriptshaping_cache**) DECLSPEC_HIDDEN; extern void release_scriptshaping_cache(struct scriptshaping_cache*) DECLSPEC_HIDDEN; struct scriptshaping_ops diff --git a/dlls/dwrite/opentype.c b/dlls/dwrite/opentype.c index 532c126..318adcf 100644 --- a/dlls/dwrite/opentype.c +++ b/dlls/dwrite/opentype.c @@ -25,10 +25,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(dwrite); -#define DWRITE_MAKE_OPENTYPE_TAG(ch0, ch1, ch2, ch3) \ - ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \ - ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24)) - #define MS_TTCF_TAG DWRITE_MAKE_OPENTYPE_TAG('t','t','c','f') #define MS_OTTO_TAG DWRITE_MAKE_OPENTYPE_TAG('O','T','T','O') diff --git a/dlls/dwrite/shape.c b/dlls/dwrite/shape.c index bf09861..dbf5c67 100644 --- a/dlls/dwrite/shape.c +++ b/dlls/dwrite/shape.c @@ -29,9 +29,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(dwrite); struct scriptshaping_cache { IDWriteFontFace *fontface; + UINT32 language_tag; }; -HRESULT create_scriptshaping_cache(IDWriteFontFace *fontface, struct scriptshaping_cache **cache) +HRESULT create_scriptshaping_cache(IDWriteFontFace *fontface, const WCHAR *locale, struct scriptshaping_cache **cache) { struct scriptshaping_cache *ret; @@ -42,6 +43,13 @@ HRESULT create_scriptshaping_cache(IDWriteFontFace *fontface, struct scriptshapi ret->fontface = fontface; IDWriteFontFace_AddRef(fontface); + ret->language_tag = DWRITE_MAKE_OPENTYPE_TAG('d','f','l','t'); + if (locale) { + WCHAR tag[5]; + if (GetLocaleInfoEx(locale, LOCALE_SOPENTYPELANGUAGETAG, tag, sizeof(tag)/sizeof(WCHAR))) + ret->language_tag = DWRITE_MAKE_OPENTYPE_TAG(tag[0],tag[1],tag[2],tag[3]); + } + *cache = ret; return S_OK;
1
0
0
0
← Newer
1
...
28
29
30
31
32
33
34
...
40
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
Results per page:
10
25
50
100
200