winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
February 2018
----- 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
804 discussions
Start a n
N
ew thread
Józef Kucia : wined3d: Introduce structure for dummy textures.
by Alexandre Julliard
15 Feb '18
15 Feb '18
Module: wine Branch: master Commit: 1b3b2b22682ec79bad8a01ad73ba2e25b33308f6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1b3b2b22682ec79bad8a01ad…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Thu Feb 15 13:49:36 2018 +0100 wined3d: Introduce structure for dummy textures. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/context.c | 58 ++++++++----------- dlls/wined3d/device.c | 123 +++++++++++++++-------------------------- dlls/wined3d/wined3d_private.h | 26 +++++---- 3 files changed, 82 insertions(+), 125 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=1b3b2b22682ec79bad8a…
1
0
0
0
Józef Kucia : wined3d: Create dummy textures for multisample texture targets.
by Alexandre Julliard
15 Feb '18
15 Feb '18
Module: wine Branch: master Commit: d9fa6bb6c239aeba48a781ef0526156584032042 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d9fa6bb6c239aeba48a781ef…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Thu Feb 15 13:49:35 2018 +0100 wined3d: Create dummy textures for multisample texture targets. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/context.c | 17 ++++++++++++++++- dlls/wined3d/device.c | 31 +++++++++++++++++++++++++++++++ dlls/wined3d/wined3d_private.h | 2 ++ 3 files changed, 49 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 8c2ea86..7eeb8c4 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -1756,7 +1756,15 @@ void context_bind_dummy_textures(const struct wined3d_device *device, const stru if (gl_info->supported[ARB_TEXTURE_BUFFER_OBJECT]) gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_BUFFER, device->dummy_textures.tex_buffer); - checkGLcall("Bind dummy textures"); + if (gl_info->supported[ARB_TEXTURE_MULTISAMPLE]) + { + gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, + device->dummy_textures.tex_2d_ms); + gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, + device->dummy_textures.tex_2d_ms_array); + } + + checkGLcall("bind dummy textures"); } } @@ -2759,6 +2767,13 @@ void context_bind_texture(struct wined3d_context *context, GLenum target, GLuint gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_BUFFER, device->dummy_textures.tex_buffer); checkGLcall("glBindTexture"); break; + case GL_TEXTURE_2D_MULTISAMPLE: + gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, device->dummy_textures.tex_2d_ms); + break; + case GL_TEXTURE_2D_MULTISAMPLE_ARRAY: + gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, + device->dummy_textures.tex_2d_ms_array); + break; default: ERR("Unexpected texture target %#x.\n", old_texture_type); } diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 89083fc..83ba2b6 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -727,6 +727,31 @@ static void create_dummy_textures(struct wined3d_device *device, struct wined3d_ checkGLcall("glDeleteBuffers"); } + if (gl_info->supported[ARB_TEXTURE_MULTISAMPLE]) + { + gl_info->gl_ops.gl.p_glGenTextures(1, &device->dummy_textures.tex_2d_ms); + gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, device->dummy_textures.tex_2d_ms); + GL_EXTCALL(glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, 1, GL_RGBA8, 1, 1, GL_TRUE)); + + gl_info->gl_ops.gl.p_glGenTextures(1, &device->dummy_textures.tex_2d_ms_array); + gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, device->dummy_textures.tex_2d_ms_array); + GL_EXTCALL(glTexImage3DMultisample(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, 1, GL_RGBA8, 1, 1, 1, GL_TRUE)); + + if (gl_info->supported[ARB_CLEAR_TEXTURE]) + { + GL_EXTCALL(glClearTexImage(device->dummy_textures.tex_2d_ms, + 0, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, &color)); + GL_EXTCALL(glClearTexImage(device->dummy_textures.tex_2d_ms_array, + 0, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, &color)); + } + else + { + WARN("ARB_clear_texture is currently required to clear dummy multisample textures.\n"); + } + + checkGLcall("create dummy multisample textures"); + } + context_bind_dummy_textures(device, context); } @@ -735,6 +760,12 @@ static void destroy_dummy_textures(struct wined3d_device *device, struct wined3d { const struct wined3d_gl_info *gl_info = context->gl_info; + if (gl_info->supported[ARB_TEXTURE_MULTISAMPLE]) + { + gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->dummy_textures.tex_2d_ms); + gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->dummy_textures.tex_2d_ms_array); + } + if (gl_info->supported[ARB_TEXTURE_BUFFER_OBJECT]) gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->dummy_textures.tex_buffer); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 02f471b..7cf5fc3 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2942,6 +2942,8 @@ struct wined3d_device GLuint tex_cube_array; GLuint tex_2d_array; GLuint tex_buffer; + GLuint tex_2d_ms; + GLuint tex_2d_ms_array; } dummy_textures; /* Default sampler used to emulate the direct resource access without using wined3d_sampler */
1
0
0
0
Józef Kucia : wined3d: Align OpenGL version comments for newer core functions.
by Alexandre Julliard
15 Feb '18
15 Feb '18
Module: wine Branch: master Commit: a9e30882310608f6665089bd1803b10094a8ca9e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a9e30882310608f6665089bd…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Thu Feb 15 13:49:34 2018 +0100 wined3d: Align OpenGL version comments for newer core functions. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/directx.c | 232 ++++++++++++++++++++++++------------------------- 1 file changed, 116 insertions(+), 116 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=a9e30882310608f66650…
1
0
0
0
Józef Kucia : d3d8/tests: Add test for changing multisample type of implicit swapchain.
by Alexandre Julliard
15 Feb '18
15 Feb '18
Module: wine Branch: master Commit: 6503946fc749434804131681ce70af4631403f35 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6503946fc749434804131681…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Thu Feb 15 13:49:33 2018 +0100 d3d8/tests: Add test for changing multisample type of implicit swapchain. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d8/tests/device.c | 58 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index 9efa943..6ae1782 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -8492,9 +8492,64 @@ static void test_clip_planes_limits(void) DestroyWindow(window); } +static void test_swapchain_multisample_reset(void) +{ + D3DPRESENT_PARAMETERS present_parameters; + IDirect3DDevice8 *device; + IDirect3D8 *d3d; + ULONG refcount; + HWND window; + HRESULT hr; + + window = CreateWindowA("d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + ok(!!window, "Failed to create a window.\n"); + d3d = Direct3DCreate8(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create D3D object.\n"); + + if (IDirect3D8_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_A8R8G8B8, TRUE, D3DMULTISAMPLE_2_SAMPLES) == D3DERR_NOTAVAILABLE) + { + skip("Multisampling not supported for D3DFMT_A8R8G8B8.\n"); + IDirect3D8_Release(d3d); + DestroyWindow(window); + return; + } + + if (!(device = create_device(d3d, window, NULL))) + { + skip("Failed to create 3D device.\n"); + IDirect3D8_Release(d3d); + DestroyWindow(window); + return; + } + + hr = IDirect3DDevice8_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xffffffff, 1.0f, 0); + ok(hr == D3D_OK, "Failed to clear, hr %#x.\n", hr); + + memset(&present_parameters, 0, sizeof(present_parameters)); + present_parameters.BackBufferWidth = 640; + present_parameters.BackBufferHeight = 480; + present_parameters.BackBufferFormat = D3DFMT_A8R8G8B8; + present_parameters.SwapEffect = D3DSWAPEFFECT_DISCARD; + present_parameters.hDeviceWindow = NULL; + present_parameters.Windowed = TRUE; + present_parameters.MultiSampleType = D3DMULTISAMPLE_2_SAMPLES; + hr = IDirect3DDevice8_Reset(device, &present_parameters); + ok(hr == D3D_OK, "Failed to reset device, hr %#x.\n", hr); + + hr = IDirect3DDevice8_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0f, 0); + ok(hr == D3D_OK, "Failed to clear, hr %#x.\n", hr); + + refcount = IDirect3DDevice8_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); + IDirect3D8_Release(d3d); + DestroyWindow(window); +} + START_TEST(device) { - HMODULE d3d8_handle = GetModuleHandleA( "d3d8.dll" ); + HMODULE d3d8_handle = GetModuleHandleA("d3d8.dll"); WNDCLASSA wc = {0}; IDirect3D8 *d3d8; DEVMODEW current_mode; @@ -8600,6 +8655,7 @@ START_TEST(device) test_format_unknown(); test_destroyed_window(); test_clip_planes_limits(); + test_swapchain_multisample_reset(); UnregisterClassA("d3d8_test_wc", GetModuleHandleA(NULL)); }
1
0
0
0
Nikolay Sivov : comctl32/button: Use allocated structure to keep control data.
by Alexandre Julliard
15 Feb '18
15 Feb '18
Module: wine Branch: master Commit: 6e5507357457fd5835f24bdbeaae620918100c08 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6e5507357457fd5835f24bdb…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Feb 15 11:00:09 2018 +0300 comctl32/button: Use allocated structure to keep control data. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/button.c | 354 +++++++++++++++++++++---------------------- dlls/comctl32/tests/button.c | 4 + 2 files changed, 175 insertions(+), 183 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=6e5507357457fd5835f2…
1
0
0
0
Nikolay Sivov : comctl32/tests: Use the global memory allocation helpers.
by Alexandre Julliard
15 Feb '18
15 Feb '18
Module: wine Branch: master Commit: 8874a6ecc3358a7512e15b37654b896c5c7b4f6e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8874a6ecc3358a7512e15b37…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Feb 15 11:00:08 2018 +0300 comctl32/tests: Use the global memory allocation helpers. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/tests/combo.c | 4 ++-- dlls/comctl32/tests/listbox.c | 9 +++++---- dlls/comctl32/tests/mru.c | 5 +++-- dlls/comctl32/tests/msg.h | 12 +++++------- dlls/comctl32/tests/rebar.c | 13 +++++++------ dlls/comctl32/tests/subclass.c | 9 +++++---- dlls/comctl32/tests/taskdialog.c | 5 +++-- dlls/comctl32/tests/toolbar.c | 14 +++++++------- 8 files changed, 37 insertions(+), 34 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=8874a6ecc3358a7512e1…
1
0
0
0
Nikolay Sivov : comctl32/combo: Use the global memory allocation helpers.
by Alexandre Julliard
15 Feb '18
15 Feb '18
Module: wine Branch: master Commit: 887836cc6d5a2cb76f6cd413b26bd9d14222667c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=887836cc6d5a2cb76f6cd413…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Feb 15 11:00:07 2018 +0300 comctl32/combo: Use the global memory allocation helpers. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/combo.c | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/dlls/comctl32/combo.c b/dlls/comctl32/combo.c index 43b4cb4..7401a7e 100644 --- a/dlls/comctl32/combo.c +++ b/dlls/comctl32/combo.c @@ -38,6 +38,7 @@ #include "commctrl.h" #include "wine/unicode.h" #include "wine/debug.h" +#include "wine/heap.h" #include "comctl32.h" @@ -124,9 +125,9 @@ static BOOL COMBO_Init(void) */ static LRESULT COMBO_NCCreate(HWND hwnd, LONG style) { - LPHEADCOMBO lphc; + HEADCOMBO *lphc; - if (COMBO_Init() && (lphc = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(HEADCOMBO))) ) + if (COMBO_Init() && (lphc = heap_alloc_zero(sizeof(*lphc)))) { lphc->self = hwnd; SetWindowLongPtrW( hwnd, 0, (LONG_PTR)lphc ); @@ -157,20 +158,20 @@ static LRESULT COMBO_NCCreate(HWND hwnd, LONG style) /*********************************************************************** * COMBO_NCDestroy */ -static LRESULT COMBO_NCDestroy( LPHEADCOMBO lphc ) +static LRESULT COMBO_NCDestroy( HEADCOMBO *lphc ) { + if (lphc) + { + TRACE("[%p]: freeing storage\n", lphc->self); - if( lphc ) - { - TRACE("[%p]: freeing storage\n", lphc->self); + if ( (CB_GETTYPE(lphc) != CBS_SIMPLE) && lphc->hWndLBox ) + DestroyWindow( lphc->hWndLBox ); - if( (CB_GETTYPE(lphc) != CBS_SIMPLE) && lphc->hWndLBox ) - DestroyWindow( lphc->hWndLBox ); + SetWindowLongPtrW( lphc->self, 0, 0 ); + heap_free( lphc ); + } - SetWindowLongPtrW( lphc->self, 0, 0 ); - HeapFree( GetProcessHeap(), 0, lphc ); - } - return 0; + return 0; } /*********************************************************************** @@ -670,7 +671,7 @@ static void CBPaintText(HEADCOMBO *lphc, HDC hdc_paint) size = SendMessageW(lphc->hWndLBox, LB_GETTEXTLEN, id, 0); if (size == LB_ERR) FIXME("LB_ERR probably not handled yet\n"); - if( (pText = HeapAlloc( GetProcessHeap(), 0, (size + 1) * sizeof(WCHAR))) ) + if ((pText = heap_alloc((size + 1) * sizeof(WCHAR)))) { /* size from LB_GETTEXTLEN may be too large, from LB_GETTEXT is accurate */ size=SendMessageW(lphc->hWndLBox, LB_GETTEXT, id, (LPARAM)pText); @@ -768,7 +769,8 @@ static void CBPaintText(HEADCOMBO *lphc, HDC hdc_paint) if( !hdc_paint ) ReleaseDC( lphc->self, hdc ); } - HeapFree( GetProcessHeap(), 0, pText ); + + heap_free(pText); } /*********************************************************************** @@ -891,8 +893,8 @@ static INT CBUpdateLBox( LPHEADCOMBO lphc, BOOL bSelect ) idx = LB_ERR; length = SendMessageW( lphc->hWndEdit, WM_GETTEXTLENGTH, 0, 0 ); - if( length > 0 ) - pText = HeapAlloc( GetProcessHeap(), 0, (length + 1) * sizeof(WCHAR)); + if (length > 0) + pText = heap_alloc((length + 1) * sizeof(WCHAR)); TRACE("\t edit text length %i\n", length ); @@ -900,7 +902,7 @@ static INT CBUpdateLBox( LPHEADCOMBO lphc, BOOL bSelect ) { GetWindowTextW( lphc->hWndEdit, pText, length + 1); idx = SendMessageW(lphc->hWndLBox, LB_FINDSTRING, -1, (LPARAM)pText); - HeapFree( GetProcessHeap(), 0, pText ); + heap_free( pText ); } SendMessageW(lphc->hWndLBox, LB_SETCURSEL, bSelect ? idx : -1, 0); @@ -930,10 +932,8 @@ static void CBUpdateEdit( LPHEADCOMBO lphc , INT index ) length = SendMessageW(lphc->hWndLBox, LB_GETTEXTLEN, index, 0); if( length != LB_ERR) { - if( (pText = HeapAlloc( GetProcessHeap(), 0, (length + 1) * sizeof(WCHAR))) ) - { + if ((pText = heap_alloc((length + 1) * sizeof(WCHAR)))) SendMessageW(lphc->hWndLBox, LB_GETTEXT, index, (LPARAM)pText); - } } } @@ -947,7 +947,7 @@ static void CBUpdateEdit( LPHEADCOMBO lphc , INT index ) if( lphc->wState & CBF_FOCUSED ) SendMessageW(lphc->hWndEdit, EM_SETSEL, 0, -1); - HeapFree( GetProcessHeap(), 0, pText ); + heap_free( pText ); } /*********************************************************************** @@ -1367,7 +1367,7 @@ static LRESULT COMBO_GetText( HEADCOMBO *lphc, INT count, LPWSTR buf ) /* 'length' is without the terminating character */ if (length >= count) { - LPWSTR lpBuffer = HeapAlloc(GetProcessHeap(), 0, (length + 1) * sizeof(WCHAR)); + WCHAR *lpBuffer = heap_alloc((length + 1) * sizeof(WCHAR)); if (!lpBuffer) goto error; length = SendMessageW(lphc->hWndLBox, LB_GETTEXT, idx, (LPARAM)lpBuffer); @@ -1377,7 +1377,7 @@ static LRESULT COMBO_GetText( HEADCOMBO *lphc, INT count, LPWSTR buf ) lstrcpynW( buf, lpBuffer, count ); length = count; } - HeapFree( GetProcessHeap(), 0, lpBuffer ); + heap_free( lpBuffer ); } else length = SendMessageW(lphc->hWndLBox, LB_GETTEXT, idx, (LPARAM)buf);
1
0
0
0
Nikolay Sivov : comctl32/edit: Use the global memory allocation helpers.
by Alexandre Julliard
15 Feb '18
15 Feb '18
Module: wine Branch: master Commit: e265c49306115b094a7af1fea892d83fc9f863dd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e265c49306115b094a7af1fe…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Feb 15 11:00:06 2018 +0300 comctl32/edit: Use the global memory allocation helpers. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/edit.c | 67 ++++++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/dlls/comctl32/edit.c b/dlls/comctl32/edit.c index e1a79b1..67d77da 100644 --- a/dlls/comctl32/edit.c +++ b/dlls/comctl32/edit.c @@ -50,6 +50,7 @@ #include "vsstyle.h" #include "wine/unicode.h" #include "wine/debug.h" +#include "wine/heap.h" WINE_DEFAULT_DEBUG_CHANNEL(edit); @@ -242,7 +243,7 @@ static INT EDIT_WordBreakProc(EDITSTATE *es, LPWSTR s, INT index, INT count, INT memset(&psa,0,sizeof(SCRIPT_ANALYSIS)); psa.eScript = SCRIPT_UNDEFINED; - es->logAttr = HeapAlloc(GetProcessHeap(), 0, sizeof(SCRIPT_LOGATTR) * get_text_length(es)); + es->logAttr = heap_alloc(sizeof(SCRIPT_LOGATTR) * get_text_length(es)); ScriptBreak(es->text, get_text_length(es), &psa, es->logAttr); } @@ -480,7 +481,7 @@ static void EDIT_BuildLineDefs_ML(EDITSTATE *es, INT istart, INT iend, INT delta { /* The buffer has been expanded, create a new line and insert it into the link list */ - LINEDEF *new_line = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(LINEDEF)); + LINEDEF *new_line = heap_alloc_zero(sizeof(*new_line)); new_line->next = previous_line->next; previous_line->next = new_line; current_line = new_line; @@ -490,7 +491,7 @@ static void EDIT_BuildLineDefs_ML(EDITSTATE *es, INT istart, INT iend, INT delta { /* The previous line merged with this line so we delete this extra entry */ previous_line->next = current_line->next; - HeapFree(GetProcessHeap(), 0, current_line); + heap_free(current_line); current_line = previous_line->next; es->line_count--; continue; @@ -590,7 +591,7 @@ static void EDIT_BuildLineDefs_ML(EDITSTATE *es, INT istart, INT iend, INT delta if (current_line->ssa) { count = ScriptString_pcOutChars(current_line->ssa); - piDx = HeapAlloc(GetProcessHeap(),0,sizeof(INT) * (*count)); + piDx = heap_alloc(sizeof(INT) * (*count)); ScriptStringGetLogicalWidths(current_line->ssa,piDx); prev = current_line->net_length-1; @@ -600,7 +601,7 @@ static void EDIT_BuildLineDefs_ML(EDITSTATE *es, INT istart, INT iend, INT delta } while ( prev > 0 && current_line->width > fw); if (prev<=0) prev = 1; - HeapFree(GetProcessHeap(),0,piDx); + heap_free(piDx); } else prev = (fw / es->char_width); @@ -689,7 +690,7 @@ static void EDIT_BuildLineDefs_ML(EDITSTATE *es, INT istart, INT iend, INT delta { pnext = current_line->next; EDIT_InvalidateUniscribeData_linedef(current_line); - HeapFree(GetProcessHeap(), 0, current_line); + heap_free(current_line); current_line = pnext; es->line_count--; } @@ -1181,7 +1182,7 @@ static inline void text_buffer_changed(EDITSTATE *es) { es->text_length = (UINT)-1; - HeapFree( GetProcessHeap(), 0, es->logAttr ); + heap_free( es->logAttr ); es->logAttr = NULL; EDIT_InvalidateUniscribeData(es); } @@ -2463,7 +2464,7 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, const WCHAR *lpsz_r /* there is something to be deleted */ TRACE("deleting stuff.\n"); bufl = e - s; - buf = HeapAlloc(GetProcessHeap(), 0, (bufl + 1) * sizeof(WCHAR)); + buf = heap_alloc((bufl + 1) * sizeof(WCHAR)); if (!buf) return; memcpy(buf, es->text + s, bufl * sizeof(WCHAR)); buf[bufl] = 0; /* ensure 0 termination */ @@ -2576,7 +2577,7 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, const WCHAR *lpsz_r EDIT_EM_EmptyUndoBuffer(es); } - HeapFree(GetProcessHeap(), 0, buf); + heap_free(buf); s += strl; @@ -2803,12 +2804,12 @@ static BOOL EDIT_EM_SetTabStops(EDITSTATE *es, INT count, const INT *tabs) { if (!(es->style & ES_MULTILINE)) return FALSE; - HeapFree(GetProcessHeap(), 0, es->tabs); + heap_free(es->tabs); es->tabs_count = count; if (!count) es->tabs = NULL; else { - es->tabs = HeapAlloc(GetProcessHeap(), 0, count * sizeof(INT)); + es->tabs = heap_alloc(count * sizeof(INT)); memcpy(es->tabs, tabs, count * sizeof(INT)); } EDIT_InvalidateUniscribeData(es); @@ -2852,7 +2853,7 @@ static BOOL EDIT_EM_Undo(EDITSTATE *es) ulength = strlenW(es->undo_text); - utext = HeapAlloc(GetProcessHeap(), 0, (ulength + 1) * sizeof(WCHAR)); + utext = heap_alloc((ulength + 1) * sizeof(WCHAR)); strcpyW(utext, es->undo_text); @@ -2866,7 +2867,7 @@ static BOOL EDIT_EM_Undo(EDITSTATE *es) /* send the notification after the selection start and end are set */ EDIT_NOTIFY_PARENT(es, EN_CHANGE); EDIT_EM_ScrollCaret(es); - HeapFree(GetProcessHeap(), 0, utext); + heap_free(utext); TRACE("after UNDO:insertion length = %d, deletion buffer = %s\n", es->undo_insert_count, debugstr_w(es->undo_text)); @@ -4171,7 +4172,7 @@ static void EDIT_GetCompositionStr(HIMC hIMC, LPARAM CompFlag, EDITSTATE *es) return; } - lpCompStr = HeapAlloc(GetProcessHeap(),0,buflen); + lpCompStr = heap_alloc(buflen); if (!lpCompStr) { ERR("Unable to allocate IME CompositionString\n"); @@ -4191,11 +4192,11 @@ static void EDIT_GetCompositionStr(HIMC hIMC, LPARAM CompFlag, EDITSTATE *es) if (dwBufLenAttr) { dwBufLenAttr ++; - lpCompStrAttr = HeapAlloc(GetProcessHeap(),0,dwBufLenAttr+1); + lpCompStrAttr = heap_alloc(dwBufLenAttr + 1); if (!lpCompStrAttr) { ERR("Unable to allocate IME Attribute String\n"); - HeapFree(GetProcessHeap(),0,lpCompStr); + heap_free(lpCompStr); return; } ImmGetCompositionStringW(hIMC,GCS_COMPATTR, lpCompStrAttr, @@ -4222,8 +4223,8 @@ static void EDIT_GetCompositionStr(HIMC hIMC, LPARAM CompFlag, EDITSTATE *es) es->selection_start = es->composition_start; es->selection_end = es->selection_start + es->composition_len; - HeapFree(GetProcessHeap(),0,lpCompStrAttr); - HeapFree(GetProcessHeap(),0,lpCompStr); + heap_free(lpCompStrAttr); + heap_free(lpCompStr); } static void EDIT_GetResultStr(HIMC hIMC, EDITSTATE *es) @@ -4237,7 +4238,7 @@ static void EDIT_GetResultStr(HIMC hIMC, EDITSTATE *es) return; } - lpResultStr = HeapAlloc(GetProcessHeap(),0, buflen); + lpResultStr = heap_alloc(buflen); if (!lpResultStr) { ERR("Unable to alloc buffer for IME string\n"); @@ -4256,7 +4257,7 @@ static void EDIT_GetResultStr(HIMC hIMC, EDITSTATE *es) es->composition_start = es->selection_end; es->composition_len = 0; - HeapFree(GetProcessHeap(),0,lpResultStr); + heap_free(lpResultStr); } static void EDIT_ImeComposition(HWND hwnd, LPARAM CompFlag, EDITSTATE *es) @@ -4303,9 +4304,9 @@ static LRESULT EDIT_WM_NCCreate(HWND hwnd, LPCREATESTRUCTW lpcs) TRACE("Creating edit control, style = %08x\n", lpcs->style); - if (!(es = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*es)))) - return FALSE; - SetWindowLongPtrW( hwnd, 0, (LONG_PTR)es ); + if (!(es = heap_alloc_zero(sizeof(*es)))) + return FALSE; + SetWindowLongPtrW( hwnd, 0, (LONG_PTR)es ); /* * Note: since the EDITSTATE has not been fully initialized yet, @@ -4365,13 +4366,13 @@ static LRESULT EDIT_WM_NCCreate(HWND hwnd, LPCREATESTRUCTW lpcs) goto cleanup; es->buffer_size = LocalSize(es->hloc32W)/sizeof(WCHAR) - 1; - if (!(es->undo_text = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (es->buffer_size + 1) * sizeof(WCHAR)))) + if (!(es->undo_text = heap_alloc_zero((es->buffer_size + 1) * sizeof(WCHAR)))) goto cleanup; es->undo_buffer_size = es->buffer_size; if (es->style & ES_MULTILINE) - if (!(es->first_line_def = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(LINEDEF)))) - goto cleanup; + if (!(es->first_line_def = heap_alloc_zero(sizeof(LINEDEF)))) + goto cleanup; es->line_count = 1; /* @@ -4395,11 +4396,11 @@ static LRESULT EDIT_WM_NCCreate(HWND hwnd, LPCREATESTRUCTW lpcs) cleanup: SetWindowLongPtrW(es->hwndSelf, 0, 0); EDIT_InvalidateUniscribeData(es); - HeapFree(GetProcessHeap(), 0, es->first_line_def); - HeapFree(GetProcessHeap(), 0, es->undo_text); + heap_free(es->first_line_def); + heap_free(es->undo_text); if (es->hloc32W) LocalFree(es->hloc32W); - HeapFree(GetProcessHeap(), 0, es->logAttr); - HeapFree(GetProcessHeap(), 0, es); + heap_free(es->logAttr); + heap_free(es); return FALSE; } @@ -4482,13 +4483,13 @@ static LRESULT EDIT_WM_NCDestroy(EDITSTATE *es) while (pc) { pp = pc->next; - HeapFree(GetProcessHeap(), 0, pc); + heap_free(pc); pc = pp; } SetWindowLongPtrW( es->hwndSelf, 0, 0 ); - HeapFree(GetProcessHeap(), 0, es->undo_text); - HeapFree(GetProcessHeap(), 0, es); + heap_free(es->undo_text); + heap_free(es); return 0; }
1
0
0
0
Daniel Lehman : include: Add some tchar forwards.
by Alexandre Julliard
15 Feb '18
15 Feb '18
Module: wine Branch: master Commit: 94faa161ee3ca69a6b6dcc3fc72ac02fe2237291 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=94faa161ee3ca69a6b6dcc3f…
Author: Daniel Lehman <dlehman(a)esri.com> Date: Mon Aug 22 18:23:24 2016 -0700 include: Add some tchar forwards. Signed-off-by: Daniel Lehman <dlehman(a)esri.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/tchar.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/tchar.h b/include/tchar.h index 13c8ee6..d6f2b00 100644 --- a/include/tchar.h +++ b/include/tchar.h @@ -75,7 +75,7 @@ extern "C" { #define _gettc WINE_tchar_routine(getc, getc, getwc) #define _gettchar WINE_tchar_routine(getchar, getchar, getwchar) #define _getts WINE_tchar_routine(gets, gets, getws) -#define _isalnum WINE_tchar_routine(isalnum, _ismbcalnum, iswalnum) +#define _istalnum WINE_tchar_routine(isalnum, _ismbcalnum, iswalnum) #define _istalpha WINE_tchar_routine(isalpha, _ismbcalpha, iswalpha) #define _istascii WINE_tchar_routine(isascii, __isascii, iswascii) #define _istcntrl WINE_tchar_routine(iscntrl, iscntrl, iswcntrl) @@ -197,6 +197,7 @@ extern "C" { #define _tspawnvpe WINE_tchar_routine(_spawnvpe, _spawnvpe, _tspawnvpe) #define _tsplitpath WINE_tchar_routine(_splitpath, _splitpath, _wsplitpath) #define _tstat WINE_tchar_routine(_stat, _stat, _wstat) +#define _tstati64 WINE_tchar_routine(_stati64, _stati64, _wstati64) #define _tstrdate WINE_tchar_routine(_strdate, _strdate, _wstrdate) #define _tstrtime WINE_tchar_routine(_strtime, _strtime, _wstrtime) #define _tsystem WINE_tchar_routine(system, system, _wsystem)
1
0
0
0
Alexandre Julliard : ntdll: Use the image information data when mapping an image file.
by Alexandre Julliard
15 Feb '18
15 Feb '18
Module: wine Branch: master Commit: 5d088206d28806915afd29b92f1b4a6abe92a22e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5d088206d28806915afd29b9…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Feb 15 12:23:23 2018 +0100 ntdll: Use the image information data when mapping an image file. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/virtual.c | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index 8e764f7..d26be98 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -1357,8 +1357,8 @@ static NTSTATUS map_pe_header( void *ptr, size_t size, int fd, BOOL *removable ) * * Map an executable (PE format) image into memory. */ -static NTSTATUS map_image( HANDLE hmapping, ACCESS_MASK access, int fd, char *base, SIZE_T total_size, - SIZE_T mask, SIZE_T header_size, int shared_fd, BOOL removable, PVOID *addr_ptr ) +static NTSTATUS map_image( HANDLE hmapping, ACCESS_MASK access, int fd, SIZE_T mask, + pe_image_info_t *image_info, int shared_fd, BOOL removable, PVOID *addr_ptr ) { IMAGE_DOS_HEADER *dos; IMAGE_NT_HEADERS *nt; @@ -1366,12 +1366,21 @@ static NTSTATUS map_image( HANDLE hmapping, ACCESS_MASK access, int fd, char *ba IMAGE_SECTION_HEADER *sec; IMAGE_DATA_DIRECTORY *imports; NTSTATUS status = STATUS_CONFLICTING_ADDRESSES; + SIZE_T header_size, total_size = image_info->map_size; int i; off_t pos; sigset_t sigset; struct stat st; struct file_view *view = NULL; char *ptr, *header_end, *header_start; + char *base = wine_server_get_ptr( image_info->base ); + + if (total_size != image_info->map_size) /* truncated */ + { + WARN( "Modules larger than 4Gb (%s) not supported\n", wine_dbgstr_longlong(image_info->map_size) ); + return STATUS_INVALID_PARAMETER; + } + if ((ULONG_PTR)base != image_info->base) base = NULL; /* zero-map the whole range */ @@ -1397,7 +1406,7 @@ static NTSTATUS map_image( HANDLE hmapping, ACCESS_MASK access, int fd, char *ba status = FILE_GetNtStatus(); goto error; } - header_size = min( header_size, st.st_size ); + header_size = min( image_info->header_size, st.st_size ); if ((status = map_pe_header( view->base, header_size, fd, &removable )) != STATUS_SUCCESS) goto error; status = STATUS_INVALID_IMAGE_FORMAT; /* generic error */ @@ -1419,7 +1428,7 @@ static NTSTATUS map_image( HANDLE hmapping, ACCESS_MASK access, int fd, char *ba /* check for non page-aligned binary */ - if (nt->OptionalHeader.SectionAlignment <= page_mask) + if (image_info->image_flags & IMAGE_FLAGS_ImageMappedFlat) { /* unaligned sections, this happens for native subsystem binaries */ /* in that case Windows simply maps in the whole file */ @@ -1654,35 +1663,23 @@ NTSTATUS virtual_map_section( HANDLE handle, PVOID *addr_ptr, ULONG zero_bits, S if (sec_flags & SEC_IMAGE) { - void *base = wine_server_get_ptr( image_info->base ); - - if ((ULONG_PTR)base != image_info->base) base = NULL; - size = image_info->map_size; - if (size != image_info->map_size) /* truncated */ - { - WARN( "Modules larger than 4Gb (%s) not supported\n", - wine_dbgstr_longlong(image_info->map_size) ); - res = STATUS_INVALID_PARAMETER; - goto done; - } if (shared_file) { int shared_fd, shared_needs_close; if ((res = server_get_unix_fd( shared_file, FILE_READ_DATA|FILE_WRITE_DATA, &shared_fd, &shared_needs_close, NULL, NULL ))) goto done; - res = map_image( handle, access, unix_handle, base, size, mask, image_info->header_size, + res = map_image( handle, access, unix_handle, mask, image_info, shared_fd, needs_close, addr_ptr ); if (shared_needs_close) close( shared_fd ); close_handle( shared_file ); } else { - res = map_image( handle, access, unix_handle, base, size, mask, image_info->header_size, - -1, needs_close, addr_ptr ); + res = map_image( handle, access, unix_handle, mask, image_info, -1, needs_close, addr_ptr ); } if (needs_close) close( unix_handle ); - if (res >= 0) *size_ptr = size; + if (res >= 0) *size_ptr = image_info->map_size; return res; }
1
0
0
0
← Newer
1
...
34
35
36
37
38
39
40
...
81
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
Results per page:
10
25
50
100
200