00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #pragma once
00023
00024 #include "ISubPic.h"
00025
00026
00027
00028 class CDX9SubPic : public ISubPicImpl
00029 {
00030 CComPtr<IDirect3DSurface9> m_pSurface;
00031
00032 protected:
00033 STDMETHODIMP_(void*) GetObject();
00034
00035 public:
00036 CDX9SubPic(IDirect3DSurface9* pSurface);
00037
00038
00039 STDMETHODIMP GetDesc(SubPicDesc& spd);
00040 STDMETHODIMP CopyTo(ISubPic* pSubPic);
00041 STDMETHODIMP ClearDirtyRect(DWORD color);
00042 STDMETHODIMP Lock(SubPicDesc& spd);
00043 STDMETHODIMP Unlock(RECT* pDirtyRect);
00044 STDMETHODIMP AlphaBlt(RECT* pSrc, RECT* pDst, SubPicDesc* pTarget);
00045 };
00046
00047
00048
00049 class CDX9SubPicAllocator : public ISubPicAllocatorImpl, public CCritSec
00050 {
00051 CComPtr<IDirect3DDevice9> m_pD3DDev;
00052 CSize m_maxsize;
00053
00054 bool Alloc(bool fStatic, ISubPic** ppSubPic);
00055
00056 public:
00057 CDX9SubPicAllocator(IDirect3DDevice9* pD3DDev, SIZE maxsize, bool fPow2Textures);
00058
00059
00060 STDMETHODIMP ChangeDevice(IUnknown* pDev);
00061 };