Enable FastPFOR encodings in MLT (#4146)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Bart Louwers <bart@emeel.net>
This commit is contained in:
@@ -47,5 +47,11 @@ bool NativeMapOptions::asyncRendererCleanup(jni::JNIEnv &env, const jni::Object<
|
||||
return obj.Get(env, asyncRendererCleanupField);
|
||||
}
|
||||
|
||||
bool NativeMapOptions::fastPFOREnabled(jni::JNIEnv &env, const jni::Object<NativeMapOptions> &obj) {
|
||||
auto &javaClass = jni::Class<NativeMapOptions>::Singleton(env);
|
||||
auto field = javaClass.GetField<jni::jboolean>(env, "fastPFOREnabled");
|
||||
return obj.Get(env, field);
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namespace mbgl
|
||||
|
||||
@@ -20,6 +20,7 @@ public:
|
||||
static float pixelRatio(jni::JNIEnv&, const jni::Object<NativeMapOptions>&);
|
||||
static bool crossSourceCollisions(jni::JNIEnv&, const jni::Object<NativeMapOptions>&);
|
||||
static bool asyncRendererCleanup(jni::JNIEnv&, const jni::Object<NativeMapOptions>&);
|
||||
static bool fastPFOREnabled(jni::JNIEnv&, const jni::Object<NativeMapOptions>&);
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
|
||||
@@ -87,7 +87,8 @@ NativeMapView::NativeMapView(jni::JNIEnv& _env,
|
||||
.withPixelRatio(pixelRatio)
|
||||
.withConstrainMode(ConstrainMode::HeightOnly)
|
||||
.withViewportMode(ViewportMode::Default)
|
||||
.withCrossSourceCollisions(NativeMapOptions::crossSourceCollisions(_env, jNativeMapOptions));
|
||||
.withCrossSourceCollisions(NativeMapOptions::crossSourceCollisions(_env, jNativeMapOptions))
|
||||
.withFastPFOREnabled(NativeMapOptions::fastPFOREnabled(_env, jNativeMapOptions));
|
||||
|
||||
// Create the core map
|
||||
map = std::make_unique<mbgl::Map>(
|
||||
|
||||
Reference in New Issue
Block a user