Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorExMix <rahuba.youri@gmail.com>2013-05-03 17:42:20 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:54:20 +0300
commit09ed371d8d0a8b9972d4383015840b2f14640683 (patch)
tree6e5cfb67a544280dc7edec011e47fa1a655ca953 /graphics
parentb662391167abc512696ab602e6d5eafa67822ca4 (diff)
mul stroke radius on visual scale. Fix for HD devices.
Diffstat (limited to 'graphics')
-rw-r--r--graphics/glyph_cache.cpp14
-rw-r--r--graphics/glyph_cache.hpp4
-rw-r--r--graphics/glyph_cache_impl.cpp2
-rw-r--r--graphics/resource_manager.cpp7
-rw-r--r--graphics/resource_manager.hpp5
5 files changed, 26 insertions, 6 deletions
diff --git a/graphics/glyph_cache.cpp b/graphics/glyph_cache.cpp
index 59b184789e..2d5462c476 100644
--- a/graphics/glyph_cache.cpp
+++ b/graphics/glyph_cache.cpp
@@ -49,8 +49,18 @@ namespace graphics
|| (l.m_color != r.m_color);
}
- GlyphCache::Params::Params(string const & blocksFile, string const & whiteListFile, string const & blackListFile, size_t maxSize, bool isDebugging)
- : m_blocksFile(blocksFile), m_whiteListFile(whiteListFile), m_blackListFile(blackListFile), m_maxSize(maxSize), m_isDebugging(isDebugging)
+ GlyphCache::Params::Params(string const & blocksFile,
+ string const & whiteListFile,
+ string const & blackListFile,
+ size_t maxSize,
+ EDensity density,
+ bool isDebugging)
+ : m_blocksFile(blocksFile),
+ m_whiteListFile(whiteListFile),
+ m_blackListFile(blackListFile),
+ m_maxSize(maxSize),
+ m_density(density),
+ m_isDebugging(isDebugging)
{}
GlyphCache::GlyphCache()
diff --git a/graphics/glyph_cache.hpp b/graphics/glyph_cache.hpp
index 169246894d..b45ab7af57 100644
--- a/graphics/glyph_cache.hpp
+++ b/graphics/glyph_cache.hpp
@@ -2,6 +2,8 @@
#include "color.hpp"
+#include "defines.hpp"
+
#include "../base/string_utils.hpp"
#include "../base/mutex.hpp"
@@ -71,11 +73,13 @@ namespace graphics
string m_whiteListFile;
string m_blackListFile;
size_t m_maxSize;
+ EDensity m_density;
bool m_isDebugging;
Params(string const & blocksFile,
string const & whiteListFile,
string const & blackListFile,
size_t maxSize,
+ EDensity density,
bool isDebugging);
};
diff --git a/graphics/glyph_cache_impl.cpp b/graphics/glyph_cache_impl.cpp
index ada71a2863..0fcb37606f 100644
--- a/graphics/glyph_cache_impl.cpp
+++ b/graphics/glyph_cache_impl.cpp
@@ -423,7 +423,7 @@ namespace graphics
/// Initializing stroker
FTCHECK(FT_Stroker_New(m_lib, &m_stroker));
- FT_Stroker_Set(m_stroker, 2 * 64, FT_STROKER_LINECAP_ROUND, FT_STROKER_LINEJOIN_ROUND, 0);
+ FT_Stroker_Set(m_stroker, FT_Fixed(graphics::visualScale(params.m_density) * 2 * 64), FT_STROKER_LINECAP_ROUND, FT_STROKER_LINEJOIN_ROUND, 0);
FTCHECK(FTC_CMapCache_New(m_manager, &m_charMapCache));
}
diff --git a/graphics/resource_manager.cpp b/graphics/resource_manager.cpp
index 2d5744315b..995e1179b5 100644
--- a/graphics/resource_manager.cpp
+++ b/graphics/resource_manager.cpp
@@ -176,11 +176,13 @@ namespace graphics
ResourceManager::GlyphCacheParams::GlyphCacheParams(string const & unicodeBlockFile,
string const & whiteListFile,
string const & blackListFile,
- size_t glyphCacheMemoryLimit)
+ size_t glyphCacheMemoryLimit,
+ EDensity density)
: m_unicodeBlockFile(unicodeBlockFile),
m_whiteListFile(whiteListFile),
m_blackListFile(blackListFile),
- m_glyphCacheMemoryLimit(glyphCacheMemoryLimit)
+ m_glyphCacheMemoryLimit(glyphCacheMemoryLimit),
+ m_density(density)
{}
namespace
@@ -306,6 +308,7 @@ namespace
gccp.m_whiteListFile,
gccp.m_blackListFile,
gccp.m_glyphCacheMemoryLimit / p.m_threadSlotsCount,
+ gccp.m_density,
false);
m_threadSlots[i].m_glyphCache.reset(new GlyphCache(gcp));
diff --git a/graphics/resource_manager.hpp b/graphics/resource_manager.hpp
index 623a6a3858..37a21cf4d1 100644
--- a/graphics/resource_manager.hpp
+++ b/graphics/resource_manager.hpp
@@ -159,11 +159,14 @@ namespace graphics
size_t m_glyphCacheMemoryLimit;
+ EDensity m_density;
+
GlyphCacheParams();
GlyphCacheParams(string const & unicodeBlockFile,
string const & whiteListFile,
string const & blackListFile,
- size_t glyphCacheMemoryLimit);
+ size_t glyphCacheMemoryLimit,
+ EDensity density);
};
struct Params