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
May 2012
----- 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
737 discussions
Start a n
N
ew thread
Józef Kucia : d3d9/tests: Add tests for IDirect3DCubeTexture9:: GetLevelDesc and IDirect3DCubeTexture9::GetCubeMapSurface.
by Alexandre Julliard
22 May '12
22 May '12
Module: wine Branch: master Commit: cafab890937e770bde947977c556d2d8fcd4de3b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cafab890937e770bde947977c…
Author: Józef Kucia <joseph.kucia(a)gmail.com> Date: Mon May 21 23:10:47 2012 +0200 d3d9/tests: Add tests for IDirect3DCubeTexture9::GetLevelDesc and IDirect3DCubeTexture9::GetCubeMapSurface. --- dlls/d3d9/tests/texture.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 43 insertions(+), 0 deletions(-) diff --git a/dlls/d3d9/tests/texture.c b/dlls/d3d9/tests/texture.c index bf9673e..8e8f27b 100644 --- a/dlls/d3d9/tests/texture.c +++ b/dlls/d3d9/tests/texture.c @@ -152,6 +152,48 @@ static void test_cube_texture_mipmap_gen(IDirect3DDevice9 *device_ptr) texture_ptr = NULL; } +static void test_cube_texture_levels(IDirect3DDevice9 *device_ptr) +{ + IDirect3DCubeTexture9 *texture_ptr; + DWORD levels; + D3DSURFACE_DESC desc; + HRESULT hr; + IDirect3DSurface9 *surface; + + hr = IDirect3DDevice9_CreateCubeTexture(device_ptr, 64, 0, 0, D3DFMT_X8R8G8B8, + D3DPOOL_DEFAULT, &texture_ptr, NULL); + if (FAILED(hr)) + { + skip("Couldn't create cube texture\n"); + return; + } + + levels = IDirect3DCubeTexture9_GetLevelCount(texture_ptr); + ok(levels == 7, "Got %u levels, expected 7\n", levels); + + hr = IDirect3DCubeTexture9_GetLevelDesc(texture_ptr, levels - 1, &desc); + ok(hr == D3D_OK, "IDirect3DCubeTexture9_GetLevelDesc returned %#x\n", hr); + hr = IDirect3DCubeTexture9_GetLevelDesc(texture_ptr, levels, &desc); + ok(hr == D3DERR_INVALIDCALL, "IDirect3DCubeTexture9_GetLevelDesc returned %#x\n", hr); + hr = IDirect3DCubeTexture9_GetLevelDesc(texture_ptr, levels + 1, &desc); + ok(hr == D3DERR_INVALIDCALL, "IDirect3DCubeTexture9_GetLevelDesc returned %#x\n", hr); + + hr = IDirect3DCubeTexture9_GetCubeMapSurface(texture_ptr, D3DCUBEMAP_FACE_POSITIVE_X, + 0, &surface); + ok(hr == D3D_OK, "IDirect3DCubeTexture9_GetCubeMapSurface returned %#x\n", hr); + if (SUCCEEDED(hr)) IDirect3DSurface9_Release(surface); + hr = IDirect3DCubeTexture9_GetCubeMapSurface(texture_ptr, D3DCUBEMAP_FACE_NEGATIVE_Z + 1, + 0, &surface); + ok(hr == D3DERR_INVALIDCALL, "IDirect3DCubeTexture9_GetCubeMapSurface returned %#x\n", hr); + if (SUCCEEDED(hr)) IDirect3DSurface9_Release(surface); + hr = IDirect3DCubeTexture9_GetCubeMapSurface(texture_ptr, D3DCUBEMAP_FACE_POSITIVE_X - 1, + 0, &surface); + ok(hr == D3DERR_INVALIDCALL, "IDirect3DCubeTexture9_GetCubeMapSurface returned %#x\n", hr); + if (SUCCEEDED(hr)) IDirect3DSurface9_Release(surface); + + IDirect3DCubeTexture9_Release(texture_ptr); +} + static void test_cube_textures(IDirect3DDevice9 *device_ptr, DWORD caps) { test_cube_texture_from_pool(device_ptr, caps, D3DPOOL_DEFAULT, TRUE); @@ -159,6 +201,7 @@ static void test_cube_textures(IDirect3DDevice9 *device_ptr, DWORD caps) test_cube_texture_from_pool(device_ptr, caps, D3DPOOL_SYSTEMMEM, TRUE); test_cube_texture_from_pool(device_ptr, caps, D3DPOOL_SCRATCH, FALSE); test_cube_texture_mipmap_gen(device_ptr); + test_cube_texture_levels(device_ptr); } static void test_mipmap_gen(IDirect3DDevice9 *device)
1
0
0
0
Józef Kucia : d3d9: Return D3DERR_INVALIDCALL when IDirect3DCubeTexture9:: GetCubeMapSurface is called with invalid level.
by Alexandre Julliard
22 May '12
22 May '12
Module: wine Branch: master Commit: cd4b973d59f4d94c89b49805a73dbad4c807ca4c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cd4b973d59f4d94c89b49805a…
Author: Józef Kucia <joseph.kucia(a)gmail.com> Date: Mon May 21 23:10:46 2012 +0200 d3d9: Return D3DERR_INVALIDCALL when IDirect3DCubeTexture9::GetCubeMapSurface is called with invalid level. --- dlls/d3d9/texture.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/dlls/d3d9/texture.c b/dlls/d3d9/texture.c index 0594c20..3d07b1c 100644 --- a/dlls/d3d9/texture.c +++ b/dlls/d3d9/texture.c @@ -750,11 +750,19 @@ static HRESULT WINAPI d3d9_texture_cube_GetCubeMapSurface(IDirect3DCubeTexture9 struct wined3d_resource *sub_resource; IDirect3DSurface9Impl *surface_impl; UINT sub_resource_idx; + DWORD level_count; TRACE("iface %p, face %#x, level %u, surface %p.\n", iface, face, level, surface); wined3d_mutex_lock(); - sub_resource_idx = wined3d_texture_get_level_count(texture->wined3d_texture) * face + level; + level_count = wined3d_texture_get_level_count(texture->wined3d_texture); + if (level >= level_count) + { + wined3d_mutex_unlock(); + return D3DERR_INVALIDCALL; + } + + sub_resource_idx = level_count * face + level; if (!(sub_resource = wined3d_texture_get_sub_resource(texture->wined3d_texture, sub_resource_idx))) { wined3d_mutex_unlock();
1
0
0
0
Józef Kucia : d3d9: Return D3DERR_INVALIDCALL when IDirect3DCubeTexture9:: GetLevelDesc is called with invalid level.
by Alexandre Julliard
22 May '12
22 May '12
Module: wine Branch: master Commit: 5f6310ee45034fe126c3d30b16ce61bb5969b5bc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5f6310ee45034fe126c3d30b1…
Author: Józef Kucia <joseph.kucia(a)gmail.com> Date: Mon May 21 23:10:45 2012 +0200 d3d9: Return D3DERR_INVALIDCALL when IDirect3DCubeTexture9::GetLevelDesc is called with invalid level. --- dlls/d3d9/texture.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/dlls/d3d9/texture.c b/dlls/d3d9/texture.c index f453f90..0594c20 100644 --- a/dlls/d3d9/texture.c +++ b/dlls/d3d9/texture.c @@ -710,10 +710,18 @@ static HRESULT WINAPI d3d9_texture_cube_GetLevelDesc(IDirect3DCubeTexture9 *ifac struct d3d9_texture *texture = impl_from_IDirect3DCubeTexture9(iface); struct wined3d_resource *sub_resource; HRESULT hr = D3D_OK; + DWORD level_count; TRACE("iface %p, level %u, desc %p.\n", iface, level, desc); wined3d_mutex_lock(); + level_count = wined3d_texture_get_level_count(texture->wined3d_texture); + if (level >= level_count) + { + wined3d_mutex_unlock(); + return D3DERR_INVALIDCALL; + } + if (!(sub_resource = wined3d_texture_get_sub_resource(texture->wined3d_texture, level))) hr = D3DERR_INVALIDCALL; else
1
0
0
0
Józef Kucia : d3dx9/tests: Remove d3d9 test from d3dx9 tests.
by Alexandre Julliard
22 May '12
22 May '12
Module: wine Branch: master Commit: 5bd0070a1d4bdee5ee4ac1299082dc98664f1b3d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5bd0070a1d4bdee5ee4ac1299…
Author: Józef Kucia <joseph.kucia(a)gmail.com> Date: Mon May 21 23:10:44 2012 +0200 d3dx9/tests: Remove d3d9 test from d3dx9 tests. --- dlls/d3dx9_36/tests/texture.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/dlls/d3dx9_36/tests/texture.c b/dlls/d3dx9_36/tests/texture.c index 884d4e7..cade445 100644 --- a/dlls/d3dx9_36/tests/texture.c +++ b/dlls/d3dx9_36/tests/texture.c @@ -1329,9 +1329,6 @@ static void test_D3DXCreateCubeTextureFromFileInMemory(IDirect3DDevice9 *device) ok(surface_desc.Width == 4, "Got width %u, expected 4\n", surface_desc.Width); ok(surface_desc.Height == 4, "Got height %u, expected 4\n", surface_desc.Height); - hr = IDirect3DCubeTexture9_GetLevelDesc(cube_texture, 3, &surface_desc); - todo_wine ok(hr == D3DERR_INVALIDCALL, "GetLevelDesc returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); - ref = IDirect3DCubeTexture9_Release(cube_texture); ok(ref == 0, "Invalid reference count. Got %u, expected 0\n", ref); } else skip("Couldn't create cube texture\n");
1
0
0
0
Aric Stewart : quartz: COM cleanup for WAVEParserImpl.
by Alexandre Julliard
22 May '12
22 May '12
Module: wine Branch: master Commit: dc53f0181019888f75d84f501ce9601459cc1ac8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dc53f0181019888f75d84f501…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Mon May 21 08:21:13 2012 -0500 quartz: COM cleanup for WAVEParserImpl. --- dlls/quartz/waveparser.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/quartz/waveparser.c b/dlls/quartz/waveparser.c index a7bce6f..9c84320 100644 --- a/dlls/quartz/waveparser.c +++ b/dlls/quartz/waveparser.c @@ -53,6 +53,11 @@ static inline WAVEParserImpl *impl_from_IMediaSeeking( IMediaSeeking *iface ) return CONTAINING_RECORD(iface, WAVEParserImpl, Parser.sourceSeeking.IMediaSeeking_iface); } +static inline WAVEParserImpl *impl_from_IBaseFilter( IBaseFilter *iface ) +{ + return CONTAINING_RECORD(iface, WAVEParserImpl, Parser.filter.IBaseFilter_iface); +} + static LONGLONG bytepos_to_duration(WAVEParserImpl *This, LONGLONG bytepos) { LONGLONG duration = BYTES_FROM_MEDIATIME(bytepos - This->StartOfFile); @@ -246,11 +251,11 @@ static HRESULT WAVEParser_InputPin_PreConnect(IPin * iface, IPin * pConnectPin, LONGLONG pos = 0; /* in bytes */ PIN_INFO piOutput; AM_MEDIA_TYPE amt; - WAVEParserImpl * pWAVEParser = (WAVEParserImpl *)This->pin.pinInfo.pFilter; + WAVEParserImpl * pWAVEParser = impl_from_IBaseFilter(This->pin.pinInfo.pFilter); LONGLONG length, avail; piOutput.dir = PINDIR_OUTPUT; - piOutput.pFilter = (IBaseFilter *)This; + piOutput.pFilter = &pWAVEParser->Parser.filter.IBaseFilter_iface; lstrcpynW(piOutput.achName, wcsOutputPinName, sizeof(piOutput.achName) / sizeof(piOutput.achName[0])); hr = IAsyncReader_SyncRead(This->pReader, pos, sizeof(list), (BYTE *)&list);
1
0
0
0
Aric Stewart : quartz: Add offscreen presentation to VMR9.
by Alexandre Julliard
22 May '12
22 May '12
Module: wine Branch: master Commit: 0352a7fb88f603fcbacc904418a72b3dbf44011c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0352a7fb88f603fcbacc90441…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Mon May 21 07:53:52 2012 -0500 quartz: Add offscreen presentation to VMR9. --- dlls/quartz/vmr9.c | 32 +++++++++++++++++++++++++++++++- 1 files changed, 31 insertions(+), 1 deletions(-) diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index fc04269..efd14a1 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -1416,6 +1416,36 @@ static HRESULT VMR9_ImagePresenter_PresentTexture(VMR9DefaultAllocatorPresenterI return S_OK; } +static HRESULT VMR9_ImagePresenter_PresentOffscreenSurface(VMR9DefaultAllocatorPresenterImpl *This, IDirect3DSurface9 *surface) +{ + HRESULT hr; + IDirect3DSurface9 *target = NULL; + RECT target_rect; + + hr = IDirect3DDevice9_GetBackBuffer(This->d3d9_dev, 0, 0, D3DBACKBUFFER_TYPE_MONO, &target); + if (FAILED(hr)) + { + ERR("IDirect3DDevice9_GetBackBuffer -- %08x\n", hr); + return hr; + } + + target_rect = This->pVMR9->target_rect; + target_rect.right -= target_rect.left; + target_rect.bottom -= target_rect.top; + target_rect.left = target_rect.top = 0; + + /* Flip */ + target_rect.top = target_rect.bottom; + target_rect.bottom = 0; + + hr = IDirect3DDevice9_StretchRect(This->d3d9_dev, surface, &This->pVMR9->source_rect, target, &target_rect, D3DTEXF_LINEAR); + if (FAILED(hr)) + ERR("IDirect3DDevice9_StretchRect -- %08x\n", hr); + IDirect3DSurface9_Release(target); + + return hr; +} + static HRESULT WINAPI VMR9_ImagePresenter_PresentImage(IVMRImagePresenter9 *iface, DWORD_PTR id, VMR9PresentationInfo *info) { VMR9DefaultAllocatorPresenterImpl *This = impl_from_IVMRImagePresenter9(iface); @@ -1441,7 +1471,7 @@ static HRESULT WINAPI VMR9_ImagePresenter_PresentImage(IVMRImagePresenter9 *ifac if (This->d3d9_vertex) hr = VMR9_ImagePresenter_PresentTexture(This, info->lpSurf); else - hr = E_NOTIMPL; + hr = VMR9_ImagePresenter_PresentOffscreenSurface(This, info->lpSurf); render = SUCCEEDED(hr); } else
1
0
0
0
Aric Stewart : quartz: Implement a Default Presenter in VMR9.
by Alexandre Julliard
22 May '12
22 May '12
Module: wine Branch: master Commit: 38c31973d47c0711c1d32a71ab77fb1e906ac776 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=38c31973d47c0711c1d32a71a…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Mon May 21 07:53:44 2012 -0500 quartz: Implement a Default Presenter in VMR9. --- dlls/quartz/vmr9.c | 254 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 252 insertions(+), 2 deletions(-) diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index 809ee0f..fc04269 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -123,6 +123,28 @@ static inline VMR9Impl *impl_from_IVMRSurfaceAllocatorNotify9( IVMRSurfaceAlloca return CONTAINING_RECORD(iface, VMR9Impl, IVMRSurfaceAllocatorNotify9_iface); } +typedef struct +{ + IVMRImagePresenter9 IVMRImagePresenter9_iface; + + LONG refCount; + + IDirect3DDevice9 *d3d9_dev; + IDirect3D9 *d3d9_ptr; + IDirect3DVertexBuffer9 *d3d9_vertex; + + VMR9AllocationInfo info; + + VMR9Impl* pVMR9; +} VMR9DefaultAllocatorPresenterImpl; + +static inline VMR9DefaultAllocatorPresenterImpl *impl_from_IVMRImagePresenter9( IVMRImagePresenter9 *iface) +{ + return CONTAINING_RECORD(iface, VMR9DefaultAllocatorPresenterImpl, IVMRImagePresenter9_iface); +} + +static HRESULT VMR9DefaultAllocatorPresenterImpl_create(VMR9Impl *parent, LPVOID * ppv); + static HRESULT WINAPI VMR9_DoRenderSample(BaseRenderer *iface, IMediaSample * pSample) { VMR9Impl *This = (VMR9Impl *)iface; @@ -886,10 +908,21 @@ static HRESULT WINAPI VMR9FilterConfig_SetRenderingMode(IVMRFilterConfig9 *iface { case VMR9Mode_Windowed: case VMR9Mode_Windowless: - This->allocator = NULL; - This->presenter = NULL; This->allocator_is_ex = 0; This->cookie = ~0; + + hr = VMR9DefaultAllocatorPresenterImpl_create(This, (LPVOID*)&This->presenter); + if (SUCCEEDED(hr)) + hr = IVMRImagePresenter9_QueryInterface(This->presenter, &IID_IVMRSurfaceAllocatorEx9, (LPVOID*)&This->allocator); + if (FAILED(hr)) + { + ERR("Unable to find Presenter interface\n"); + IVMRSurfaceAllocatorEx9_Release(This->presenter); + This->allocator = NULL; + This->presenter = NULL; + } + else + hr = IVMRSurfaceAllocator9_AdviseNotify(This->allocator, &This->IVMRSurfaceAllocatorNotify9_iface); break; case VMR9Mode_Renderless: break; @@ -1262,3 +1295,220 @@ fail: CoTaskMemFree(pVMR9); return hr; } + + + +static HRESULT WINAPI VMR9_ImagePresenter_QueryInterface(IVMRImagePresenter9 *iface, REFIID riid, LPVOID * ppv) +{ + VMR9DefaultAllocatorPresenterImpl *This = impl_from_IVMRImagePresenter9(iface); + TRACE("(%p/%p)->(%s, %p)\n", This, iface, qzdebugstr_guid(riid), ppv); + + *ppv = NULL; + + if (IsEqualIID(riid, &IID_IUnknown)) + *ppv = (LPVOID)&(This->IVMRImagePresenter9_iface); + else if (IsEqualIID(riid, &IID_IVMRImagePresenter9)) + *ppv = &This->IVMRImagePresenter9_iface; + + if (*ppv) + { + IUnknown_AddRef((IUnknown *)(*ppv)); + return S_OK; + } + + FIXME("No interface for %s\n", debugstr_guid(riid)); + + return E_NOINTERFACE; +} + +static ULONG WINAPI VMR9_ImagePresenter_AddRef(IVMRImagePresenter9 *iface) +{ + VMR9DefaultAllocatorPresenterImpl *This = impl_from_IVMRImagePresenter9(iface); + ULONG refCount = InterlockedIncrement(&This->refCount); + + TRACE("(%p)->() AddRef from %d\n", iface, refCount - 1); + + return refCount; +} + +static ULONG WINAPI VMR9_ImagePresenter_Release(IVMRImagePresenter9 *iface) +{ + VMR9DefaultAllocatorPresenterImpl *This = impl_from_IVMRImagePresenter9(iface); + ULONG refCount = InterlockedDecrement(&This->refCount); + + TRACE("(%p)->() Release from %d\n", iface, refCount + 1); + + if (!refCount) + { + TRACE("Destroying\n"); + IUnknown_Release(This->d3d9_ptr); + + if (This->d3d9_vertex) + { + IUnknown_Release(This->d3d9_vertex); + This->d3d9_vertex = NULL; + } + CoTaskMemFree(This); + return 0; + } + return refCount; +} + +static HRESULT WINAPI VMR9_ImagePresenter_StartPresenting(IVMRImagePresenter9 *iface, DWORD_PTR id) +{ + VMR9DefaultAllocatorPresenterImpl *This = impl_from_IVMRImagePresenter9(iface); + + TRACE("(%p/%p/%p)->(...) stub\n", iface, This,This->pVMR9); + return S_OK; +} + +static HRESULT WINAPI VMR9_ImagePresenter_StopPresenting(IVMRImagePresenter9 *iface, DWORD_PTR id) +{ + VMR9DefaultAllocatorPresenterImpl *This = impl_from_IVMRImagePresenter9(iface); + + TRACE("(%p/%p/%p)->(...) stub\n", iface, This,This->pVMR9); + return S_OK; +} + +#define USED_FVF (D3DFVF_XYZRHW | D3DFVF_TEX1) +struct VERTEX { float x, y, z, rhw, u, v; }; + +static HRESULT VMR9_ImagePresenter_PresentTexture(VMR9DefaultAllocatorPresenterImpl *This, IDirect3DSurface9 *surface) +{ + IDirect3DTexture9 *texture = NULL; + HRESULT hr; + + hr = IDirect3DDevice9_SetFVF(This->d3d9_dev, USED_FVF); + if (FAILED(hr)) + { + FIXME("SetFVF: %08x\n", hr); + return hr; + } + + hr = IDirect3DDevice9_SetStreamSource(This->d3d9_dev, 0, This->d3d9_vertex, 0, sizeof(struct VERTEX)); + if (FAILED(hr)) + { + FIXME("SetStreamSource: %08x\n", hr); + return hr; + } + + hr = IDirect3DSurface9_GetContainer(surface, &IID_IDirect3DTexture9, (void **) &texture); + if (FAILED(hr)) + { + FIXME("IDirect3DSurface9_GetContainer failed\n"); + return hr; + } + hr = IDirect3DDevice9_SetTexture(This->d3d9_dev, 0, (IDirect3DBaseTexture9 *)texture); + IDirect3DTexture9_Release(texture); + if (FAILED(hr)) + { + FIXME("SetTexture: %08x\n", hr); + return hr; + } + + hr = IDirect3DDevice9_DrawPrimitive(This->d3d9_dev, D3DPT_TRIANGLESTRIP, 0, 2); + if (FAILED(hr)) + { + FIXME("DrawPrimitive: %08x\n", hr); + return hr; + } + + return S_OK; +} + +static HRESULT WINAPI VMR9_ImagePresenter_PresentImage(IVMRImagePresenter9 *iface, DWORD_PTR id, VMR9PresentationInfo *info) +{ + VMR9DefaultAllocatorPresenterImpl *This = impl_from_IVMRImagePresenter9(iface); + HRESULT hr; + RECT output; + BOOL render = FALSE; + + TRACE("(%p/%p/%p)->(...) stub\n", iface, This, This->pVMR9); + GetWindowRect(This->pVMR9->baseControlWindow.baseWindow.hWnd, &output); + TRACE("Output rectangle: starting at %dx%d, up to point %dx%d\n", output.left, output.top, output.right, output.bottom); + + /* This might happen if we don't have active focus (eg on a different virtual desktop) */ + if (!This->d3d9_dev) + return S_OK; + + /* Display image here */ + hr = IDirect3DDevice9_Clear(This->d3d9_dev, 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0); + if (FAILED(hr)) + FIXME("hr: %08x\n", hr); + hr = IDirect3DDevice9_BeginScene(This->d3d9_dev); + if (SUCCEEDED(hr)) + { + if (This->d3d9_vertex) + hr = VMR9_ImagePresenter_PresentTexture(This, info->lpSurf); + else + hr = E_NOTIMPL; + render = SUCCEEDED(hr); + } + else + FIXME("BeginScene: %08x\n", hr); + hr = IDirect3DDevice9_EndScene(This->d3d9_dev); + if (render && SUCCEEDED(hr)) + { + hr = IDirect3DDevice9_Present(This->d3d9_dev, NULL, NULL, This->pVMR9->baseControlWindow.baseWindow.hWnd, NULL); + if (FAILED(hr)) + FIXME("Presenting image: %08x\n", hr); + } + + return S_OK; +} + +static const IVMRImagePresenter9Vtbl VMR9_ImagePresenter = +{ + VMR9_ImagePresenter_QueryInterface, + VMR9_ImagePresenter_AddRef, + VMR9_ImagePresenter_Release, + VMR9_ImagePresenter_StartPresenting, + VMR9_ImagePresenter_StopPresenting, + VMR9_ImagePresenter_PresentImage +}; + +static HRESULT VMR9DefaultAllocatorPresenterImpl_create(VMR9Impl *parent, LPVOID * ppv) +{ + HRESULT hr = S_OK; + int i; + VMR9DefaultAllocatorPresenterImpl* This; + + This = CoTaskMemAlloc(sizeof(VMR9DefaultAllocatorPresenterImpl)); + if (!This) + return E_OUTOFMEMORY; + + This->d3d9_ptr = NULL; + if (!This->d3d9_ptr) + { + WARN("Could not initialize d3d9.dll\n"); + CoTaskMemFree(This); + return VFW_E_DDRAW_CAPS_NOT_SUITABLE; + } + + i = 0; + do + { + D3DDISPLAYMODE mode; + + hr = IDirect3D9_EnumAdapterModes(This->d3d9_ptr, i++, D3DFMT_X8R8G8B8, 0, &mode); + } while (FAILED(hr)); + if (FAILED(hr)) + ERR("HR: %08x\n", hr); + if (hr == D3DERR_NOTAVAILABLE) + { + ERR("Format not supported\n"); + IUnknown_Release(This->d3d9_ptr); + CoTaskMemFree(This); + return VFW_E_DDRAW_CAPS_NOT_SUITABLE; + } + + This->IVMRImagePresenter9_iface.lpVtbl = &VMR9_ImagePresenter; + + This->refCount = 1; + This->pVMR9 = parent; + This->d3d9_dev = NULL; + This->d3d9_vertex = NULL; + + *ppv = This; + return S_OK; +}
1
0
0
0
Alexandre Julliard : gdi32: Add support for dithering pattern brushes when painting to monochrome bitmaps .
by Alexandre Julliard
22 May '12
22 May '12
Module: wine Branch: master Commit: 3c2502a8c7452061e386bf29768b82c044593a35 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3c2502a8c7452061e386bf297…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue May 22 10:57:01 2012 +0200 gdi32: Add support for dithering pattern brushes when painting to monochrome bitmaps. --- dlls/gdi32/dibdrv/dc.c | 2 +- dlls/gdi32/dibdrv/dibdrv.h | 2 +- dlls/gdi32/dibdrv/objects.c | 6 ++- dlls/gdi32/dibdrv/primitives.c | 102 ++++++++++++++++++++++------------------ 4 files changed, 62 insertions(+), 50 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=3c2502a8c7452061e386b…
1
0
0
0
Henri Verbeet : d3d8: Get rid of IDirect3DIndexBuffer8Impl.
by Alexandre Julliard
21 May '12
21 May '12
Module: wine Branch: master Commit: 27ca37dbe088845c4e1cd9cf43a875452e8b5040 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=27ca37dbe088845c4e1cd9cf4…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon May 21 20:48:37 2012 +0200 d3d8: Get rid of IDirect3DIndexBuffer8Impl. --- dlls/d3d8/buffer.c | 72 +++++++++++++++++++++++----------------------- dlls/d3d8/d3d8_private.h | 20 ++++--------- dlls/d3d8/device.c | 8 ++-- 3 files changed, 46 insertions(+), 54 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=27ca37dbe088845c4e1cd…
1
0
0
0
Henri Verbeet : d3d8: Get rid of IDirect3DDevice8Impl.
by Alexandre Julliard
21 May '12
21 May '12
Module: wine Branch: master Commit: 9b085a92609b8fcfeabcf6fc7be2bbe4b7121c52 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9b085a92609b8fcfeabcf6fc7…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon May 21 20:48:36 2012 +0200 d3d8: Get rid of IDirect3DDevice8Impl. --- dlls/d3d8/buffer.c | 4 +- dlls/d3d8/d3d8_private.h | 29 +- dlls/d3d8/device.c | 1655 ++++++++++++++++++++--------------------- dlls/d3d8/directx.c | 2 +- dlls/d3d8/shader.c | 6 +- dlls/d3d8/surface.c | 2 +- dlls/d3d8/swapchain.c | 2 +- dlls/d3d8/texture.c | 6 +- dlls/d3d8/vertexdeclaration.c | 4 +- dlls/d3d8/volume.c | 2 +- 10 files changed, 835 insertions(+), 877 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=9b085a92609b8fcfeabcf…
1
0
0
0
← Newer
1
...
22
23
24
25
26
27
28
...
74
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
Results per page:
10
25
50
100
200