Support for WebGPU backend in Android SDK (#4097)

This commit is contained in:
Birk Skyum
2026-02-28 16:24:14 +01:00
committed by GitHub
parent 166593f0fb
commit 57a14cf110
15 changed files with 1242 additions and 11 deletions

View File

@@ -93,6 +93,25 @@ android {
}
}
}
create("webgpuDawn") {
dimension = "renderer"
externalNativeBuild {
cmake {
arguments("-DMLN_WITH_WEBGPU=ON", "-DMLN_WEBGPU_IMPL_DAWN=ON")
}
}
}
create("webgpuWgpu") {
dimension = "renderer"
ndk {
abiFilters += "arm64-v8a"
}
externalNativeBuild {
cmake {
arguments("-DMLN_WITH_WEBGPU=ON", "-DMLN_WEBGPU_IMPL_WGPU=ON")
}
}
}
}
buildFeatures {

View File

@@ -36,7 +36,7 @@ class HeatmapLayerActivity : AppCompatActivity() {
Style.Builder()
.fromUri(TestStyles.getPredefinedStyleWithFallback("Pastel"))
.withSource(createEarthquakeSource())
.withLayerAbove(createHeatmapLayer(), "country_label")
.withLayer(createHeatmapLayer())
.withLayerBelow(createCircleLayer(), HEATMAP_LAYER_ID)
)
} catch (exception: URISyntaxException) {