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)
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
24 #include "SubPicImpl.h"
25 #include "SubPicAllocatorPresenterImpl.h"
29 class CDX7SubPic
: public CSubPicImpl
31 CComPtr
<IDirect3DDevice7
> m_pD3DDev
;
32 CComPtr
<IDirectDrawSurface7
> m_pSurface
;
35 STDMETHODIMP_(void*) GetObject() const; // returns IDirectDrawSurface7*
38 CDX7SubPic(IDirect3DDevice7
* pD3DDev
, IDirectDrawSurface7
* pSurface
);
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
;
56 bool Alloc(bool fStatic
, ISubPic
** ppSubPic
);
59 CDX7SubPicAllocator(IDirect3DDevice7
* pD3DDev
, SIZE maxsize
, bool fPow2Textures
);
62 STDMETHODIMP
ChangeDevice(IUnknown
* pDev
);