2 #include "xy_clipper_paint_machine.h"
4 #include "Rasterizer.h"
5 #include "cache_manager.h"
6 #include "subpixel_position_controler.h"
8 //////////////////////////////////////////////////////////////////////////
10 // CClipperPaintMachine
13 void CClipperPaintMachine::Paint(SharedPtrGrayImage2
*output
)
18 ClipperAlphaMaskCacheKey
key(m_clipper
);
19 key
.UpdateHashValue();
20 ClipperAlphaMaskMruCache
* cache
= CacheManager::GetClipperAlphaMaskMruCache();
21 POSITION pos
= cache
->Lookup(key
);
24 *output
= cache
->GetAt(pos
);
25 cache
->UpdateCache(pos
);
29 (*output
).reset(m_clipper
->Paint());
30 cache
->UpdateCache(key
, *output
);
35 CRect
CClipperPaintMachine::CalcDirtyRect()
37 return CRect(0,0,INT_MAX
, INT_MAX
);//fix me: not a decent state machine yet