Support unrar64.dll
[xy_vsfilter.git] / src / subpic / DX7SubPic.h
blob0098372087c9cd1e1079ccdd587673cc4aba1077
1 /*
2 * Copyright (C) 2003-2006 Gabest
3 * http://www.gabest.org
5 * This Program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
8 * any later version.
10 * This Program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with GNU Make; see the file COPYING. If not, write to
17 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
18 * http://www.gnu.org/copyleft/gpl.html
22 #pragma once
24 #include "SubPicImpl.h"
25 #include "SubPicAllocatorPresenterImpl.h"
27 // CDX7SubPic
29 class CDX7SubPic : public CSubPicImpl
31 CComPtr<IDirect3DDevice7> m_pD3DDev;
32 CComPtr<IDirectDrawSurface7> m_pSurface;
34 protected:
35 STDMETHODIMP_(void*) GetObject() const; // returns IDirectDrawSurface7*
37 public:
38 CDX7SubPic(IDirect3DDevice7* pD3DDev, IDirectDrawSurface7* pSurface);
40 // ISubPic
41 STDMETHODIMP GetDesc(SubPicDesc& spd) const;
42 STDMETHODIMP CopyTo(ISubPic* pSubPic);
43 STDMETHODIMP ClearDirtyRect(DWORD color);
44 STDMETHODIMP Lock(SubPicDesc& spd);
45 STDMETHODIMP Unlock(RECT* pDirtyRect);
46 STDMETHODIMP AlphaBlt(const RECT* pSrc, const RECT* pDst, SubPicDesc* pTarget);
49 // CDX7SubPicAllocator
51 class CDX7SubPicAllocator : public CSubPicAllocatorImpl, public CCritSec
53 CComPtr<IDirect3DDevice7> m_pD3DDev;
54 CSize m_maxsize;
56 bool Alloc(bool fStatic, ISubPic** ppSubPic);
58 public:
59 CDX7SubPicAllocator(IDirect3DDevice7* pD3DDev, SIZE maxsize, bool fPow2Textures);
61 // ISubPicAllocator
62 STDMETHODIMP ChangeDevice(IUnknown* pDev);