From c68213d9a2778a5e13350f11a4df6d770e200eb8 Mon Sep 17 00:00:00 2001 From: vng Date: Mon, 6 Jun 2011 22:40:02 +0300 Subject: [PATCH] Correct duplicating rules filtration. --- map/framework.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/map/framework.cpp b/map/framework.cpp index 1a1f1185f0..b8c7a34734 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -140,8 +140,14 @@ namespace fwork return true; } + // remove duplicating identical drawing keys + PreProcessKeys(); + // get drawing rules for the m_keys array size_t const count = m_keys.size(); +#ifdef PROFILER_DRAWING + m_drawCount += count; +#endif buffer_vector rules; rules.resize(count); @@ -253,17 +259,8 @@ namespace fwork } } - // nothing to draw - if (!isExist) return true; - - // remove duplicating identical drawing keys - PreProcessKeys(); - -#ifdef PROFILER_DRAWING - m_drawCount += m_keys.size(); -#endif - - pDrawer->Draw(ptr.get(), rules.data(), count); + if (isExist) + pDrawer->Draw(ptr.get(), rules.data(), count); return true; }