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.
Due to the way Android works, when I switch apps this happens:
Android pauses my app
I call map::stop
I call map::terminate - to release GL objects
Android deletes the GL context
I switch back:
Android resumes my app
I recreate a new GL context
I call map::start
It should just pick up where it was, ie the map should not lose state (except for GL rendering related objects and state)
So it just redraws the tiles from memory (without needing to download them again)
But when I call map::stop it calls map::async_terminate which resets a bunch of stuff including the style etc.
So when I resume with map::start and in painter::render if finds style.layers is empty and does not render anything
Activity
ljbade commentedon Nov 8, 2014
The GL context seems to be destroyed and recreated OK.
It's getting far enough to fill the screen, but it isn't redrawing the tiles.
Does it need a redraw triggered?
Moving around does not fix it either.
ljbade commentedon Nov 8, 2014
Is it related to this?
EDIT: fixed this, but still have red screen
ljbade commentedon Nov 8, 2014
OK finally got into it with GDB.
It fails to render anything because there are no layers renderLayers()
See painter.cpp
It returns there.
ljbade commentedon Nov 8, 2014
Why is style.layers being reset?
ljbade commentedon Nov 8, 2014
Perhaps here after map::stop is called in NativeMapView: map.cpp
ljbade commentedon Nov 8, 2014
@kkaefer you might be able to help.
Due to the way Android works, when I switch apps this happens:
I switch back:
It should just pick up where it was, ie the map should not lose state (except for GL rendering related objects and state)
So it just redraws the tiles from memory (without needing to download them again)
But when I call map::stop it calls map::async_terminate which resets a bunch of stuff including the style etc.
So when I resume with map::start and in painter::render if finds style.layers is empty and does not render anything
ljbade commentedon Nov 8, 2014
Another error:
ljbade commentedon Nov 9, 2014
Fixed with new pause/resume 28d66bb
Still think about how to do it better in #578