[android] Initialize NativeMapView with OpenGL ES 2.0 minimum texture size

This commit is contained in:
Bruno de Oliveira Abinader
2017-04-06 15:47:54 +03:00
parent 2417d13f08
commit f1bcca1465
2 changed files with 9 additions and 6 deletions

View File

@@ -15,6 +15,7 @@
#include <jni/jni.hpp>
#include <mbgl/map/backend_scope.hpp>
#include <mbgl/math/minmax.hpp>
#include <mbgl/util/constants.hpp>
#include <mbgl/util/event.hpp>
#include <mbgl/util/exception.hpp>
@@ -320,8 +321,8 @@ void NativeMapView::update(jni::JNIEnv&) {
}
void NativeMapView::resizeView(jni::JNIEnv&, int w, int h) {
width = w;
height = h;
width = util::max(64, w);
height = util::max(64, h);
map->setSize({ static_cast<uint32_t>(width), static_cast<uint32_t>(height) });
}