mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
105 lines
4.2 KiB
Diff
105 lines
4.2 KiB
Diff
From 9a5ebfa598dedd23eeef0ea4d1a292f4e6281a1c Mon Sep 17 00:00:00 2001
|
|
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
|
Date: Tue, 23 Jul 2019 08:37:12 +1000
|
|
Subject: [PATCH] directmanipulation: Supprot
|
|
IDirectManipulationFrameInfoProvider interface in
|
|
IDirectManipulationCompositor.
|
|
|
|
---
|
|
dlls/directmanipulation/directmanipulation.c | 49 ++++++++++++++++++++
|
|
1 file changed, 49 insertions(+)
|
|
|
|
diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c
|
|
index 3b4c19a7994..e1cfec7a6a5 100644
|
|
--- a/dlls/directmanipulation/directmanipulation.c
|
|
+++ b/dlls/directmanipulation/directmanipulation.c
|
|
@@ -340,6 +340,7 @@ static HRESULT WINAPI DirectManipulation_CreateInstance(IClassFactory *iface, IU
|
|
struct directcompositor
|
|
{
|
|
IDirectManipulationCompositor IDirectManipulationCompositor_iface;
|
|
+ IDirectManipulationFrameInfoProvider IDirectManipulationFrameInfoProvider_iface;
|
|
LONG ref;
|
|
};
|
|
|
|
@@ -348,8 +349,15 @@ static inline struct directcompositor *impl_from_IDirectManipulationCompositor(I
|
|
return CONTAINING_RECORD(iface, struct directcompositor, IDirectManipulationCompositor_iface);
|
|
}
|
|
|
|
+static inline struct directcompositor *impl_from_IDirectManipulationFrameInfoProvider(IDirectManipulationFrameInfoProvider *iface)
|
|
+{
|
|
+ return CONTAINING_RECORD(iface, struct directcompositor, IDirectManipulationFrameInfoProvider_iface);
|
|
+}
|
|
+
|
|
static HRESULT WINAPI compositor_QueryInterface(IDirectManipulationCompositor *iface, REFIID riid, void **ppv)
|
|
{
|
|
+ struct directcompositor *This = impl_from_IDirectManipulationCompositor(iface);
|
|
+
|
|
if (IsEqualGUID(riid, &IID_IUnknown) ||
|
|
IsEqualGUID(riid, &IID_IDirectManipulationCompositor))
|
|
{
|
|
@@ -357,6 +365,12 @@ static HRESULT WINAPI compositor_QueryInterface(IDirectManipulationCompositor *i
|
|
*ppv = iface;
|
|
return S_OK;
|
|
}
|
|
+ else if(IsEqualGUID(riid, &IID_IDirectManipulationFrameInfoProvider))
|
|
+ {
|
|
+ IUnknown_AddRef(iface);
|
|
+ *ppv = &This->IDirectManipulationFrameInfoProvider_iface;
|
|
+ return S_OK;
|
|
+ }
|
|
|
|
FIXME("(%p)->(%s,%p),not found\n", iface, debugstr_guid(riid), ppv);
|
|
return E_NOINTERFACE;
|
|
@@ -426,6 +440,40 @@ static const struct IDirectManipulationCompositorVtbl compositorVtbl =
|
|
compositor_Flush
|
|
};
|
|
|
|
+static HRESULT WINAPI provider_QueryInterface(IDirectManipulationFrameInfoProvider *iface, REFIID riid, void **ppv)
|
|
+{
|
|
+ struct directcompositor *This = impl_from_IDirectManipulationFrameInfoProvider(iface);
|
|
+ return IDirectManipulationCompositor_QueryInterface(&This->IDirectManipulationCompositor_iface, riid, ppv);
|
|
+}
|
|
+
|
|
+static ULONG WINAPI provider_AddRef(IDirectManipulationFrameInfoProvider *iface)
|
|
+{
|
|
+ struct directcompositor *This = impl_from_IDirectManipulationFrameInfoProvider(iface);
|
|
+ return IDirectManipulationCompositor_AddRef(&This->IDirectManipulationCompositor_iface);
|
|
+}
|
|
+
|
|
+static ULONG WINAPI provider_Release(IDirectManipulationFrameInfoProvider *iface)
|
|
+{
|
|
+ struct directcompositor *This = impl_from_IDirectManipulationFrameInfoProvider(iface);
|
|
+ return IDirectManipulationCompositor_Release(&This->IDirectManipulationCompositor_iface);
|
|
+}
|
|
+
|
|
+static HRESULT WINAPI provider_GetNextFrameInfo(IDirectManipulationFrameInfoProvider *iface, ULONGLONG *time,
|
|
+ ULONGLONG *process, ULONGLONG *composition)
|
|
+{
|
|
+ struct directcompositor *This = impl_from_IDirectManipulationFrameInfoProvider(iface);
|
|
+ FIXME("%p, %p, %p, %p\n", This, time, process, composition);
|
|
+ return E_NOTIMPL;
|
|
+}
|
|
+
|
|
+static const struct IDirectManipulationFrameInfoProviderVtbl providerVtbl =
|
|
+{
|
|
+ provider_QueryInterface,
|
|
+ provider_AddRef,
|
|
+ provider_Release,
|
|
+ provider_GetNextFrameInfo
|
|
+};
|
|
+
|
|
static HRESULT WINAPI DirectCompositor_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
|
|
{
|
|
struct directcompositor *object;
|
|
@@ -440,6 +488,7 @@ static HRESULT WINAPI DirectCompositor_CreateInstance(IClassFactory *iface, IUnk
|
|
return E_OUTOFMEMORY;
|
|
|
|
object->IDirectManipulationCompositor_iface.lpVtbl = &compositorVtbl;
|
|
+ object->IDirectManipulationFrameInfoProvider_iface.lpVtbl = &providerVtbl;
|
|
object->ref = 1;
|
|
|
|
ret = compositor_QueryInterface(&object->IDirectManipulationCompositor_iface, riid, ppv);
|
|
--
|
|
2.27.0
|
|
|