Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Switch background snapshot to periodic. - #412

Merged
julianrex merged 2 commits into
masterfrom
jrex/remove-snapshot
Sep 3, 2020
Merged

julianrex merged 2 commits into
masterfrom
jrex/remove-snapshot

Conversation

@julianrex

@julianrex julianrex commented Sep 3, 2020 •

Copy link
Copy Markdown
Contributor

This PR fixes #44, by taking the background snapshot while the map is idle.

Calling snapshot in response to UIApplicationWillResignActiveNotification appears to be no longer supported in OpenGL (see the same issue reported to the Flutter repo).

Another option is to completely remove snapshot handling, but without this we do see a momentary flash when coming into the foreground.

Since this PR periodically takes the snapshot, we now cross-fade from the snapshot view to the map view, to avoid a jarring transition, for example:

RPReplay_Final1599230029

@julianrex
julianrex force-pushed the jrex/remove-snapshot branch from 5d6c542 to c6dd79f Compare September 3, 2020 03:27
@julianrex
julianrex changed the base branch from master to jrex/update-render-calls September 3, 2020 03:30
@julianrex
julianrex marked this pull request as ready for review September 3, 2020 20:25
@julianrex
julianrex requested a review from a team September 3, 2020 20:25
@julianrex julianrex added this to the release-z (xcode12-ios14) milestone Sep 3, 2020
@julianrex julianrex changed the title remove snapshot Switch background snapshot to periodic. Sep 3, 2020
Base automatically changed from jrex/update-render-calls to master September 3, 2020 20:54
@julianrex
julianrex requested a review from 1ec5 as a code owner September 3, 2020 20:54
@julianrex
julianrex force-pushed the jrex/remove-snapshot branch from c6dd79f to 3764c04 Compare September 3, 2020 21:21
@julianrex
julianrex requested review from fabian-guerra and removed request for a team and 1ec5 September 3, 2020 21:35
@julianrex
julianrex merged commit 31f69d7 into master Sep 3, 2020
@julianrex
julianrex deleted the jrex/remove-snapshot branch September 3, 2020 21:39
katydecorah pushed a commit that referenced this pull request Sep 4, 2020
* master:
  Release 6.2.0 beta.1 prep (#417)
  Update for Xcode 12 release (#415)
  Switch background snapshot to periodic. (#412)
  Fix map stuttering by switching render call to use setNeedsDisplay (#411)
  Add a flag to enforce using catched tiles (#416)
  Improve header documentation for MGLObservable (#398)
  Expose styling options for the user location annotation. (#403)
mappy-mobile pushed a commit to Mappy/mapbox-gl-native-ios that referenced this pull request Sep 17, 2020
emerson233 pushed a commit to emerson233/mapbox-gl-native-ios that referenced this pull request Jul 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

2 participants