review fixes

This commit is contained in:
ExMix 2015-02-17 14:17:03 +03:00 committed by r.kuznetsov
parent 87f712ed6c
commit 26fca8b440
3 changed files with 9 additions and 12 deletions

View file

@ -141,7 +141,7 @@ dp::OGLContext * AndroidOGLContextFactory::getDrawContext()
{
ASSERT(IsValid(), ());
ASSERT(m_windowSurface != EGL_NO_SURFACE, ());
if (m_drawContext == NULL)
if (m_drawContext == nullptr)
m_drawContext = new AndroidOGLContext(m_display, m_windowSurface, m_config, m_uploadContext);
return m_drawContext;
}
@ -150,19 +150,19 @@ dp::OGLContext * AndroidOGLContextFactory::getResourcesUploadContext()
{
ASSERT(IsValid(), ());
ASSERT(m_pixelbufferSurface != EGL_NO_SURFACE, ());
if (m_uploadContext == NULL)
if (m_uploadContext == nullptr)
m_uploadContext = new AndroidOGLContext(m_display, m_pixelbufferSurface, m_config, m_drawContext);
return m_uploadContext;
}
bool AndroidOGLContextFactory::isDrawContextCreated() const
{
return m_drawContext != NULL;
return m_drawContext != nullptr;
}
bool AndroidOGLContextFactory::isUploadContextCreated() const
{
return m_uploadContext != NULL;
return m_uploadContext != nullptr;
}
bool AndroidOGLContextFactory::createWindowSurface()

View file

@ -12,9 +12,6 @@
#include "std/map.hpp"
#endif
#include "std/cstring.hpp"
#include "std/atomic.hpp"
#if defined(OMIM_OS_WINDOWS)
#define DP_APIENTRY __stdcall
#elif defined(OMIM_OS_ANDROID)
@ -253,7 +250,7 @@ void GLFunctions::Init()
#else
typedef void (DP_APIENTRY *glShaderSource_Type)(GLuint shaderID, GLsizei count, GLchar const ** string, GLint const * length);
glShaderSourceFn = reinterpret_cast<glShaderSource_Type>(&::glShaderSource);
#endif`
#endif
glCompileShaderFn = LOAD_GL_FUNC(TglCompileShaderFn, glCompileShader);
glDeleteShaderFn = LOAD_GL_FUNC(TglDeleteShaderFn, glDeleteShader);
glGetShaderivFn = LOAD_GL_FUNC(TglGetShaderivFn, glGetShaderiv);

View file

@ -38,7 +38,7 @@ void DrapeSurface::CreateEngine()
{
dp::RefPointer<dp::OGLContextFactory> f(m_contextFactory.GetRefPointer());
float pixelRatio = devicePixelRatio();
float const pixelRatio = devicePixelRatio();
m_drapeEngine = TEnginePrt(new df::TestingEngine(f, df::Viewport(0, 0, pixelRatio * width(), pixelRatio * height()), pixelRatio));
}
@ -47,9 +47,9 @@ void DrapeSurface::sizeChanged(int)
{
if (!m_drapeEngine.IsNull())
{
float vs = devicePixelRatio();
int w = width() * vs;
int h = height() * vs;
float const vs = devicePixelRatio();
int const w = width() * vs;
int const h = height() * vs;
m_drapeEngine->Resize(w, h);
}
}