blob: d5a7376ea93de69fa9b18286cf27aca0e04de77b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
#include "drape/support_manager.hpp"
#include "drape/glfunctions.hpp"
#include "base/logging.hpp"
namespace dp
{
void SupportManager::Init()
{
string const renderer = GLFunctions::glGetString(gl_const::GLRenderer);
string const version = GLFunctions::glGetString(gl_const::GLVersion);
LOG(LINFO, ("Renderer =", renderer, "Version =", version));
m_isSamsungGoogleNexus = (renderer == "PowerVR SGX 540" && version.find("GOOGLENEXUS.ED945322") != string::npos);
if (m_isSamsungGoogleNexus)
LOG(LINFO, ("Samsung Google Nexus detected."));
if (renderer.find("Adreno") != string::npos)
{
vector<string> const models = { "200", "203", "205", "220", "225" };
for (auto const & model : models)
{
if (renderer.find(model) != string::npos)
{
LOG(LINFO, ("Adreno 200 device detected."));
m_isAdreno200 = true;
break;
}
}
}
}
bool SupportManager::IsSamsungGoogleNexus() const
{
return m_isSamsungGoogleNexus;
}
bool SupportManager::IsAdreno200Device() const
{
return m_isAdreno200;
}
SupportManager & SupportManager::Instance()
{
static SupportManager manager;
return manager;
}
} // namespace dp
|