feat: add weather-local render cadence
This commit is contained in:
@@ -1218,6 +1218,18 @@ jni::jboolean NativeMapView::setRasterParticleTrailColor(JNIEnv& env,
|
||||
return true;
|
||||
}
|
||||
|
||||
jni::jboolean NativeMapView::setRasterArraySourceTargetFps(JNIEnv& env,
|
||||
const jni::String& sourceId,
|
||||
const jni::jint targetFps) {
|
||||
auto* source = dynamic_cast<mbgl::style::RasterArraySource*>(map->getStyle().getSource(jni::Make<std::string>(env, sourceId)));
|
||||
return source && source->setRuntimeTargetFps(static_cast<uint8_t>(targetFps));
|
||||
}
|
||||
|
||||
jni::jint NativeMapView::getRasterArraySourceTargetFps(JNIEnv& env, const jni::String& sourceId) {
|
||||
auto* source = dynamic_cast<mbgl::style::RasterArraySource*>(map->getStyle().getSource(jni::Make<std::string>(env, sourceId)));
|
||||
return source ? source->runtimeTargetFps() : 0;
|
||||
}
|
||||
|
||||
jni::jboolean NativeMapView::setWeatherColorStops(JNIEnv& env,
|
||||
const jni::String& layerId,
|
||||
const jni::Array<jni::jfloat>& speeds,
|
||||
@@ -1721,6 +1733,8 @@ void NativeMapView::registerNative(jni::JNIEnv& env) {
|
||||
METHOD(&NativeMapView::setRasterParticleColors, "nativeSetRasterParticleColors"),
|
||||
METHOD(&NativeMapView::setRasterParticleColor, "nativeSetRasterParticleColor"),
|
||||
METHOD(&NativeMapView::setRasterParticleTrailColor, "nativeSetRasterParticleTrailColor"),
|
||||
METHOD(&NativeMapView::setRasterArraySourceTargetFps, "nativeSetRasterArraySourceTargetFps"),
|
||||
METHOD(&NativeMapView::getRasterArraySourceTargetFps, "nativeGetRasterArraySourceTargetFps"),
|
||||
METHOD(&NativeMapView::setWeatherColorStops, "nativeSetWeatherColorStops"),
|
||||
METHOD(&NativeMapView::getWeatherColorStopCapacity, "nativeGetWeatherColorStopCapacity"),
|
||||
METHOD(&NativeMapView::advanceRasterArraySourceFieldWindow, "nativeAdvanceRasterArraySourceFieldWindow"),
|
||||
|
||||
@@ -286,6 +286,8 @@ public:
|
||||
jni::jboolean setRasterParticleColors(JNIEnv&, const jni::String&, const jni::Array<jni::jfloat>&, const jni::Array<jni::jfloat>&);
|
||||
jni::jboolean setRasterParticleColor(JNIEnv&, const jni::String&, const jni::Array<jni::jfloat>&);
|
||||
jni::jboolean setRasterParticleTrailColor(JNIEnv&, const jni::String&, const jni::Array<jni::jfloat>&);
|
||||
jni::jboolean setRasterArraySourceTargetFps(JNIEnv&, const jni::String&, jni::jint);
|
||||
jni::jint getRasterArraySourceTargetFps(JNIEnv&, const jni::String&);
|
||||
jni::jboolean setWeatherColorStops(JNIEnv&, const jni::String&, const jni::Array<jni::jfloat>&, const jni::Array<jni::jfloat>&);
|
||||
jni::jint getWeatherColorStopCapacity(JNIEnv&);
|
||||
jni::jboolean advanceRasterArraySourceFieldWindow(JNIEnv&, const jni::String&);
|
||||
|
||||
Reference in New Issue
Block a user