From 98599ea342cd4c1833475eaab95c7feb47144a87 Mon Sep 17 00:00:00 2001 From: "r.kuznetsov" Date: Mon, 25 Jan 2016 16:17:17 +0300 Subject: [PATCH 1/2] Fixed freeze on Mali-400 on Android 4.2 --- android/jni/com/mapswithme/opengl/androidoglcontext.cpp | 5 +++++ android/jni/com/mapswithme/opengl/androidoglcontext.hpp | 1 + 2 files changed, 6 insertions(+) diff --git a/android/jni/com/mapswithme/opengl/androidoglcontext.cpp b/android/jni/com/mapswithme/opengl/androidoglcontext.cpp index 58cd2a1f9f..22bc507973 100644 --- a/android/jni/com/mapswithme/opengl/androidoglcontext.cpp +++ b/android/jni/com/mapswithme/opengl/androidoglcontext.cpp @@ -47,6 +47,11 @@ void AndroidOGLContext::makeCurrent() CHECK_EGL_CALL(); } +void AndroidOGLContext::doneCurrent() +{ + clearCurrent(); +} + void AndroidOGLContext::clearCurrent() { if (eglMakeCurrent(m_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT) == EGL_FALSE) diff --git a/android/jni/com/mapswithme/opengl/androidoglcontext.hpp b/android/jni/com/mapswithme/opengl/androidoglcontext.hpp index 98a4da3a80..ae50d0bbac 100644 --- a/android/jni/com/mapswithme/opengl/androidoglcontext.hpp +++ b/android/jni/com/mapswithme/opengl/androidoglcontext.hpp @@ -15,6 +15,7 @@ public: ~AndroidOGLContext(); void makeCurrent() override; + void doneCurrent() override; void present() override; void setDefaultFramebuffer() override; void setRenderingEnabled(bool enabled) override; From d0331caf72d2248953ed3050b94852dac6811832 Mon Sep 17 00:00:00 2001 From: "r.kuznetsov" Date: Wed, 27 Jan 2016 10:56:09 +0300 Subject: [PATCH 2/2] Fixed loading of functions glMapBufferRange and glFlushMappedBufferRange on Android --- drape/glfunctions.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drape/glfunctions.cpp b/drape/glfunctions.cpp index 2cf6ab83a1..042d1d05b7 100644 --- a/drape/glfunctions.cpp +++ b/drape/glfunctions.cpp @@ -381,6 +381,8 @@ void GLFunctions::Init() glDeleteVertexArrayFn = (TglDeleteVertexArrayFn)eglGetProcAddress("glDeleteVertexArraysOES"); glMapBufferFn = &::glMapBufferOES; glUnmapBufferFn = &::glUnmapBufferOES; + glMapBufferRangeFn = (TglMapBufferRangeFn)eglGetProcAddress("glMapBufferRangeEXT"); + glFlushMappedBufferRangeFn = (TglFlushMappedBufferRangeFn)eglGetProcAddress("glFlushMappedBufferRangeEXT"); #elif defined(OMIM_OS_MOBILE) glGenVertexArraysFn = &glGenVertexArraysOES; glBindVertexArrayFn = &glBindVertexArrayOES;