Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Unify has surface state handling #14426

Merged
merged 1 commit into from
Apr 17, 2019
Merged

Unify has surface state handling #14426

merged 1 commit into from
Apr 17, 2019

Conversation

tobrun
Copy link
Member

@tobrun tobrun commented Apr 15, 2019

Closes #14422, Follow up from #14395. This PR unifies state management around having a render surface created. Instead of maintaining it in 2 places NativeMapView + MapRenderer. This PR moves it fully to MapRenderer instead. This solves the issue from #14422. Validated that both setups work correctly for quering with both TextureView as GLSurfaceView. Running tests on mutliple devices on firebase didn't show any issues.

image

@tobrun tobrun added the Android Mapbox Maps SDK for Android label Apr 15, 2019
@tobrun tobrun added this to the release-liquid milestone Apr 15, 2019
@tobrun tobrun requested a review from LukasPaczos April 15, 2019 10:06
@tobrun tobrun self-assigned this Apr 15, 2019
@tobrun tobrun changed the title [android] - unify has surface state handling Unify has surface state handling Apr 15, 2019
@tobrun tobrun force-pushed the tvn-unify-flag-handling branch from b5de6c3 to 6bdb31b Compare April 16, 2019 09:14
Copy link
Contributor

@LukasPaczos LukasPaczos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hasSurface should be switched to false after reaching MapRenderer#onSurfaceDestroyed.

@tobrun
Copy link
Member Author

tobrun commented Apr 16, 2019

Looked into this again and we can't unify setting the hasSurface flags for both renderers. They have a different lifespan. SurfaceHolder.Callback#onSurfaceCreated is called when an Activity is resumed but Renderer#onSurfaceCreated isn't. This would disable rendering when returning from the background.

@tobrun tobrun force-pushed the tvn-unify-flag-handling branch from 6bdb31b to dde289a Compare April 16, 2019 11:32
@tobrun tobrun added the beta blocker Blocks the next beta release label Apr 17, 2019
@tobrun tobrun force-pushed the tvn-unify-flag-handling branch from 82a2f2a to 367ac74 Compare April 17, 2019 08:22
@tobrun tobrun merged commit d89b13f into master Apr 17, 2019
@tobrun tobrun deleted the tvn-unify-flag-handling branch April 17, 2019 09:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android beta blocker Blocks the next beta release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(Android - MapBox 7.3.1) queryRenderedFeatures not working properly anymore
2 participants