You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Did some logging and found the delay between map and the GPS marker.
TextureView has a 1 frame lag between a a render and when it appears on screen.
Only way I can see to fix this would be to capture the calculated positions of the GPS marker at render time, save it, them update the view at onSurfaceTextureUpdated
I wonder if it's possible to capture the GPS marker, or render it into a offscreen buffer then overlay it in GL.
This is the approach I tried in #1125 (comment). It's a proven concept and needs development time, which will probably be easier on iOS.
How much lag does iOS now have with the GPS marker?
None, nor has it had any in any release. We solved this problem. The trick is updating the GPS marker position using the geo-to-pixel conversion routines with the same iteration of TransformState as the GL frame was drawn. Has to be exact.
I tried pinpointing some stuff using the improved GPU profiler on Marshmallow. I wanted to showcase this tool because I think we should really been using this.
Legenda:
In upcoming screenshots you will see bars. A bar represents the frame time, the horizontal green line represents the magic 16ms border. A frame going above this border will be dropped and the user will notice a stutter. A bar consist out of multiple colors, image below explains the different colors:
Panning
This feels responsive and the profiler shows the same:
Double tap zoom
This feels responsive and the profiler shows the same:
Loading new tile
Occasionally you see spikes for Swapping Buffers.
Pinch zoom on higher zoomlevel
It rarely drops a frame (multiple zoom actions recorded)
Pinch zoom on lower zoomlevel
It drops frames more often (multiple zoom actions recorded)
Pinch zooming slowly for some time
When zooming slowly, I noticed stuttering in the ui, the profiler shows the same.
Rotate slowly on same zoom level
When rotating slowly, I noticed stuttering in the ui, the profiler shows the same.
Activity
ljbade commentedon Sep 24, 2015
Did some logging and found the delay between map and the GPS marker.
TextureView has a 1 frame lag between a a render and when it appears on screen.
Only way I can see to fix this would be to capture the calculated positions of the GPS marker at render time, save it, them update the view at
onSurfaceTextureUpdatedGoing to try this.
ljbade commentedon Sep 24, 2015
Didn't seem to make a difference.
I wonder if it's possible to capture the GPS marker, or render it into a offscreen buffer then overlay it in GL.
@incanus How much lag does iOS now have with the GPS marker?
incanus commentedon Sep 24, 2015
This is the approach I tried in #1125 (comment). It's a proven concept and needs development time, which will probably be easier on iOS.
None, nor has it had any in any release. We solved this problem. The trick is updating the GPS marker position using the geo-to-pixel conversion routines with the same iteration of
TransformStateas the GL frame was drawn. Has to be exact.tobrun commentedon Sep 27, 2015
I tried pinpointing some stuff using the improved GPU profiler on Marshmallow. I wanted to showcase this tool because I think we should really been using this.
Legenda:
In upcoming screenshots you will see bars. A bar represents the frame time, the horizontal green line represents the magic 16ms border. A frame going above this border will be dropped and the user will notice a stutter. A bar consist out of multiple colors, image below explains the different colors:
Panning
This feels responsive and the profiler shows the same:
Double tap zoom
This feels responsive and the profiler shows the same:
Loading new tile
Occasionally you see spikes for Swapping Buffers.
Pinch zoom on higher zoomlevel
It rarely drops a frame (multiple zoom actions recorded)
Pinch zoom on lower zoomlevel
It drops frames more often (multiple zoom actions recorded)
Pinch zooming slowly for some time
When zooming slowly, I noticed stuttering in the ui, the profiler shows the same.
Rotate slowly on same zoom level
When rotating slowly, I noticed stuttering in the ui, the profiler shows the same.
ljbade commentedon Sep 28, 2015
Nice work @tobrun that matches the observations I had made.
Sounds like we need to look at optimising higher zoom levels.
@kkaefer Do you have any thoughts on what we could improve?
ljbade commentedon Sep 28, 2015
@tobrun Do you know much about the GPU tools built into Android Studio? I recall 1.3 or 1.4 improved these.
tobrun commentedon Sep 28, 2015
It is actually the same thing as in the screenshot, only visualised in the IDE.
You can enable it by:
Settings > Developer options > Profile GPU rendering:
Normally you should see it visualise in the IDE under:
Android Monitor > CPU | GPU tab > GPU tab
I initally wanted to try out this feature but couldn't get it to work.
I used the other option in Profile GPU rendering instead.
ljbade commentedon Sep 29, 2015
I tested this today. You can very easily see when we get the hitches. Now we need to work out what is causing them.
3 remaining items
[android] Render at 60fps
[android] Render at 60fps
[android] Sync GPS marker
[android] Sync GPS marker
[android] Implement UserLocationView
[android] Implement UserLocationView