some improvements

This commit is contained in:
Jinhao
2015-02-17 04:03:55 +08:00
parent 4385ac623d
commit 0ffa3e54ca
10 changed files with 175 additions and 161 deletions

View File

@@ -36,12 +36,8 @@ namespace nana
struct output_t
{
drawing::diehard_t diehard;
drawing::diehard_t diehard{ nullptr };
std::vector<nana::point> points;
output_t()
: diehard(nullptr)
{}
};
struct framebuilder
@@ -443,12 +439,14 @@ namespace nana
for(auto thr : threads_)
{
std::lock_guard<decltype(thr->mutex)> privlock(thr->mutex);
if ((thr->fps == p->fps) && (thr->performance_parameter / (thr->animations.size() + 1) <= 43.3))
if (thr->fps == p->fps)
{
p->thr_variable = thr;
thr->animations.push_back(p);
return;
if (thr->animations.empty() || (thr->performance_parameter * (1.0 + 1.0 / thr->animations.size()) <= 43.3))
{
p->thr_variable = thr;
thr->animations.push_back(p);
return;
}
}
}