Android benchmark frame time (#1958)
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:
@@ -60,7 +60,7 @@ class RemoveUnusedImagesTest : AppCenter() {
|
||||
mapView.addOnCanRemoveUnusedStyleImageListener {
|
||||
callbackLatch.countDown()
|
||||
maplibreMap.moveCamera(CameraUpdateFactory.newLatLngZoom(LatLng(0.0, 120.0), 8.0))
|
||||
mapView.addOnDidFinishRenderingFrameListener {
|
||||
mapView.addOnDidFinishRenderingFrameListener{ _, _, _ ->
|
||||
assertNotNull(maplibreMap.style!!.getImage("small"))
|
||||
assertNotNull(maplibreMap.style!!.getImage("large"))
|
||||
latch.countDown()
|
||||
@@ -89,7 +89,7 @@ class RemoveUnusedImagesTest : AppCenter() {
|
||||
maplibreMap.moveCamera(CameraUpdateFactory.newLatLngZoom(LatLng(0.0, 120.0), 8.0))
|
||||
|
||||
// Wait for the next frame and check that images were removed from the style.
|
||||
mapView.addOnDidFinishRenderingFrameListener {
|
||||
mapView.addOnDidFinishRenderingFrameListener { _, _, _ ->
|
||||
if (maplibreMap.style!!.getImage("small") == null && maplibreMap.style!!.getImage("large") == null) {
|
||||
latch.countDown()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user