summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobrun <tobrun.van.nuland@gmail.com>2016-09-27 15:08:49 +0200
committerGitHub <noreply@github.com>2016-09-27 15:08:49 +0200
commit0c0671bff0aa7f2ac7fe0c3e2221e050fbda6905 (patch)
tree699e9cf6cd7e3f3c07f15cfaa5eb03dd40ed1e90
parentc88ce2d51e4aa61f1e6b3939ada474a0572c7ce0 (diff)
downloadqtlocation-mapboxgl-0c0671bff0aa7f2ac7fe0c3e2221e050fbda6905.tar.gz
[android] - disable general purpose logging during transformation change (#6452)
-rwxr-xr-xplatform/android/src/jni.cpp19
-rwxr-xr-xplatform/android/src/native_map_view.cpp10
2 files changed, 1 insertions, 28 deletions
diff --git a/platform/android/src/jni.cpp b/platform/android/src/jni.cpp
index 6d7fb4430d..03e66c5895 100755
--- a/platform/android/src/jni.cpp
+++ b/platform/android/src/jni.cpp
@@ -363,7 +363,6 @@ void nativeUpdate(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPtr) {
}
void nativeRender(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPtr) {
- mbgl::Log::Debug(mbgl::Event::JNI, "nativeRender");
assert(nativeMapViewPtr != 0);
NativeMapView *nativeMapView = reinterpret_cast<NativeMapView *>(nativeMapViewPtr);
nativeMapView->render();
@@ -469,14 +468,12 @@ jni::jstring* nativeGetAccessToken(JNIEnv *env, jni::jobject* obj, jlong nativeM
}
void nativeCancelTransitions(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPtr) {
- mbgl::Log::Debug(mbgl::Event::JNI, "nativeCancelTransitions");
assert(nativeMapViewPtr != 0);
NativeMapView *nativeMapView = reinterpret_cast<NativeMapView *>(nativeMapViewPtr);
nativeMapView->getMap().cancelTransitions();
}
void nativeSetGestureInProgress(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPtr, jboolean inProgress) {
- mbgl::Log::Debug(mbgl::Event::JNI, "nativeSetGestureInProgress");
assert(nativeMapViewPtr != 0);
NativeMapView *nativeMapView = reinterpret_cast<NativeMapView *>(nativeMapViewPtr);
nativeMapView->getMap().setGestureInProgress(inProgress);
@@ -484,7 +481,6 @@ void nativeSetGestureInProgress(JNIEnv *env, jni::jobject* obj, jlong nativeMapV
void nativeMoveBy(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPtr, jdouble dx, jdouble dy,
jlong duration) {
- mbgl::Log::Debug(mbgl::Event::JNI, "nativeMoveBy");
assert(nativeMapViewPtr != 0);
NativeMapView *nativeMapView = reinterpret_cast<NativeMapView *>(nativeMapViewPtr);
mbgl::ScreenCoordinate center(dx, dy);
@@ -492,14 +488,12 @@ void nativeMoveBy(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPtr, jdoubl
}
void nativeSetLatLng(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPtr, jdouble latitude, jdouble longitude, jlong duration) {
- mbgl::Log::Debug(mbgl::Event::JNI, "nativeSetLatLng");
assert(nativeMapViewPtr != 0);
NativeMapView *nativeMapView = reinterpret_cast<NativeMapView *>(nativeMapViewPtr);
nativeMapView->getMap().setLatLng(mbgl::LatLng(latitude, longitude), nativeMapView->getInsets(), mbgl::Duration(duration));
}
jni::jobject* nativeGetLatLng(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPtr) {
- mbgl::Log::Debug(mbgl::Event::JNI, "nativeGetLatLng");
assert(nativeMapViewPtr != 0);
NativeMapView *nativeMapView = reinterpret_cast<NativeMapView *>(nativeMapViewPtr);
mbgl::LatLng latLng = nativeMapView->getMap().getLatLng(nativeMapView->getInsets());
@@ -507,7 +501,6 @@ jni::jobject* nativeGetLatLng(JNIEnv *env, jni::jobject* obj, jlong nativeMapVie
}
jdoubleArray nativeGetCameraValues(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPtr) {
- mbgl::Log::Debug(mbgl::Event::JNI, "nativeGetCameraValues");
assert(nativeMapViewPtr != 0);
NativeMapView *nativeMapView = reinterpret_cast<NativeMapView *>(nativeMapViewPtr);
mbgl::LatLng latLng = nativeMapView->getMap().getLatLng(nativeMapView->getInsets());
@@ -1018,14 +1011,12 @@ void nativeSetReachability(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPt
}
jdouble nativeGetMetersPerPixelAtLatitude(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPtr, jdouble lat, jdouble zoom) {
- mbgl::Log::Debug(mbgl::Event::JNI, "nativeGetMetersPerPixelAtLatitude");
assert(nativeMapViewPtr != 0);
NativeMapView *nativeMapView = reinterpret_cast<NativeMapView *>(nativeMapViewPtr);
return nativeMapView->getMap().getMetersPerPixelAtLatitude(lat, zoom);
}
jni::jobject* nativeProjectedMetersForLatLng(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPtr, jdouble latitude, jdouble longitude) {
- mbgl::Log::Debug(mbgl::Event::JNI, "nativeProjectedMetersForLatLng");
assert(nativeMapViewPtr != 0);
NativeMapView *nativeMapView = reinterpret_cast<NativeMapView *>(nativeMapViewPtr);
mbgl::ProjectedMeters projectedMeters = nativeMapView->getMap().projectedMetersForLatLng(mbgl::LatLng(latitude, longitude));
@@ -1033,7 +1024,6 @@ jni::jobject* nativeProjectedMetersForLatLng(JNIEnv *env, jni::jobject* obj, jlo
}
jni::jobject* nativeLatLngForProjectedMeters(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPtr, jdouble northing, jdouble easting) {
- mbgl::Log::Debug(mbgl::Event::JNI, "nativeLatLngForProjectedMeters");
assert(nativeMapViewPtr != 0);
NativeMapView *nativeMapView = reinterpret_cast<NativeMapView *>(nativeMapViewPtr);
mbgl::LatLng latLng = nativeMapView->getMap().latLngForProjectedMeters(mbgl::ProjectedMeters(northing, easting));
@@ -1041,7 +1031,6 @@ jni::jobject* nativeLatLngForProjectedMeters(JNIEnv *env, jni::jobject* obj, jlo
}
jni::jobject* nativePixelForLatLng(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPtr, jdouble latitude, jdouble longitude) {
- mbgl::Log::Debug(mbgl::Event::JNI, "nativePixelForLatLng");
assert(nativeMapViewPtr != 0);
NativeMapView *nativeMapView = reinterpret_cast<NativeMapView *>(nativeMapViewPtr);
mbgl::ScreenCoordinate pixel = nativeMapView->getMap().pixelForLatLng(mbgl::LatLng(latitude, longitude));
@@ -1049,7 +1038,6 @@ jni::jobject* nativePixelForLatLng(JNIEnv *env, jni::jobject* obj, jlong nativeM
}
jni::jobject* nativeLatLngForPixel(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPtr, jfloat x, jfloat y) {
- mbgl::Log::Debug(mbgl::Event::JNI, "nativeLatLngForPixel");
assert(nativeMapViewPtr != 0);
NativeMapView *nativeMapView = reinterpret_cast<NativeMapView *>(nativeMapViewPtr);
mbgl::LatLng latLng = nativeMapView->getMap().latLngForPixel(mbgl::ScreenCoordinate(x, y));
@@ -1057,14 +1045,12 @@ jni::jobject* nativeLatLngForPixel(JNIEnv *env, jni::jobject* obj, jlong nativeM
}
jdouble nativeGetTopOffsetPixelsForAnnotationSymbol(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPtr, jni::jstring* symbolName) {
- mbgl::Log::Debug(mbgl::Event::JNI, "nativeGetTopOffsetPixelsForAnnotationSymbol");
assert(nativeMapViewPtr != 0);
NativeMapView *nativeMapView = reinterpret_cast<NativeMapView *>(nativeMapViewPtr);
return nativeMapView->getMap().getTopOffsetPixelsForAnnotationIcon(std_string_from_jstring(env, symbolName));
}
void nativeJumpTo(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPtr, jdouble angle, jdouble latitude, jdouble longitude, jdouble pitch, jdouble zoom) {
- mbgl::Log::Debug(mbgl::Event::JNI, "nativeJumpTo");
assert(nativeMapViewPtr != 0);
NativeMapView *nativeMapView = reinterpret_cast<NativeMapView *>(nativeMapViewPtr);
@@ -1085,7 +1071,6 @@ void nativeJumpTo(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPtr, jdoubl
}
void nativeEaseTo(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPtr, jdouble angle, jdouble latitude, jdouble longitude, jlong duration, jdouble pitch, jdouble zoom, jboolean easing) {
- mbgl::Log::Debug(mbgl::Event::JNI, "nativeEaseTo");
assert(nativeMapViewPtr != 0);
NativeMapView *nativeMapView = reinterpret_cast<NativeMapView *>(nativeMapViewPtr);
@@ -1113,14 +1098,12 @@ void nativeEaseTo(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPtr, jdoubl
}
void nativeSetContentPadding(JNIEnv *env, jni::jobject* obj,long nativeMapViewPtr, double top, double left, double bottom, double right) {
- mbgl::Log::Debug(mbgl::Event::JNI, "nativeSetContentPadding");
assert(nativeMapViewPtr != 0);
NativeMapView *nativeMapView = reinterpret_cast<NativeMapView *>(nativeMapViewPtr);
nativeMapView->setInsets({top, left, bottom, right});
}
void nativeFlyTo(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPtr, jdouble angle, jdouble latitude, jdouble longitude, jlong duration, jdouble pitch, jdouble zoom) {
- mbgl::Log::Debug(mbgl::Event::JNI, "nativeFlyTo");
assert(nativeMapViewPtr != 0);
NativeMapView *nativeMapView = reinterpret_cast<NativeMapView *>(nativeMapViewPtr);
@@ -1230,7 +1213,7 @@ void nativeRemoveSource(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPtr,
}
void nativeScheduleTakeSnapshot(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPtr) {
- mbgl::Log::Error(mbgl::Event::JNI, "nativeRenderToOffscreen");
+ mbgl::Log::Debug(mbgl::Event::JNI, "nativeRenderToOffscreen");
assert(nativeMapViewPtr != 0);
NativeMapView *nativeMapView = reinterpret_cast<NativeMapView *>(nativeMapViewPtr);
nativeMapView->scheduleTakeSnapshot();
diff --git a/platform/android/src/native_map_view.cpp b/platform/android/src/native_map_view.cpp
index 529511b6d9..33ba115b94 100755
--- a/platform/android/src/native_map_view.cpp
+++ b/platform/android/src/native_map_view.cpp
@@ -129,8 +129,6 @@ void NativeMapView::activate() {
return;
}
- mbgl::Log::Debug(mbgl::Event::Android, "NativeMapView::activate");
-
oldDisplay = eglGetCurrentDisplay();
oldReadSurface = eglGetCurrentSurface(EGL_READ);
oldDrawSurface = eglGetCurrentSurface(EGL_DRAW);
@@ -159,8 +157,6 @@ void NativeMapView::deactivate() {
return;
}
- mbgl::Log::Debug(mbgl::Event::Android, "NativeMapView::deactivate");
-
assert(vm != nullptr);
if (oldContext != context && oldContext != EGL_NO_CONTEXT) {
@@ -181,8 +177,6 @@ void NativeMapView::deactivate() {
}
void NativeMapView::invalidate() {
- mbgl::Log::Debug(mbgl::Event::Android, "NativeMapView::invalidate()");
-
assert(vm != nullptr);
assert(obj != nullptr);
@@ -678,8 +672,6 @@ EGLConfig NativeMapView::chooseConfig(const EGLConfig configs[], EGLint numConfi
}
void NativeMapView::notifyMapChange(mbgl::MapChange change) {
- mbgl::Log::Debug(mbgl::Event::Android, "NativeMapView::notifyMapChange()");
-
assert(vm != nullptr);
assert(obj != nullptr);
@@ -696,8 +688,6 @@ void NativeMapView::enableFps(bool enable) {
}
void NativeMapView::updateFps() {
- mbgl::Log::Debug(mbgl::Event::Android, "NativeMapView::updateFps()");
-
if (!fpsEnabled) {
return;
}