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
January 2009
----- 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
3 participants
1348 discussions
Start a n
N
ew thread
Henri Verbeet : d3d10core: Add a stub ID3D10Texture2D implementation.
by Alexandre Julliard
15 Jan '09
15 Jan '09
Module: wine Branch: master Commit: e398a779f7bda8d652fa4a4bbf42db68a4ce4947 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e398a779f7bda8d652fa4a4bb…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Jan 15 09:58:44 2009 +0100 d3d10core: Add a stub ID3D10Texture2D implementation. --- dlls/d3d10core/Makefile.in | 1 + dlls/d3d10core/d3d10core_private.h | 8 ++ dlls/d3d10core/device.c | 19 ++++- dlls/d3d10core/texture2d.c | 162 ++++++++++++++++++++++++++++++++++++ 4 files changed, 188 insertions(+), 2 deletions(-) diff --git a/dlls/d3d10core/Makefile.in b/dlls/d3d10core/Makefile.in index c45ff3c..fe3ead6 100644 --- a/dlls/d3d10core/Makefile.in +++ b/dlls/d3d10core/Makefile.in @@ -9,6 +9,7 @@ IMPORTS = dxguid uuid dxgi kernel32 C_SRCS = \ d3d10core_main.c \ device.c \ + texture2d.c \ utils.c RC_SRCS = version.rc diff --git a/dlls/d3d10core/d3d10core_private.h b/dlls/d3d10core/d3d10core_private.h index 16bb323..965ebf9 100644 --- a/dlls/d3d10core/d3d10core_private.h +++ b/dlls/d3d10core/d3d10core_private.h @@ -43,6 +43,14 @@ struct d3d10_device LONG refcount; }; +/* ID3D10Texture2D */ +extern const struct ID3D10Texture2DVtbl d3d10_texture2d_vtbl; +struct d3d10_texture2d +{ + const struct ID3D10Texture2DVtbl *vtbl; + LONG refcount; +}; + /* Layered device */ enum dxgi_device_layer_id { diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c index 567c93a..437219a 100644 --- a/dlls/d3d10core/device.c +++ b/dlls/d3d10core/device.c @@ -567,9 +567,24 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateTexture1D(ID3D10Device *ifac static HRESULT STDMETHODCALLTYPE d3d10_device_CreateTexture2D(ID3D10Device *iface, const D3D10_TEXTURE2D_DESC *desc, const D3D10_SUBRESOURCE_DATA *data, ID3D10Texture2D **texture) { - FIXME("iface %p, desc %p, data %p, texture %p stub!\n", iface, desc, data, texture); + struct d3d10_texture2d *object; - return E_NOTIMPL; + FIXME("iface %p, desc %p, data %p, texture %p partial stub!\n", iface, desc, data, texture); + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + { + ERR("Failed to allocate D3D10 texture2d object memory\n"); + return E_OUTOFMEMORY; + } + + object->vtbl = &d3d10_texture2d_vtbl; + object->refcount = 1; + *texture = (ID3D10Texture2D *)object; + + TRACE("Created ID3D10Texture2D %p\n", object); + + return S_OK; } static HRESULT STDMETHODCALLTYPE d3d10_device_CreateTexture3D(ID3D10Device *iface, diff --git a/dlls/d3d10core/texture2d.c b/dlls/d3d10core/texture2d.c new file mode 100644 index 0000000..9b57c61 --- /dev/null +++ b/dlls/d3d10core/texture2d.c @@ -0,0 +1,162 @@ +/* + * Copyright 2009 Henri Verbeet for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include "config.h" +#include "wine/port.h" + +#include "d3d10core_private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(d3d10core); + +/* IUnknown methods */ + +static HRESULT STDMETHODCALLTYPE d3d10_texture2d_QueryInterface(ID3D10Texture2D *iface, REFIID riid, void **object) +{ + TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), object); + + if (IsEqualGUID(riid, &IID_ID3D10Texture2D) + || IsEqualGUID(riid, &IID_ID3D10Resource) + || IsEqualGUID(riid, &IID_ID3D10DeviceChild) + || IsEqualGUID(riid, &IID_IUnknown)) + { + IUnknown_AddRef(iface); + *object = iface; + return S_OK; + } + + WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid)); + + *object = NULL; + return E_NOINTERFACE; +} + +static ULONG STDMETHODCALLTYPE d3d10_texture2d_AddRef(ID3D10Texture2D *iface) +{ + struct d3d10_texture2d *This = (struct d3d10_texture2d *)iface; + ULONG refcount = InterlockedIncrement(&This->refcount); + + TRACE("%p increasing refcount to %u\n", This, refcount); + + return refcount; +} + +static ULONG STDMETHODCALLTYPE d3d10_texture2d_Release(ID3D10Texture2D *iface) +{ + struct d3d10_texture2d *This = (struct d3d10_texture2d *)iface; + ULONG refcount = InterlockedDecrement(&This->refcount); + + TRACE("%p decreasing refcount to %u\n", This, refcount); + + return refcount; +} + +/* ID3D10DeviceChild methods */ + +static void STDMETHODCALLTYPE d3d10_texture2d_GetDevice(ID3D10Texture2D *iface, ID3D10Device **device) +{ + FIXME("iface %p, device %p stub!\n", iface, device); +} + +static HRESULT STDMETHODCALLTYPE d3d10_texture2d_GetPrivateData(ID3D10Texture2D *iface, + REFGUID guid, UINT *data_size, void *data) +{ + FIXME("iface %p, guid %s, data_size %p, data %p stub!\n", + iface, debugstr_guid(guid), data_size, data); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d3d10_texture2d_SetPrivateData(ID3D10Texture2D *iface, + REFGUID guid, UINT data_size, const void *data) +{ + FIXME("iface %p, guid %s, data_size %u, data %p stub!\n", + iface, debugstr_guid(guid), data_size, data); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d3d10_texture2d_SetPrivateDataInterface(ID3D10Texture2D *iface, + REFGUID guid, const IUnknown *data) +{ + FIXME("iface %p, guid %s, data %p stub!\n", iface, debugstr_guid(guid), data); + + return E_NOTIMPL; +} + +/* ID3D10Resource methods */ + +static void STDMETHODCALLTYPE d3d10_texture2d_GetType(ID3D10Texture2D *iface, + D3D10_RESOURCE_DIMENSION *resource_dimension) +{ + FIXME("iface %p, resource_dimension %p stub!\n", iface, resource_dimension); +} + +static void STDMETHODCALLTYPE d3d10_texture2d_SetEvictionPriority(ID3D10Texture2D *iface, UINT eviction_priority) +{ + FIXME("iface %p, eviction_priority %u stub!\n", iface, eviction_priority); +} + +static UINT STDMETHODCALLTYPE d3d10_texture2d_GetEvictionPriority(ID3D10Texture2D *iface) +{ + FIXME("iface %p stub!\n", iface); + + return 0; +} + +/* ID3D10Texture2D methods */ + +static HRESULT STDMETHODCALLTYPE d3d10_texture2d_Map(ID3D10Texture2D *iface, UINT sub_resource, + D3D10_MAP map_type, UINT map_flags, D3D10_MAPPED_TEXTURE2D *mapped_texture) +{ + FIXME("iface %p, sub_resource %u, map_type %u, map_flags %#x, mapped_texture %p stub!\n", + iface, sub_resource, map_type, map_flags, mapped_texture); + + return E_NOTIMPL; +} + +static void STDMETHODCALLTYPE d3d10_texture2d_Unmap(ID3D10Texture2D *iface, UINT sub_resource) +{ + FIXME("iface %p, sub_resource %u stub!\n", iface, sub_resource); +} + +static void STDMETHODCALLTYPE d3d10_texture2d_GetDesc(ID3D10Texture2D *iface, D3D10_TEXTURE2D_DESC *desc) +{ + FIXME("iface %p, desc %p stub!\n", iface, desc); +} + +const struct ID3D10Texture2DVtbl d3d10_texture2d_vtbl = +{ + /* IUnknown methods */ + d3d10_texture2d_QueryInterface, + d3d10_texture2d_AddRef, + d3d10_texture2d_Release, + /* ID3D10DeviceChild methods */ + d3d10_texture2d_GetDevice, + d3d10_texture2d_GetPrivateData, + d3d10_texture2d_SetPrivateData, + d3d10_texture2d_SetPrivateDataInterface, + /* ID3D10Resource methods */ + d3d10_texture2d_GetType, + d3d10_texture2d_SetEvictionPriority, + d3d10_texture2d_GetEvictionPriority, + /* ID3D10Texture2D methods */ + d3d10_texture2d_Map, + d3d10_texture2d_Unmap, + d3d10_texture2d_GetDesc, +};
1
0
0
0
Henri Verbeet : dxgi: Add a stub IDXGISurface implementation.
by Alexandre Julliard
15 Jan '09
15 Jan '09
Module: wine Branch: master Commit: 529faa2cd40a9d33166089a1efebd3a5a024e2c0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=529faa2cd40a9d33166089a1e…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Jan 15 09:58:44 2009 +0100 dxgi: Add a stub IDXGISurface implementation. --- dlls/dxgi/Makefile.in | 1 + dlls/dxgi/device.c | 33 +++++++++- dlls/dxgi/dxgi_private.h | 8 +++ dlls/dxgi/surface.c | 155 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 195 insertions(+), 2 deletions(-) diff --git a/dlls/dxgi/Makefile.in b/dlls/dxgi/Makefile.in index 2922473..9215e61 100644 --- a/dlls/dxgi/Makefile.in +++ b/dlls/dxgi/Makefile.in @@ -12,6 +12,7 @@ C_SRCS = \ dxgi_main.c \ factory.c \ utils.c \ + surface.c \ swapchain.c RC_SRCS = version.rc diff --git a/dlls/dxgi/device.c b/dlls/dxgi/device.c index 1b82b2a..69ba3e5 100644 --- a/dlls/dxgi/device.c +++ b/dlls/dxgi/device.c @@ -141,10 +141,39 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_CreateSurface(IDXGIDevice *iface, const DXGI_SURFACE_DESC *desc, UINT surface_count, DXGI_USAGE usage, const DXGI_SHARED_RESOURCE *shared_resource, IDXGISurface **surface) { - FIXME("iface %p, desc %p, surface_count %u, usage %#x, shared_resource %p, surface %p stub!\n", + struct dxgi_surface *object; + HRESULT hr; + UINT i; + + FIXME("iface %p, desc %p, surface_count %u, usage %#x, shared_resource %p, surface %p partial stub!\n", iface, desc, surface_count, usage, shared_resource, surface); - return E_NOTIMPL; + memset(surface, 0, surface_count * sizeof(*surface)); + for (i = 0; i < surface_count; ++i) + { + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + { + ERR("Failed to allocate DXGI surface object memory\n"); + hr = E_OUTOFMEMORY; + goto fail; + } + + object->vtbl = &dxgi_surface_vtbl; + object->refcount = 1; + surface[i] = (IDXGISurface *)object; + + TRACE("Created IDXGISurface %p (%u/%u)\n", object, i + 1, surface_count); + } + + return S_OK; + +fail: + for (i = 0; i < surface_count; ++i) + { + HeapFree(GetProcessHeap(), 0, surface[i]); + } + return hr; } static HRESULT STDMETHODCALLTYPE dxgi_device_QueryResourceResidency(IDXGIDevice *iface, diff --git a/dlls/dxgi/dxgi_private.h b/dlls/dxgi/dxgi_private.h index 1e8ca51..bb2eebe 100644 --- a/dlls/dxgi/dxgi_private.h +++ b/dlls/dxgi/dxgi_private.h @@ -79,6 +79,14 @@ struct dxgi_swapchain LONG refcount; }; +/* IDXGISurface */ +extern const struct IDXGISurfaceVtbl dxgi_surface_vtbl; +struct dxgi_surface +{ + const struct IDXGISurfaceVtbl *vtbl; + LONG refcount; +}; + /* Layered device */ enum dxgi_device_layer_id { diff --git a/dlls/dxgi/surface.c b/dlls/dxgi/surface.c new file mode 100644 index 0000000..82db08b --- /dev/null +++ b/dlls/dxgi/surface.c @@ -0,0 +1,155 @@ +/* + * Copyright 2009 Henri Verbeet for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include "config.h" +#include "wine/port.h" + +#include "dxgi_private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(dxgi); + +/* IUnknown methods */ + +static HRESULT STDMETHODCALLTYPE dxgi_surface_QueryInterface(IDXGISurface *iface, REFIID riid, void **object) +{ + TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), object); + + if (IsEqualGUID(riid, &IID_IDXGISurface) + || IsEqualGUID(riid, &IID_IDXGIDeviceSubObject) + || IsEqualGUID(riid, &IID_IDXGIObject) + || IsEqualGUID(riid, &IID_IUnknown)) + { + IUnknown_AddRef(iface); + *object = iface; + return S_OK; + } + + WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid)); + + *object = NULL; + return E_NOINTERFACE; +} + +static ULONG STDMETHODCALLTYPE dxgi_surface_AddRef(IDXGISurface *iface) +{ + struct dxgi_surface *This = (struct dxgi_surface *)iface; + ULONG refcount = InterlockedIncrement(&This->refcount); + + TRACE("%p increasing refcount to %u\n", This, refcount); + + return refcount; +} + +static ULONG STDMETHODCALLTYPE dxgi_surface_Release(IDXGISurface *iface) +{ + struct dxgi_surface *This = (struct dxgi_surface *)iface; + ULONG refcount = InterlockedDecrement(&This->refcount); + + TRACE("%p decreasing refcount to %u\n", This, refcount); + + if (!refcount) + { + HeapFree(GetProcessHeap(), 0, This); + } + + return refcount; +} + +/* IDXGIObject methods */ + +static HRESULT STDMETHODCALLTYPE dxgi_surface_SetPrivateData(IDXGISurface *iface, + REFGUID guid, UINT data_size, const void *data) +{ + FIXME("iface %p, guid %s, data_size %u, data %p stub!\n", iface, debugstr_guid(guid), data_size, data); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE dxgi_surface_SetPrivateDataInterface(IDXGISurface *iface, + REFGUID guid, const IUnknown *object) +{ + FIXME("iface %p, guid %s, object %p stub!\n", iface, debugstr_guid(guid), object); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE dxgi_surface_GetPrivateData(IDXGISurface *iface, + REFGUID guid, UINT *data_size, void *data) +{ + FIXME("iface %p, guid %s, data_size %p, data %p stub!\n", iface, debugstr_guid(guid), data_size, data); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE dxgi_surface_GetParent(IDXGISurface *iface, REFIID riid, void **parent) +{ + FIXME("iface %p, riid %s, parent %p stub!\n", iface, debugstr_guid(riid), parent); + + return E_NOTIMPL; +} + +/* IDXGIDeviceSubObject methods */ + +static HRESULT STDMETHODCALLTYPE dxgi_surface_GetDevice(IDXGISurface *iface, REFIID riid, void **device) +{ + FIXME("iface %p, riid %s, device %p stub!\n", iface, debugstr_guid(riid), device); + + return E_NOTIMPL; +} + +/* IDXGISurface methods */ +static HRESULT STDMETHODCALLTYPE dxgi_surface_GetDesc(IDXGISurface *iface, DXGI_SURFACE_DESC *desc) +{ + FIXME("iface %p, desc %p stub!\n", iface, desc); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE dxgi_surface_Map(IDXGISurface *iface, DXGI_MAPPED_RECT *mapped_rect, UINT flags) +{ + FIXME("iface %p, mapped_rect %p, flags %#x stub!\n", iface, mapped_rect, flags); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE dxgi_surface_Unmap(IDXGISurface *iface) +{ + FIXME("iface %p stub!\n", iface); + + return E_NOTIMPL; +} + +const struct IDXGISurfaceVtbl dxgi_surface_vtbl = +{ + /* IUnknown methods */ + dxgi_surface_QueryInterface, + dxgi_surface_AddRef, + dxgi_surface_Release, + /* IDXGIObject methods */ + dxgi_surface_SetPrivateData, + dxgi_surface_SetPrivateDataInterface, + dxgi_surface_GetPrivateData, + dxgi_surface_GetParent, + /* IDXGIDeviceSubObject methods */ + dxgi_surface_GetDevice, + /* IDXGISurface methods */ + dxgi_surface_GetDesc, + dxgi_surface_Map, + dxgi_surface_Unmap, +};
1
0
0
0
Michael Stefaniuc : dxdiagn: Remove superfluous pointer casts.
by Alexandre Julliard
15 Jan '09
15 Jan '09
Module: wine Branch: master Commit: 89b043744faf61be0f95c5bb40d5926eb10c1bf1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=89b043744faf61be0f95c5bb4…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Thu Jan 15 09:44:36 2009 +0100 dxdiagn: Remove superfluous pointer casts. --- dlls/dxdiagn/provider.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/dxdiagn/provider.c b/dlls/dxdiagn/provider.c index a55bbb4..398c9ad 100644 --- a/dlls/dxdiagn/provider.c +++ b/dlls/dxdiagn/provider.c @@ -353,7 +353,7 @@ static HRESULT DXDiag_InitDXDiagSystemDevicesContainer(IDxDiagContainer* pSubCon IDxDiagContainer* pDeviceSubCont = NULL; IDxDiagContainer* pDriversCont = NULL; - hr = DXDiag_CreateDXDiagContainer(&IID_IDxDiagContainer, (void**) &pDeviceSubCont); + hr = DXDiag_CreateDXDiagContainer(&IID_IDxDiagContainer, &pDeviceSubCont); if (FAILED(hr)) { return hr; } V_VT(pvarProp) = VT_BSTR; V_BSTR(pvarProp) = SysAllocString(property->psz); hr = IDxDiagContainerImpl_AddProp(pDeviceSubCont, szDescription, &v); @@ -369,7 +369,7 @@ static HRESULT DXDiag_InitDXDiagSystemDevicesContainer(IDxDiagContainer* pSubCon * Drivers Cont contains Files Desc Containers */ /* - hr = DXDiag_CreateDXDiagContainer(&IID_IDxDiagContainer, (void**) &pDriversCont); + hr = DXDiag_CreateDXDiagContainer(&IID_IDxDiagContainer, &pDriversCont); if (FAILED(hr)) { return hr; } hr = IDxDiagContainerImpl_AddChildContainer(pDeviceSubCont, szDrivers, pDriversCont); @@ -394,7 +394,7 @@ static HRESULT DXDiag_InitDXDiagLogicalDisksContainer(IDxDiagContainer* pSubCont IDxDiagContainer* pDiskSubCont = NULL; IDxDiagContainer* pDriversCont = NULL; - hr = DXDiag_CreateDXDiagContainer(&IID_IDxDiagContainer, (void**) &pDiskSubCont); + hr = DXDiag_CreateDXDiagContainer(&IID_IDxDiagContainer, &pDiskSubCont); if (FAILED(hr)) { return hr; } hr = IDxDiagContainerImpl_AddChildContainer(pSubCont, "" , pDiskSubCont); */ @@ -403,7 +403,7 @@ static HRESULT DXDiag_InitDXDiagLogicalDisksContainer(IDxDiagContainer* pSubCont * Drivers Cont contains Files Desc Containers */ /* - hr = DXDiag_CreateDXDiagContainer(&IID_IDxDiagContainer, (void**) &pDriversCont); + hr = DXDiag_CreateDXDiagContainer(&IID_IDxDiagContainer, &pDriversCont); if (FAILED(hr)) { return hr; } hr = IDxDiagContainerImpl_AddChildContainer(pDeviceSubCont, szDrivers, pDriversCont); */
1
0
0
0
Michael Stefaniuc : regedit: Remove superfluous pointer casts.
by Alexandre Julliard
15 Jan '09
15 Jan '09
Module: wine Branch: master Commit: 484a53574a566f2f54fdd0612b4fc692590de3aa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=484a53574a566f2f54fdd0612…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Thu Jan 15 09:47:14 2009 +0100 regedit: Remove superfluous pointer casts. --- programs/regedit/listview.c | 4 ++-- programs/regedit/treeview.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/programs/regedit/listview.c b/programs/regedit/listview.c index 65efecb..fb7688f 100644 --- a/programs/regedit/listview.c +++ b/programs/regedit/listview.c @@ -179,7 +179,7 @@ static void AddEntryToList(HWND hwndLV, LPWSTR Name, DWORD dwValType, break; case REG_BINARY: { unsigned int i; - LPBYTE pData = (LPBYTE)ValBuf; + LPBYTE pData = ValBuf; LPWSTR strBinary = HeapAlloc(GetProcessHeap(), 0, dwCount * sizeof(WCHAR) * 3 + sizeof(WCHAR)); WCHAR format[] = {'%','0','2','X',' ',0}; for (i = 0; i < dwCount; i++) @@ -476,7 +476,7 @@ HWND CreateListView(HWND hwndParent, UINT id) hwndLV = CreateWindowExW(WS_EX_CLIENTEDGE, WC_LISTVIEWW, ListView, WS_VISIBLE | WS_CHILD | WS_TABSTOP | LVS_REPORT | LVS_EDITLABELS, 0, 0, rcClient.right, rcClient.bottom, - hwndParent, (HMENU)ULongToHandle(id), hInst, NULL); + hwndParent, ULongToHandle(id), hInst, NULL); if (!hwndLV) return NULL; SendMessageW(hwndLV, LVM_SETUNICODEFORMAT, TRUE, 0); SendMessageW(hwndLV, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT); diff --git a/programs/regedit/treeview.c b/programs/regedit/treeview.c index 20d1b76..e48eb5b 100644 --- a/programs/regedit/treeview.c +++ b/programs/regedit/treeview.c @@ -672,7 +672,7 @@ HWND CreateTreeView(HWND hwndParent, LPWSTR pHostName, UINT id) hwndTV = CreateWindowExW(WS_EX_CLIENTEDGE, WC_TREEVIEWW, TreeView, WS_VISIBLE | WS_CHILD | WS_TABSTOP | TVS_HASLINES | TVS_HASBUTTONS | TVS_LINESATROOT, 0, 0, rcClient.right, rcClient.bottom, - hwndParent, (HMENU)ULongToHandle(id), hInst, NULL); + hwndParent, ULongToHandle(id), hInst, NULL); SendMessageW(hwndTV, TVM_SETUNICODEFORMAT, TRUE, 0); /* Initialize the image list, and add items to the control. */ if (!InitTreeViewImageLists(hwndTV) || !InitTreeViewItems(hwndTV, pHostName)) {
1
0
0
0
Michael Stefaniuc : msi: Remove superfluous pointer casts.
by Alexandre Julliard
15 Jan '09
15 Jan '09
Module: wine Branch: master Commit: 5f3ac30b3c5ec68b186596a3ca2d465c1ca97d81 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5f3ac30b3c5ec68b186596a3c…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Thu Jan 15 09:46:57 2009 +0100 msi: Remove superfluous pointer casts. --- dlls/msi/action.c | 50 +++++++++++++++++++++++++------------------------- dlls/msi/appsearch.c | 3 +-- dlls/msi/classes.c | 10 +++++----- dlls/msi/database.c | 10 +++++----- dlls/msi/dialog.c | 6 +++--- dlls/msi/files.c | 4 ++-- dlls/msi/font.c | 2 +- dlls/msi/handle.c | 2 +- dlls/msi/media.c | 8 ++++---- dlls/msi/msi_main.c | 6 +++--- dlls/msi/package.c | 18 +++++++++--------- dlls/msi/registry.c | 2 +- dlls/msi/upgrade.c | 2 +- 13 files changed, 61 insertions(+), 62 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=5f3ac30b3c5ec68b18659…
1
0
0
0
Michael Stefaniuc : msrle32: Remove superfluous pointer casts.
by Alexandre Julliard
15 Jan '09
15 Jan '09
Module: wine Branch: master Commit: 20c70ed85d1fdbc9b2b3d0ff3fad0f0d37cca8b1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=20c70ed85d1fdbc9b2b3d0ff3…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Thu Jan 15 09:45:50 2009 +0100 msrle32: Remove superfluous pointer casts. --- dlls/msrle32/msrle32.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dlls/msrle32/msrle32.c b/dlls/msrle32/msrle32.c index 6fa8e87..b0354b9 100644 --- a/dlls/msrle32/msrle32.c +++ b/dlls/msrle32/msrle32.c @@ -1497,11 +1497,11 @@ static LRESULT Compress(CodecInfo *pi, ICCOMPRESS* lpic, DWORD dwSize) lpic->lpbiOutput->biSizeImage = 0; if (lpic->lpbiOutput->biBitCount == 4) - MSRLE32_CompressRLE4(pi, lpic->lpbiInput, (LPBYTE)lpic->lpInput, - lpic->lpbiOutput, (LPBYTE)lpic->lpOutput, (lpic->dwFlags & ICCOMPRESS_KEYFRAME) != 0); + MSRLE32_CompressRLE4(pi, lpic->lpbiInput, lpic->lpInput, + lpic->lpbiOutput, lpic->lpOutput, (lpic->dwFlags & ICCOMPRESS_KEYFRAME) != 0); else - MSRLE32_CompressRLE8(pi, lpic->lpbiInput, (LPBYTE)lpic->lpInput, - lpic->lpbiOutput, (LPBYTE)lpic->lpOutput, (lpic->dwFlags & ICCOMPRESS_KEYFRAME) != 0); + MSRLE32_CompressRLE8(pi, lpic->lpbiInput, lpic->lpInput, + lpic->lpbiOutput, lpic->lpOutput, (lpic->dwFlags & ICCOMPRESS_KEYFRAME) != 0); if (lpic->dwFrameSize == 0 || lpic->lpbiOutput->biSizeImage < lpic->dwFrameSize) @@ -1509,11 +1509,11 @@ static LRESULT Compress(CodecInfo *pi, ICCOMPRESS* lpic, DWORD dwSize) if ((*lpic->lpdwFlags & ICCOMPRESS_KEYFRAME) == 0) { if (lpic->lpbiOutput->biBitCount == 4) - MSRLE32_CompressRLE4(pi, lpic->lpbiInput, (LPBYTE)lpic->lpInput, - lpic->lpbiOutput, (LPBYTE)lpic->lpOutput, TRUE); + MSRLE32_CompressRLE4(pi, lpic->lpbiInput, lpic->lpInput, + lpic->lpbiOutput, lpic->lpOutput, TRUE); else - MSRLE32_CompressRLE8(pi, lpic->lpbiInput, (LPBYTE)lpic->lpInput, - lpic->lpbiOutput, (LPBYTE)lpic->lpOutput, TRUE); + MSRLE32_CompressRLE8(pi, lpic->lpbiInput, lpic->lpInput, + lpic->lpbiOutput, lpic->lpOutput, TRUE); if (lpic->dwFrameSize == 0 || lpic->lpbiOutput->biSizeImage < lpic->dwFrameSize) { @@ -1908,7 +1908,7 @@ LRESULT CALLBACK MSRLE32_DriverProc(DWORD_PTR dwDrvID, HDRVR hDrv, UINT uMsg, /* DllMain - library initialization code */ BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpReserved) { - TRACE("(%p,%d,%p)\n",(LPVOID)hModule,dwReason,lpReserved); + TRACE("(%p,%d,%p)\n",hModule,dwReason,lpReserved); switch (dwReason) { case DLL_PROCESS_ATTACH:
1
0
0
0
Michael Stefaniuc : msi/tests: Remove superfluous pointer casts.
by Alexandre Julliard
15 Jan '09
15 Jan '09
Module: wine Branch: master Commit: 9975dcd19e9a7cc10929659340a4db6d0ec5d6aa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9975dcd19e9a7cc1092965934…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Thu Jan 15 09:44:57 2009 +0100 msi/tests: Remove superfluous pointer casts. --- dlls/msi/tests/automation.c | 4 ++-- dlls/msi/tests/install.c | 2 +- dlls/msi/tests/msi.c | 6 +++--- dlls/msi/tests/package.c | 4 ++-- dlls/msi/tests/source.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dlls/msi/tests/automation.c b/dlls/msi/tests/automation.c index 1c392cb..f831ef4 100644 --- a/dlls/msi/tests/automation.c +++ b/dlls/msi/tests/automation.c @@ -594,7 +594,7 @@ static void test_dispatch(void) ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr); /* Test getting ID of a function name that does exist */ - name = (WCHAR *)szOpenPackage; + name = szOpenPackage; hr = IDispatch_GetIDsOfNames(pInstaller, &IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &dispid); ok(hr == S_OK, "IDispatch::GetIDsOfNames returned 0x%08x\n", hr); @@ -638,7 +638,7 @@ static void test_dispatch(void) ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr); /* Test invoking a read-only property as DISPATCH_PROPERTYPUT or as a DISPATCH_METHOD */ - name = (WCHAR *)szProductState; + name = szProductState; hr = IDispatch_GetIDsOfNames(pInstaller, &IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &dispid); ok(hr == S_OK, "IDispatch::GetIDsOfNames returned 0x%08x\n", hr); diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index dd5dc29..5360284 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -1362,7 +1362,7 @@ static void get_user_sid(LPSTR *usersid) OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token); size = sizeof(buf); - GetTokenInformation(token, TokenUser, (void *)buf, size, &size); + GetTokenInformation(token, TokenUser, buf, size, &size); user = (PTOKEN_USER)buf; pConvertSidToStringSidA(user->User.Sid, usersid); } diff --git a/dlls/msi/tests/msi.c b/dlls/msi/tests/msi.c index a52e011..fba584d 100644 --- a/dlls/msi/tests/msi.c +++ b/dlls/msi/tests/msi.c @@ -505,7 +505,7 @@ static void create_test_guid(LPSTR prodcode, LPSTR squashed) hr = CoCreateGuid(&guid); ok(hr == S_OK, "Expected S_OK, got %d\n", hr); - size = StringFromGUID2(&guid, (LPOLESTR)guidW, MAX_PATH); + size = StringFromGUID2(&guid, guidW, MAX_PATH); ok(size == 39, "Expected 39, got %d\n", hr); WideCharToMultiByte(CP_ACP, 0, guidW, size, prodcode, MAX_PATH, NULL, NULL); @@ -522,7 +522,7 @@ static void get_user_sid(LPSTR *usersid) OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token); size = sizeof(buf); - GetTokenInformation(token, TokenUser, (void *)buf, size, &size); + GetTokenInformation(token, TokenUser, buf, size, &size); user = (PTOKEN_USER)buf; pConvertSidToStringSidA(user->User.Sid, usersid); } @@ -794,7 +794,7 @@ static void compose_base85_guid(LPSTR component, LPSTR comp_base85, LPSTR squash hr = CoCreateGuid(&guid); ok(hr == S_OK, "Expected S_OK, got %d\n", hr); - size = StringFromGUID2(&guid, (LPOLESTR)guidW, MAX_PATH); + size = StringFromGUID2(&guid, guidW, MAX_PATH); ok(size == 39, "Expected 39, got %d\n", hr); WideCharToMultiByte(CP_ACP, 0, guidW, size, component, MAX_PATH, NULL, NULL); diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c index aa0b6f3..66ff3f0 100644 --- a/dlls/msi/tests/package.c +++ b/dlls/msi/tests/package.c @@ -48,7 +48,7 @@ static void get_user_sid(LPSTR *usersid) OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token); size = sizeof(buf); - GetTokenInformation(token, TokenUser, (void *)buf, size, &size); + GetTokenInformation(token, TokenUser, buf, size, &size); user = (PTOKEN_USER)buf; pConvertSidToStringSidA(user->User.Sid, usersid); } @@ -160,7 +160,7 @@ static void create_test_guid(LPSTR prodcode, LPSTR squashed) hr = CoCreateGuid(&guid); ok(hr == S_OK, "Expected S_OK, got %d\n", hr); - size = StringFromGUID2(&guid, (LPOLESTR)guidW, MAX_PATH); + size = StringFromGUID2(&guid, guidW, MAX_PATH); ok(size == 39, "Expected 39, got %d\n", hr); WideCharToMultiByte(CP_ACP, 0, guidW, size, prodcode, MAX_PATH, NULL, NULL); diff --git a/dlls/msi/tests/source.c b/dlls/msi/tests/source.c index 9248b70..2eb5f18 100644 --- a/dlls/msi/tests/source.c +++ b/dlls/msi/tests/source.c @@ -114,7 +114,7 @@ static void create_test_guid(LPSTR prodcode, LPSTR squashed) hr = CoCreateGuid(&guid); ok(hr == S_OK, "Expected S_OK, got %d\n", hr); - size = StringFromGUID2(&guid, (LPOLESTR)guidW, MAX_PATH); + size = StringFromGUID2(&guid, guidW, MAX_PATH); ok(size == 39, "Expected 39, got %d\n", hr); WideCharToMultiByte(CP_ACP, 0, guidW, size, prodcode, MAX_PATH, NULL, NULL); @@ -136,7 +136,7 @@ static int get_user_sid(LPSTR *usersid) if (!rc && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) return 0; size = sizeof(buf); - GetTokenInformation(token, TokenUser, (void *)buf, size, &size); + GetTokenInformation(token, TokenUser, buf, size, &size); user = (PTOKEN_USER)buf; pConvertSidToStringSidA(user->User.Sid, usersid); return 1;
1
0
0
0
Michael Stefaniuc : mciseq: Remove superfluous pointer casts.
by Alexandre Julliard
15 Jan '09
15 Jan '09
Module: wine Branch: master Commit: 24e5816245e01cd3b7335811bad00440398f003a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=24e5816245e01cd3b7335811b…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Thu Jan 15 09:44:25 2009 +0100 mciseq: Remove superfluous pointer casts. --- dlls/mciseq/mcimidi.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/mciseq/mcimidi.c b/dlls/mciseq/mcimidi.c index 3ee3fee..47cb792 100644 --- a/dlls/mciseq/mcimidi.c +++ b/dlls/mciseq/mcimidi.c @@ -104,8 +104,8 @@ struct SCA { */ static DWORD CALLBACK MCI_SCAStarter(LPVOID arg) { - struct SCA* sca = (struct SCA*)arg; - DWORD ret; + struct SCA* sca = arg; + DWORD ret; TRACE("In thread before async command (%08x,%u,%08lx,%08lx)\n", sca->wDevID, sca->wMsg, sca->dwParam1, sca->dwParam2); @@ -403,7 +403,7 @@ static DWORD MIDI_mciReadMTrk(WINE_MCIMIDI* wmm, MCI_MIDITRACK* mmt) WARN("Buffer for text is too small (%u are needed)\n", len); len = sizeof(buf) - 1; } - if (mmioRead(wmm->hFile, (HPSTR)buf, len) == len) { + if (mmioRead(wmm->hFile, buf, len) == len) { buf[len] = 0; /* end string in case */ switch (HIBYTE(LOWORD(mmt->dwEventData))) { case 0x02: @@ -1051,7 +1051,7 @@ static DWORD MIDI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms) WARN("Buffer for text is too small (%u are needed)\n", len); len = sizeof(buf) - 1; } - if (mmioRead(wmm->hFile, (HPSTR)buf, len) == len) { + if (mmioRead(wmm->hFile, buf, len) == len) { buf[len] = 0; /* end string in case */ TRACE("%s => \"%s\"\n", (idx < 8 ) ? info[idx] : "", buf); } else {
1
0
0
0
Lei Zhang : quartz: Add a filtergraph test for mpeg files.
by Alexandre Julliard
15 Jan '09
15 Jan '09
Module: wine Branch: master Commit: e9f1aa29b2a440338c1108ea066f62d3dfde34d3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e9f1aa29b2a440338c1108ea0…
Author: Lei Zhang <thestig(a)google.com> Date: Wed Jan 14 10:48:19 2009 -0800 quartz: Add a filtergraph test for mpeg files. --- dlls/quartz/tests/filtergraph.c | 19 ++++++++++++------- 1 files changed, 12 insertions(+), 7 deletions(-) diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index f56e722..53f39d5 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -27,8 +27,9 @@ #include "dshow.h" #include "control.h" -static const CHAR fileA[] = "test.avi"; -static const WCHAR file[] = {'t','e','s','t','.','a','v','i',0}; +#define FILE_LEN 9 +static const char avifileA[FILE_LEN] = "test.avi"; +static const char mpegfileA[FILE_LEN] = "test.mpg"; IGraphBuilder* pgraph; @@ -38,11 +39,14 @@ static int createfiltergraph(void) &CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IGraphBuilder, (LPVOID*)&pgraph); } -static void renderfile(void) +static void renderfile(const char * fileA) { HRESULT hr; + WCHAR fileW[FILE_LEN]; - hr = IGraphBuilder_RenderFile(pgraph, file, NULL); + MultiByteToWideChar(CP_ACP, 0, fileA, -1, fileW, FILE_LEN); + + hr = IGraphBuilder_RenderFile(pgraph, fileW, NULL); ok(hr==S_OK, "RenderFile returned: %x\n", hr); } @@ -137,7 +141,7 @@ static void releasefiltergraph(void) ok(hr==0, "Releasing filtergraph returned: %x\n", hr); } -static void test_render_run(void) +static void test_render_run(const char * fileA) { HANDLE h; @@ -147,7 +151,7 @@ static void test_render_run(void) h = CreateFileA(fileA, 0, 0, NULL, OPEN_EXISTING, 0, NULL); if (h != INVALID_HANDLE_VALUE) { CloseHandle(h); - renderfile(); + renderfile(fileA); rungraph(); } @@ -1822,7 +1826,8 @@ static void test_render_filter_priority(void) START_TEST(filtergraph) { CoInitializeEx(NULL, COINIT_MULTITHREADED); - test_render_run(); + test_render_run(avifileA); + test_render_run(mpegfileA); test_graph_builder(); test_graph_builder_addfilter(); test_mediacontrol();
1
0
0
0
Andrey Turkin : gdiplus: GdipLoadImageFromStream should use well-known pixel format constants when possible .
by Alexandre Julliard
15 Jan '09
15 Jan '09
Module: wine Branch: master Commit: 1138c28eeb0f6753e05590dd2670d6a17c815627 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1138c28eeb0f6753e05590dd2…
Author: Andrey Turkin <andrey.turkin(a)gmail.com> Date: Thu Jan 15 12:39:47 2009 +0300 gdiplus: GdipLoadImageFromStream should use well-known pixel format constants when possible. --- dlls/gdiplus/image.c | 30 +++++++++++++++++++++++++++++- 1 files changed, 29 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index 1fb8824..02f8f5a 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -1068,7 +1068,35 @@ GpStatus WINGDIPAPI GdipLoadImageFromStream(IStream* stream, GpImage **image) else GetDIBits(hdc, hbm, 0, 0, NULL, pbmi, DIB_RGB_COLORS); - (*((GpBitmap**) image))->format = (bmch->bcBitCount << 8) | PixelFormatGDI; + switch(bmch->bcBitCount) + { + case 1: + (*((GpBitmap**) image))->format = PixelFormat1bppIndexed; + break; + case 4: + (*((GpBitmap**) image))->format = PixelFormat4bppIndexed; + break; + case 8: + (*((GpBitmap**) image))->format = PixelFormat8bppIndexed; + break; + case 16: + (*((GpBitmap**) image))->format = PixelFormat16bppRGB565; + break; + case 24: + (*((GpBitmap**) image))->format = PixelFormat24bppRGB; + break; + case 32: + (*((GpBitmap**) image))->format = PixelFormat32bppRGB; + break; + case 48: + (*((GpBitmap**) image))->format = PixelFormat48bppRGB; + break; + default: + FIXME("Bit depth %d is not fully supported yet\n", bmch->bcBitCount); + (*((GpBitmap**) image))->format = (bmch->bcBitCount << 8) | PixelFormatGDI; + break; + } + GdipFree(pbmi); } else if(type == PICTYPE_METAFILE || type == PICTYPE_ENHMETAFILE){
1
0
0
0
← Newer
1
...
65
66
67
68
69
70
71
...
135
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
Results per page:
10
25
50
100
200