Increase ParseScript cache from 30 to 90 seconds
[xy_vsfilter.git] / src / subpic / SimpleSubPicWrapper.cpp
blobd4dd586fdfc5bc760065b2bcde3c155764973786
1 #include "stdafx.h"
2 #include "SimpleSubPicWrapper.h"
4 //////////////////////////////////////////////////////////////////////////
5 //
6 // SimpleSubPicWrapper
7 //
9 SimpleSubPicWrapper::SimpleSubPicWrapper( ISubPicEx * inner_obj )
10 : CUnknown(NAME("SimpleSubPicWrapper"), NULL)
11 , m_inner_obj(inner_obj)
16 SimpleSubPicWrapper::SimpleSubPicWrapper( ISubPic* inner_obj )
17 : CUnknown(NAME("SimpleSubPicWrapper"), NULL)
18 , m_inner_obj2(inner_obj)
23 STDMETHODIMP SimpleSubPicWrapper::NonDelegatingQueryInterface( REFIID riid, void** ppv )
25 return
26 QI(ISimpleSubPic)
27 __super::NonDelegatingQueryInterface(riid, ppv);
30 STDMETHODIMP SimpleSubPicWrapper::AlphaBlt(SubPicDesc* target)
32 if (m_inner_obj)
34 CAtlList<const CRect> rect_list;
35 m_inner_obj->GetDirtyRects(rect_list);
37 POSITION pos = rect_list.GetHeadPosition();
38 while(pos!=NULL)
40 const CRect& rect = rect_list.GetNext(pos);
41 m_inner_obj->AlphaBlt(rect, rect, target);
44 else if (m_inner_obj2)
46 CRect r;
47 m_inner_obj2->GetDirtyRect(r);
49 m_inner_obj2->AlphaBlt(r, r, target);
52 return S_OK;