[vlc-commits] d3d9_fmt: remove unused code

Steve Lhomme git at videolan.org
Wed Dec 11 11:04:23 CET 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Nov 26 16:45:02 2019 +0100| [9c5e60a8ef86a20867b7cba322dea7e38b753d0e] | committer: Steve Lhomme

d3d9_fmt: remove unused code

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9c5e60a8ef86a20867b7cba322dea7e38b753d0e
---

 modules/video_chroma/d3d9_fmt.c | 33 ---------------------------------
 modules/video_chroma/d3d9_fmt.h |  3 ---
 2 files changed, 36 deletions(-)

diff --git a/modules/video_chroma/d3d9_fmt.c b/modules/video_chroma/d3d9_fmt.c
index 945ca49c54..7bc71d1324 100644
--- a/modules/video_chroma/d3d9_fmt.c
+++ b/modules/video_chroma/d3d9_fmt.c
@@ -136,29 +136,6 @@ HRESULT D3D9_CreateDevice(vlc_object_t *o, d3d9_handle_t *hd3d, int AdapterToUse
     return hr;
 }
 
-HRESULT D3D9_CreateDeviceExternal(IDirect3DDevice9 *dev, d3d9_handle_t *hd3d,
-                                  d3d9_device_t *out)
-{
-    D3DDEVICE_CREATION_PARAMETERS params;
-    HRESULT hr = IDirect3DDevice9_GetCreationParameters(dev, &params);
-    if (FAILED(hr))
-       return hr;
-    out->dev   = dev;
-    out->owner = false;
-    out->adapterId = params.AdapterOrdinal;
-    ZeroMemory(&out->caps, sizeof(out->caps));
-    hr = IDirect3D9_GetDeviceCaps(hd3d->obj, out->adapterId, params.DeviceType, &out->caps);
-    if (FAILED(hr))
-       return hr;
-    D3DDISPLAYMODE d3ddm;
-    hr = IDirect3D9_GetAdapterDisplayMode(hd3d->obj, out->adapterId, &d3ddm);
-    if (FAILED(hr))
-        return hr;
-    IDirect3DDevice9_AddRef(out->dev);
-    out->BufferFormat = d3ddm.Format;
-    return S_OK;
-}
-
 void D3D9_ReleaseDevice(d3d9_device_t *d3d_dev)
 {
     if (d3d_dev->dev)
@@ -264,16 +241,6 @@ error:
     return VLC_EGENERIC;
 }
 
-int D3D9_CreateExternal(d3d9_handle_t *hd3d, IDirect3DDevice9 *d3d9dev)
-{
-    HRESULT hr = IDirect3DDevice9_GetDirect3D(d3d9dev, &hd3d->obj);
-    if (unlikely(FAILED(hr)))
-        return VLC_EGENERIC;
-    hd3d->hdll = NULL;
-    hd3d->use_ex = false; /* we don't care */
-    return VLC_SUCCESS;
-}
-
 void D3D9_CloneExternal(d3d9_handle_t *hd3d, IDirect3D9 *dev)
 {
     hd3d->obj = dev;
diff --git a/modules/video_chroma/d3d9_fmt.h b/modules/video_chroma/d3d9_fmt.h
index d91f1a223b..50dc0e8092 100644
--- a/modules/video_chroma/d3d9_fmt.h
+++ b/modules/video_chroma/d3d9_fmt.h
@@ -139,13 +139,10 @@ static inline void ReleaseD3D9PictureSys(picture_sys_d3d9_t *p_sys)
 HRESULT D3D9_CreateDevice(vlc_object_t *, d3d9_handle_t *, int,
                           d3d9_device_t *out);
 #define D3D9_CreateDevice(a,b,c,d) D3D9_CreateDevice( VLC_OBJECT(a), b, c, d )
-HRESULT D3D9_CreateDeviceExternal(IDirect3DDevice9 *, d3d9_handle_t *,
-                                  d3d9_device_t *out);
 
 void D3D9_ReleaseDevice(d3d9_device_t *);
 int D3D9_Create(vlc_object_t *, d3d9_handle_t *);
 #define D3D9_Create(a,b) D3D9_Create( VLC_OBJECT(a), b )
-int D3D9_CreateExternal(d3d9_handle_t *, IDirect3DDevice9 *);
 void D3D9_CloneExternal(d3d9_handle_t *, IDirect3D9 *);
 
 void D3D9_Destroy(d3d9_handle_t *);



More information about the vlc-commits mailing list