Path: blob/master/samples/wp8/OcvImageManipulation/PhoneXamlDirect3DApp1/PhoneXamlDirect3DApp1Comp/Direct3DContentProvider.h
16349 views
#pragma once12#include "pch.h"3#include <wrl/module.h>4#include <Windows.Phone.Graphics.Interop.h>5#include <DrawingSurfaceNative.h>67#include "Direct3DInterop.h"89class Direct3DContentProvider : public Microsoft::WRL::RuntimeClass<10Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::WinRtClassicComMix>,11ABI::Windows::Phone::Graphics::Interop::IDrawingSurfaceContentProvider,12IDrawingSurfaceContentProviderNative>13{14public:15Direct3DContentProvider(PhoneXamlDirect3DApp1Comp::Direct3DInterop^ controller);1617void ReleaseD3DResources();1819// IDrawingSurfaceContentProviderNative20HRESULT STDMETHODCALLTYPE Connect(_In_ IDrawingSurfaceRuntimeHostNative* host);21void STDMETHODCALLTYPE Disconnect();2223HRESULT STDMETHODCALLTYPE PrepareResources(_In_ const LARGE_INTEGER* presentTargetTime, _Out_ BOOL* contentDirty);24HRESULT STDMETHODCALLTYPE GetTexture(_In_ const DrawingSurfaceSizeF* size, _Out_ IDrawingSurfaceSynchronizedTextureNative** synchronizedTexture, _Out_ DrawingSurfaceRectF* textureSubRectangle);2526private:27HRESULT InitializeTexture(_In_ const DrawingSurfaceSizeF* size);2829PhoneXamlDirect3DApp1Comp::Direct3DInterop^ m_controller;30Microsoft::WRL::ComPtr<IDrawingSurfaceRuntimeHostNative> m_host;31Microsoft::WRL::ComPtr<IDrawingSurfaceSynchronizedTextureNative> m_synchronizedTexture;32};3334