Draw, CtrlCore: Major refactor of Draw

git-svn-id: svn://ultimatepp.org/upp/trunk@5545 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2012-11-11 12:33:47 +00:00
parent fa5f9ec55e
commit bd87a04fda
37 changed files with 2704 additions and 2655 deletions

View file

@ -2,6 +2,8 @@
NAMESPACE_UPP
StaticMutex RichPara::cache_lock;
Array<RichPara>& RichPara::Cache()
{
static Array<RichPara> x;
@ -24,7 +26,7 @@ RichPara::RichPara()
RichPara::~RichPara()
{
if(cacheid && !part.IsPicked() && !incache) {
DrawLock __;
Mutex::Lock __(cache_lock);
Array<RichPara>& cache = Cache();
incache = true;
cache.InsertPick(0, *this);
@ -566,7 +568,7 @@ void RichPara::Unpack(const String& data, const Array<RichObject>& obj,
format = style;
if(cacheid) {
DrawLock __;
Mutex::Lock __(cache_lock);
Array<RichPara>& cache = Cache();
for(int i = 0; i < cache.GetCount(); i++)
if(cache[i].cacheid == cacheid) {