-
-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose RENDERMODE_CONTINUOUSLY and RENDERMODE_WHEN_DIRTY #2801
Conversation
@louwers CI is failing. Can you tell me what log I should look at to understand the failure? |
Hmm the logs should show up if you click through but
AWS Device Farm logs can also be found via this guide: https://github.com/maplibre/maplibre-native/wiki/AWS-Device-Farm-Logs Did you try running the (Android) C++ Unit Tests locally? They are in |
@louwers All tests are passing on my phone. The runner hangs at the end but this is true on main as well. It shows this log without returning (I have to manually kill the process):
|
583ace9
to
8b9a439
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do users know when the view is ready for this method to be called?
I don't really like this API. If I understand it correctly, it is OpenGL specific. Taking an int
(instead of some kind of enum class
) is acceptable for internal API but not so much for a public API. And if we want people to configure low level rendering, we should expose that on some low level object, otherwise the MapView will turn into a kitchen sink.
What do you think? Is there another way we can expose this?
8b9a439
to
42c92b2
Compare
@louwers You're right that exposing it as-is to client apps without a proper enum is wrong. I fixed this. It should work in both Vulkan and GL. It won't work for TextureView which seems to be a deprecated feature. |
42c92b2
to
724717e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding the enum.
I have one more request, we should add some test coverage. At the minimum just toggling the rendering refresh mode similar to: https://github.com/alexcristici/maplibre-native/blob/f74f4ff3cf3983a07cbd25391103d8f2950846d5/platform/android/MapLibreAndroidTestApp/src/androidTest/java/org/maplibre/android/maps/MapLibreMapTest.kt#L471-L481
724717e
to
b379f63
Compare
b379f63
to
5bba75f
Compare
To save power, MapLibre only renders the map scene when it becomes dirty (an Android event causes the map to change). This behavior is desired in production. However, when testing performance and particularly trying to automatically detect stuttering, it is better to use continuous rendering.
GLSurfaceView
already has the ability to switch betweenRENDERMODE_CONTINUOUSLY
andRENDERMODE_WHEN_DIRTY
. This PR simply exposes these options to MapLibre client apps.